]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge tag 'renesas-dt2-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Wed, 30 Nov 2016 15:44:12 +0000 (16:44 +0100)
committerArnd Bergmann <arnd@arndb.de>
Wed, 30 Nov 2016 15:44:12 +0000 (16:44 +0100)
Pull "Second Round of Renesas ARM Based SoC DT Updates for v4.10" from Simon Horman:

Enhancements:
* Add device nodes for PRR
* Add r8a7745 SoC and sk-rzg1e board
* Add r8a7743 SoC and sk-rzg1m board
* Enable SDR-104 and I2C demuxer on alt, koelsch and lager boards

Corrections:
* Use SYSC "always-on" PM Domain for sound on r8a7794 SoC
* Correct hsusb parent clock on r8a7794 SoC
* Correct PFC names for DU on alt board

* tag 'renesas-dt2-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (33 commits)
  ARM: dts: r8a7794: Add device node for PRR
  ARM: dts: r8a7793: Add device node for PRR
  ARM: dts: r8a7792: Add device node for PRR
  ARM: dts: r8a7791: Add device node for PRR
  ARM: dts: r8a7790: Add device node for PRR
  ARM: dts: r8a7779: Add device node for PRR
  ARM: dts: r8a73a4: Add device node for PRR
  ARM: dts: sk-rzg1e: add Ether support
  ARM: dts: sk-rzg1e: initial device tree
  ARM: dts: r8a7745: add IRQC support
  ARM: dts: r8a7745: add Ether support
  ARM: dts: r8a7745: add [H]SCIF{|A|B} support
  ARM: dts: r8a7745: add SYS-DMAC support
  ARM: dts: r8a7745: initial SoC device tree
  ARM: dts: sk-rzg1m: add Ether support
  ARM: dts: sk-rzg1m: initial device tree
  ARM: dts: r8a7743: add IRQC support
  ARM: dts: r8a7743: add Ether support
  ARM: dts: r8a7743: add [H]SCIF{A|B} support
  ARM: dts: r8a7743: add SYS-DMAC support
  ...

887 files changed:
CREDITS
Documentation/ABI/testing/sysfs-class-cxl
Documentation/device-mapper/dm-raid.txt
Documentation/devicetree/bindings/arm/cpus.txt
Documentation/devicetree/bindings/arm/oxnas.txt
Documentation/devicetree/bindings/arm/qcom.txt
Documentation/devicetree/bindings/arm/rockchip.txt
Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
Documentation/devicetree/bindings/arm/swir.txt [new file with mode: 0644]
Documentation/devicetree/bindings/ata/ahci-st.txt
Documentation/devicetree/bindings/clock/uniphier-clock.txt
Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
Documentation/devicetree/bindings/ipmi/aspeed,ast2400-bt-bmc.txt [new file with mode: 0644]
Documentation/devicetree/bindings/ipmi/ipmi-smic.txt [moved from Documentation/devicetree/bindings/ipmi.txt with 100% similarity]
Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
Documentation/devicetree/bindings/reset/st,sti-softreset.txt
Documentation/devicetree/bindings/reset/uniphier-reset.txt
Documentation/devicetree/bindings/serial/cdns,uart.txt
Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
Documentation/devicetree/bindings/thermal/st-thermal.txt
Documentation/devicetree/bindings/timer/jcore,pit.txt [new file with mode: 0644]
Documentation/devicetree/bindings/usb/atmel-usb.txt
Documentation/devicetree/bindings/usb/dwc2.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
Documentation/filesystems/proc.txt
Documentation/gpio/board.txt
MAINTAINERS
Makefile
arch/alpha/kernel/ptrace.c
arch/arc/Kconfig
arch/arc/Makefile
arch/arc/boot/Makefile
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/cache.h
arch/arc/include/asm/elf.h
arch/arc/include/asm/mcip.h
arch/arc/include/asm/module.h
arch/arc/include/asm/setup.h
arch/arc/include/asm/syscalls.h
arch/arc/include/uapi/asm/unistd.h
arch/arc/kernel/mcip.c
arch/arc/kernel/module.c
arch/arc/kernel/process.c
arch/arc/kernel/setup.c
arch/arc/kernel/troubleshoot.c
arch/arc/mm/cache.c
arch/arc/mm/dma.c
arch/arc/mm/tlb.c
arch/arc/mm/tlbex.S
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/am335x-baltos-ir5221.dts
arch/arm/boot/dts/am335x-baltos.dtsi
arch/arm/boot/dts/am335x-bone-common.dtsi
arch/arm/boot/dts/am335x-evm.dts
arch/arm/boot/dts/am335x-evmsk.dts
arch/arm/boot/dts/am33xx.dtsi
arch/arm/boot/dts/am3517.dtsi
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/armada-370-db.dts
arch/arm/boot/dts/armada-370-dlink-dns327l.dts
arch/arm/boot/dts/armada-370-mirabox.dts
arch/arm/boot/dts/armada-370-netgear-rn102.dts
arch/arm/boot/dts/armada-370-netgear-rn104.dts
arch/arm/boot/dts/armada-370-rd.dts
arch/arm/boot/dts/armada-370-seagate-nas-4bay.dts
arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
arch/arm/boot/dts/armada-370-seagate-personal-cloud.dtsi
arch/arm/boot/dts/armada-370-synology-ds213j.dts
arch/arm/boot/dts/armada-370-xp.dtsi
arch/arm/boot/dts/armada-370.dtsi
arch/arm/boot/dts/armada-375-db.dts
arch/arm/boot/dts/armada-375.dtsi
arch/arm/boot/dts/armada-38x.dtsi
arch/arm/boot/dts/armada-39x.dtsi
arch/arm/boot/dts/armada-xp-axpwifiap.dts
arch/arm/boot/dts/armada-xp-db.dts
arch/arm/boot/dts/armada-xp-gp.dts
arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
arch/arm/boot/dts/armada-xp-linksys-mamba.dts
arch/arm/boot/dts/armada-xp-matrix.dts
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-netgear-rn2120.dts
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
arch/arm/boot/dts/armada-xp-synology-ds414.dts
arch/arm/boot/dts/armada-xp.dtsi
arch/arm/boot/dts/artpec6-devboard.dts
arch/arm/boot/dts/artpec6.dtsi
arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts
arch/arm/boot/dts/at91rm9200.dtsi
arch/arm/boot/dts/at91sam9260.dtsi
arch/arm/boot/dts/at91sam9260ek.dts
arch/arm/boot/dts/at91sam9261.dtsi
arch/arm/boot/dts/at91sam9263.dtsi
arch/arm/boot/dts/at91sam9g45.dtsi
arch/arm/boot/dts/at91sam9n12.dtsi
arch/arm/boot/dts/at91sam9rl.dtsi
arch/arm/boot/dts/at91sam9x5.dtsi
arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts [new file with mode: 0644]
arch/arm/boot/dts/da850-lcdk.dts
arch/arm/boot/dts/da850.dtsi
arch/arm/boot/dts/dm814x.dtsi
arch/arm/boot/dts/dm816x.dtsi
arch/arm/boot/dts/dra7.dtsi
arch/arm/boot/dts/dra71-evm.dts [new file with mode: 0644]
arch/arm/boot/dts/dra72-evm-common.dtsi
arch/arm/boot/dts/dra72-evm-revc.dts
arch/arm/boot/dts/dra72-evm-tps65917.dtsi [new file with mode: 0644]
arch/arm/boot/dts/dra72-evm.dts
arch/arm/boot/dts/exynos3250-pinctrl.dtsi
arch/arm/boot/dts/exynos3250.dtsi
arch/arm/boot/dts/exynos4.dtsi
arch/arm/boot/dts/exynos4210-pinctrl.dtsi
arch/arm/boot/dts/exynos4210.dtsi
arch/arm/boot/dts/exynos4412-itop-elite.dts [new file with mode: 0644]
arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi [new file with mode: 0644]
arch/arm/boot/dts/exynos4415-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/exynos4415.dtsi [deleted file]
arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
arch/arm/boot/dts/exynos4x12.dtsi
arch/arm/boot/dts/exynos5.dtsi
arch/arm/boot/dts/exynos5250-snow-common.dtsi
arch/arm/boot/dts/exynos5250.dtsi
arch/arm/boot/dts/exynos5260.dtsi
arch/arm/boot/dts/exynos5410-odroidxu.dts
arch/arm/boot/dts/exynos5410-pinctrl.dtsi
arch/arm/boot/dts/exynos5410.dtsi
arch/arm/boot/dts/exynos5420-peach-pit.dts
arch/arm/boot/dts/exynos5420.dtsi
arch/arm/boot/dts/exynos5440.dtsi
arch/arm/boot/dts/exynos54xx.dtsi
arch/arm/boot/dts/exynos5800-peach-pi.dts
arch/arm/boot/dts/hi3620.dtsi
arch/arm/boot/dts/hip01.dtsi
arch/arm/boot/dts/hisi-x5hd2.dtsi
arch/arm/boot/dts/imx1.dtsi
arch/arm/boot/dts/imx23.dtsi
arch/arm/boot/dts/imx25.dtsi
arch/arm/boot/dts/imx27.dtsi
arch/arm/boot/dts/imx28-m28.dtsi
arch/arm/boot/dts/imx28-m28evk.dts
arch/arm/boot/dts/imx28.dtsi
arch/arm/boot/dts/imx31.dtsi
arch/arm/boot/dts/imx35.dtsi
arch/arm/boot/dts/imx50.dtsi
arch/arm/boot/dts/imx51.dtsi
arch/arm/boot/dts/imx53-m53.dtsi
arch/arm/boot/dts/imx53-m53evk.dts
arch/arm/boot/dts/imx53.dtsi
arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-icore.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-riotboard.dts
arch/arm/boot/dts/imx6dl-tx6dl-comtft.dts
arch/arm/boot/dts/imx6dl-tx6u-801x.dts
arch/arm/boot/dts/imx6q-apalis-ixora.dts
arch/arm/boot/dts/imx6q-b650v3.dts
arch/arm/boot/dts/imx6q-evi.dts
arch/arm/boot/dts/imx6q-icore.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-nitrogen6_som2.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-novena.dts
arch/arm/boot/dts/imx6q-phytec-pbab01.dts
arch/arm/boot/dts/imx6q-tx6q-1010-comtft.dts
arch/arm/boot/dts/imx6q-tx6q-1010.dts
arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts
arch/arm/boot/dts/imx6q-tx6q-1020.dts
arch/arm/boot/dts/imx6q-utilite-pro.dts
arch/arm/boot/dts/imx6qdl-apalis.dtsi
arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
arch/arm/boot/dts/imx6qdl-colibri.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
arch/arm/boot/dts/imx6qdl-gw552x.dtsi
arch/arm/boot/dts/imx6qdl-icore.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
arch/arm/boot/dts/imx6qdl-sabresd.dtsi
arch/arm/boot/dts/imx6qdl-tx6.dtsi
arch/arm/boot/dts/imx6qdl-wandboard-revb1.dtsi
arch/arm/boot/dts/imx6qdl-wandboard.dtsi
arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6qp.dtsi
arch/arm/boot/dts/imx6sl.dtsi
arch/arm/boot/dts/imx6sx-sdb.dtsi
arch/arm/boot/dts/imx6sx-udoo-neo-basic.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6sx-udoo-neo-full.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6sx-udoo-neo.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6sx.dtsi
arch/arm/boot/dts/imx6ul-14x14-evk.dts
arch/arm/boot/dts/imx6ul-liteboard.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6ul-litesom.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6ul.dtsi
arch/arm/boot/dts/imx6ull-14x14-evk.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6ull-pinfunc.h [new file with mode: 0644]
arch/arm/boot/dts/imx6ull.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx7s.dtsi
arch/arm/boot/dts/integratorap.dts
arch/arm/boot/dts/integratorcp.dts
arch/arm/boot/dts/keystone-k2g.dtsi
arch/arm/boot/dts/keystone-k2l.dtsi
arch/arm/boot/dts/kirkwood-topkick.dts
arch/arm/boot/dts/lpc32xx.dtsi
arch/arm/boot/dts/ls1021a.dtsi
arch/arm/boot/dts/mps2-an385.dts
arch/arm/boot/dts/mps2-an399.dts
arch/arm/boot/dts/mps2.dtsi
arch/arm/boot/dts/mt2701.dtsi
arch/arm/boot/dts/omap2420.dtsi
arch/arm/boot/dts/omap2430.dtsi
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/omap34xx.dtsi
arch/arm/boot/dts/omap36xx.dtsi
arch/arm/boot/dts/omap4-droid4-xt894.dts [new file with mode: 0644]
arch/arm/boot/dts/omap4.dtsi
arch/arm/boot/dts/omap5-uevm.dts
arch/arm/boot/dts/omap5.dtsi
arch/arm/boot/dts/orion5x-lschl.dts [new file with mode: 0644]
arch/arm/boot/dts/ox820.dtsi [new file with mode: 0644]
arch/arm/boot/dts/pxa25x.dtsi [new file with mode: 0644]
arch/arm/boot/dts/pxa27x.dtsi
arch/arm/boot/dts/pxa2xx.dtsi
arch/arm/boot/dts/pxa3xx.dtsi
arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
arch/arm/boot/dts/qcom-apq8064.dtsi
arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts [new file with mode: 0644]
arch/arm/boot/dts/qcom-mdm9615-wp8548.dtsi [new file with mode: 0644]
arch/arm/boot/dts/qcom-mdm9615.dtsi [new file with mode: 0644]
arch/arm/boot/dts/qcom-msm8660.dtsi
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
arch/arm/boot/dts/rk3036-evb.dts
arch/arm/boot/dts/rk3036-kylin.dts
arch/arm/boot/dts/rk3036.dtsi
arch/arm/boot/dts/rk3066a-bqcurie2.dts
arch/arm/boot/dts/rk3066a-marsboard.dts
arch/arm/boot/dts/rk3066a-mk808.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3066a-rayeager.dts
arch/arm/boot/dts/rk3066a.dtsi
arch/arm/boot/dts/rk3188-px3-evb.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3188-radxarock.dts
arch/arm/boot/dts/rk3188.dtsi
arch/arm/boot/dts/rk3228-evb.dts
arch/arm/boot/dts/rk3229-evb.dts
arch/arm/boot/dts/rk322x.dtsi
arch/arm/boot/dts/rk3288-evb.dtsi
arch/arm/boot/dts/rk3288-fennec.dts
arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi
arch/arm/boot/dts/rk3288-firefly.dtsi
arch/arm/boot/dts/rk3288-miqi.dts
arch/arm/boot/dts/rk3288-popmetal.dts
arch/arm/boot/dts/rk3288-r89.dts
arch/arm/boot/dts/rk3288-rock2-som.dtsi
arch/arm/boot/dts/rk3288-veyron.dtsi
arch/arm/boot/dts/rk3288.dtsi
arch/arm/boot/dts/rk3xxx.dtsi
arch/arm/boot/dts/sama5d2.dtsi
arch/arm/boot/dts/sama5d3.dtsi
arch/arm/boot/dts/sama5d4.dtsi
arch/arm/boot/dts/socfpga.dtsi
arch/arm/boot/dts/socfpga_arria10.dtsi
arch/arm/boot/dts/socfpga_arria10_socdk.dtsi
arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts [new file with mode: 0644]
arch/arm/boot/dts/socfpga_arria5_socdk.dts
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
arch/arm/boot/dts/socfpga_cyclone5_mcv.dtsi
arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
arch/arm/boot/dts/socfpga_cyclone5_sodia.dts [new file with mode: 0644]
arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts
arch/arm/boot/dts/ste-snowball.dts
arch/arm/boot/dts/stih407-clock.dtsi
arch/arm/boot/dts/stih407-family.dtsi
arch/arm/boot/dts/stih407-pinctrl.dtsi
arch/arm/boot/dts/stih407.dtsi
arch/arm/boot/dts/stih410-b2260.dts
arch/arm/boot/dts/stih410-clock.dtsi
arch/arm/boot/dts/stih410.dtsi
arch/arm/boot/dts/stih415-b2000.dts [deleted file]
arch/arm/boot/dts/stih415-b2020.dts [deleted file]
arch/arm/boot/dts/stih415-clock.dtsi [deleted file]
arch/arm/boot/dts/stih415-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/stih415.dtsi [deleted file]
arch/arm/boot/dts/stih416-b2000.dts [deleted file]
arch/arm/boot/dts/stih416-b2020.dts [deleted file]
arch/arm/boot/dts/stih416-b2020e.dts [deleted file]
arch/arm/boot/dts/stih416-clock.dtsi [deleted file]
arch/arm/boot/dts/stih416-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/stih416.dtsi [deleted file]
arch/arm/boot/dts/stih41x-b2000.dtsi [deleted file]
arch/arm/boot/dts/stih41x-b2020.dtsi [deleted file]
arch/arm/boot/dts/stih41x-b2020x.dtsi [deleted file]
arch/arm/boot/dts/stih41x.dtsi [deleted file]
arch/arm/boot/dts/stihxxx-b2120.dtsi
arch/arm/boot/dts/stm32429i-eval.dts
arch/arm/boot/dts/stm32746g-eval.dts [new file with mode: 0644]
arch/arm/boot/dts/stm32f429-disco.dts
arch/arm/boot/dts/stm32f429.dtsi
arch/arm/boot/dts/stm32f469-disco.dts
arch/arm/boot/dts/stm32f746.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sun4i-a10.dtsi
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
arch/arm/boot/dts/sun5i-a10s.dtsi
arch/arm/boot/dts/sun5i-a13-olinuxino.dts
arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
arch/arm/boot/dts/sun5i-gr8-chip-pro.dts [new file with mode: 0644]
arch/arm/boot/dts/sun5i-gr8-evb.dts [moved from arch/arm/boot/dts/ntc-gr8-evb.dts with 92% similarity]
arch/arm/boot/dts/sun5i-gr8.dtsi [moved from arch/arm/boot/dts/ntc-gr8.dtsi with 95% similarity]
arch/arm/boot/dts/sun5i-r8-chip.dts
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
arch/arm/boot/dts/sun5i.dtsi
arch/arm/boot/dts/sun6i-a31-hummingbird.dts
arch/arm/boot/dts/sun6i-a31.dtsi
arch/arm/boot/dts/sun6i-a31s-sina31s.dts
arch/arm/boot/dts/sun6i-a31s.dtsi
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
arch/arm/boot/dts/sun7i-a20.dtsi
arch/arm/boot/dts/sun8i-a23-a33.dtsi
arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts
arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
arch/arm/boot/dts/sun8i-h3-nanopi.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3.dtsi
arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
arch/arm/boot/dts/sun9i-a80-optimus.dts
arch/arm/boot/dts/sun9i-a80.dtsi
arch/arm/boot/dts/tegra124-apalis.dtsi
arch/arm/boot/dts/tegra124-nyan.dtsi
arch/arm/boot/dts/tegra20.dtsi
arch/arm/boot/dts/tegra30-apalis.dtsi
arch/arm/boot/dts/tegra30-colibri.dtsi
arch/arm/boot/dts/tegra30.dtsi
arch/arm/boot/dts/tps65217.dtsi
arch/arm/boot/dts/uniphier-common32.dtsi [deleted file]
arch/arm/boot/dts/uniphier-ld4.dtsi
arch/arm/boot/dts/uniphier-pro4.dtsi
arch/arm/boot/dts/uniphier-pro5.dtsi
arch/arm/boot/dts/uniphier-pxs2.dtsi
arch/arm/boot/dts/uniphier-sld3.dtsi
arch/arm/boot/dts/uniphier-sld8.dtsi
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
arch/arm/boot/dts/vf-colibri.dtsi
arch/arm/boot/dts/vf500.dtsi
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
arch/arm/boot/dts/vfxxx.dtsi
arch/arm/configs/multi_v7_defconfig
arch/arm/kvm/arm.c
arch/arm/mach-imx/gpc.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-mvebu/Kconfig
arch/arm/mach-uniphier/Kconfig
arch/arm64/Kconfig
arch/arm64/Kconfig.platforms
arch/arm64/Makefile
arch/arm64/boot/dts/broadcom/ns2-svk.dts
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
arch/arm64/boot/dts/hisilicon/hi6220.dtsi
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
arch/arm64/boot/dts/mediatek/mt8173.dtsi
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/exec.h
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/memory.h
arch/arm64/include/asm/module.h
arch/arm64/include/asm/percpu.h
arch/arm64/include/asm/processor.h
arch/arm64/include/asm/sysreg.h
arch/arm64/include/asm/uaccess.h
arch/arm64/kernel/armv8_deprecated.c
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/head.S
arch/arm64/kernel/process.c
arch/arm64/kernel/sleep.S
arch/arm64/kernel/smp.c
arch/arm64/kernel/suspend.c
arch/arm64/kernel/traps.c
arch/arm64/mm/fault.c
arch/arm64/mm/init.c
arch/arm64/mm/numa.c
arch/blackfin/kernel/ptrace.c
arch/cris/arch-v32/drivers/cryptocop.c
arch/cris/arch-v32/kernel/ptrace.c
arch/h8300/include/asm/thread_info.h
arch/h8300/kernel/signal.c
arch/ia64/kernel/err_inject.c
arch/ia64/kernel/ptrace.c
arch/m32r/kernel/ptrace.c
arch/mips/kernel/ptrace32.c
arch/mips/kvm/mips.c
arch/mips/mm/gup.c
arch/powerpc/boot/main.c
arch/powerpc/include/asm/cpuidle.h
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/tlb.h
arch/powerpc/include/asm/unistd.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/hw_breakpoint.c
arch/powerpc/kernel/idle_book3s.S
arch/powerpc/kernel/process.c
arch/powerpc/kernel/ptrace32.c
arch/powerpc/kvm/book3s_hv_rm_xics.c
arch/powerpc/mm/copro_fault.c
arch/powerpc/mm/numa.c
arch/powerpc/mm/tlb-radix.c
arch/s390/include/asm/ftrace.h
arch/s390/include/asm/processor.h
arch/s390/include/asm/unistd.h
arch/s390/kernel/dis.c
arch/s390/kernel/dumpstack.c
arch/s390/kernel/perf_event.c
arch/s390/kernel/stacktrace.c
arch/s390/kvm/intercept.c
arch/s390/mm/gup.c
arch/s390/mm/hugetlbpage.c
arch/s390/mm/init.c
arch/s390/oprofile/init.c
arch/score/kernel/ptrace.c
arch/sh/Makefile
arch/sh/boards/Kconfig
arch/sh/configs/j2_defconfig
arch/sh/mm/gup.c
arch/sparc/kernel/ptrace_64.c
arch/sparc/mm/gup.c
arch/x86/entry/Makefile
arch/x86/entry/syscalls/syscall_32.tbl
arch/x86/entry/syscalls/syscall_64.tbl
arch/x86/events/intel/core.c
arch/x86/events/intel/cstate.c
arch/x86/events/intel/lbr.c
arch/x86/events/intel/rapl.c
arch/x86/events/intel/uncore.c
arch/x86/include/asm/cpufeatures.h
arch/x86/include/asm/intel-family.h
arch/x86/include/asm/io.h
arch/x86/include/asm/msr-index.h
arch/x86/include/asm/rwsem.h
arch/x86/include/asm/thread_info.h
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/cpu/microcode/amd.c
arch/x86/kernel/cpu/scattered.c
arch/x86/kernel/cpu/vmware.c
arch/x86/kernel/e820.c
arch/x86/kernel/fpu/xstate.c
arch/x86/kernel/kprobes/core.c
arch/x86/kernel/mcount_64.S
arch/x86/kernel/quirks.c
arch/x86/kernel/setup.c
arch/x86/kernel/signal_compat.c
arch/x86/kernel/smp.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/step.c
arch/x86/kernel/unwind_guess.c
arch/x86/kvm/ioapic.c
arch/x86/kvm/x86.c
arch/x86/mm/gup.c
arch/x86/mm/kaslr.c
arch/x86/mm/mpx.c
arch/x86/mm/pat.c
arch/x86/platform/uv/bios_uv.c
arch/x86/um/ptrace_32.c
arch/x86/um/ptrace_64.c
arch/x86/xen/enlighten.c
block/badblocks.c
block/blk-flush.c
block/blk-mq.c
drivers/Makefile
drivers/acpi/acpica/dsinit.c
drivers/acpi/acpica/dsmethod.c
drivers/acpi/acpica/dswload2.c
drivers/acpi/acpica/evrgnini.c
drivers/acpi/acpica/nsload.c
drivers/acpi/apei/ghes.c
drivers/acpi/pci_link.c
drivers/android/binder.c
drivers/ata/ahci.c
drivers/base/Kconfig
drivers/block/DAC960.c
drivers/block/nbd.c
drivers/block/rbd.c
drivers/bus/Kconfig
drivers/char/hw_random/core.c
drivers/char/ipmi/Kconfig
drivers/char/ipmi/Makefile
drivers/char/ipmi/bt-bmc.c [new file with mode: 0644]
drivers/char/ipmi/ipmi_msghandler.c
drivers/clk/at91/clk-programmable.c
drivers/clk/bcm/clk-bcm2835.c
drivers/clk/clk-max77686.c
drivers/clk/hisilicon/clk-hi6220.c
drivers/clk/mediatek/Kconfig
drivers/clk/mvebu/armada-37xx-periph.c
drivers/clk/samsung/clk-exynos-audss.c
drivers/clk/uniphier/clk-uniphier-core.c
drivers/clk/uniphier/clk-uniphier-mio.c
drivers/clk/uniphier/clk-uniphier-mux.c
drivers/clk/uniphier/clk-uniphier.h
drivers/clocksource/Kconfig
drivers/clocksource/Makefile
drivers/clocksource/jcore-pit.c [new file with mode: 0644]
drivers/clocksource/timer-sun5i.c
drivers/cpufreq/intel_pstate.c
drivers/dax/Kconfig
drivers/dax/pmem.c
drivers/extcon/extcon-qcom-spmi-misc.c
drivers/firewire/nosy.c
drivers/firmware/efi/libstub/Makefile
drivers/gpio/Kconfig
drivers/gpio/gpio-ath79.c
drivers/gpio/gpio-mpc8xxx.c
drivers/gpio/gpio-mxs.c
drivers/gpio/gpio-stmpe.c
drivers/gpio/gpio-ts4800.c
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib.c
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/cz_dpm.c
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
drivers/gpu/drm/amd/amdgpu/si_dpm.c
drivers/gpu/drm/amd/amdgpu/tonga_ih.c
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
drivers/gpu/drm/amd/include/amd_shared.h
drivers/gpu/drm/amd/powerplay/eventmgr/eventactionchains.c
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c
drivers/gpu/drm/armada/armada_crtc.c
drivers/gpu/drm/ast/ast_ttm.c
drivers/gpu/drm/cirrus/cirrus_ttm.c
drivers/gpu/drm/drm_info.c
drivers/gpu/drm/etnaviv/etnaviv_buffer.c
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/gpu/drm/etnaviv/etnaviv_mmu.c
drivers/gpu/drm/exynos/exynos_drm_g2d.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
drivers/gpu/drm/i915/i915_gem_userptr.c
drivers/gpu/drm/mgag200/mgag200_ttm.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/gpu/drm/radeon/r600_dpm.c
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_display.c
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/radeon/radeon_i2c.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/radeon_ttm.c
drivers/gpu/drm/radeon/si.c
drivers/gpu/drm/radeon/sid.h
drivers/gpu/drm/via/via_dmablit.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
drivers/hid/hid-dr.c
drivers/hid/hid-ids.h
drivers/hid/hid-led.c
drivers/hid/usbhid/hid-quirks.c
drivers/hv/hv_util.c
drivers/hwmon/adm9240.c
drivers/hwmon/max31790.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-designware-core.c
drivers/i2c/busses/i2c-digicolor.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-imx.c
drivers/i2c/busses/i2c-jz4780.c
drivers/i2c/busses/i2c-rk3x.c
drivers/i2c/busses/i2c-xgene-slimpro.c
drivers/i2c/busses/i2c-xlp9xx.c
drivers/i2c/busses/i2c-xlr.c
drivers/i2c/i2c-core.c
drivers/iio/adc/Kconfig
drivers/iio/chemical/atlas-ph-sensor.c
drivers/iio/temperature/maxim_thermocouple.c
drivers/infiniband/core/umem.c
drivers/infiniband/core/umem_odp.c
drivers/infiniband/hw/mthca/mthca_memfree.c
drivers/infiniband/hw/qib/qib_user_pages.c
drivers/infiniband/hw/usnic/usnic_uiom.c
drivers/ipack/ipack.c
drivers/irqchip/Kconfig
drivers/irqchip/irq-eznps.c
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-gic.c
drivers/irqchip/irq-jcore-aic.c
drivers/md/dm-raid.c
drivers/md/dm-raid1.c
drivers/md/dm-rq.c
drivers/md/dm-table.c
drivers/md/dm.c
drivers/media/pci/ivtv/ivtv-udma.c
drivers/media/pci/ivtv/ivtv-yuv.c
drivers/media/platform/omap/omap_vout.c
drivers/media/v4l2-core/videobuf-dma-sg.c
drivers/media/v4l2-core/videobuf2-memops.c
drivers/memstick/host/rtsx_usb_ms.c
drivers/misc/cxl/api.c
drivers/misc/cxl/context.c
drivers/misc/cxl/cxl.h
drivers/misc/cxl/file.c
drivers/misc/cxl/guest.c
drivers/misc/cxl/main.c
drivers/misc/cxl/pci.c
drivers/misc/cxl/sysfs.c
drivers/misc/genwqe/card_utils.c
drivers/misc/mei/hw-txe.c
drivers/misc/mic/scif/scif_rma.c
drivers/misc/sgi-gru/grufault.c
drivers/misc/sgi-gru/grumain.c
drivers/misc/vmw_vmci/vmci_doorbell.c
drivers/misc/vmw_vmci/vmci_driver.c
drivers/mmc/card/block.c
drivers/mmc/card/queue.h
drivers/mmc/core/mmc.c
drivers/mmc/host/rtsx_usb_sdmmc.c
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mmc/host/sdhci-of-arasan.c
drivers/mmc/host/sdhci-pci-core.c
drivers/mmc/host/sdhci-pci.h
drivers/mmc/host/sdhci-pxav3.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h
drivers/mtd/ubi/eba.c
drivers/mtd/ubi/fastmap.c
drivers/nvdimm/Kconfig
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/pmem.c
drivers/nvme/host/core.c
drivers/nvme/host/pci.c
drivers/nvme/host/scsi.c
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/discovery.c
drivers/pci/host/pci-layerscape.c
drivers/pci/host/pcie-designware-plat.c
drivers/pci/msi.c
drivers/perf/xgene_pmu.c
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
drivers/pinctrl/aspeed/pinctrl-aspeed.c
drivers/pinctrl/intel/pinctrl-baytrail.c
drivers/pinctrl/intel/pinctrl-intel.c
drivers/platform/goldfish/goldfish_pipe.c
drivers/platform/x86/Kconfig
drivers/platform/x86/ideapad-laptop.c
drivers/rapidio/devices/rio_mport_cdev.c
drivers/reset/reset-uniphier.c
drivers/s390/block/dasd_eckd.c
drivers/s390/cio/chp.c
drivers/s390/scsi/zfcp_dbf.c
drivers/scsi/NCR5380.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/ipr.c
drivers/scsi/libiscsi.c
drivers/scsi/scsi_dh.c
drivers/scsi/scsi_scan.c
drivers/scsi/st.c
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion_of.c
drivers/staging/greybus/arche-platform.c
drivers/staging/greybus/es2.c
drivers/staging/greybus/gpio.c
drivers/staging/greybus/module.c
drivers/staging/greybus/uart.c
drivers/staging/iio/accel/sca3000_core.c
drivers/staging/lustre/lustre/llite/lproc_llite.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
drivers/staging/wilc1000/host_interface.c
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_login.c
drivers/target/target_core_transport.c
drivers/target/target_core_user.c
drivers/target/target_core_xcopy.c
drivers/target/tcm_fc/tfc_cmd.c
drivers/target/tcm_fc/tfc_sess.c
drivers/thermal/intel_pch_thermal.c
drivers/thermal/intel_powerclamp.c
drivers/tty/serial/8250/8250_lpss.c
drivers/tty/serial/8250/8250_port.c
drivers/tty/serial/8250/8250_uniphier.c
drivers/tty/serial/Kconfig
drivers/tty/serial/atmel_serial.c
drivers/tty/serial/fsl_lpuart.c
drivers/tty/serial/pch_uart.c
drivers/tty/serial/sc16is7xx.c
drivers/tty/serial/serial_core.c
drivers/tty/serial/stm32-usart.h
drivers/tty/serial/xilinx_uartps.c
drivers/tty/vt/vt.c
drivers/usb/chipidea/host.c
drivers/usb/dwc2/core.c
drivers/usb/dwc2/core.h
drivers/usb/dwc2/gadget.c
drivers/usb/dwc3/gadget.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/u_ether.c
drivers/usb/gadget/udc/atmel_usba_udc.c
drivers/usb/host/ehci-platform.c
drivers/usb/host/ohci-at91.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci.h
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/omap2430.c
drivers/usb/renesas_usbhs/rcar3.c
drivers/usb/serial/cp210x.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h
drivers/usb/serial/usb-serial.c
drivers/usb/wusbcore/crypto.c
drivers/video/fbdev/pvr2fb.c
drivers/virt/fsl_hypervisor.c
drivers/vme/vme.c
drivers/watchdog/wdat_wdt.c
drivers/xen/manage.c
drivers/xen/xenbus/xenbus_dev_frontend.c
drivers/xen/xenbus/xenbus_probe_frontend.c
fs/btrfs/compression.c
fs/btrfs/send.c
fs/btrfs/tree-log.c
fs/ceph/file.c
fs/ceph/inode.c
fs/ceph/super.c
fs/ceph/xattr.c
fs/crypto/crypto.c
fs/crypto/policy.c
fs/exec.c
fs/exofs/dir.c
fs/ext2/inode.c
fs/ext4/block_validity.c
fs/ext4/mballoc.h
fs/ext4/namei.c
fs/ext4/super.c
fs/ext4/sysfs.c
fs/ext4/xattr.c
fs/f2fs/gc.c
fs/iomap.c
fs/isofs/inode.c
fs/jbd2/transaction.c
fs/kernfs/file.c
fs/locks.c
fs/nfs/blocklayout/blocklayout.c
fs/nfs/nfs4proc.c
fs/orangefs/dcache.c
fs/orangefs/file.c
fs/orangefs/namei.c
fs/orangefs/orangefs-kernel.h
fs/proc/array.c
fs/proc/base.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c
fs/ubifs/dir.c
fs/ubifs/xattr.c
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_dquot_buf.c
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_inode_buf.c
fs/xfs/libxfs/xfs_inode_buf.h
fs/xfs/xfs_file.c
fs/xfs/xfs_icache.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_reflink.c
fs/xfs/xfs_reflink.h
fs/xfs/xfs_sysfs.c
fs/xfs/xfs_trace.h
include/acpi/pcc.h
include/asm-generic/export.h
include/dt-bindings/clock/rk3188-cru-common.h
include/dt-bindings/clock/stih415-clks.h [deleted file]
include/dt-bindings/mfd/tps65217.h [new file with mode: 0644]
include/dt-bindings/pinctrl/rockchip.h
include/dt-bindings/power/mt2701-power.h [new file with mode: 0644]
include/linux/acpi.h
include/linux/clk-provider.h
include/linux/cpufreq.h
include/linux/cpuhotplug.h
include/linux/io.h
include/linux/iomap.h
include/linux/irqchip/arm-gic-v3.h
include/linux/kasan.h
include/linux/kconfig.h
include/linux/mm.h
include/linux/mmzone.h
include/linux/nvme.h
include/linux/perf_event.h
include/linux/syscalls.h
include/linux/thread_info.h
include/target/target_core_base.h
include/uapi/asm-generic/unistd.h
include/uapi/linux/Kbuild
include/uapi/linux/bt-bmc.h [new file with mode: 0644]
ipc/msgutil.c
kernel/cpu.c
kernel/events/core.c
kernel/events/uprobes.c
kernel/irq/manage.c
kernel/kcov.c
kernel/power/suspend.c
kernel/printk/printk.c
kernel/ptrace.c
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/wait.c
kernel/softirq.c
kernel/time/alarmtimer.c
kernel/time/timer.c
lib/Kconfig.debug
lib/genalloc.c
lib/stackdepot.c
mm/Kconfig
mm/filemap.c
mm/frame_vector.c
mm/gup.c
mm/kasan/kasan.c
mm/kmemleak.c
mm/list_lru.c
mm/memcontrol.c
mm/memory.c
mm/memory_hotplug.c
mm/mempolicy.c
mm/mprotect.c
mm/nommu.c
mm/page_alloc.c
mm/process_vm_access.c
mm/slab.c
mm/slab.h
mm/util.c
mm/vmscan.c
net/ceph/pagevec.c
security/keys/Kconfig
security/keys/big_key.c
security/keys/proc.c
security/selinux/hooks.c
security/tomoyo/domain.c
sound/core/seq/seq_timer.c
sound/pci/asihpi/hpioctl.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c
sound/usb/quirks-table.h
tools/arch/x86/include/asm/cpufeatures.h
tools/objtool/arch/x86/decode.c
tools/objtool/builtin-check.c
tools/perf/jvmti/Makefile
tools/perf/ui/browsers/hists.c
tools/perf/util/header.c
tools/perf/util/parse-events.l
virt/kvm/async_pf.c
virt/kvm/kvm_main.c

diff --git a/CREDITS b/CREDITS
index 513aaa3546bff3fa1d95c21bf4c9d9b2da2daa4f..837367624e4598e1b936c25b9c2095f5d43e33eb 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1864,10 +1864,11 @@ S: The Netherlands
 
 N: Martin Kepplinger
 E: martink@posteo.de
-E: martin.kepplinger@theobroma-systems.com
+E: martin.kepplinger@ginzinger.com
 W: http://www.martinkepplinger.com
 D: mma8452 accelerators iio driver
-D: Kernel cleanups
+D: pegasus_notetaker input driver
+D: Kernel fixes and cleanups
 S: Garnisonstraße 26
 S: 4020 Linz
 S: Austria
index 4ba0a2a61926251edf33e5f94a4eff45028d44a8..640f65e79ef1c00c94508b6b9f9fe8b63a1305a6 100644 (file)
@@ -220,8 +220,11 @@ What:           /sys/class/cxl/<card>/reset
 Date:           October 2014
 Contact:        linuxppc-dev@lists.ozlabs.org
 Description:    write only
-                Writing 1 will issue a PERST to card which may cause the card
-                to reload the FPGA depending on load_image_on_perst.
+                Writing 1 will issue a PERST to card provided there are no
+                contexts active on any one of the card AFUs. This may cause
+                the card to reload the FPGA depending on load_image_on_perst.
+                Writing -1 will do a force PERST irrespective of any active
+                contexts on the card AFUs.
 Users:         https://github.com/ibm-capi/libcxl
 
 What:          /sys/class/cxl/<card>/perst_reloads_same_image (not in a guest)
index e5b6497116f41be1a6e91e9d59b77a0991eabfa1..c75b64a85859fbca05571093c02799a25f994e1a 100644 (file)
@@ -309,3 +309,4 @@ Version History
        with a reshape in progress.
 1.9.0   Add support for RAID level takeover/reshape/region size
        and set size reduction.
+1.9.1   Fix activation of existing RAID 4/10 mapped devices
index e6782d50cbcd800149b1993558218bc8fd0ac38d..6b79f8744eaa0e79c4ea0f7352e5cc0fc18b92dc 100644 (file)
@@ -178,6 +178,7 @@ nodes to be present and contain the properties described below.
                            "marvell,pj4b"
                            "marvell,sheeva-v5"
                            "nvidia,tegra132-denver"
+                           "nvidia,tegra186-denver"
                            "qcom,krait"
                            "qcom,kryo"
                            "qcom,scorpion"
index b9e49711ba056db7c45777acc0918f423f94ec61..ac64e60f99f1659fb1438bcd4a7def68e1b6e1d3 100644 (file)
@@ -5,5 +5,10 @@ Boards with the OX810SE SoC shall have the following properties:
   Required root node property:
     compatible: "oxsemi,ox810se"
 
+Boards with the OX820 SoC shall have the following properties:
+  Required root node property:
+    compatible: "oxsemi,ox820"
+
 Board compatible values:
   - "wd,mbwe" (OX810SE)
+  - "cloudengines,pogoplugv3" (OX820)
index 3e24518c6678d1e1e7a8c4def669e1bf12dada2d..43abf4e0a0a5474932e0aed5dd0b224ebefb2def 100644 (file)
@@ -22,6 +22,7 @@ The 'SoC' element must be one of the following strings:
        msm8916
        msm8974
        msm8996
+       mdm9615
 
 The 'board' element must be one of the following strings:
 
index 55f388f954deee9587a57b59749e912f93f34663..e921f3efac6476ec814a6733ea1adabb4ec36b33 100644 (file)
@@ -25,6 +25,10 @@ Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "radxa,rock2-square", "rockchip,rk3288";
 
+- Rikomagic MK808 v1 board:
+    Required root node properties:
+      - compatible = "rikomagic,mk808", "rockchip,rk3066a";
+
 - Firefly Firefly-RK3288 board:
     Required root node properties:
       - compatible = "firefly,firefly-rk3288", "rockchip,rk3288";
index 0ea7f14ef2949d0419faa021d7173515131f8c8c..5160fa5f7b5cef902c8e7c92d46afb8e964fea84 100644 (file)
@@ -22,6 +22,9 @@ Required root node properties:
   * FriendlyARM
        - "friendlyarm,tiny4412"  - for Exynos4412-based FriendlyARM
                                    TINY4412 board.
+  * TOPEET
+       - "topeet,itop4412-elite" - for Exynos4412-based TOPEET
+                                    Elite base board.
 
   * Google
        - "google,pi"           - for Exynos5800-based Google Peach Pi
diff --git a/Documentation/devicetree/bindings/arm/swir.txt b/Documentation/devicetree/bindings/arm/swir.txt
new file mode 100644 (file)
index 0000000..042be73
--- /dev/null
@@ -0,0 +1,12 @@
+Sierra Wireless Modules device tree bindings
+--------------------------------------------
+
+Supported Modules :
+ - WP8548 : Includes MDM9615 and PM8018 in a module
+
+Sierra Wireless modules shall have the following properties :
+  Required root node property
+   - compatible: "swir,wp8548" for the WP8548 CF3 Module
+
+Board compatible values:
+  - "swir,mangoh-green-wp8548" for the mangOH green board with the WP8548 module
index e1d01df8e3c13cf95a83039e00db4cfbf7d56d78..909c9935360d673091f6593853e4fd580bfcc50a 100644 (file)
@@ -18,21 +18,6 @@ Optional properties:
 
 Example:
 
-       /* Example for stih416 */
-       sata0: sata@fe380000 {
-               compatible      = "st,ahci";
-               reg             = <0xfe380000 0x1000>;
-               interrupts      = <GIC_SPI 157 IRQ_TYPE_NONE>;
-               interrupt-names = "hostc";
-               phys            = <&phy_port0 PHY_TYPE_SATA>;
-               phy-names       = "ahci_phy";
-               resets          = <&powerdown STIH416_SATA0_POWERDOWN>,
-                                 <&softreset STIH416_SATA0_SOFTRESET>;
-               reset-names     = "pwr-dwn", "sw-rst";
-               clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-               clock-names     = "ahci_clk";
-       };
-
        /* Example for stih407 family silicon */
        sata0: sata@9b20000 {
                compatible      = "st,ahci";
index c7179d3b5c33e11d0f8b1af713cc7625b96ecfd5..812163060fa3e4cb4e4f39fe22c9fbd2aeb41d9f 100644 (file)
@@ -24,7 +24,7 @@ Example:
                reg = <0x61840000 0x4000>;
 
                clock {
-                       compatible = "socionext,uniphier-ld20-clock";
+                       compatible = "socionext,uniphier-ld11-clock";
                        #clock-cells = <1>;
                };
 
@@ -43,8 +43,8 @@ Provided clocks:
 21: USB3 ch1 PHY1
 
 
-Media I/O (MIO) clock
----------------------
+Media I/O (MIO) clock, SD clock
+-------------------------------
 
 Required properties:
 - compatible: should be one of the following:
@@ -52,10 +52,10 @@ Required properties:
     "socionext,uniphier-ld4-mio-clock"  - for LD4 SoC.
     "socionext,uniphier-pro4-mio-clock" - for Pro4 SoC.
     "socionext,uniphier-sld8-mio-clock" - for sLD8 SoC.
-    "socionext,uniphier-pro5-mio-clock" - for Pro5 SoC.
-    "socionext,uniphier-pxs2-mio-clock" - for PXs2/LD6b SoC.
+    "socionext,uniphier-pro5-sd-clock"  - for Pro5 SoC.
+    "socionext,uniphier-pxs2-sd-clock"  - for PXs2/LD6b SoC.
     "socionext,uniphier-ld11-mio-clock" - for LD11 SoC.
-    "socionext,uniphier-ld20-mio-clock" - for LD20 SoC.
+    "socionext,uniphier-ld20-sd-clock"  - for LD20 SoC.
 - #clock-cells: should be 1.
 
 Example:
@@ -66,7 +66,7 @@ Example:
                reg = <0x59810000 0x800>;
 
                clock {
-                       compatible = "socionext,uniphier-ld20-mio-clock";
+                       compatible = "socionext,uniphier-ld11-mio-clock";
                        #clock-cells = <1>;
                };
 
@@ -112,7 +112,7 @@ Example:
                reg = <0x59820000 0x200>;
 
                clock {
-                       compatible = "socionext,uniphier-ld20-peri-clock";
+                       compatible = "socionext,uniphier-ld11-peri-clock";
                        #clock-cells = <1>;
                };
 
index c3d016532d8e69b81fbb834057c5cd4976f430ba..30fd2201b3d4cfc8fbc3fe7b1f7a39854c1d3d7e 100644 (file)
@@ -17,7 +17,9 @@ Required properties:
 - #interrupt-cells: Specifies the number of cells needed to encode an
   interrupt source.
 - gpio-controller : Marks the device node as a gpio controller.
-- #gpio-cells : Should be one.  It is the pin number.
+- #gpio-cells : Should be two.  The first cell is the pin number and
+  the second cell is used to specify flags. See gpio.txt for possible
+  values.
 
 Example for a MMP platform:
 
@@ -27,7 +29,7 @@ Example for a MMP platform:
                interrupts = <49>;
                interrupt-names = "gpio_mux";
                gpio-controller;
-               #gpio-cells = <1>;
+               #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <1>;
       };
diff --git a/Documentation/devicetree/bindings/ipmi/aspeed,ast2400-bt-bmc.txt b/Documentation/devicetree/bindings/ipmi/aspeed,ast2400-bt-bmc.txt
new file mode 100644 (file)
index 0000000..fbbacd9
--- /dev/null
@@ -0,0 +1,23 @@
+* Aspeed BT (Block Transfer) IPMI interface
+
+The Aspeed SOCs (AST2400 and AST2500) are commonly used as BMCs
+(BaseBoard Management Controllers) and the BT interface can be used to
+perform in-band IPMI communication with their host.
+
+Required properties:
+
+- compatible : should be "aspeed,ast2400-bt-bmc"
+- reg: physical address and size of the registers
+
+Optional properties:
+
+- interrupts: interrupt generated by the BT interface. without an
+  interrupt, the driver will operate in poll mode.
+
+Example:
+
+       ibt@1e789140 {
+               compatible = "aspeed,ast2400-bt-bmc";
+               reg = <0x1e789140 0x18>;
+               interrupts = <8>;
+       };
index 5e60ad18f147c2399b418026968068a9ccc7cf0d..2ad18c4ea55c5f022f0181c78896d5a8e33d4e74 100644 (file)
@@ -43,7 +43,9 @@ aspeed,ast2500-pinctrl, aspeed,g5-pinctrl:
 
 GPID0 GPID2 GPIE0 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 I2C5 I2C6 I2C7 I2C8
 I2C9 MAC1LINK MDIO1 MDIO2 OSCCLK PEWAKE PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7
-RGMII1 RGMII2 RMII1 RMII2 SD1 SPI1 TIMER4 TIMER5 TIMER6 TIMER7 TIMER8
+RGMII1 RGMII2 RMII1 RMII2 SD1 SPI1 SPI1DEBUG SPI1PASSTHRU TIMER4 TIMER5 TIMER6
+TIMER7 TIMER8 VGABIOSROM
+
 
 Examples:
 
index 66dcaa9efd7401916d3ec8cc9e03c9ebaff50a22..e705acd3612ccc4c1ec487f79f3f2ed6fb46fc47 100644 (file)
@@ -7,6 +7,9 @@ Required properties:
 
 - reg : offset and length of the register set for the mux registers
 
+- #pinctrl-cells : number of cells in addition to the index, set to 1
+  for pinctrl-single,pins and 2 for pinctrl-single,bits
+
 - pinctrl-single,register-width : pinmux register access width in bits
 
 - pinctrl-single,function-mask : mask of allowed pinmux function bits
index 1cfd21d1dfa1826753be5486a7ca3f282ba500e2..92527138bc931b6635dbfa7cb3be2804a2f5d228 100644 (file)
@@ -16,15 +16,14 @@ Please refer to reset.txt in this directory for common reset
 controller binding usage.
 
 Required properties:
-- compatible: Should be "st,<chip>-powerdown"
-       ex: "st,stih415-powerdown", "st,stih416-powerdown"
+- compatible: Should be "st,stih407-powerdown"
 - #reset-cells: 1, see below
 
 example:
 
        powerdown: powerdown-controller {
+               compatible = "st,stih407-powerdown";
                #reset-cells = <1>;
-               compatible = "st,stih415-powerdown";
        };
 
 
@@ -37,11 +36,10 @@ index specifying which channel to use, as described in reset.txt
 
 example:
 
-       usb1: usb@fe200000 {
-               resets  = <&powerdown STIH41X_USB1_POWERDOWN>;
+       st_dwc3: dwc3@8f94000 {
+               resets          = <&powerdown STIH407_USB3_POWERDOWN>,
        };
 
 Macro definitions for the supported reset channels can be found in:
 
-include/dt-bindings/reset/stih415-resets.h
-include/dt-bindings/reset/stih416-resets.h
+include/dt-bindings/reset/stih407-resets.h
index 891a2fd85ed619ca0274b1709e3093fc0713f4c2..a21658f18fe6d7d593adece10e056e072fa2c5e4 100644 (file)
@@ -15,15 +15,14 @@ Please refer to reset.txt in this directory for common reset
 controller binding usage.
 
 Required properties:
-- compatible: Should be "st,<chip>-softreset" example:
-       "st,stih415-softreset" or "st,stih416-softreset";
+- compatible: Should be st,stih407-softreset";
 - #reset-cells: 1, see below
 
 example:
 
        softreset: softreset-controller {
                #reset-cells = <1>;
-               compatible = "st,stih415-softreset";
+               compatible = "st,stih407-softreset";
        };
 
 
@@ -42,5 +41,4 @@ example:
 
 Macro definitions for the supported reset channels can be found in:
 
-include/dt-bindings/reset/stih415-resets.h
-include/dt-bindings/reset/stih416-resets.h
+include/dt-bindings/reset/stih407-resets.h
index e6bbfccd56c326214d4d7cdaf78c664f34f863e5..5020524cddebf70ddaedeeb6b61bd47bdcb0a4a1 100644 (file)
@@ -6,25 +6,25 @@ System reset
 
 Required properties:
 - compatible: should be one of the following:
-    "socionext,uniphier-sld3-reset" - for PH1-sLD3 SoC.
-    "socionext,uniphier-ld4-reset"  - for PH1-LD4 SoC.
-    "socionext,uniphier-pro4-reset" - for PH1-Pro4 SoC.
-    "socionext,uniphier-sld8-reset" - for PH1-sLD8 SoC.
-    "socionext,uniphier-pro5-reset" - for PH1-Pro5 SoC.
-    "socionext,uniphier-pxs2-reset" - for ProXstream2/PH1-LD6b SoC.
-    "socionext,uniphier-ld11-reset" - for PH1-LD11 SoC.
-    "socionext,uniphier-ld20-reset" - for PH1-LD20 SoC.
+    "socionext,uniphier-sld3-reset" - for sLD3 SoC.
+    "socionext,uniphier-ld4-reset"  - for LD4 SoC.
+    "socionext,uniphier-pro4-reset" - for Pro4 SoC.
+    "socionext,uniphier-sld8-reset" - for sLD8 SoC.
+    "socionext,uniphier-pro5-reset" - for Pro5 SoC.
+    "socionext,uniphier-pxs2-reset" - for PXs2/LD6b SoC.
+    "socionext,uniphier-ld11-reset" - for LD11 SoC.
+    "socionext,uniphier-ld20-reset" - for LD20 SoC.
 - #reset-cells: should be 1.
 
 Example:
 
        sysctrl@61840000 {
-               compatible = "socionext,uniphier-ld20-sysctrl",
+               compatible = "socionext,uniphier-ld11-sysctrl",
                             "simple-mfd", "syscon";
                reg = <0x61840000 0x4000>;
 
                reset {
-                       compatible = "socionext,uniphier-ld20-reset";
+                       compatible = "socionext,uniphier-ld11-reset";
                        #reset-cells = <1>;
                };
 
@@ -32,30 +32,30 @@ Example:
        };
 
 
-Media I/O (MIO) reset
----------------------
+Media I/O (MIO) reset, SD reset
+-------------------------------
 
 Required properties:
 - compatible: should be one of the following:
-    "socionext,uniphier-sld3-mio-reset" - for PH1-sLD3 SoC.
-    "socionext,uniphier-ld4-mio-reset"  - for PH1-LD4 SoC.
-    "socionext,uniphier-pro4-mio-reset" - for PH1-Pro4 SoC.
-    "socionext,uniphier-sld8-mio-reset" - for PH1-sLD8 SoC.
-    "socionext,uniphier-pro5-mio-reset" - for PH1-Pro5 SoC.
-    "socionext,uniphier-pxs2-mio-reset" - for ProXstream2/PH1-LD6b SoC.
-    "socionext,uniphier-ld11-mio-reset" - for PH1-LD11 SoC.
-    "socionext,uniphier-ld20-mio-reset" - for PH1-LD20 SoC.
+    "socionext,uniphier-sld3-mio-reset" - for sLD3 SoC.
+    "socionext,uniphier-ld4-mio-reset"  - for LD4 SoC.
+    "socionext,uniphier-pro4-mio-reset" - for Pro4 SoC.
+    "socionext,uniphier-sld8-mio-reset" - for sLD8 SoC.
+    "socionext,uniphier-pro5-sd-reset"  - for Pro5 SoC.
+    "socionext,uniphier-pxs2-sd-reset"  - for PXs2/LD6b SoC.
+    "socionext,uniphier-ld11-mio-reset" - for LD11 SoC.
+    "socionext,uniphier-ld20-sd-reset"  - for LD20 SoC.
 - #reset-cells: should be 1.
 
 Example:
 
        mioctrl@59810000 {
-               compatible = "socionext,uniphier-ld20-mioctrl",
+               compatible = "socionext,uniphier-ld11-mioctrl",
                             "simple-mfd", "syscon";
                reg = <0x59810000 0x800>;
 
                reset {
-                       compatible = "socionext,uniphier-ld20-mio-reset";
+                       compatible = "socionext,uniphier-ld11-mio-reset";
                        #reset-cells = <1>;
                };
 
@@ -68,24 +68,24 @@ Peripheral reset
 
 Required properties:
 - compatible: should be one of the following:
-    "socionext,uniphier-ld4-peri-reset"  - for PH1-LD4 SoC.
-    "socionext,uniphier-pro4-peri-reset" - for PH1-Pro4 SoC.
-    "socionext,uniphier-sld8-peri-reset" - for PH1-sLD8 SoC.
-    "socionext,uniphier-pro5-peri-reset" - for PH1-Pro5 SoC.
-    "socionext,uniphier-pxs2-peri-reset" - for ProXstream2/PH1-LD6b SoC.
-    "socionext,uniphier-ld11-peri-reset" - for PH1-LD11 SoC.
-    "socionext,uniphier-ld20-peri-reset" - for PH1-LD20 SoC.
+    "socionext,uniphier-ld4-peri-reset"  - for LD4 SoC.
+    "socionext,uniphier-pro4-peri-reset" - for Pro4 SoC.
+    "socionext,uniphier-sld8-peri-reset" - for sLD8 SoC.
+    "socionext,uniphier-pro5-peri-reset" - for Pro5 SoC.
+    "socionext,uniphier-pxs2-peri-reset" - for PXs2/LD6b SoC.
+    "socionext,uniphier-ld11-peri-reset" - for LD11 SoC.
+    "socionext,uniphier-ld20-peri-reset" - for LD20 SoC.
 - #reset-cells: should be 1.
 
 Example:
 
        perictrl@59820000 {
-               compatible = "socionext,uniphier-ld20-perictrl",
+               compatible = "socionext,uniphier-ld11-perictrl",
                             "simple-mfd", "syscon";
                reg = <0x59820000 0x200>;
 
                reset {
-                       compatible = "socionext,uniphier-ld20-peri-reset";
+                       compatible = "socionext,uniphier-ld11-peri-reset";
                        #reset-cells = <1>;
                };
 
index a3eb154c32caf9f273c8801811565722a3201e38..227bb770b0276af8cb716bd89d88e8c055c168f8 100644 (file)
@@ -1,7 +1,9 @@
 Binding for Cadence UART Controller
 
 Required properties:
-- compatible : should be "cdns,uart-r1p8", or "xlnx,xuartps"
+- compatible :
+  Use "xlnx,xuartps","cdns,uart-r1p8" for Zynq-7xxx SoC.
+  Use "xlnx,zynqmp-uart","cdns,uart-r1p12" for Zynq Ultrascale+ MPSoC.
 - reg: Should contain UART controller registers location and length.
 - interrupts: Should contain UART controller interrupts.
 - clocks: Must contain phandles to the UART clocks
index 845850caf088100fb325d5353a6c4a1e1073e730..c93a2d1c1a654e3a618a4976086aa8d145903da1 100644 (file)
@@ -10,7 +10,7 @@ Required properties:
   See ../reset/reset.txt for details.
 - reset-names : Must include the following entries:
   - serial
-- dmas : Must contain an entry for each entry in clock-names.
+- dmas : Must contain an entry for each entry in dma-names.
   See ../dma/dma.txt for details.
 - dma-names : Must include the following entries:
   - rx
index 1e4000d83aee06828c974000e5122567b8fda631..8d27d1a603e7bf755c8451186cdb507dd1d50a58 100644 (file)
@@ -9,6 +9,14 @@ Required properties:
     - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
     - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
     - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.
+    - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatible UART.
+    - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART.
+    - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART.
+    - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART.
+    - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART.
+    - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART.
+    - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART.
+    - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible UART.
     - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
     - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
     - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
index e8f15e34027ff4c62370253a4368c9f58da2615f..16fe94d7783c965e64288870b9391591af68bf7c 100644 (file)
@@ -9,17 +9,20 @@ domain control.
 
 The driver implements the Generic PM domain bindings described in
 power/power_domain.txt. It provides the power domains defined in
-include/dt-bindings/power/mt8173-power.h.
+include/dt-bindings/power/mt8173-power.h and mt2701-power.h.
 
 Required properties:
-- compatible: Must be "mediatek,mt8173-scpsys"
+- compatible: Should be one of:
+       - "mediatek,mt2701-scpsys"
+       - "mediatek,mt8173-scpsys"
 - #power-domain-cells: Must be 1
 - reg: Address range of the SCPSYS unit
 - infracfg: must contain a phandle to the infracfg controller
 - clock, clock-names: clocks according to the common clock binding.
-                      The clocks needed "mm", "mfg", "venc" and "venc_lt".
-                     These are the clocks which hardware needs to be enabled
-                     before enabling certain power domains.
+                      These are clocks which hardware needs to be
+                      enabled before enabling certain power domains.
+       Required clocks for MT2701: "mm", "mfg", "ethif"
+       Required clocks for MT8173: "mm", "mfg", "venc", "venc_lt"
 
 Optional properties:
 - vdec-supply: Power supply for the vdec power domain
index 3b9251b4a1456ca7e6565fd33bd11c9597c45170..a2f939137e3541e3b3f3e89627cdbb6d74b69c98 100644 (file)
@@ -3,17 +3,8 @@ Binding for Thermal Sensor driver for STMicroelectronics STi series of SoCs.
 Required parameters:
 -------------------
 
-compatible :   st,<SoC>-<module>-thermal; should be one of:
-                 "st,stih415-sas-thermal",
-                 "st,stih415-mpe-thermal",
-                 "st,stih416-sas-thermal"
-                 "st,stih416-mpe-thermal"
-                 "st,stid127-thermal" or
-                 "st,stih407-thermal"
-               according to the SoC type (stih415, stih416, stid127, stih407)
-               and module type (sas or mpe). On stid127 & stih407 there is only
-               one die/module, so there is no module type in the compatible
-               string.
+compatible :   Should be "st,stih407-thermal"
+
 clock-names :  Should be "thermal".
                  See: Documentation/devicetree/bindings/resource-names.txt
 clocks :       Phandle of the clock used by the thermal sensor.
@@ -25,18 +16,17 @@ Optional parameters:
 reg :          For non-sysconf based sensors, this should be the physical base
                address and length of the sensor's registers.
 interrupts :   Standard way to define interrupt number.
-               Interrupt is mandatory to be defined when compatible is
-               "stih416-mpe-thermal".
                  NB: For thermal sensor's for which no interrupt has been
                  defined, a polling delay of 1000ms will be used to read the
                  temperature from device.
 
 Example:
 
-       temp1@fdfe8000 {
-               compatible      = "st,stih416-mpe-thermal";
-               reg             = <0xfdfe8000 0x10>;
-               clock-names     = "thermal";
-               clocks          = <&clk_m_mpethsens>;
-               interrupts      = <GIC_SPI 23 IRQ_TYPE_NONE>;
+       temp0@91a0000 {
+               compatible = "st,stih407-thermal";
+               reg = <0x91a0000 0x28>;
+               clock-names = "thermal";
+               clocks = <&CLK_SYSIN>;
+               interrupts = <GIC_SPI 205 IRQ_TYPE_EDGE_RISING>;
+               st,passive_cooling_temp = <110>;
        };
diff --git a/Documentation/devicetree/bindings/timer/jcore,pit.txt b/Documentation/devicetree/bindings/timer/jcore,pit.txt
new file mode 100644 (file)
index 0000000..af5dd35
--- /dev/null
@@ -0,0 +1,24 @@
+J-Core Programmable Interval Timer and Clocksource
+
+Required properties:
+
+- compatible: Must be "jcore,pit".
+
+- reg: Memory region(s) for timer/clocksource registers. For SMP,
+  there should be one region per cpu, indexed by the sequential,
+  zero-based hardware cpu number.
+
+- interrupts: An interrupt to assign for the timer. The actual pit
+  core is integrated with the aic and allows the timer interrupt
+  assignment to be programmed by software, but this property is
+  required in order to reserve an interrupt number that doesn't
+  conflict with other devices.
+
+
+Example:
+
+timer@200 {
+       compatible = "jcore,pit";
+       reg = < 0x200 0x30 0x500 0x30 >;
+       interrupts = < 0x48 >;
+};
index f4262ed60582d31bcb807f7d5ac2f2b1ae66462d..ad8ea56a9ed37aa1c14a0a80b6c533c9ae9efcbd 100644 (file)
@@ -6,9 +6,9 @@ Required properties:
  - compatible: Should be "atmel,at91rm9200-ohci" for USB controllers
    used in host mode.
  - reg: Address and length of the register set for the device
- - interrupts: Should contain ehci interrupt
+ - interrupts: Should contain ohci interrupt
  - clocks: Should reference the peripheral, host and system clocks
- - clock-names: Should contains two strings
+ - clock-names: Should contain three strings
                "ohci_clk" for the peripheral clock
                "hclk" for the host clock
                "uhpck" for the system clock
@@ -35,7 +35,7 @@ Required properties:
  - reg: Address and length of the register set for the device
  - interrupts: Should contain ehci interrupt
  - clocks: Should reference the peripheral and the UTMI clocks
- - clock-names: Should contains two strings
+ - clock-names: Should contain two strings
                "ehci_clk" for the peripheral clock
                "usb_clk" for the UTMI clock
 
@@ -58,7 +58,7 @@ Required properties:
  - reg: Address and length of the register set for the device
  - interrupts: Should contain macb interrupt
  - clocks: Should reference the peripheral and the AHB clocks
- - clock-names: Should contains two strings
+ - clock-names: Should contain two strings
                "pclk" for the peripheral clock
                "hclk" for the AHB clock
 
@@ -85,7 +85,7 @@ Required properties:
  - reg: Address and length of the register set for the device
  - interrupts: Should contain usba interrupt
  - clocks: Should reference the peripheral and host clocks
- - clock-names: Should contains two strings
+ - clock-names: Should contain two strings
                "pclk" for the peripheral clock
                "hclk" for the host clock
  - ep childnode: To specify the number of endpoints and their properties.
index 455f2c310a1b90ce94a087e1983a7e8d5ee869ab..2c30a5479069b98ef22467fd91a0f090c87f1d91 100644 (file)
@@ -28,10 +28,7 @@ Refer to phy/phy-bindings.txt for generic phy consumer properties
 - g-use-dma: enable dma usage in gadget driver.
 - g-rx-fifo-size: size of rx fifo size in gadget mode.
 - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode.
-
-Deprecated properties:
-- g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0)
-  in gadget mode.
+- g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
 
 Example:
 
index f0a48ea78659c933839554ca879babb1b621b264..17194f30d65eb4648aec0c58c61146082965817f 100644 (file)
@@ -229,6 +229,7 @@ realtek Realtek Semiconductor Corp.
 renesas        Renesas Electronics Corporation
 richtek        Richtek Technology Corporation
 ricoh  Ricoh Co. Ltd.
+rikomagic      Rikomagic Tech Corp. Ltd
 rockchip       Fuzhou Rockchip Electronics Co., Ltd
 samsung        Samsung Semiconductor
 sandisk        Sandisk Corporation
index 219ffd41a9117d1f598f97ba2745e22a371dfc29..74329fd0add2237a848a72fb71a46d5e4e98cee4 100644 (file)
@@ -395,32 +395,6 @@ is not associated with a file:
 
  or if empty, the mapping is anonymous.
 
-The /proc/PID/task/TID/maps is a view of the virtual memory from the viewpoint
-of the individual tasks of a process. In this file you will see a mapping marked
-as [stack] if that task sees it as a stack. Hence, for the example above, the
-task-level map, i.e. /proc/PID/task/TID/maps for thread 1001 will look like this:
-
-08048000-08049000 r-xp 00000000 03:00 8312       /opt/test
-08049000-0804a000 rw-p 00001000 03:00 8312       /opt/test
-0804a000-0806b000 rw-p 00000000 00:00 0          [heap]
-a7cb1000-a7cb2000 ---p 00000000 00:00 0
-a7cb2000-a7eb2000 rw-p 00000000 00:00 0
-a7eb2000-a7eb3000 ---p 00000000 00:00 0
-a7eb3000-a7ed5000 rw-p 00000000 00:00 0          [stack]
-a7ed5000-a8008000 r-xp 00000000 03:00 4222       /lib/libc.so.6
-a8008000-a800a000 r--p 00133000 03:00 4222       /lib/libc.so.6
-a800a000-a800b000 rw-p 00135000 03:00 4222       /lib/libc.so.6
-a800b000-a800e000 rw-p 00000000 00:00 0
-a800e000-a8022000 r-xp 00000000 03:00 14462      /lib/libpthread.so.0
-a8022000-a8023000 r--p 00013000 03:00 14462      /lib/libpthread.so.0
-a8023000-a8024000 rw-p 00014000 03:00 14462      /lib/libpthread.so.0
-a8024000-a8027000 rw-p 00000000 00:00 0
-a8027000-a8043000 r-xp 00000000 03:00 8317       /lib/ld-linux.so.2
-a8043000-a8044000 r--p 0001b000 03:00 8317       /lib/ld-linux.so.2
-a8044000-a8045000 rw-p 0001c000 03:00 8317       /lib/ld-linux.so.2
-aff35000-aff4a000 rw-p 00000000 00:00 0
-ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
-
 The /proc/PID/smaps is an extension based on maps, showing the memory
 consumption for each of the process's mappings. For each of mappings there
 is a series of lines such as the following:
index 40884c4fe40c5f85c4f64e096b7469141652a8cd..a0f61898d493b720fbc014554b628f5b6e25a93f 100644 (file)
@@ -6,7 +6,7 @@ Note that it only applies to the new descriptor-based interface. For a
 description of the deprecated integer-based GPIO interface please refer to
 gpio-legacy.txt (actually, there is no real mapping possible with the old
 interface; you just fetch an integer from somewhere and request the
-corresponding GPIO.
+corresponding GPIO).
 
 All platforms can enable the GPIO library, but if the platform strictly
 requires GPIO functionality to be present, it needs to select GPIOLIB from its
@@ -162,6 +162,9 @@ The driver controlling "foo.0" will then be able to obtain its GPIOs as follows:
 
 Since the "led" GPIOs are mapped as active-high, this example will switch their
 signals to 1, i.e. enabling the LEDs. And for the "power" GPIO, which is mapped
-as active-low, its actual signal will be 0 after this code. Contrary to the legacy
-integer GPIO interface, the active-low property is handled during mapping and is
-thus transparent to GPIO consumers.
+as active-low, its actual signal will be 0 after this code. Contrary to the
+legacy integer GPIO interface, the active-low property is handled during
+mapping and is thus transparent to GPIO consumers.
+
+A set of functions such as gpiod_set_value() is available to work with
+the new descriptor-oriented interface.
index 1cd38a7e0064e537a95a9fc7473d28cfdb1822f4..b4e472a159eea263f3a6641889ff72a3f8b576c0 100644 (file)
@@ -1442,6 +1442,7 @@ F:        drivers/cpufreq/mvebu-cpufreq.c
 F:     arch/arm/configs/mvebu_*_defconfig
 
 ARM/Marvell Berlin SoC support
+M:     Jisheng Zhang <jszhang@marvell.com>
 M:     Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
@@ -1478,8 +1479,9 @@ L:        linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:     linux-oxnas@lists.tuxfamily.org (moderated for non-subscribers)
 S:     Maintained
 F:     arch/arm/mach-oxnas/
-F:     arch/arm/boot/dts/oxnas*
+F:     arch/arm/boot/dts/ox8*.dtsi
 F:     arch/arm/boot/dts/wd-mbwe.dts
+F:     arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts
 N:     oxnas
 
 ARM/Mediatek RTC DRIVER
@@ -1779,9 +1781,7 @@ F:        drivers/media/rc/st_rc.c
 F:     drivers/media/platform/sti/c8sectpfe/
 F:     drivers/mmc/host/sdhci-st.c
 F:     drivers/phy/phy-miphy28lp.c
-F:     drivers/phy/phy-miphy365x.c
 F:     drivers/phy/phy-stih407-usb.c
-F:     drivers/phy/phy-stih41x-usb.c
 F:     drivers/pinctrl/pinctrl-st.c
 F:     drivers/remoteproc/st_remoteproc.c
 F:     drivers/reset/sti/
@@ -4620,8 +4620,9 @@ F:        sound/usb/misc/ua101.c
 
 EXTENSIBLE FIRMWARE INTERFACE (EFI)
 M:     Matt Fleming <matt@codeblueprint.co.uk>
+M:     Ard Biesheuvel <ard.biesheuvel@linaro.org>
 L:     linux-efi@vger.kernel.org
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
 S:     Maintained
 F:     Documentation/efi-stub.txt
 F:     arch/ia64/kernel/efi.c
@@ -5286,6 +5287,12 @@ M:       Joe Perches <joe@perches.com>
 S:     Maintained
 F:     scripts/get_maintainer.pl
 
+GENWQE (IBM Generic Workqueue Card)
+M:     Frank Haverkamp <haver@linux.vnet.ibm.com>
+M:     Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
+S:     Supported
+F:     drivers/misc/genwqe/
+
 GFS2 FILE SYSTEM
 M:     Steven Whitehouse <swhiteho@redhat.com>
 M:     Bob Peterson <rpeterso@redhat.com>
@@ -8099,6 +8106,7 @@ S:        Maintained
 F:     drivers/media/dvb-frontends/mn88473*
 
 MODULE SUPPORT
+M:     Jessica Yu <jeyu@redhat.com>
 M:     Rusty Russell <rusty@rustcorp.com.au>
 S:     Maintained
 F:     include/linux/module.h
@@ -8212,7 +8220,7 @@ F:        include/linux/mfd/
 MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
 M:     Ulf Hansson <ulf.hansson@linaro.org>
 L:     linux-mmc@vger.kernel.org
-T:     git git://git.linaro.org/people/ulf.hansson/mmc.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
 S:     Maintained
 F:     Documentation/devicetree/bindings/mmc/
 F:     drivers/mmc/
@@ -9299,7 +9307,7 @@ S:        Maintained
 F:     drivers/pci/host/*designware*
 
 PCI DRIVER FOR SYNOPSYS PROTOTYPING DEVICE
-M:     Joao Pinto <jpinto@synopsys.com>
+M:     Jose Abreu <Jose.Abreu@synopsys.com>
 L:     linux-pci@vger.kernel.org
 S:     Maintained
 F:     Documentation/devicetree/bindings/pci/designware-pcie.txt
index 512e47a53e9aebf10b144b888b349df5ede5f8d0..a2650f9c6a2595079eb70434d258df30b918b202 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 4
 PATCHLEVEL = 9
 SUBLEVEL = 0
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc3
 NAME = Psychotic Stoned Sheep
 
 # *DOCUMENTATION*
index d9ee81769899fb8652046857d2fa3eaabd1bacc1..940dfb4065910822d42f3d11c02ba2305f25b02a 100644 (file)
@@ -157,14 +157,16 @@ put_reg(struct task_struct *task, unsigned long regno, unsigned long data)
 static inline int
 read_int(struct task_struct *task, unsigned long addr, int * data)
 {
-       int copied = access_process_vm(task, addr, data, sizeof(int), 0);
+       int copied = access_process_vm(task, addr, data, sizeof(int),
+                       FOLL_FORCE);
        return (copied == sizeof(int)) ? 0 : -EIO;
 }
 
 static inline int
 write_int(struct task_struct *task, unsigned long addr, int data)
 {
-       int copied = access_process_vm(task, addr, &data, sizeof(int), 1);
+       int copied = access_process_vm(task, addr, &data, sizeof(int),
+                       FOLL_FORCE | FOLL_WRITE);
        return (copied == sizeof(int)) ? 0 : -EIO;
 }
 
@@ -281,7 +283,8 @@ long arch_ptrace(struct task_struct *child, long request,
        /* When I and D space are separate, these will need to be fixed.  */
        case PTRACE_PEEKTEXT: /* read word at location addr. */
        case PTRACE_PEEKDATA:
-               copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
+               copied = access_process_vm(child, addr, &tmp, sizeof(tmp),
+                               FOLL_FORCE);
                ret = -EIO;
                if (copied != sizeof(tmp))
                        break;
index ecd12379e2cdb55bf29626ce0590742875574f3a..bd204bfa29edd52f8e4d43c989ab07024e66ab98 100644 (file)
@@ -41,6 +41,8 @@ config ARC
        select PERF_USE_VMALLOC
        select HAVE_DEBUG_STACKOVERFLOW
        select HAVE_GENERIC_DMA_COHERENT
+       select HAVE_KERNEL_GZIP
+       select HAVE_KERNEL_LZMA
 
 config MIGHT_HAVE_PCI
        bool
@@ -186,14 +188,6 @@ if SMP
 config ARC_HAS_COH_CACHES
        def_bool n
 
-config ARC_MCIP
-       bool "ARConnect Multicore IP (MCIP) Support "
-       depends on ISA_ARCV2
-       help
-         This IP block enables SMP in ARC-HS38 cores.
-         It provides for cross-core interrupts, multi-core debug
-         hardware semaphores, shared memory,....
-
 config NR_CPUS
        int "Maximum number of CPUs (2-4096)"
        range 2 4096
@@ -211,6 +205,15 @@ config ARC_SMP_HALT_ON_RESET
 
 endif  #SMP
 
+config ARC_MCIP
+       bool "ARConnect Multicore IP (MCIP) Support "
+       depends on ISA_ARCV2
+       default y if SMP
+       help
+         This IP block enables SMP in ARC-HS38 cores.
+         It provides for cross-core interrupts, multi-core debug
+         hardware semaphores, shared memory,....
+
 menuconfig ARC_CACHE
        bool "Enable Cache Support"
        default y
@@ -537,14 +540,6 @@ config ARC_DBG_TLB_PARANOIA
        bool "Paranoia Checks in Low Level TLB Handlers"
        default n
 
-config ARC_DBG_TLB_MISS_COUNT
-       bool "Profile TLB Misses"
-       default n
-       select DEBUG_FS
-       help
-         Counts number of I and D TLB Misses and exports them via Debugfs
-         The counters can be cleared via Debugfs as well
-
 endif
 
 config ARC_UBOOT_SUPPORT
index aa82d13d4213855d299e864b54b64d444a126d73..864adad522803cfdec31983d062514d7c50f19c3 100644 (file)
@@ -50,9 +50,6 @@ atleast_gcc44 :=  $(call cc-ifversion, -ge, 0404, y)
 
 cflags-$(atleast_gcc44)                        += -fsection-anchors
 
-cflags-$(CONFIG_ARC_HAS_LLSC)          += -mlock
-cflags-$(CONFIG_ARC_HAS_SWAPE)         += -mswape
-
 ifdef CONFIG_ISA_ARCV2
 
 ifndef CONFIG_ARC_HAS_LL64
index e597cb34c16a832e4d219fd95a688126427b34b3..f94cf151e06ab2e142bbf2b867ae8a2de0e255af 100644 (file)
@@ -14,9 +14,15 @@ UIMAGE_ENTRYADDR   = $(LINUX_START_TEXT)
 
 suffix-y := bin
 suffix-$(CONFIG_KERNEL_GZIP)   := gz
+suffix-$(CONFIG_KERNEL_LZMA)   := lzma
 
-targets += uImage uImage.bin uImage.gz
-extra-y += vmlinux.bin vmlinux.bin.gz
+targets += uImage
+targets += uImage.bin
+targets += uImage.gz
+targets += uImage.lzma
+extra-y += vmlinux.bin
+extra-y += vmlinux.bin.gz
+extra-y += vmlinux.bin.lzma
 
 $(obj)/vmlinux.bin: vmlinux FORCE
        $(call if_changed,objcopy)
@@ -24,12 +30,18 @@ $(obj)/vmlinux.bin: vmlinux FORCE
 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
        $(call if_changed,gzip)
 
+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
+       $(call if_changed,lzma)
+
 $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
        $(call if_changed,uimage,none)
 
 $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
        $(call if_changed,uimage,gzip)
 
+$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
+       $(call if_changed,uimage,lzma)
+
 $(obj)/uImage: $(obj)/uImage.$(suffix-y)
        @ln -sf $(notdir $<) $@
        @echo '  Image $@ is ready'
index db25c65155cb80a284ab3078f60797f2b25735dc..7f3f9f63708cf4c3b0e1d77f9b1ac17e3505c4ba 100644 (file)
@@ -349,10 +349,11 @@ struct cpuinfo_arc {
        struct cpuinfo_arc_bpu bpu;
        struct bcr_identity core;
        struct bcr_isa isa;
+       const char *details, *name;
        unsigned int vec_base;
        struct cpuinfo_arc_ccm iccm, dccm;
        struct {
-               unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, pad1:3,
+               unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2,
                             fpu_sp:1, fpu_dp:1, pad2:6,
                             debug:1, ap:1, smart:1, rtt:1, pad3:4,
                             timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
index fb781e34f322fdd5aec20e9444bb395f4253c3a9..b3410ff6a62dbcc589ffa411f326d6954c8ba80c 100644 (file)
@@ -53,7 +53,7 @@ extern void arc_cache_init(void);
 extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len);
 extern void read_decode_cache_bcr(void);
 
-extern int ioc_exists;
+extern int ioc_enable;
 extern unsigned long perip_base, perip_end;
 
 #endif /* !__ASSEMBLY__ */
index 7096f97a14340f5d54766e21245c7ae779da0e72..aa2d6da9d187be21b1f38ac116f40941bb5dc39d 100644 (file)
@@ -54,7 +54,7 @@ extern int elf_check_arch(const struct elf32_hdr *);
  * the loader.  We need to make sure that it is out of the way of the program
  * that it will "exec", and that there is sufficient room for the brk.
  */
-#define ELF_ET_DYN_BASE                (2 * TASK_SIZE / 3)
+#define ELF_ET_DYN_BASE                (2UL * TASK_SIZE / 3)
 
 /*
  * When the program starts, a1 contains a pointer to a function to be
index 847e3bbe387fc92f9b4433bf7e08fc0b11e3ec70..c8fbe4114badd972a18b37de313f91ab7cffd482 100644 (file)
@@ -55,6 +55,22 @@ struct mcip_cmd {
 #define IDU_M_DISTRI_DEST              0x2
 };
 
+struct mcip_bcr {
+#ifdef CONFIG_CPU_BIG_ENDIAN
+               unsigned int pad3:8,
+                            idu:1, llm:1, num_cores:6,
+                            iocoh:1,  gfrc:1, dbg:1, pad2:1,
+                            msg:1, sem:1, ipi:1, pad:1,
+                            ver:8;
+#else
+               unsigned int ver:8,
+                            pad:1, ipi:1, sem:1, msg:1,
+                            pad2:1, dbg:1, gfrc:1, iocoh:1,
+                            num_cores:6, llm:1, idu:1,
+                            pad3:8;
+#endif
+};
+
 /*
  * MCIP programming model
  *
index 518222bb3f8ef4c551b88e93749bbc2efa6da1a8..6e91d8b339c3616b59d7b389353c477acba8a418 100644 (file)
@@ -18,6 +18,7 @@
 struct mod_arch_specific {
        void *unw_info;
        int unw_sec_idx;
+       const char *secstr;
 };
 #endif
 
index 48b37c693db39d6dd2e73df0671edbb01e3be3fa..cb954cdab07087bc6b49e72c8d117c77b905595c 100644 (file)
@@ -27,11 +27,6 @@ struct id_to_str {
        const char *str;
 };
 
-struct cpuinfo_data {
-       struct id_to_str info;
-       int up_range;
-};
-
 extern int root_mountflags, end_mem;
 
 void setup_processor(void);
@@ -43,5 +38,6 @@ void __init setup_arch_memory(void);
 #define IS_USED_RUN(v)         ((v) ? "" : "(not used) ")
 #define IS_USED_CFG(cfg)       IS_USED_RUN(IS_ENABLED(cfg))
 #define IS_AVAIL2(v, s, cfg)   IS_AVAIL1(v, s), IS_AVAIL1(v, IS_USED_CFG(cfg))
+#define IS_AVAIL3(v, v2, s)    IS_AVAIL1(v, s), IS_AVAIL1(v, IS_DISABLED_RUN(v2))
 
 #endif /* __ASMARC_SETUP_H */
index e56f9fcc558133277ca03d93461a56da5f02a4b9..772b67ca56e7bacb307fe5f5a944b1318b188b97 100644 (file)
@@ -17,6 +17,7 @@ int sys_clone_wrapper(int, int, int, int, int);
 int sys_cacheflush(uint32_t, uint32_t uint32_t);
 int sys_arc_settls(void *);
 int sys_arc_gettls(void);
+int sys_arc_usr_cmpxchg(int *, int, int);
 
 #include <asm-generic/syscalls.h>
 
index 41fa2ec9e02c7721717e5c513bc9703ebed5bed4..9a34136d84b2c77b45ee3b3b7a739f2d994151d4 100644 (file)
 
 #define NR_syscalls    __NR_syscalls
 
+/* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */
+#define __NR_sysfs             (__NR_arch_specific_syscall + 3)
+
 /* ARC specific syscall */
 #define __NR_cacheflush                (__NR_arch_specific_syscall + 0)
 #define __NR_arc_settls                (__NR_arch_specific_syscall + 1)
 #define __NR_arc_gettls                (__NR_arch_specific_syscall + 2)
+#define __NR_arc_usr_cmpxchg   (__NR_arch_specific_syscall + 4)
 
 __SYSCALL(__NR_cacheflush, sys_cacheflush)
 __SYSCALL(__NR_arc_settls, sys_arc_settls)
 __SYSCALL(__NR_arc_gettls, sys_arc_gettls)
-
-
-/* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */
-#define __NR_sysfs             (__NR_arch_specific_syscall + 3)
+__SYSCALL(__NR_arc_usr_cmpxchg, sys_arc_usr_cmpxchg)
 __SYSCALL(__NR_sysfs, sys_sysfs)
 
 #undef __SYSCALL
index 72f9179b1a24663b582b73d0bdc1972ec46befa9..c424d5abc318a220f07d4724b8796a35280f4e7e 100644 (file)
 #include <asm/mcip.h>
 #include <asm/setup.h>
 
-static char smp_cpuinfo_buf[128];
-static int idu_detected;
-
 static DEFINE_RAW_SPINLOCK(mcip_lock);
 
+#ifdef CONFIG_SMP
+
+static char smp_cpuinfo_buf[128];
+
 static void mcip_setup_per_cpu(int cpu)
 {
        smp_ipi_irq_setup(cpu, IPI_IRQ);
@@ -86,21 +87,7 @@ static void mcip_ipi_clear(int irq)
 
 static void mcip_probe_n_setup(void)
 {
-       struct mcip_bcr {
-#ifdef CONFIG_CPU_BIG_ENDIAN
-               unsigned int pad3:8,
-                            idu:1, llm:1, num_cores:6,
-                            iocoh:1,  gfrc:1, dbg:1, pad2:1,
-                            msg:1, sem:1, ipi:1, pad:1,
-                            ver:8;
-#else
-               unsigned int ver:8,
-                            pad:1, ipi:1, sem:1, msg:1,
-                            pad2:1, dbg:1, gfrc:1, iocoh:1,
-                            num_cores:6, llm:1, idu:1,
-                            pad3:8;
-#endif
-       } mp;
+       struct mcip_bcr mp;
 
        READ_BCR(ARC_REG_MCIP_BCR, mp);
 
@@ -114,7 +101,6 @@ static void mcip_probe_n_setup(void)
                IS_AVAIL1(mp.gfrc, "GFRC"));
 
        cpuinfo_arc700[0].extn.gfrc = mp.gfrc;
-       idu_detected = mp.idu;
 
        if (mp.dbg) {
                __mcip_cmd_data(CMD_DEBUG_SET_SELECT, 0, 0xf);
@@ -130,6 +116,8 @@ struct plat_smp_ops plat_smp_ops = {
        .ipi_clear      = mcip_ipi_clear,
 };
 
+#endif
+
 /***************************************************************************
  * ARCv2 Interrupt Distribution Unit (IDU)
  *
@@ -295,8 +283,11 @@ idu_of_init(struct device_node *intc, struct device_node *parent)
        /* Read IDU BCR to confirm nr_irqs */
        int nr_irqs = of_irq_count(intc);
        int i, irq;
+       struct mcip_bcr mp;
+
+       READ_BCR(ARC_REG_MCIP_BCR, mp);
 
-       if (!idu_detected)
+       if (!mp.idu)
                panic("IDU not detected, but DeviceTree using it");
 
        pr_info("MCIP: IDU referenced from Devicetree %d irqs\n", nr_irqs);
index 9a2849756022c01c2b3c6da9b7b5a0e371ed2e20..42e964db29677877438f8b9bc8e6225cc5f64174 100644 (file)
@@ -30,17 +30,9 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
                              char *secstr, struct module *mod)
 {
 #ifdef CONFIG_ARC_DW2_UNWIND
-       int i;
-
        mod->arch.unw_sec_idx = 0;
        mod->arch.unw_info = NULL;
-
-       for (i = 1; i < hdr->e_shnum; i++) {
-               if (strcmp(secstr+sechdrs[i].sh_name, ".eh_frame") == 0) {
-                       mod->arch.unw_sec_idx = i;
-                       break;
-               }
-       }
+       mod->arch.secstr = secstr;
 #endif
        return 0;
 }
@@ -59,29 +51,33 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
                       unsigned int relsec,     /* sec index for relo sec */
                       struct module *module)
 {
-       int i, n;
+       int i, n, relo_type;
        Elf32_Rela *rel_entry = (void *)sechdrs[relsec].sh_addr;
        Elf32_Sym *sym_entry, *sym_sec;
-       Elf32_Addr relocation;
-       Elf32_Addr location;
-       Elf32_Addr sec_to_patch;
-       int relo_type;
-
-       sec_to_patch = sechdrs[sechdrs[relsec].sh_info].sh_addr;
+       Elf32_Addr relocation, location, tgt_addr;
+       unsigned int tgtsec;
+
+       /*
+        * @relsec has relocations e.g. .rela.init.text
+        * @tgtsec is section to patch e.g. .init.text
+        */
+       tgtsec = sechdrs[relsec].sh_info;
+       tgt_addr = sechdrs[tgtsec].sh_addr;
        sym_sec = (Elf32_Sym *) sechdrs[symindex].sh_addr;
        n = sechdrs[relsec].sh_size / sizeof(*rel_entry);
 
-       pr_debug("\n========== Module Sym reloc ===========================\n");
-       pr_debug("Section to fixup %x\n", sec_to_patch);
+       pr_debug("\nSection to fixup %s @%x\n",
+                module->arch.secstr + sechdrs[tgtsec].sh_name, tgt_addr);
        pr_debug("=========================================================\n");
-       pr_debug("rela->r_off | rela->addend | sym->st_value | ADDR | VALUE\n");
+       pr_debug("r_off\tr_add\tst_value ADDRESS  VALUE\n");
        pr_debug("=========================================================\n");
 
        /* Loop thru entries in relocation section */
        for (i = 0; i < n; i++) {
+               const char *s;
 
                /* This is where to make the change */
-               location = sec_to_patch + rel_entry[i].r_offset;
+               location = tgt_addr + rel_entry[i].r_offset;
 
                /* This is the symbol it is referring to.  Note that all
                   undefined symbols have been resolved.  */
@@ -89,10 +85,15 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
 
                relocation = sym_entry->st_value + rel_entry[i].r_addend;
 
-               pr_debug("\t%x\t\t%x\t\t%x  %x %x [%s]\n",
-                       rel_entry[i].r_offset, rel_entry[i].r_addend,
-                       sym_entry->st_value, location, relocation,
-                       strtab + sym_entry->st_name);
+               if (sym_entry->st_name == 0 && ELF_ST_TYPE (sym_entry->st_info) == STT_SECTION) {
+                       s = module->arch.secstr + sechdrs[sym_entry->st_shndx].sh_name;
+               } else {
+                       s = strtab + sym_entry->st_name;
+               }
+
+               pr_debug("   %x\t%x\t%x %x %x [%s]\n",
+                        rel_entry[i].r_offset, rel_entry[i].r_addend,
+                        sym_entry->st_value, location, relocation, s);
 
                /* This assumes modules are built with -mlong-calls
                 * so any branches/jumps are absolute 32 bit jmps
@@ -111,6 +112,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
                        goto relo_err;
 
        }
+
+       if (strcmp(module->arch.secstr+sechdrs[tgtsec].sh_name, ".eh_frame") == 0)
+               module->arch.unw_sec_idx = tgtsec;
+
        return 0;
 
 relo_err:
index be1972bd2729e7a41013d521e9349cd4ac028499..59aa43cb146e732e01544790913f0b018a923cc6 100644 (file)
@@ -41,6 +41,39 @@ SYSCALL_DEFINE0(arc_gettls)
        return task_thread_info(current)->thr_ptr;
 }
 
+SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
+{
+       int uval;
+       int ret;
+
+       /*
+        * This is only for old cores lacking LLOCK/SCOND, which by defintion
+        * can't possibly be SMP. Thus doesn't need to be SMP safe.
+        * And this also helps reduce the overhead for serializing in
+        * the UP case
+        */
+       WARN_ON_ONCE(IS_ENABLED(CONFIG_SMP));
+
+       if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
+               return -EFAULT;
+
+       preempt_disable();
+
+       ret = __get_user(uval, uaddr);
+       if (ret)
+               goto done;
+
+       if (uval != expected)
+               ret = -EAGAIN;
+       else
+               ret = __put_user(new, uaddr);
+
+done:
+       preempt_enable();
+
+       return ret;
+}
+
 void arch_cpu_idle(void)
 {
        /* sleep, but enable all interrupts before committing */
index 3df7f9c72f4271478e1ca26cd90f1d59da475129..0385df77a69738f06a45d45553b1c0d6e0980e30 100644 (file)
@@ -40,6 +40,29 @@ struct task_struct *_current_task[NR_CPUS];  /* For stack switching */
 
 struct cpuinfo_arc cpuinfo_arc700[NR_CPUS];
 
+static const struct id_to_str arc_cpu_rel[] = {
+#ifdef CONFIG_ISA_ARCOMPACT
+       { 0x34, "R4.10"},
+       { 0x35, "R4.11"},
+#else
+       { 0x51, "R2.0" },
+       { 0x52, "R2.1" },
+       { 0x53, "R3.0" },
+#endif
+       { 0x00, NULL   }
+};
+
+static const struct id_to_str arc_cpu_nm[] = {
+#ifdef CONFIG_ISA_ARCOMPACT
+       { 0x20, "ARC 600"   },
+       { 0x30, "ARC 770"   },  /* 750 identified seperately */
+#else
+       { 0x40, "ARC EM"  },
+       { 0x50, "ARC HS38"  },
+#endif
+       { 0x00, "Unknown"   }
+};
+
 static void read_decode_ccm_bcr(struct cpuinfo_arc *cpu)
 {
        if (is_isa_arcompact()) {
@@ -92,11 +115,26 @@ static void read_arc_build_cfg_regs(void)
        struct bcr_timer timer;
        struct bcr_generic bcr;
        struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
+       const struct id_to_str *tbl;
+
        FIX_PTR(cpu);
 
        READ_BCR(AUX_IDENTITY, cpu->core);
        READ_BCR(ARC_REG_ISA_CFG_BCR, cpu->isa);
 
+       for (tbl = &arc_cpu_rel[0]; tbl->id != 0; tbl++) {
+               if (cpu->core.family == tbl->id) {
+                       cpu->details = tbl->str;
+                       break;
+               }
+       }
+
+       for (tbl = &arc_cpu_nm[0]; tbl->id != 0; tbl++) {
+               if ((cpu->core.family & 0xF0) == tbl->id)
+                       break;
+       }
+       cpu->name = tbl->str;
+
        READ_BCR(ARC_REG_TIMERS_BCR, timer);
        cpu->extn.timer0 = timer.t0;
        cpu->extn.timer1 = timer.t1;
@@ -111,6 +149,9 @@ static void read_arc_build_cfg_regs(void)
        cpu->extn.swap = read_aux_reg(ARC_REG_SWAP_BCR) ? 1 : 0;        /* 1,3 */
        cpu->extn.crc = read_aux_reg(ARC_REG_CRC_BCR) ? 1 : 0;
        cpu->extn.minmax = read_aux_reg(ARC_REG_MIXMAX_BCR) > 1 ? 1 : 0; /* 2 */
+       cpu->extn.swape = (cpu->core.family >= 0x34) ? 1 :
+                               IS_ENABLED(CONFIG_ARC_HAS_SWAPE);
+
        READ_BCR(ARC_REG_XY_MEM_BCR, cpu->extn_xymem);
 
        /* Read CCM BCRs for boot reporting even if not enabled in Kconfig */
@@ -160,64 +201,38 @@ static void read_arc_build_cfg_regs(void)
        cpu->extn.rtt = bcr.ver ? 1 : 0;
 
        cpu->extn.debug = cpu->extn.ap | cpu->extn.smart | cpu->extn.rtt;
-}
 
-static const struct cpuinfo_data arc_cpu_tbl[] = {
-#ifdef CONFIG_ISA_ARCOMPACT
-       { {0x20, "ARC 600"      }, 0x2F},
-       { {0x30, "ARC 700"      }, 0x33},
-       { {0x34, "ARC 700 R4.10"}, 0x34},
-       { {0x35, "ARC 700 R4.11"}, 0x35},
-#else
-       { {0x50, "ARC HS38 R2.0"}, 0x51},
-       { {0x52, "ARC HS38 R2.1"}, 0x52},
-       { {0x53, "ARC HS38 R3.0"}, 0x53},
-#endif
-       { {0x00, NULL           } }
-};
+       /* some hacks for lack of feature BCR info in old ARC700 cores */
+       if (is_isa_arcompact()) {
+               if (!cpu->isa.ver)      /* ISA BCR absent, use Kconfig info */
+                       cpu->isa.atomic = IS_ENABLED(CONFIG_ARC_HAS_LLSC);
+               else
+                       cpu->isa.atomic = cpu->isa.atomic1;
 
+               cpu->isa.be = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN);
+
+                /* there's no direct way to distinguish 750 vs. 770 */
+               if (unlikely(cpu->core.family < 0x34 || cpu->mmu.ver < 3))
+                       cpu->name = "ARC750";
+       }
+}
 
 static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
 {
        struct cpuinfo_arc *cpu = &cpuinfo_arc700[cpu_id];
        struct bcr_identity *core = &cpu->core;
-       const struct cpuinfo_data *tbl;
-       char *isa_nm;
-       int i, be, atomic;
-       int n = 0;
+       int i, n = 0;
 
        FIX_PTR(cpu);
 
-       if (is_isa_arcompact()) {
-               isa_nm = "ARCompact";
-               be = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN);
-
-               atomic = cpu->isa.atomic1;
-               if (!cpu->isa.ver)      /* ISA BCR absent, use Kconfig info */
-                       atomic = IS_ENABLED(CONFIG_ARC_HAS_LLSC);
-       } else {
-               isa_nm = "ARCv2";
-               be = cpu->isa.be;
-               atomic = cpu->isa.atomic;
-       }
-
        n += scnprintf(buf + n, len - n,
                       "\nIDENTITY\t: ARCVER [%#02x] ARCNUM [%#02x] CHIPID [%#4x]\n",
                       core->family, core->cpu_id, core->chip_id);
 
-       for (tbl = &arc_cpu_tbl[0]; tbl->info.id != 0; tbl++) {
-               if ((core->family >= tbl->info.id) &&
-                   (core->family <= tbl->up_range)) {
-                       n += scnprintf(buf + n, len - n,
-                                      "processor [%d]\t: %s (%s ISA) %s\n",
-                                      cpu_id, tbl->info.str, isa_nm,
-                                      IS_AVAIL1(be, "[Big-Endian]"));
-                       break;
-               }
-       }
-
-       if (tbl->info.id == 0)
-               n += scnprintf(buf + n, len - n, "UNKNOWN ARC Processor\n");
+       n += scnprintf(buf + n, len - n, "processor [%d]\t: %s %s (%s ISA) %s\n",
+                      cpu_id, cpu->name, cpu->details,
+                      is_isa_arcompact() ? "ARCompact" : "ARCv2",
+                      IS_AVAIL1(cpu->isa.be, "[Big-Endian]"));
 
        n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s\nISA Extn\t: ",
                       IS_AVAIL1(cpu->extn.timer0, "Timer0 "),
@@ -226,7 +241,7 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
                                 CONFIG_ARC_HAS_RTC));
 
        n += i = scnprintf(buf + n, len - n, "%s%s%s%s%s",
-                          IS_AVAIL2(atomic, "atomic ", CONFIG_ARC_HAS_LLSC),
+                          IS_AVAIL2(cpu->isa.atomic, "atomic ", CONFIG_ARC_HAS_LLSC),
                           IS_AVAIL2(cpu->isa.ldd, "ll64 ", CONFIG_ARC_HAS_LL64),
                           IS_AVAIL1(cpu->isa.unalign, "unalign (not used)"));
 
@@ -253,7 +268,7 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
                       IS_AVAIL1(cpu->extn.swap, "swap "),
                       IS_AVAIL1(cpu->extn.minmax, "minmax "),
                       IS_AVAIL1(cpu->extn.crc, "crc "),
-                      IS_AVAIL2(1, "swape", CONFIG_ARC_HAS_SWAPE));
+                      IS_AVAIL2(cpu->extn.swape, "swape", CONFIG_ARC_HAS_SWAPE));
 
        if (cpu->bpu.ver)
                n += scnprintf(buf + n, len - n,
@@ -272,9 +287,7 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
 
        FIX_PTR(cpu);
 
-       n += scnprintf(buf + n, len - n,
-                      "Vector Table\t: %#x\nPeripherals\t: %#lx:%#lx\n",
-                      cpu->vec_base, perip_base, perip_end);
+       n += scnprintf(buf + n, len - n, "Vector Table\t: %#x\n", cpu->vec_base);
 
        if (cpu->extn.fpu_sp || cpu->extn.fpu_dp)
                n += scnprintf(buf + n, len - n, "FPU\t\t: %s%s\n",
@@ -507,7 +520,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
         * way to pass it w/o having to kmalloc/free a 2 byte string.
         * Encode cpu-id as 0xFFcccc, which is decoded by show routine.
         */
-       return *pos < num_possible_cpus() ? cpu_to_ptr(*pos) : NULL;
+       return *pos < nr_cpu_ids ? cpu_to_ptr(*pos) : NULL;
 }
 
 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
index 934150e7ac4895ef9e4523fd1ffabbdacce2dd74..82f9bc819f4a2d40f9849d88cc4631fa8f07d7a8 100644 (file)
@@ -237,113 +237,3 @@ void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
        if (!user_mode(regs))
                show_stacktrace(current, regs);
 }
-
-#ifdef CONFIG_DEBUG_FS
-
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/mount.h>
-#include <linux/pagemap.h>
-#include <linux/init.h>
-#include <linux/namei.h>
-#include <linux/debugfs.h>
-
-static struct dentry *test_dentry;
-static struct dentry *test_dir;
-static struct dentry *test_u32_dentry;
-
-static u32 clr_on_read = 1;
-
-#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT
-u32 numitlb, numdtlb, num_pte_not_present;
-
-static int fill_display_data(char *kbuf)
-{
-       size_t num = 0;
-       num += sprintf(kbuf + num, "I-TLB Miss %x\n", numitlb);
-       num += sprintf(kbuf + num, "D-TLB Miss %x\n", numdtlb);
-       num += sprintf(kbuf + num, "PTE not present %x\n", num_pte_not_present);
-
-       if (clr_on_read)
-               numitlb = numdtlb = num_pte_not_present = 0;
-
-       return num;
-}
-
-static int tlb_stats_open(struct inode *inode, struct file *file)
-{
-       file->private_data = (void *)__get_free_page(GFP_KERNEL);
-       return 0;
-}
-
-/* called on user read(): display the counters */
-static ssize_t tlb_stats_output(struct file *file,     /* file descriptor */
-                               char __user *user_buf,  /* user buffer */
-                               size_t len,             /* length of buffer */
-                               loff_t *offset)         /* offset in the file */
-{
-       size_t num;
-       char *kbuf = (char *)file->private_data;
-
-       /* All of the data can he shoved in one iteration */
-       if (*offset != 0)
-               return 0;
-
-       num = fill_display_data(kbuf);
-
-       /* simple_read_from_buffer() is helper for copy to user space
-          It copies up to @2 (num) bytes from kernel buffer @4 (kbuf) at offset
-          @3 (offset) into the user space address starting at @1 (user_buf).
-          @5 (len) is max size of user buffer
-        */
-       return simple_read_from_buffer(user_buf, num, offset, kbuf, len);
-}
-
-/* called on user write : clears the counters */
-static ssize_t tlb_stats_clear(struct file *file, const char __user *user_buf,
-                              size_t length, loff_t *offset)
-{
-       numitlb = numdtlb = num_pte_not_present = 0;
-       return length;
-}
-
-static int tlb_stats_close(struct inode *inode, struct file *file)
-{
-       free_page((unsigned long)(file->private_data));
-       return 0;
-}
-
-static const struct file_operations tlb_stats_file_ops = {
-       .read = tlb_stats_output,
-       .write = tlb_stats_clear,
-       .open = tlb_stats_open,
-       .release = tlb_stats_close
-};
-#endif
-
-static int __init arc_debugfs_init(void)
-{
-       test_dir = debugfs_create_dir("arc", NULL);
-
-#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT
-       test_dentry = debugfs_create_file("tlb_stats", 0444, test_dir, NULL,
-                                         &tlb_stats_file_ops);
-#endif
-
-       test_u32_dentry =
-           debugfs_create_u32("clr_on_read", 0444, test_dir, &clr_on_read);
-
-       return 0;
-}
-
-module_init(arc_debugfs_init);
-
-static void __exit arc_debugfs_exit(void)
-{
-       debugfs_remove(test_u32_dentry);
-       debugfs_remove(test_dentry);
-       debugfs_remove(test_dir);
-}
-module_exit(arc_debugfs_exit);
-
-#endif
index 97dddbefb86a93fa2f1e05275b6f25db3f283644..2b96cfc3be751a6d56fd13a9531c40e4f8debd8b 100644 (file)
@@ -22,8 +22,8 @@
 #include <asm/setup.h>
 
 static int l2_line_sz;
-int ioc_exists;
-volatile int slc_enable = 1, ioc_enable = 1;
+static int ioc_exists;
+int slc_enable = 1, ioc_enable = 1;
 unsigned long perip_base = ARC_UNCACHED_ADDR_SPACE; /* legacy value for boot */
 unsigned long perip_end = 0xFFFFFFFF; /* legacy value */
 
@@ -53,18 +53,15 @@ char *arc_cache_mumbojumbo(int c, char *buf, int len)
        PR_CACHE(&cpuinfo_arc700[c].icache, CONFIG_ARC_HAS_ICACHE, "I-Cache");
        PR_CACHE(&cpuinfo_arc700[c].dcache, CONFIG_ARC_HAS_DCACHE, "D-Cache");
 
-       if (!is_isa_arcv2())
-                return buf;
-
        p = &cpuinfo_arc700[c].slc;
        if (p->ver)
                n += scnprintf(buf + n, len - n,
                               "SLC\t\t: %uK, %uB Line%s\n",
                               p->sz_k, p->line_len, IS_USED_RUN(slc_enable));
 
-       if (ioc_exists)
-               n += scnprintf(buf + n, len - n, "IOC\t\t:%s\n",
-                               IS_DISABLED_RUN(ioc_enable));
+       n += scnprintf(buf + n, len - n, "Peripherals\t: %#lx%s%s\n",
+                      perip_base,
+                      IS_AVAIL3(ioc_exists, ioc_enable, ", IO-Coherency "));
 
        return buf;
 }
@@ -113,8 +110,10 @@ static void read_decode_cache_bcr_arcv2(int cpu)
        }
 
        READ_BCR(ARC_REG_CLUSTER_BCR, cbcr);
-       if (cbcr.c && ioc_enable)
+       if (cbcr.c)
                ioc_exists = 1;
+       else
+               ioc_enable = 0;
 
        /* HS 2.0 didn't have AUX_VOL */
        if (cpuinfo_arc700[cpu].core.family > 0x51) {
@@ -1002,7 +1001,7 @@ void arc_cache_init(void)
                        read_aux_reg(ARC_REG_SLC_CTRL) | SLC_CTRL_DISABLE);
        }
 
-       if (is_isa_arcv2() && ioc_exists) {
+       if (is_isa_arcv2() && ioc_enable) {
                /* IO coherency base - 0x8z */
                write_aux_reg(ARC_REG_IO_COH_AP0_BASE, 0x80000);
                /* IO coherency aperture size - 512Mb: 0x8z-0xAz */
index 20afc65e22dc780c69dea280acfc6907a1680e9f..60aab5a7522b50c75e9e008214586a9fee182b10 100644 (file)
@@ -45,7 +45,7 @@ static void *arc_dma_alloc(struct device *dev, size_t size,
         *   -For coherent data, Read/Write to buffers terminate early in cache
         *   (vs. always going to memory - thus are faster)
         */
-       if ((is_isa_arcv2() && ioc_exists) ||
+       if ((is_isa_arcv2() && ioc_enable) ||
            (attrs & DMA_ATTR_NON_CONSISTENT))
                need_coh = 0;
 
@@ -97,7 +97,7 @@ static void arc_dma_free(struct device *dev, size_t size, void *vaddr,
        int is_non_coh = 1;
 
        is_non_coh = (attrs & DMA_ATTR_NON_CONSISTENT) ||
-                       (is_isa_arcv2() && ioc_exists);
+                       (is_isa_arcv2() && ioc_enable);
 
        if (PageHighMem(page) || !is_non_coh)
                iounmap((void __force __iomem *)vaddr);
index ec868a9081a1103790e594063d1544c0766be3fb..bdb295e09160b2037c9dd90058963800cbe78d08 100644 (file)
@@ -793,16 +793,16 @@ char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len)
        char super_pg[64] = "";
 
        if (p_mmu->s_pg_sz_m)
-               scnprintf(super_pg, 64, "%dM Super Page%s, ",
+               scnprintf(super_pg, 64, "%dM Super Page %s",
                          p_mmu->s_pg_sz_m,
                          IS_USED_CFG(CONFIG_TRANSPARENT_HUGEPAGE));
 
        n += scnprintf(buf + n, len - n,
-                     "MMU [v%x]\t: %dk PAGE, %sJTLB %d (%dx%d), uDTLB %d, uITLB %d %s%s\n",
+                     "MMU [v%x]\t: %dk PAGE, %sJTLB %d (%dx%d), uDTLB %d, uITLB %d%s%s\n",
                       p_mmu->ver, p_mmu->pg_sz_k, super_pg,
                       p_mmu->sets * p_mmu->ways, p_mmu->sets, p_mmu->ways,
                       p_mmu->u_dtlb, p_mmu->u_itlb,
-                      IS_AVAIL2(p_mmu->pae, "PAE40 ", CONFIG_ARC_HAS_PAE40));
+                      IS_AVAIL2(p_mmu->pae, "PAE40 ", CONFIG_ARC_HAS_PAE40));
 
        return buf;
 }
index f1967eeb32e757bb906580fecfce84a309df9983..b30e4e36bb00dd3c5feaa685fe08dd0629404119 100644 (file)
@@ -237,15 +237,6 @@ ex_saved_reg1:
 
 2:
 
-#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT
-       and.f 0, r0, _PAGE_PRESENT
-       bz   1f
-       ld   r3, [num_pte_not_present]
-       add  r3, r3, 1
-       st   r3, [num_pte_not_present]
-1:
-#endif
-
 .endm
 
 ;-----------------------------------------------------------------
@@ -309,12 +300,6 @@ ENTRY(EV_TLBMissI)
 
        TLBMISS_FREEUP_REGS
 
-#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT
-       ld  r0, [@numitlb]
-       add r0, r0, 1
-       st  r0, [@numitlb]
-#endif
-
        ;----------------------------------------------------------------
        ; Get the PTE corresponding to V-addr accessed, r2 is setup with EFA
        LOAD_FAULT_PTE
@@ -349,12 +334,6 @@ ENTRY(EV_TLBMissD)
 
        TLBMISS_FREEUP_REGS
 
-#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT
-       ld  r0, [@numdtlb]
-       add r0, r0, 1
-       st  r0, [@numdtlb]
-#endif
-
        ;----------------------------------------------------------------
        ; Get the PTE corresponding to V-addr accessed
        ; If PTE exists, it will setup, r0 = PTE, r1 = Ptr to PTE, r2 = EFA
index 6f8cd1436ee8525161693d7ba665aa0e5abb652e..ecc3a359de9a59f54aaf2cbea61154e76ee2b3a1 100644 (file)
@@ -136,6 +136,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
        exynos4210-smdkv310.dtb \
        exynos4210-trats.dtb \
        exynos4210-universal_c210.dtb \
+       exynos4412-itop-elite.dtb \
        exynos4412-odroidu3.dtb \
        exynos4412-odroidx.dtb \
        exynos4412-odroidx2.dtb \
@@ -330,6 +331,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6dl-aristainetos_7.dtb \
        imx6dl-aristainetos2_4.dtb \
        imx6dl-aristainetos2_7.dtb \
+       imx6dl-colibri-eval-v3.dtb \
        imx6dl-cubox-i.dtb \
        imx6dl-dfi-fs700-m60.dtb \
        imx6dl-gw51xx.dtb \
@@ -340,6 +342,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6dl-gw552x.dtb \
        imx6dl-gw553x.dtb \
        imx6dl-hummingboard.dtb \
+       imx6dl-icore.dtb \
        imx6dl-nit6xlite.dtb \
        imx6dl-nitrogen6x.dtb \
        imx6dl-phytec-pbab01.dtb \
@@ -381,10 +384,12 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6q-gw553x.dtb \
        imx6q-h100.dtb \
        imx6q-hummingboard.dtb \
+       imx6q-icore.dtb \
        imx6q-icore-rqs.dtb \
        imx6q-marsboard.dtb \
        imx6q-nitrogen6x.dtb \
        imx6q-nitrogen6_max.dtb \
+       imx6q-nitrogen6_som2.dtb \
        imx6q-novena.dtb \
        imx6q-phytec-pbab01.dtb \
        imx6q-rex-pro.dtb \
@@ -416,14 +421,19 @@ dtb-$(CONFIG_SOC_IMX6SX) += \
        imx6sx-sabreauto.dtb \
        imx6sx-sdb-reva.dtb \
        imx6sx-sdb-sai.dtb \
-       imx6sx-sdb.dtb
+       imx6sx-sdb.dtb \
+       imx6sx-udoo-neo-basic.dtb \
+       imx6sx-udoo-neo-extended.dtb \
+       imx6sx-udoo-neo-full.dtb
 dtb-$(CONFIG_SOC_IMX6UL) += \
        imx6ul-14x14-evk.dtb \
        imx6ul-geam-kit.dtb \
+       imx6ul-liteboard.dtb \
        imx6ul-pico-hobbit.dtb \
        imx6ul-tx6ul-0010.dtb \
        imx6ul-tx6ul-0011.dtb \
-       imx6ul-tx6ul-mainboard.dtb
+       imx6ul-tx6ul-mainboard.dtb \
+       imx6ull-14x14-evk.dtb
 dtb-$(CONFIG_SOC_IMX7D) += \
        imx7d-cl-som-imx7.dtb \
        imx7d-colibri-eval-v3.dtb \
@@ -561,6 +571,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
        am335x-sl50.dtb \
        am335x-wega-rdk.dtb
 dtb-$(CONFIG_ARCH_OMAP4) += \
+       omap4-droid4-xt894.dtb \
        omap4-duovero-parlor.dtb \
        omap4-kc1.dtb \
        omap4-panda.dtb \
@@ -590,13 +601,15 @@ dtb-$(CONFIG_SOC_DRA7XX) += \
        am572x-idk.dtb \
        dra7-evm.dtb \
        dra72-evm.dtb \
-       dra72-evm-revc.dtb
+       dra72-evm-revc.dtb \
+       dra71-evm.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += \
        orion5x-kuroboxpro.dtb \
        orion5x-lacie-d2-network.dtb \
        orion5x-lacie-ethernet-disk-mini-v2.dtb \
        orion5x-linkstation-lsgl.dtb \
        orion5x-linkstation-lswtgl.dtb \
+       orion5x-lschl.dtb \
        orion5x-lswsgl.dtb \
        orion5x-maxtor-shared-storage-2.dtb \
        orion5x-netgear-wnr854t.dtb \
@@ -604,7 +617,8 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
 dtb-$(CONFIG_ARCH_PRIMA2) += \
        prima2-evb.dtb
 dtb-$(CONFIG_ARCH_OXNAS) += \
-       wd-mbwe.dtb
+       wd-mbwe.dtb \
+       cloudengines-pogoplug-series-3.dtb
 dtb-$(CONFIG_ARCH_QCOM) += \
        qcom-apq8060-dragonboard.dtb \
        qcom-apq8064-arrow-sd-600eval.dtb \
@@ -620,7 +634,8 @@ dtb-$(CONFIG_ARCH_QCOM) += \
        qcom-msm8660-surf.dtb \
        qcom-msm8960-cdp.dtb \
        qcom-msm8974-lge-nexus5-hammerhead.dtb \
-       qcom-msm8974-sony-xperia-honami.dtb
+       qcom-msm8974-sony-xperia-honami.dtb \
+       qcom-mdm9615-wp8548-mangoh-green.dtb
 dtb-$(CONFIG_ARCH_REALVIEW) += \
        arm-realview-pb1176.dtb \
        arm-realview-pb11mp.dtb \
@@ -639,7 +654,9 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
        rk3036-kylin.dtb \
        rk3066a-bqcurie2.dtb \
        rk3066a-marsboard.dtb \
+       rk3066a-mk808.dtb \
        rk3066a-rayeager.dtb \
+       rk3188-px3-evb.dtb \
        rk3188-radxarock.dtb \
        rk3228-evb.dtb \
        rk3229-evb.dtb \
@@ -692,12 +709,14 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
        sh73a0-kzm9g.dtb
 dtb-$(CONFIG_ARCH_SOCFPGA) += \
        socfpga_arria5_socdk.dtb \
+       socfpga_arria10_socdk_qspi.dtb \
        socfpga_arria10_socdk_sdmmc.dtb \
        socfpga_cyclone5_mcvevk.dtb \
        socfpga_cyclone5_socdk.dtb \
        socfpga_cyclone5_de0_sockit.dtb \
        socfpga_cyclone5_sockit.dtb \
        socfpga_cyclone5_socrates.dtb \
+       socfpga_cyclone5_sodia.dtb \
        socfpga_cyclone5_vining_fpga.dtb \
        socfpga_vt.dtb
 dtb-$(CONFIG_ARCH_SPEAR13XX) += \
@@ -714,16 +733,12 @@ dtb-$(CONFIG_ARCH_STI) += \
        stih407-b2120.dtb \
        stih410-b2120.dtb \
        stih410-b2260.dtb \
-       stih415-b2000.dtb \
-       stih415-b2020.dtb \
-       stih416-b2000.dtb \
-       stih416-b2020.dtb \
-       stih416-b2020e.dtb \
        stih418-b2199.dtb
 dtb-$(CONFIG_ARCH_STM32)+= \
        stm32f429-disco.dtb \
        stm32f469-disco.dtb \
-       stm32429i-eval.dtb
+       stm32429i-eval.dtb \
+       stm32746g-eval.dtb
 dtb-$(CONFIG_MACH_SUN4I) += \
        sun4i-a10-a1000.dtb \
        sun4i-a10-ba10-tvbox.dtb \
@@ -747,7 +762,6 @@ dtb-$(CONFIG_MACH_SUN4I) += \
        sun4i-a10-pcduino2.dtb \
        sun4i-a10-pov-protab2-ips9.dtb
 dtb-$(CONFIG_MACH_SUN5I) += \
-       ntc-gr8-evb.dtb \
        sun5i-a10s-auxtek-t003.dtb \
        sun5i-a10s-auxtek-t004.dtb \
        sun5i-a10s-mk802.dtb \
@@ -763,6 +777,8 @@ dtb-$(CONFIG_MACH_SUN5I) += \
        sun5i-a13-olinuxino-micro.dtb \
        sun5i-a13-q8-tablet.dtb \
        sun5i-a13-utoo-p66.dtb \
+       sun5i-gr8-chip-pro.dtb \
+       sun5i-gr8-evb.dtb \
        sun5i-r8-chip.dtb
 dtb-$(CONFIG_MACH_SUN6I) += \
        sun6i-a31-app4-evb1.dtb \
index d0faa7b8c5da91f318c2de4c5be19af910f17386..f599350dd3052da41a686321d164b816408cf7f6 100644 (file)
@@ -114,7 +114,7 @@ &usb0 {
 
 &usb1 {
        status = "okay";
-       dr_mode = "otg";
+       dr_mode = "host";
 };
 
 &cpsw_emac0 {
index dd45d172a892a12dcc7947e1caaddcca547d0862..09b954154e6bbdc54361a52deba1e2781da196cb 100644 (file)
@@ -406,3 +406,7 @@ &aes {
 &gpio0 {
        ti,no-reset-on-init;
 };
+
+&gpio3 {
+       ti,no-reset-on-init;
+};
index 007b5e5a51a9fc83c3ffcbc955ba8b9b50c4ff4b..dc561d505bbe2ce10054c7bc19452b0b4b76fc4f 100644 (file)
@@ -6,6 +6,8 @@
  * published by the Free Software Foundation.
  */
 
+#include <dt-bindings/mfd/tps65217.h>
+
 / {
        cpus {
                cpu@0 {
@@ -310,8 +312,23 @@ &tps {
         * by the hardware problems. (Tip: double-check by performing a current
         * measurement after shutdown: it should be less than 1 mA.)
         */
+
+       interrupts = <7>; /* NMI */
+       interrupt-parent = <&intc>;
+
        ti,pmic-shutdown-controller;
 
+       charger {
+               interrupts = <TPS65217_IRQ_AC>, <TPS65217_IRQ_USB>;
+               interrupts-names = "AC", "USB";
+               status = "okay";
+       };
+
+       pwrbutton {
+               interrupts = <TPS65217_IRQ_PB>;
+               status = "okay";
+       };
+
        regulators {
                dcdc1_reg: regulator@0 {
                        regulator-name = "vdds_dpr";
@@ -393,3 +410,8 @@ &aes {
 &sham {
        status = "okay";
 };
+
+&rtc {
+       clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
+       clock-names = "ext-clk", "int-clk";
+};
index e82432c79f85f3a0a1d089cb3ba7a633e96bf9df..c2186ec2834b4c297197ba76708b29e24dca7023 100644 (file)
@@ -783,3 +783,8 @@ &dcan1 {
        pinctrl-names = "default";
        pinctrl-0 = <&dcan1_pins_default>;
 };
+
+&rtc {
+       clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
+       clock-names = "ext-clk", "int-clk";
+};
index 975c36e332a2583e778d3dc41390ed67577693c8..e2548d1ce753a659acbcdd72ef7d2af4d78afdbf 100644 (file)
@@ -715,3 +715,8 @@ &lcdc {
 
        blue-and-red-wiring = "crossed";
 };
+
+&rtc {
+       clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
+       clock-names = "ext-clk", "int-clk";
+};
index 194d884c9de13781f586ca5f8dbce474d8ffdebf..64c8aa9057a3366b746078a51e662f76a35e8f4b 100644 (file)
@@ -130,6 +130,7 @@ scm: scm@210000 {
                                reg = <0x210000 0x2000>;
                                #address-cells = <1>;
                                #size-cells = <1>;
+                               #pinctrl-cells = <1>;
                                ranges = <0 0x210000 0x2000>;
 
                                am33xx_pinmux: pinmux@800 {
@@ -137,6 +138,7 @@ am33xx_pinmux: pinmux@800 {
                                        reg = <0x800 0x238>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        pinctrl-single,register-width = <32>;
                                        pinctrl-single,function-mask = <0x7f>;
                                };
@@ -505,6 +507,8 @@ rtc: rtc@44e3e000 {
                        interrupts = <75
                                      76>;
                        ti,hwmods = "rtc";
+                       clocks = <&clkdiv32k_ick>;
+                       clock-names = "int-clk";
                };
 
                spi0: spi@48030000 {
@@ -855,6 +859,8 @@ tscadc: tscadc@44e0d000 {
                        interrupts = <16>;
                        ti,hwmods = "adc_tsc";
                        status = "disabled";
+                       dmas = <&edma 53 0>, <&edma 57 0>;
+                       dma-names = "fifo0", "fifo1";
 
                        tsc {
                                compatible = "ti,am3359-tsc";
index 0db19d39d24c138a3b34a9ef983e840c47bfc8f6..9fe545dbfa89bb446b553506eb16bd51c4cc0f5f 100644 (file)
@@ -66,6 +66,7 @@ omap3_pmx_core2: pinmux@480025d8 {
                        reg = <0x480025d8 0x24>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #pinctrl-cells = <1>;
                        #interrupt-cells = <1>;
                        interrupt-controller;
                        pinctrl-single,register-width = <16>;
index a275fa956813df7a34d6505c97a52c578207e3aa..ac55f93fc91e997deef1815adeb9d9dee9e2c555 100644 (file)
@@ -189,6 +189,7 @@ am43xx_pinmux: pinmux@800 {
                                        reg = <0x800 0x31c>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        #interrupt-cells = <1>;
                                        interrupt-controller;
                                        pinctrl-single,register-width = <32>;
@@ -871,6 +872,8 @@ tscadc: tscadc@44e0d000 {
                        clocks = <&adc_tsc_fck>;
                        clock-names = "fck";
                        status = "disabled";
+                       dmas = <&edma 53 0>, <&edma 57 0>;
+                       dma-names = "fifo0", "fifo1";
 
                        tsc {
                                compatible = "ti,am3359-tsc";
index 033fa63544f7932e543dd7dc3aaa26694e0f2673..a9419f8e17e806c41e1effcee4f57fedd294513c 100644 (file)
@@ -67,7 +67,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x40000000>; /* 1 GB */
        };
@@ -86,18 +86,6 @@ sata@a0000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               pinctrl-0 = <&mdio_pins>;
-                               pinctrl-names = "default";
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 {
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@70000 {
                                pinctrl-0 = <&ge0_rgmii_pins>;
                                pinctrl-names = "default";
@@ -182,24 +170,6 @@ partition@1000000 {
                                };
                        };
                };
-
-               pcie-controller {
-                       status = "okay";
-                       /*
-                        * The two PCIe units are accessible through
-                        * both standard PCIe slots and mini-PCIe
-                        * slots on the board.
-                        */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       pcie@2,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
        };
 
        sound {
@@ -261,6 +231,37 @@ spdif_in: spdif-in {
        };
 };
 
+&pciec {
+       status = "okay";
+       /*
+        * The two PCIe units are accessible through
+        * both standard PCIe slots and mini-PCIe
+        * slots on the board.
+        */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       pcie@2,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       pinctrl-0 = <&mdio_pins>;
+       pinctrl-names = "default";
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+
 &spi0 {
        pinctrl-0 = <&spi0_pins2>;
        pinctrl-names = "default";
index e2a363b1dd8ad3778f361c0b93760f81d40995e8..aeedc463daa631fd8a4c9dd577a4a6f39f8f9089 100644 (file)
@@ -62,7 +62,7 @@ chosen {
                stdout-path = &uart0;
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MiB */
        };
@@ -72,20 +72,6 @@ soc {
                        MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
                        MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       pcie@2,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        sata@a0000 {
                                nr-ports = <2>;
@@ -262,6 +248,20 @@ sata_l_power: regulator@3 {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       pcie@2,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
 &pinctrl {
        sata_l_white_pin: sata-l-white-pin {
                marvell,pins = "mpp57";
index d5e19cd4d256bc1e8fd51b21201ca576278ee782..a1425409e570dac39481c2f06b6d5f72a0f34ad1 100644 (file)
@@ -54,7 +54,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MB */
        };
@@ -64,22 +64,6 @@ soc {
                          MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* Internal mini-PCIe connector */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* Connected on the PCB to a USB 3.0 XHCI controller */
-                       pcie@2,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        serial@12000 {
                                status = "okay";
@@ -113,17 +97,6 @@ green_stat_led {
                                };
                        };
 
-                       mdio {
-                               pinctrl-0 = <&mdio_pins>;
-                               pinctrl-names = "default";
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 {
-                                       reg = <1>;
-                               };
-                       };
                        ethernet@70000 {
                                pinctrl-0 = <&ge0_rgmii_pins>;
                                pinctrl-names = "default";
@@ -197,6 +170,34 @@ partition@800000 {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /* Internal mini-PCIe connector */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* Connected on the PCB to a USB 3.0 XHCI controller */
+       pcie@2,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       pinctrl-0 = <&mdio_pins>;
+       pinctrl-names = "default";
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &pinctrl {
        pwr_led_pin: pwr-led-pin {
                marvell,pins = "mpp63";
index 39181b3fa90d1d3a68745a9f3e2faec83b0d6c9b..6bd9265f106253b9b74d50f02b0be42341ead7bf 100644 (file)
@@ -56,7 +56,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MB */
        };
@@ -66,22 +66,6 @@ soc {
                          MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* Connected to Marvell 88SE9170 SATA controller */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* Connected to FL1009 USB 3.0 controller */
-                       pcie@2,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
 
                        /* RTC is provided by Intersil ISL12057 I2C RTC chip */
@@ -99,14 +83,6 @@ sata@a0000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               pinctrl-0 = <&mdio_pins>;
-                               pinctrl-names = "default";
-                               phy0: ethernet-phy@0 { /* Marvell 88E1318 */
-                                       reg = <0>;
-                               };
-                       };
-
                        ethernet@74000 {
                                pinctrl-0 = <&ge1_rgmii_pins>;
                                pinctrl-names = "default";
@@ -120,8 +96,11 @@ usb@50000 {
                        };
 
                        i2c@11000 {
-                               compatible = "marvell,mv64xxx-i2c";
                                clock-frequency = <100000>;
+
+                               pinctrl-0 = <&i2c0_pins>;
+                               pinctrl-names = "default";
+
                                status = "okay";
 
                                isl12057: isl12057@68 {
@@ -257,6 +236,30 @@ gpio-poweroff {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /* Connected to Marvell 88SE9170 SATA controller */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* Connected to FL1009 USB 3.0 controller */
+       pcie@2,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       pinctrl-0 = <&mdio_pins>;
+       pinctrl-names = "default";
+       phy0: ethernet-phy@0 { /* Marvell 88E1318 */
+               reg = <0>;
+       };
+};
+
 &pinctrl {
        power_led_pin: power-led-pin {
                marvell,pins = "mpp57";
index 11565752b9f6b7f83ea56187ebcac73deaf91a36..c84ab5bf1e186a06ec35b6cb62abdc6e766bdca2 100644 (file)
@@ -56,7 +56,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MB */
        };
@@ -66,22 +66,6 @@ soc {
                          MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* Connected to FL1009 USB 3.0 controller */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* Connected to Marvell 88SE9215 SATA controller */
-                       pcie@2,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
 
                        /* RTC is provided by Intersil ISL12057 I2C RTC chip */
@@ -93,18 +77,6 @@ serial@12000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               pinctrl-0 = <&mdio_pins>;
-                               pinctrl-names = "default";
-                               phy0: ethernet-phy@0 { /* Marvell 88E1318 */
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 { /* Marvell 88E1318 */
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@70000 {
                                pinctrl-0 = <&ge0_rgmii_pins>;
                                pinctrl-names = "default";
@@ -126,8 +98,11 @@ usb@50000 {
                        };
 
                        i2c@11000 {
-                               compatible = "marvell,mv64xxx-i2c";
                                clock-frequency = <100000>;
+
+                               pinctrl-0 = <&i2c0_pins>;
+                               pinctrl-names = "default";
+
                                status = "okay";
 
                                isl12057: isl12057@68 {
@@ -279,6 +254,34 @@ gpio-poweroff {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /* Connected to FL1009 USB 3.0 controller */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* Connected to Marvell 88SE9215 SATA controller */
+       pcie@2,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       pinctrl-0 = <&mdio_pins>;
+       pinctrl-names = "default";
+       phy0: ethernet-phy@0 { /* Marvell 88E1318 */
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 { /* Marvell 88E1318 */
+               reg = <1>;
+       };
+};
+
 &pinctrl {
        poweroff: poweroff {
                marvell,pins = "mpp60";
index fbef730e8d379df92d735c2e98fbaf2af0851cc9..c3fd6e49212ff5edea6df2f521bf2f527d7e9d66 100644 (file)
@@ -67,7 +67,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MB */
        };
@@ -77,22 +77,6 @@ soc {
                          MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* Internal mini-PCIe connector */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* Internal mini-PCIe connector */
-                       pcie@2,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        serial@12000 {
                                status = "okay";
@@ -102,14 +86,6 @@ sata@a0000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               pinctrl-0 = <&mdio_pins>;
-                               pinctrl-names = "default";
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-                       };
-
                        ethernet@70000 {
                                status = "okay";
                                phy = <&phy0>;
@@ -146,7 +122,7 @@ gpio-keys {
                                compatible = "gpio-keys";
                                #address-cells = <1>;
                                #size-cells = <0>;
-                               button@1 {
+                               button {
                                        label = "Software Button";
                                        linux,code = <KEY_POWER>;
                                        gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
@@ -196,7 +172,7 @@ partition@1000000 {
                };
        };
 
-       dsa@0 {
+       dsa {
                compatible = "marvell,dsa";
                #address-cells = <2>;
                #size-cells = <0>;
@@ -235,7 +211,32 @@ port@5 {
                        };
                };
         };
- };
+};
+
+&pciec {
+       status = "okay";
+
+       /* Internal mini-PCIe connector */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* Internal mini-PCIe connector */
+       pcie@2,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       pinctrl-0 = <&mdio_pins>;
+       pinctrl-names = "default";
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 
 &pinctrl {
        fan_pins: fan-pins {
index ae2e1fe50ef64af3277be7a941ee1cac8a610acc..eb6af53b4954156ff4fd91584d2c64c2f680d93c 100644 (file)
@@ -28,20 +28,7 @@ / {
        compatible = "seagate,dart-4", "marvell,armada370", "marvell,armada-370-xp";
 
        soc {
-               pcie-controller {
-                       /* SATA AHCI controller 88SE9170 */
-                       pcie@1,0 {
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
-                       mdio {
-                               phy1: ethernet-phy@1 {
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@74000 {
                                status = "okay";
                                pinctrl-0 = <&ge1_rgmii_pins>;
@@ -131,3 +118,17 @@ gpio-fan {
                          1300 0>;
        };
 };
+
+&pciec {
+       /* SATA AHCI controller 88SE9170 */
+       pcie@1,0 {
+               status = "okay";
+       };
+};
+
+&mdio {
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
index 3036e25c5992a817e7ca2c8483c9e5a29bb91ce7..e9a5b952afc08db906d1def5814ce1c7d5d026c0 100644 (file)
@@ -23,7 +23,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MB */
        };
@@ -32,15 +32,6 @@ soc {
                ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
                          MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* USB 3.0 bridge ASM1042A */
-                       pcie@2,0 {
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        serial@12000 {
                                status = "okay";
@@ -51,15 +42,6 @@ sata@a0000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               pinctrl-0 = <&mdio_pins>;
-                               pinctrl-names = "default";
-
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-                       };
-
                        ethernet@70000 {
                                status = "okay";
                                pinctrl-0 = <&ge0_rgmii_pins>;
@@ -159,19 +141,19 @@ gpio-keys {
                #address-cells = <1>;
                #size-cells = <0>;
 
-               button@1 {
+               power {
                        label = "Power button";
                        linux,code = <KEY_POWER>;
                        gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
                        debounce-interval = <100>;
                };
-               button@2 {
+               backup {
                        label = "Backup button";
                        linux,code = <KEY_OPTION>;
                        gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
                        debounce-interval = <100>;
                };
-               button@3 {
+               reset {
                        label = "Reset Button";
                        linux,code = <KEY_RESTART>;
                        gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
@@ -208,6 +190,25 @@ gpio_poweroff {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /* USB 3.0 bridge ASM1042A */
+       pcie@2,0 {
+               status = "okay";
+       };
+};
+
+
+&mdio {
+       pinctrl-0 = <&mdio_pins>;
+       pinctrl-names = "default";
+
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &pinctrl {
        pinctrl-0 = <&hdd0_led_sata_pin>, <&hdd1_led_sata_pin>;
        pinctrl-names = "default";
index 01cded310cbc576a63252de2614763274fac9ef4..d079a89ee5a290b021dfe413f21dc8c7c959a08e 100644 (file)
@@ -24,7 +24,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MB */
        };
@@ -33,15 +33,6 @@ soc {
                ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
                          MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* USB 3.0 Bridge ASM1042A */
-                       pcie@1,0 {
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        coherency-fabric@20200 {
                                broken-idle;
@@ -51,15 +42,6 @@ serial@12000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               pinctrl-0 = <&mdio_pins>;
-                               pinctrl-names = "default";
-
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-                       };
-
                        ethernet@74000 {
                                status = "okay";
                                pinctrl-0 = <&ge1_rgmii_pins>;
@@ -107,19 +89,19 @@ gpio-keys {
                #address-cells = <1>;
                #size-cells = <0>;
 
-               button@1 {
+               power {
                        label = "Power button";
                        linux,code = <KEY_POWER>;
                        gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
                        debounce-interval = <100>;
                };
-               button@2 {
+               reset {
                        label = "Reset Button";
                        linux,code = <KEY_RESTART>;
                        gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
                        debounce-interval = <100>;
                };
-               button@3 {
+               button {
                        label = "USB VBUS error";
                        linux,code = <KEY_UNKNOWN>;
                        gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
@@ -143,6 +125,24 @@ gpio_poweroff {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /* USB 3.0 Bridge ASM1042A */
+       pcie@1,0 {
+               status = "okay";
+       };
+};
+
+&mdio {
+       pinctrl-0 = <&mdio_pins>;
+       pinctrl-names = "default";
+
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &pinctrl {
        pinctrl-0 = <&sata_led_pin>;
        pinctrl-names = "default";
index a9cc427768745cd39502aced36e36bc1448b143d..99f9de229ea8362b508ce37c43645f6113cf7e0a 100644 (file)
@@ -70,7 +70,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x20000000>; /* 512 MB */
        };
@@ -127,12 +127,6 @@ usb@51000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               phy1: ethernet-phy@1 { /* Marvell 88E1512 */
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@70000 {
                               status = "okay";
                               phy = <&phy1>;
@@ -192,7 +186,7 @@ regulators {
                pinctrl-0 = <&sata1_pwr_pin &sata2_pwr_pin>;
                pinctrl-names = "default";
 
-               sata1_regulator: sata1-regulator {
+               sata1_regulator: sata1-regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
                        regulator-name = "SATA1 Power";
@@ -205,7 +199,7 @@ sata1_regulator: sata1-regulator {
                        gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
                };
 
-               sata2_regulator: sata2-regulator {
+               sata2_regulator: sata2-regulator@2 {
                        compatible = "regulator-fixed";
                        reg = <2>;
                        regulator-name = "SATA2 Power";
@@ -220,6 +214,12 @@ sata2_regulator: sata2-regulator {
        };
 };
 
+&mdio {
+       phy1: ethernet-phy@1 { /* Marvell 88E1512 */
+               reg = <1>;
+       };
+};
+
 &pinctrl {
        disk1_led_pin: disk1-led-pin {
                marvell,pins = "mpp31";
index 3ccedc9dffb2bf1be5355ab038fbf9da950a908d..b0520bdeea27e1622d63a5f5febee3b7da4a33d2 100644 (file)
@@ -50,8 +50,6 @@
  * 370 and Armada XP SoC.
  */
 
-/include/ "skeleton64.dtsi"
-
 #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
 
 / {
@@ -86,7 +84,7 @@ soc {
                pcie-mem-aperture = <0xf8000000 0x7e00000>;
                pcie-io-aperture  = <0xffe00000 0x100000>;
 
-               devbus-bootcs {
+               devbus_bootcs: devbus-bootcs {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10400 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x2f) 0 0xffffffff>;
@@ -96,7 +94,7 @@ devbus-bootcs {
                        status = "disabled";
                };
 
-               devbus-cs0 {
+               devbus_cs0: devbus-cs0 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10408 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x3e) 0 0xffffffff>;
@@ -106,7 +104,7 @@ devbus-cs0 {
                        status = "disabled";
                };
 
-               devbus-cs1 {
+               devbus_cs1: devbus-cs1 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10410 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x3d) 0 0xffffffff>;
@@ -116,7 +114,7 @@ devbus-cs1 {
                        status = "disabled";
                };
 
-               devbus-cs2 {
+               devbus_cs2: devbus-cs2 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10418 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x3b) 0 0xffffffff>;
@@ -126,7 +124,7 @@ devbus-cs2 {
                        status = "disabled";
                };
 
-               devbus-cs3 {
+               devbus_cs3: devbus-cs3 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10420 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x37) 0 0xffffffff>;
@@ -142,7 +140,7 @@ internal-regs {
                        #size-cells = <1>;
                        ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
 
-                       rtc@10300 {
+                       rtc: rtc@10300 {
                                compatible = "marvell,orion-rtc";
                                reg = <0x10300 0x20>;
                                interrupts = <50>;
@@ -214,33 +212,38 @@ mpic: interrupt-controller@20a00 {
                                msi-controller;
                        };
 
-                       coherency-fabric@20200 {
+                       coherencyfab: coherency-fabric@20200 {
                                compatible = "marvell,coherency-fabric";
                                reg = <0x20200 0xb0>, <0x21010 0x1c>;
                        };
 
-                       timer@20300 {
+                       timer: timer@20300 {
                                reg = <0x20300 0x30>, <0x21040 0x30>;
                                interrupts = <37>, <38>, <39>, <40>, <5>, <6>;
                        };
 
-                       watchdog@20300 {
+                       watchdog: watchdog@20300 {
                                reg = <0x20300 0x34>, <0x20704 0x4>;
                        };
 
-                       pmsu@22000 {
+                       cpurst: cpurst@20800 {
+                               compatible = "marvell,armada-370-cpu-reset";
+                               reg = <0x20800 0x8>;
+                       };
+
+                       pmsu: pmsu@22000 {
                                compatible = "marvell,armada-370-pmsu";
                                reg = <0x22000 0x1000>;
                        };
 
-                       usb@50000 {
+                       usb0: usb@50000 {
                                compatible = "marvell,orion-ehci";
                                reg = <0x50000 0x500>;
                                interrupts = <45>;
                                status = "disabled";
                        };
 
-                       usb@51000 {
+                       usb1: usb@51000 {
                                compatible = "marvell,orion-ehci";
                                reg = <0x51000 0x500>;
                                interrupts = <46>;
@@ -254,7 +257,7 @@ eth0: ethernet@70000 {
                                status = "disabled";
                        };
 
-                       mdio: mdio {
+                       mdio: mdio@72004 {
                                #address-cells = <1>;
                                #size-cells = <0>;
                                compatible = "marvell,orion-mdio";
@@ -269,7 +272,7 @@ eth1: ethernet@74000 {
                                status = "disabled";
                        };
 
-                       sata@a0000 {
+                       sata: sata@a0000 {
                                compatible = "marvell,armada-370-sata";
                                reg = <0xa0000 0x5000>;
                                interrupts = <55>;
@@ -278,7 +281,7 @@ sata@a0000 {
                                status = "disabled";
                        };
 
-                       nand@d0000 {
+                       nand: nand@d0000 {
                                compatible = "marvell,armada370-nand";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
@@ -288,7 +291,7 @@ nand@d0000 {
                                status = "disabled";
                        };
 
-                       mvsdio@d4000 {
+                       sdio: mvsdio@d4000 {
                                compatible = "marvell,orion-sdio";
                                reg = <0xd4000 0x200>;
                                interrupts = <54>;
index b4258105e91f090c0230e7932fbebacd185af4aa..b704bcc597f71c16a37a0ad8c2ec32cb5af376cb 100644 (file)
  */
 
 #include "armada-370-xp.dtsi"
-/include/ "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        model = "Marvell Armada 370 family SoC";
        compatible = "marvell,armada370", "marvell,armada-370-xp";
 
@@ -70,7 +72,7 @@ bootrom {
                        reg = <MBUS_ID(0x01, 0xe0) 0 0x100000>;
                };
 
-               pcie-controller {
+               pciec: pcie-controller@82000000 {
                        compatible = "marvell,armada-370-pcie";
                        status = "disabled";
                        device_type = "pci";
@@ -89,7 +91,7 @@ pcie-controller {
                                0x82000000 0x2 0     MBUS_ID(0x08, 0xe8) 0       1 0 /* Port 1.0 MEM */
                                0x81000000 0x2 0     MBUS_ID(0x08, 0xe0) 0       1 0 /* Port 1.0 IO  */>;
 
-                       pcie@1,0 {
+                       pcie0: pcie@1,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
                                reg = <0x0800 0 0 0 0>;
@@ -106,7 +108,7 @@ pcie@1,0 {
                                status = "disabled";
                        };
 
-                       pcie@2,0 {
+                       pcie2: pcie@2,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
                                reg = <0x1000 0 0 0 0>;
@@ -125,7 +127,7 @@ pcie@2,0 {
                };
 
                internal-regs {
-                       L2: l2-cache {
+                       L2: l2-cache@8000 {
                                compatible = "marvell,aurora-outer-cache";
                                reg = <0x08000 0x1000>;
                                cache-id-part = <0x100>;
@@ -134,14 +136,6 @@ L2: l2-cache {
                                wt-override;
                        };
 
-                       i2c0: i2c@11000 {
-                               reg = <0x11000 0x20>;
-                       };
-
-                       i2c1: i2c@11100 {
-                               reg = <0x11100 0x20>;
-                       };
-
                        gpio0: gpio@18100 {
                                compatible = "marvell,orion-gpio";
                                reg = <0x18100 0x40>;
@@ -175,22 +169,8 @@ gpio2: gpio@18180 {
                                interrupts = <91>;
                        };
 
-                       /*
-                        * Default UART pinctrl setting without RTS/CTS, can
-                        * be overwritten on board level if a different
-                        * configuration is used.
-                        */
-                       uart0: serial@12000 {
-                               pinctrl-0 = <&uart0_pins>;
-                               pinctrl-names = "default";
-                       };
-
-                       uart1: serial@12100 {
-                               pinctrl-0 = <&uart1_pins>;
-                               pinctrl-names = "default";
-                       };
 
-                       system-controller@18200 {
+                       systemc: system-controller@18200 {
                                compatible = "marvell,armada-370-xp-system-controller";
                                reg = <0x18200 0x100>;
                        };
@@ -208,37 +188,18 @@ coreclk: mvebu-sar@18230 {
                                #clock-cells = <1>;
                        };
 
-                       thermal@18300 {
+                       thermal: thermal@18300 {
                                compatible = "marvell,armada370-thermal";
                                reg = <0x18300 0x4
                                        0x18304 0x4>;
                                status = "okay";
                        };
 
-                       sscg@18330 {
+                       sscg: sscg@18330 {
                                reg = <0x18330 0x4>;
                        };
 
-                       interrupt-controller@20a00 {
-                               reg = <0x20a00 0x1d0>, <0x21870 0x58>;
-                       };
-
-                       timer@20300 {
-                               compatible = "marvell,armada-370-timer";
-                               clocks = <&coreclk 2>;
-                       };
-
-                       watchdog@20300 {
-                               compatible = "marvell,armada-370-wdt";
-                               clocks = <&coreclk 2>;
-                       };
-
-                       cpurst@20800 {
-                               compatible = "marvell,armada-370-cpu-reset";
-                               reg = <0x20800 0x8>;
-                       };
-
-                       cpu-config@21000 {
+                       cpuconf: cpu-config@21000 {
                                compatible = "marvell,armada-370-cpu-config";
                                reg = <0x21000 0x8>;
                        };
@@ -253,15 +214,7 @@ audio_controller: audio-controller@30000 {
                                status = "disabled";
                        };
 
-                       usb@50000 {
-                               clocks = <&coreclk 0>;
-                       };
-
-                       usb@51000 {
-                               clocks = <&coreclk 0>;
-                       };
-
-                       xor@60800 {
+                       xor0: xor@60800 {
                                compatible = "marvell,orion-xor";
                                reg = <0x60800 0x100
                                       0x60A00 0x100>;
@@ -280,7 +233,7 @@ xor01 {
                                };
                        };
 
-                       xor@60900 {
+                       xor1: xor@60900 {
                                compatible = "marvell,orion-xor";
                                reg = <0x60900 0x100
                                       0x60b00 0x100>;
@@ -299,15 +252,7 @@ xor11 {
                                };
                        };
 
-                       ethernet@70000 {
-                               compatible = "marvell,armada-370-neta";
-                       };
-
-                       ethernet@74000 {
-                               compatible = "marvell,armada-370-neta";
-                       };
-
-                       crypto@90000 {
+                       cesa: crypto@90000 {
                                compatible = "marvell,armada-370-crypto";
                                reg = <0x90000 0x10000>;
                                reg-names = "regs";
@@ -342,6 +287,59 @@ idle-sram@0 {
        };
 };
 
+/*
+ * Default UART pinctrl setting without RTS/CTS, can be overwritten on
+ * board level if a different configuration is used.
+ */
+
+&uart0 {
+       pinctrl-0 = <&uart0_pins>;
+       pinctrl-names = "default";
+};
+
+&uart1 {
+       pinctrl-0 = <&uart1_pins>;
+       pinctrl-names = "default";
+};
+
+&i2c0 {
+       reg = <0x11000 0x20>;
+};
+
+&i2c1 {
+       reg = <0x11100 0x20>;
+};
+
+&mpic {
+       reg = <0x20a00 0x1d0>, <0x21870 0x58>;
+};
+
+&timer {
+       compatible = "marvell,armada-370-timer";
+       clocks = <&coreclk 2>;
+};
+
+&watchdog {
+       compatible = "marvell,armada-370-wdt";
+       clocks = <&coreclk 2>;
+};
+
+&usb0 {
+       clocks = <&coreclk 0>;
+};
+
+&usb1 {
+       clocks = <&coreclk 0>;
+};
+
+&eth0 {
+       compatible = "marvell,armada-370-neta";
+};
+
+&eth1 {
+       compatible = "marvell,armada-370-neta";
+};
+
 &pinctrl {
        compatible = "marvell,mv88f6710-pinctrl";
 
index cded5f0a262dfce4d47bd009ffdfaaaad1562036..ef45cbeb3e7d97a53ff71e8e61efac3874c88c7e 100644 (file)
@@ -58,7 +58,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x40000000>; /* 1 GB */
        };
@@ -69,138 +69,141 @@ MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x09) 0 0xf1100000 0x10000
                          MBUS_ID(0x09, 0x05) 0 0xf1110000 0x10000>;
 
-               internal-regs {
-                       spi@10600 {
-                               pinctrl-0 = <&spi0_pins>;
-                               pinctrl-names = "default";
-                               /*
-                                * SPI conflicts with NAND, so we disable it
-                                * here, and select NAND as the enabled device
-                                * by default.
-                                */
-                               status = "disabled";
-
-                               spi-flash@0 {
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-                                       compatible = "n25q128a13", "jedec,spi-nor";
-                                       reg = <0>; /* Chip select 0 */
-                                       spi-max-frequency = <108000000>;
-                               };
-                       };
-
-                       i2c@11000 {
-                               status = "okay";
-                               clock-frequency = <100000>;
-                               pinctrl-0 = <&i2c0_pins>;
-                               pinctrl-names = "default";
-                       };
-
-                       i2c@11100 {
-                               status = "okay";
-                               clock-frequency = <100000>;
-                               pinctrl-0 = <&i2c1_pins>;
-                               pinctrl-names = "default";
-                       };
-
-                       serial@12000 {
-                               status = "okay";
-                       };
-
-                       pinctrl {
-                               sdio_st_pins: sdio-st-pins {
-                                       marvell,pins = "mpp44", "mpp45";
-                                       marvell,function = "gpio";
-                               };
-                       };
-
-                       sata@a0000 {
-                               status = "okay";
-                               nr-ports = <2>;
-                       };
-
-                       nand: nand@d0000 {
-                               pinctrl-0 = <&nand_pins>;
-                               pinctrl-names = "default";
-                               status = "okay";
-                               num-cs = <1>;
-                               marvell,nand-keep-config;
-                               marvell,nand-enable-arbiter;
-                               nand-on-flash-bbt;
-                               nand-ecc-strength = <4>;
-                               nand-ecc-step-size = <512>;
-
-                               partition@0 {
-                                       label = "U-Boot";
-                                       reg = <0 0x800000>;
-                               };
-                               partition@800000 {
-                                       label = "Linux";
-                                       reg = <0x800000 0x800000>;
-                               };
-                               partition@1000000 {
-                                       label = "Filesystem";
-                                       reg = <0x1000000 0x3f000000>;
-                               };
-                       };
-
-                       usb@54000 {
-                               status = "okay";
-                       };
-
-                       usb3@58000 {
-                               status = "okay";
-                       };
-
-                       mvsdio@d4000 {
-                               pinctrl-0 = <&sdio_pins &sdio_st_pins>;
-                               pinctrl-names = "default";
-                               status = "okay";
-                               cd-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
-                               wp-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
-                       };
-
-                       mdio {
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-
-                               phy3: ethernet-phy@3 {
-                                       reg = <3>;
-                               };
-                       };
-
-                       ethernet@f0000 {
-                               status = "okay";
-
-                               eth0@c4000 {
-                                       status = "okay";
-                                       phy = <&phy0>;
-                                       phy-mode = "rgmii-id";
-                               };
-
-                               eth1@c5000 {
-                                       status = "okay";
-                                       phy = <&phy3>;
-                                       phy-mode = "gmii";
-                               };
-                       };
-               };
-
-               pcie-controller {
-                       status = "okay";
-                       /*
-                        * The two PCIe units are accessible through
-                        * standard PCIe slots on the board.
-                        */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-                       pcie@2,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
        };
 };
+&pciec {
+       status = "okay";
+};
+
+/*
+ * The two PCIe units are accessible through
+ * standard PCIe slots on the board.
+ */
+&pcie0 {
+       /* Port 0, Lane 0 */
+       status = "okay";
+};
+
+&pcie1 {
+       /* Port 1, Lane 0 */
+       status = "okay";
+};
+
+
+&spi0 {
+       pinctrl-0 = <&spi0_pins>;
+       pinctrl-names = "default";
+
+       /*
+        * SPI conflicts with NAND, so we disable it here, and
+        * select NAND as the enabled device by default.
+        */
+
+       status = "disabled";
+
+       spi-flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "n25q128a13", "jedec,spi-nor";
+               reg = <0>; /* Chip select 0 */
+               spi-max-frequency = <108000000>;
+       };
+};
+
+&i2c0 {
+       status = "okay";
+       clock-frequency = <100000>;
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "default";
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <100000>;
+       pinctrl-0 = <&i2c1_pins>;
+       pinctrl-names = "default";
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&pinctrl {
+       sdio_st_pins: sdio-st-pins {
+               marvell,pins = "mpp44", "mpp45";
+               marvell,function = "gpio";
+       };
+};
+
+&sata {
+       status = "okay";
+       nr-ports = <2>;
+};
+
+&nand {
+       pinctrl-0 = <&nand_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+       num-cs = <1>;
+       marvell,nand-keep-config;
+       marvell,nand-enable-arbiter;
+       nand-on-flash-bbt;
+       nand-ecc-strength = <4>;
+       nand-ecc-step-size = <512>;
+
+       partition@0 {
+               label = "U-Boot";
+               reg = <0 0x800000>;
+       };
+       partition@800000 {
+               label = "Linux";
+               reg = <0x800000 0x800000>;
+       };
+       partition@1000000 {
+               label = "Filesystem";
+               reg = <0x1000000 0x3f000000>;
+       };
+};
+
+&usb1 {
+       status = "okay";
+};
+
+&usb2 {
+       status = "okay";
+};
+
+&sdio {
+       pinctrl-0 = <&sdio_pins &sdio_st_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+       cd-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+       wp-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
+};
+
+&mdio {
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+
+       phy3: ethernet-phy@3 {
+               reg = <3>;
+       };
+};
+
+&ethernet {
+       status = "okay";
+};
+
+
+&eth0 {
+       status = "okay";
+       phy = <&phy0>;
+       phy-mode = "rgmii-id";
+};
+
+&eth1 {
+       status = "okay";
+       phy = <&phy3>;
+       phy-mode = "gmii";
+};
index cc952cf8ec3003b6339629161b40e2410ece51d4..f515591e873314d356480104b5cf7f5ad40aa459 100644 (file)
@@ -45,7 +45,6 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include "skeleton.dtsi"
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/phy/phy.h>
@@ -53,6 +52,9 @@
 #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        model = "Marvell Armada 375 family SoC";
        compatible = "marvell,armada375";
 
@@ -65,7 +67,7 @@ aliases {
        };
 
        clocks {
-               /* 2 GHz fixed main PLL */
+               /* 1 GHz fixed main PLL */
                mainpll: mainpll {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
@@ -84,12 +86,12 @@ cpus {
                #size-cells = <0>;
                enable-method = "marvell,armada-375-smp";
 
-               cpu@0 {
+               cpu0: cpu@0 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
                };
-               cpu@1 {
+               cpu1: cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <1>;
@@ -115,7 +117,7 @@ bootrom {
                        reg = <MBUS_ID(0x01, 0x1d) 0 0x100000>;
                };
 
-               devbus-bootcs {
+               devbus_bootcs: devbus-bootcs {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10400 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x2f) 0 0xffffffff>;
@@ -125,7 +127,7 @@ devbus-bootcs {
                        status = "disabled";
                };
 
-               devbus-cs0 {
+               devbus_cs0: devbus-cs0 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10408 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x3e) 0 0xffffffff>;
@@ -135,7 +137,7 @@ devbus-cs0 {
                        status = "disabled";
                };
 
-               devbus-cs1 {
+               devbus_cs1: devbus-cs1 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10410 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x3d) 0 0xffffffff>;
@@ -145,7 +147,7 @@ devbus-cs1 {
                        status = "disabled";
                };
 
-               devbus-cs2 {
+               devbus_cs2: devbus-cs2 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10418 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x3b) 0 0xffffffff>;
@@ -155,7 +157,7 @@ devbus-cs2 {
                        status = "disabled";
                };
 
-               devbus-cs3 {
+               devbus_cs3: devbus-cs3 {
                        compatible = "marvell,mvebu-devbus";
                        reg = <MBUS_ID(0xf0, 0x01) 0x10420 0x8>;
                        ranges = <0 MBUS_ID(0x01, 0x37) 0 0xffffffff>;
@@ -182,12 +184,12 @@ L2: cache-controller@8000 {
                                prefetch-data = <1>;
                        };
 
-                       scu@c000 {
+                       scu: scu@c000 {
                                compatible = "arm,cortex-a9-scu";
                                reg = <0xc000 0x58>;
                        };
 
-                       timer@c600 {
+                       timer0: timer@c600 {
                                compatible = "arm,cortex-a9-twd-timer";
                                reg = <0xc600 0x20>;
                                interrupts = <GIC_PPI 13 (IRQ_TYPE_EDGE_RISING | GIC_CPU_MASK_SIMPLE(2))>;
@@ -203,7 +205,7 @@ gic: interrupt-controller@d000 {
                                      <0xc100 0x100>;
                        };
 
-                       mdio {
+                       mdio: mdio@c0054 {
                                #address-cells = <1>;
                                #size-cells = <0>;
                                compatible = "marvell,orion-mdio";
@@ -212,7 +214,7 @@ mdio {
                        };
 
                        /* Network controller */
-                       ethernet@f0000 {
+                       ethernet: ethernet@f0000 {
                                compatible = "marvell,armada-375-pp2";
                                reg = <0xf0000 0xa000>, /* Packet Processor regs */
                                      <0xc0000 0x3060>, /* LMS regs */
@@ -222,20 +224,20 @@ ethernet@f0000 {
                                clock-names = "pp_clk", "gop_clk";
                                status = "disabled";
 
-                               eth0: eth0@c4000 {
+                               eth0: eth0 {
                                        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
                                        port-id = <0>;
                                        status = "disabled";
                                };
 
-                               eth1: eth1@c5000 {
+                               eth1: eth1 {
                                        interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
                                        port-id = <1>;
                                        status = "disabled";
                                };
                        };
 
-                       rtc@10300 {
+                       rtc: rtc@10300 {
                                compatible = "marvell,orion-rtc";
                                reg = <0x10300 0x20>;
                                interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
@@ -307,7 +309,7 @@ uart1: serial@12100 {
                                status = "disabled";
                        };
 
-                       pinctrl {
+                       pinctrl: pinctrl@18000 {
                                compatible = "marvell,mv88f6720-pinctrl";
                                reg = <0x18000 0x24>;
 
@@ -382,7 +384,7 @@ gpio2: gpio@18180 {
                                interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
                        };
 
-                       system-controller@18200 {
+                       systemc: system-controller@18200 {
                                compatible = "marvell,armada-375-system-controller";
                                reg = <0x18200 0x100>;
                        };
@@ -415,7 +417,7 @@ mpic: interrupt-controller@20a00 {
                                interrupts = <GIC_PPI 15 IRQ_TYPE_LEVEL_HIGH>;
                        };
 
-                       timer@20300 {
+                       timer1: timer@20300 {
                                compatible = "marvell,armada-375-timer", "marvell,armada-370-timer";
                                reg = <0x20300 0x30>, <0x21040 0x30>;
                                interrupts-extended = <&gic  GIC_SPI  8 IRQ_TYPE_LEVEL_HIGH>,
@@ -428,24 +430,24 @@ timer@20300 {
                                clock-names = "nbclk", "fixed";
                        };
 
-                       watchdog@20300 {
+                       watchdog: watchdog@20300 {
                                compatible = "marvell,armada-375-wdt";
                                reg = <0x20300 0x34>, <0x20704 0x4>, <0x18254 0x4>;
                                clocks = <&coreclk 0>, <&refclk>;
                                clock-names = "nbclk", "fixed";
                        };
 
-                       cpurst@20800 {
+                       cpurst: cpurst@20800 {
                                compatible = "marvell,armada-370-cpu-reset";
                                reg = <0x20800 0x10>;
                        };
 
-                       coherency-fabric@21010 {
+                       coherencyfab: coherency-fabric@21010 {
                                compatible = "marvell,armada-375-coherency-fabric";
                                reg = <0x21010 0x1c>;
                        };
 
-                       usb@50000 {
+                       usb0: usb@50000 {
                                compatible = "marvell,orion-ehci";
                                reg = <0x50000 0x500>;
                                interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
@@ -455,7 +457,7 @@ usb@50000 {
                                status = "disabled";
                        };
 
-                       usb@54000 {
+                       usb1: usb@54000 {
                                compatible = "marvell,orion-ehci";
                                reg = <0x54000 0x500>;
                                interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
@@ -463,7 +465,7 @@ usb@54000 {
                                status = "disabled";
                        };
 
-                       usb3@58000 {
+                       usb2: usb3@58000 {
                                compatible = "marvell,armada-375-xhci";
                                reg = <0x58000 0x20000>,<0x5b880 0x80>;
                                interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
@@ -473,7 +475,7 @@ usb3@58000 {
                                status = "disabled";
                        };
 
-                       xor@60800 {
+                       xor0: xor@60800 {
                                compatible = "marvell,orion-xor";
                                reg = <0x60800 0x100
                                       0x60A00 0x100>;
@@ -493,7 +495,7 @@ xor01 {
                                };
                        };
 
-                       xor@60900 {
+                       xor1: xor@60900 {
                                compatible = "marvell,orion-xor";
                                reg = <0x60900 0x100
                                       0x60b00 0x100>;
@@ -513,7 +515,7 @@ xor11 {
                                };
                        };
 
-                       crypto@90000 {
+                       cesa: crypto@90000 {
                                compatible = "marvell,armada-375-crypto";
                                reg = <0x90000 0x10000>;
                                reg-names = "regs";
@@ -528,7 +530,7 @@ crypto@90000 {
                                marvell,crypto-sram-size = <0x800>;
                        };
 
-                       sata@a0000 {
+                       sata: sata@a0000 {
                                compatible = "marvell,armada-370-sata";
                                reg = <0xa0000 0x5000>;
                                interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
@@ -537,7 +539,7 @@ sata@a0000 {
                                status = "disabled";
                        };
 
-                       nand@d0000 {
+                       nand: nand@d0000 {
                                compatible = "marvell,armada370-nand";
                                reg = <0xd0000 0x54>;
                                #address-cells = <1>;
@@ -547,7 +549,7 @@ nand@d0000 {
                                status = "disabled";
                        };
 
-                       mvsdio@d4000 {
+                       sdio: mvsdio@d4000 {
                                compatible = "marvell,orion-sdio";
                                reg = <0xd4000 0x200>;
                                interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
@@ -559,7 +561,7 @@ mvsdio@d4000 {
                                status = "disabled";
                        };
 
-                       thermal@e8078 {
+                       thermal: thermal@e8078 {
                                compatible = "marvell,armada375-thermal";
                                reg = <0xe8078 0x4>, <0xe807c 0x8>;
                                status = "okay";
@@ -580,7 +582,7 @@ coredivclk: corediv-clock@e8250 {
                        };
                };
 
-               pcie-controller {
+               pciec: pcie-controller@82000000 {
                        compatible = "marvell,armada-370-pcie";
                        status = "disabled";
                        device_type = "pci";
@@ -599,7 +601,7 @@ pcie-controller {
                                0x82000000 0x2 0       MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 1 MEM */
                                0x81000000 0x2 0       MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 1 IO  */>;
 
-                       pcie@1,0 {
+                       pcie0: pcie@1,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
                                reg = <0x0800 0 0 0 0>;
@@ -616,7 +618,7 @@ pcie@1,0 {
                                status = "disabled";
                        };
 
-                       pcie@2,0 {
+                       pcie1: pcie@2,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
                                reg = <0x1000 0 0 0 0>;
index 2d7668848c5ac3eed69322006b2bcb4b5cb92aa4..7450e9fea45d2defef1dbbabf1d76865466f50df 100644 (file)
@@ -661,7 +661,7 @@ spi1: spi@10680 {
        };
 
        clocks {
-               /* 2 GHz fixed main PLL */
+               /* 1 GHz fixed main PLL */
                mainpll: mainpll {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
index 34cba87f920062185f6f230f2f038478b1959f1c..de171baffcf6e0ff8c2eb779be0dd34dc8dbc8e8 100644 (file)
@@ -573,7 +573,7 @@ spi1: spi@10680 {
        };
 
        clocks {
-               /* 2 GHz fixed main PLL */
+               /* 1 GHz fixed main PLL */
                mainpll: mainpll {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
index ce152719bc28fade6a34291f6525f5a4c69a6b02..1e1fc4fccbadab268569c1aa5e4bed44cdd3102b 100644 (file)
@@ -62,7 +62,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x00000000 0x00000000 0x40000000>; /* 1GB */
        };
@@ -73,28 +73,6 @@ MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
                          MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* First mini-PCIe port */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* Second mini-PCIe port */
-                       pcie@2,0 {
-                               /* Port 0, Lane 1 */
-                               status = "okay";
-                       };
-
-                       /* Renesas uPD720202 USB 3.0 controller */
-                       pcie@3,0 {
-                               /* Port 0, Lane 3 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        /* UART0 */
                        serial@12000 {
@@ -111,16 +89,6 @@ sata@a0000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 {
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@70000 {
                                pinctrl-0 = <&ge0_rgmii_pins>;
                                pinctrl-names = "default";
@@ -145,7 +113,7 @@ gpio_keys {
                pinctrl-0 = <&keys_pin>;
                pinctrl-names = "default";
 
-               button@1 {
+               reset {
                        label = "Factory Reset Button";
                        linux,code = <KEY_SETUP>;
                        gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
@@ -153,6 +121,38 @@ button@1 {
        };
 };
 
+&mdio {
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+&pciec {
+       status = "okay";
+
+       /* First mini-PCIe port */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* Second mini-PCIe port */
+       pcie@2,0 {
+               /* Port 0, Lane 1 */
+               status = "okay";
+       };
+
+       /* Renesas uPD720202 USB 3.0 controller */
+       pcie@3,0 {
+               /* Port 0, Lane 3 */
+               status = "okay";
+       };
+};
+
 &pinctrl {
        pinctrl-0 = <&phy_int_pin>;
        pinctrl-names = "default";
index 075120bc3ec41cb40a06a23bf64e6deb9fd31609..44a724d39dbe4b4ec50b17d73e7ee144bbf9ad49 100644 (file)
@@ -67,7 +67,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x00000000 0 0x80000000>; /* 2 GB */
        };
@@ -108,39 +108,6 @@ nor@0 {
                        };
                };
 
-               pcie-controller {
-                       status = "okay";
-
-                       /*
-                        * All 6 slots are physically present as
-                        * standard PCIe slots on the board.
-                        */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-                       pcie@2,0 {
-                               /* Port 0, Lane 1 */
-                               status = "okay";
-                       };
-                       pcie@3,0 {
-                               /* Port 0, Lane 2 */
-                               status = "okay";
-                       };
-                       pcie@4,0 {
-                               /* Port 0, Lane 3 */
-                               status = "okay";
-                       };
-                       pcie@9,0 {
-                               /* Port 2, Lane 0 */
-                               status = "okay";
-                       };
-                       pcie@10,0 {
-                               /* Port 3, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        serial@12000 {
                                status = "okay";
@@ -160,24 +127,6 @@ sata@a0000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 {
-                                       reg = <1>;
-                               };
-
-                               phy2: ethernet-phy@2 {
-                                       reg = <25>;
-                               };
-
-                               phy3: ethernet-phy@3 {
-                                       reg = <27>;
-                               };
-                       };
-
                        ethernet@70000 {
                                status = "okay";
                                phy = <&phy0>;
@@ -266,6 +215,57 @@ bm-bppi {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /*
+        * All 6 slots are physically present as
+        * standard PCIe slots on the board.
+        */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+       pcie@2,0 {
+               /* Port 0, Lane 1 */
+               status = "okay";
+       };
+       pcie@3,0 {
+               /* Port 0, Lane 2 */
+               status = "okay";
+       };
+       pcie@4,0 {
+               /* Port 0, Lane 3 */
+               status = "okay";
+       };
+       pcie@9,0 {
+               /* Port 2, Lane 0 */
+               status = "okay";
+       };
+       pcie@10,0 {
+               /* Port 3, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+
+       phy2: ethernet-phy@2 {
+               reg = <25>;
+       };
+
+       phy3: ethernet-phy@3 {
+               reg = <27>;
+       };
+};
+
 &spi0 {
        status = "okay";
 
index 190e4eccb180c7fae4691d6ab8362ce49957294f..72cb8fa377e3ec4eb6dad1806058fac479c99e04 100644 (file)
@@ -68,7 +68,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                /*
                  * 8 GB of plug-in RAM modules by default.The amount
@@ -127,27 +127,6 @@ nor@0 {
                        };
                };
 
-               pcie-controller {
-                       status = "okay";
-
-                       /*
-                        * The 3 slots are physically present as
-                        * standard PCIe slots on the board.
-                        */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-                       pcie@9,0 {
-                               /* Port 2, Lane 0 */
-                               status = "okay";
-                       };
-                       pcie@10,0 {
-                               /* Port 3, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        serial@12000 {
                                status = "okay";
@@ -175,24 +154,6 @@ sata@a0000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               phy0: ethernet-phy@0 {
-                                       reg = <16>;
-                               };
-
-                               phy1: ethernet-phy@1 {
-                                       reg = <17>;
-                               };
-
-                               phy2: ethernet-phy@2 {
-                                       reg = <18>;
-                               };
-
-                               phy3: ethernet-phy@3 {
-                                       reg = <19>;
-                               };
-                       };
-
                        ethernet@70000 {
                                status = "okay";
                                phy = <&phy0>;
@@ -251,6 +212,45 @@ bm-bppi {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /*
+        * The 3 slots are physically present as
+        * standard PCIe slots on the board.
+        */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+       pcie@9,0 {
+               /* Port 2, Lane 0 */
+               status = "okay";
+       };
+       pcie@10,0 {
+               /* Port 3, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       phy0: ethernet-phy@0 {
+               reg = <16>;
+       };
+
+       phy1: ethernet-phy@1 {
+               reg = <17>;
+       };
+
+       phy2: ethernet-phy@2 {
+               reg = <18>;
+       };
+
+       phy3: ethernet-phy@3 {
+               reg = <19>;
+       };
+};
+
 &spi0 {
        status = "okay";
 
index 8af463f26ea1e162360952dbc03c0a9bda807cd5..d848ae9007db1efe60680649e4d85b3be0796acc 100644 (file)
@@ -57,7 +57,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x00000000 0 0x20000000>; /* 512MB */
        };
@@ -68,37 +68,11 @@ MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
                        MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
                        MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* Quad port sata: Marvell 88SX7042 */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* USB 3.0 xHCI controller: NEC D720200F1 */
-                       pcie@5,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        serial@12000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               phy0: ethernet-phy@0 { /* Marvell 88E1318 */
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 { /* Marvell 88E1318 */
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@70000 {
                                pinctrl-0 = <&ge0_rgmii_pins>;
                                pinctrl-names = "default";
@@ -295,6 +269,31 @@ gpio-poweroff {
                gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
        };
 };
+&pciec {
+       status = "okay";
+
+       /* Quad port sata: Marvell 88SX7042 */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* USB 3.0 xHCI controller: NEC D720200F1 */
+       pcie@5,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       phy0: ethernet-phy@0 { /* Marvell 88E1318 */
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 { /* Marvell 88E1318 */
+               reg = <1>;
+       };
+};
 
 &pinctrl {
        poweroff_pin: poweroff-pin {
index 076f27f22c3bc151a539669a491ea2cf296a03f1..83ac884c0f8ae52fc2f564bfcf2cc31c68c1f7e2 100644 (file)
@@ -62,7 +62,7 @@ chosen {
                stdout-path = &uart0;
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
        };
@@ -73,28 +73,6 @@ MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
                          MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* Etron EJ168 USB 3.0 controller */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* First mini-PCIe port */
-                       pcie@2,0 {
-                               /* Port 0, Lane 1 */
-                               status = "okay";
-                       };
-
-                       /* Second mini-PCIe port */
-                       pcie@3,0 {
-                               /* Port 0, Lane 3 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
 
                        rtc@10300 {
@@ -289,13 +267,13 @@ gpio_keys {
                pinctrl-0 = <&keys_pin>;
                pinctrl-names = "default";
 
-               button@1 {
+               wps {
                        label = "WPS";
                        linux,code = <KEY_WPS_BUTTON>;
                        gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
                };
 
-               button@2 {
+               reset {
                        label = "Factory Reset Button";
                        linux,code = <KEY_RESTART>;
                        gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
@@ -323,7 +301,7 @@ gpio_fan {
                                      4500 1>;
        };
 
-       dsa@0 {
+       dsa {
                compatible = "marvell,dsa";
                #address-cells = <2>;
                #size-cells = <0>;
@@ -369,6 +347,28 @@ port@5 {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /* Etron EJ168 USB 3.0 controller */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* First mini-PCIe port */
+       pcie@2,0 {
+               /* Port 0, Lane 1 */
+               status = "okay";
+       };
+
+       /* Second mini-PCIe port */
+       pcie@3,0 {
+               /* Port 0, Lane 3 */
+               status = "okay";
+       };
+};
+
 &pinctrl {
 
        keys_pin: keys-pin {
index 6522b04f4a8e7c7a759100153d7d990f1fb160d3..16277380e7147e41982f7a3bd293978c55d4bb3a 100644 (file)
@@ -55,7 +55,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                /*
                 * This board has 4 GB of RAM, but the last 256 MB of
@@ -99,18 +99,18 @@ fixed-link {
                                };
                        };
 
-                       pcie-controller {
-                               status = "okay";
-
-                               pcie@1,0 {
-                                       /* Port 0, Lane 0 */
-                                       status = "okay";
-                               };
-                       };
-
                        usb@50000 {
                                status = "okay";
                        };
                };
        };
 };
+
+&pciec {
+       status = "okay";
+
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+};
index 6e6d0f04bf2b5fe6f5661a75074425b71a3d9fc8..05c164b5786d1983baf92490bc6f46cbdb93e629 100644 (file)
@@ -86,7 +86,7 @@ soc {
                 * configured as x4 or quad x1 lanes. One unit is
                 * x1 only.
                 */
-               pcie-controller {
+               pciec: pcie-controller@82000000 {
                        compatible = "marvell,armada-xp-pcie";
                        status = "disabled";
                        device_type = "pci";
@@ -114,7 +114,7 @@ pcie-controller {
                                0x82000000 0x5 0       MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
                                0x81000000 0x5 0       MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO  */>;
 
-                       pcie@1,0 {
+                       pcie1: pcie@1,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
                                reg = <0x0800 0 0 0 0>;
@@ -131,7 +131,7 @@ pcie@1,0 {
                                status = "disabled";
                        };
 
-                       pcie@2,0 {
+                       pcie2: pcie@2,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
                                reg = <0x1000 0 0 0 0>;
@@ -148,7 +148,7 @@ pcie@2,0 {
                                status = "disabled";
                        };
 
-                       pcie@3,0 {
+                       pcie3: pcie@3,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
                                reg = <0x1800 0 0 0 0>;
@@ -165,7 +165,7 @@ pcie@3,0 {
                                status = "disabled";
                        };
 
-                       pcie@4,0 {
+                       pcie4: pcie@4,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
                                reg = <0x2000 0 0 0 0>;
@@ -182,7 +182,7 @@ pcie@4,0 {
                                status = "disabled";
                        };
 
-                       pcie@5,0 {
+                       pcie5: pcie@5,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
                                reg = <0x2800 0 0 0 0>;
index c5fdc99f0dbebb47f88e135a4013fdfb9d732772..07894b0d3e59ceba584d1d4ef70c51228ecfbc11 100644 (file)
@@ -87,7 +87,7 @@ soc {
                 * configured as x4 or quad x1 lanes. One unit is
                 * x4 only.
                 */
-               pcie-controller {
+               pciec: pcie-controller@82000000 {
                        compatible = "marvell,armada-xp-pcie";
                        status = "disabled";
                        device_type = "pci";
@@ -129,7 +129,7 @@ pcie-controller {
                                0x82000000 0x9 0     MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */
                                0x81000000 0x9 0     MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO  */>;
 
-                       pcie@1,0 {
+                       pcie1: pcie@1,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
                                reg = <0x0800 0 0 0 0>;
@@ -146,7 +146,7 @@ pcie@1,0 {
                                status = "disabled";
                        };
 
-                       pcie@2,0 {
+                       pcie2: pcie@2,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
                                reg = <0x1000 0 0 0 0>;
@@ -163,7 +163,7 @@ pcie@2,0 {
                                status = "disabled";
                        };
 
-                       pcie@3,0 {
+                       pcie3: pcie@3,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
                                reg = <0x1800 0 0 0 0>;
@@ -180,7 +180,7 @@ pcie@3,0 {
                                status = "disabled";
                        };
 
-                       pcie@4,0 {
+                       pcie4: pcie@4,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
                                reg = <0x2000 0 0 0 0>;
@@ -197,7 +197,7 @@ pcie@4,0 {
                                status = "disabled";
                        };
 
-                       pcie@5,0 {
+                       pcie5: pcie@5,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
                                reg = <0x2800 0 0 0 0>;
@@ -214,7 +214,7 @@ pcie@5,0 {
                                status = "disabled";
                        };
 
-                       pcie@6,0 {
+                       pcie6: pcie@6,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
                                reg = <0x3000 0 0 0 0>;
@@ -231,7 +231,7 @@ pcie@6,0 {
                                status = "disabled";
                        };
 
-                       pcie@7,0 {
+                       pcie7: pcie@7,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
                                reg = <0x3800 0 0 0 0>;
@@ -248,7 +248,7 @@ pcie@7,0 {
                                status = "disabled";
                        };
 
-                       pcie@8,0 {
+                       pcie8: pcie@8,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
                                reg = <0x4000 0 0 0 0>;
@@ -265,7 +265,7 @@ pcie@8,0 {
                                status = "disabled";
                        };
 
-                       pcie@9,0 {
+                       pcie9: pcie@9,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
                                reg = <0x4800 0 0 0 0>;
index 0e24f1a38540e30ccc257972537c8982074f4c75..775bee53ce8604598657d6abb65c37dd93311c6f 100644 (file)
@@ -104,7 +104,7 @@ soc {
                 * configured as x4 or quad x1 lanes. Two units are
                 * x4/x1.
                 */
-               pcie-controller {
+               pciec: pcie-controller@82000000 {
                        compatible = "marvell,armada-xp-pcie";
                        status = "disabled";
                        device_type = "pci";
@@ -150,7 +150,7 @@ pcie-controller {
                                0x82000000 0xa 0     MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */
                                0x81000000 0xa 0     MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO  */>;
 
-                       pcie@1,0 {
+                       pcie1: pcie@1,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
                                reg = <0x0800 0 0 0 0>;
@@ -167,7 +167,7 @@ pcie@1,0 {
                                status = "disabled";
                        };
 
-                       pcie@2,0 {
+                       pcie2: pcie@2,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
                                reg = <0x1000 0 0 0 0>;
@@ -184,7 +184,7 @@ pcie@2,0 {
                                status = "disabled";
                        };
 
-                       pcie@3,0 {
+                       pcie3: pcie@3,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
                                reg = <0x1800 0 0 0 0>;
@@ -201,7 +201,7 @@ pcie@3,0 {
                                status = "disabled";
                        };
 
-                       pcie@4,0 {
+                       pcie4: pcie@4,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
                                reg = <0x2000 0 0 0 0>;
@@ -218,7 +218,7 @@ pcie@4,0 {
                                status = "disabled";
                        };
 
-                       pcie@5,0 {
+                       pcie5: pcie@5,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
                                reg = <0x2800 0 0 0 0>;
@@ -235,7 +235,7 @@ pcie@5,0 {
                                status = "disabled";
                        };
 
-                       pcie@6,0 {
+                       pcie6: pcie@6,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
                                reg = <0x3000 0 0 0 0>;
@@ -252,7 +252,7 @@ pcie@6,0 {
                                status = "disabled";
                        };
 
-                       pcie@7,0 {
+                       pcie7: pcie@7,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
                                reg = <0x3800 0 0 0 0>;
@@ -269,7 +269,7 @@ pcie@7,0 {
                                status = "disabled";
                        };
 
-                       pcie@8,0 {
+                       pcie8: pcie@8,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
                                reg = <0x4000 0 0 0 0>;
@@ -286,7 +286,7 @@ pcie@8,0 {
                                status = "disabled";
                        };
 
-                       pcie@9,0 {
+                       pcie9: pcie@9,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
                                reg = <0x4800 0 0 0 0>;
@@ -303,7 +303,7 @@ pcie@9,0 {
                                status = "disabled";
                        };
 
-                       pcie@10,0 {
+                       pcie10: pcie@10,0 {
                                device_type = "pci";
                                assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;
                                reg = <0x5000 0 0 0 0>;
index d19f44c709257d9a35644d71cb49a04e354c42d8..a2f0e789465d0b9016a099acadfbe746c8bf80a7 100644 (file)
@@ -56,7 +56,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x00000000 0 0x80000000>; /* 2GB */
        };
@@ -67,28 +67,6 @@ MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
                          MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /* Connected to first Marvell 88SE9170 SATA controller */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /* Connected to second Marvell 88SE9170 SATA controller */
-                       pcie@2,0 {
-                               /* Port 0, Lane 1 */
-                               status = "okay";
-                       };
-
-                       /* Connected to Fresco Logic FL1009 USB 3.0 controller */
-                       pcie@5,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
 
                        /* RTC is provided by Intersil ISL12057 I2C RTC chip */
@@ -97,7 +75,6 @@ rtc@10300 {
                        };
 
                        i2c@11000 {
-                               compatible = "marvell,mv64xxx-i2c";
                                clock-frequency = <400000>;
                                status = "okay";
 
@@ -154,23 +131,19 @@ usb@50000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               phy0: ethernet-phy@0 { /* Marvell 88E1318 */
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 { /* Marvell 88E1318 */
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@70000 {
+                               pinctrl-0 = <&ge0_rgmii_pins>;
+                               pinctrl-names = "default";
+
                                status = "okay";
                                phy = <&phy0>;
                                phy-mode = "rgmii-id";
                        };
 
                        ethernet@74000 {
+                               pinctrl-0 = <&ge1_rgmii_pins>;
+                               pinctrl-names = "default";
+
                                status = "okay";
                                phy = <&phy1>;
                                phy-mode = "rgmii-id";
@@ -295,6 +268,39 @@ gpio-poweroff {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /* Connected to first Marvell 88SE9170 SATA controller */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /* Connected to second Marvell 88SE9170 SATA controller */
+       pcie@2,0 {
+               /* Port 0, Lane 1 */
+               status = "okay";
+       };
+
+       /* Connected to Fresco Logic FL1009 USB 3.0 controller */
+       pcie@5,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       phy0: ethernet-phy@0 { /* Marvell 88E1318 */
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 { /* Marvell 88E1318 */
+               reg = <1>;
+       };
+};
+
+
 &pinctrl {
        poweroff: poweroff {
                marvell,pins = "mpp42";
index ed3b889d16ce439a4e933cdcd17ff37ed6adc4c4..b577c9fb03a45aa2f0f256ca90fab4b16a67a56e 100644 (file)
@@ -57,7 +57,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x00000000 0 0x40000000>; /* 1 GB soldered on */
        };
@@ -98,15 +98,6 @@ nor@0 {
                        };
                };
 
-               pcie-controller {
-                       status = "okay";
-                       /* Internal mini-PCIe connector */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
                        rtc@10300 {
                                /* No crystal connected to the internal RTC */
@@ -148,31 +139,13 @@ gpio_keys {
                                #address-cells = <1>;
                                #size-cells = <0>;
 
-                               button@1 {
+                               init {
                                        label = "Init Button";
                                        linux,code = <KEY_POWER>;
                                        gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
                                };
                        };
 
-                       mdio {
-                               phy0: ethernet-phy@0 {
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 {
-                                       reg = <1>;
-                               };
-
-                               phy2: ethernet-phy@2 {
-                                       reg = <2>;
-                               };
-
-                               phy3: ethernet-phy@3 {
-                                       reg = <3>;
-                               };
-                       };
-
                        ethernet@70000 {
                                status = "okay";
                                phy = <&phy0>;
@@ -240,6 +213,33 @@ bm-bppi {
        };
 };
 
+&pciec {
+       status = "okay";
+       /* Internal mini-PCIe connector */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+};
+
+&mdio {
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+
+       phy2: ethernet-phy@2 {
+               reg = <2>;
+       };
+
+       phy3: ethernet-phy@3 {
+               reg = <3>;
+       };
+};
+
 &pinctrl {
        led_pins: led-pins-0 {
                marvell,pins = "mpp49", "mpp51", "mpp53";
index ae286736b90a6dca87d238c6fc5b23803da66323..e803da03146a648654d1a51408b1c4f71db595a8 100644 (file)
@@ -70,7 +70,7 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x00000000 0 0x40000000>; /* 1GB */
        };
@@ -81,28 +81,6 @@ MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
                          MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
                          MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
 
-               pcie-controller {
-                       status = "okay";
-
-                       /*
-                        * Connected to Marvell 88SX7042 SATA-II controller
-                        * handling the four disks.
-                        */
-                       pcie@1,0 {
-                               /* Port 0, Lane 0 */
-                               status = "okay";
-                       };
-
-                       /*
-                        * Connected to EtronTech EJ168A XHCI controller
-                        * providing the two rear USB 3.0 ports.
-                        */
-                       pcie@5,0 {
-                               /* Port 1, Lane 0 */
-                               status = "okay";
-                       };
-               };
-
                internal-regs {
 
                        /* RTC is provided by Seiko S-35390A below */
@@ -150,16 +128,6 @@ usb@50000 {
                                status = "okay";
                        };
 
-                       mdio {
-                               phy0: ethernet-phy@0 { /* Marvell 88E1512 */
-                                       reg = <0>;
-                               };
-
-                               phy1: ethernet-phy@1 { /* Marvell 88E1512 */
-                                       reg = <1>;
-                               };
-                       };
-
                        ethernet@70000 {
                                status = "okay";
                                pinctrl-0 = <&ge0_rgmii_pins>;
@@ -186,7 +154,7 @@ regulators {
                             &sata3_pwr_pin &sata4_pwr_pin>;
                pinctrl-names = "default";
 
-               sata1_regulator: sata1-regulator {
+               sata1_regulator: sata1-regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
                        regulator-name = "SATA1 Power";
@@ -199,7 +167,7 @@ sata1_regulator: sata1-regulator {
                        gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
                };
 
-               sata2_regulator: sata2-regulator {
+               sata2_regulator: sata2-regulator@2 {
                        compatible = "regulator-fixed";
                        reg = <2>;
                        regulator-name = "SATA2 Power";
@@ -212,7 +180,7 @@ sata2_regulator: sata2-regulator {
                        gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
                };
 
-               sata3_regulator: sata3-regulator {
+               sata3_regulator: sata3-regulator@3 {
                        compatible = "regulator-fixed";
                        reg = <3>;
                        regulator-name = "SATA3 Power";
@@ -225,7 +193,7 @@ sata3_regulator: sata3-regulator {
                        gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
                };
 
-               sata4_regulator: sata4-regulator {
+               sata4_regulator: sata4-regulator@4 {
                        compatible = "regulator-fixed";
                        reg = <4>;
                        regulator-name = "SATA4 Power";
@@ -240,6 +208,39 @@ sata4_regulator: sata4-regulator {
        };
 };
 
+&pciec {
+       status = "okay";
+
+       /*
+        * Connected to Marvell 88SX7042 SATA-II controller
+        * handling the four disks.
+        */
+       pcie@1,0 {
+               /* Port 0, Lane 0 */
+               status = "okay";
+       };
+
+       /*
+        * Connected to EtronTech EJ168A XHCI controller
+        * providing the two rear USB 3.0 ports.
+        */
+       pcie@5,0 {
+               /* Port 1, Lane 0 */
+               status = "okay";
+       };
+};
+
+
+&mdio {
+       phy0: ethernet-phy@0 { /* Marvell 88E1512 */
+               reg = <0>;
+       };
+
+       phy1: ethernet-phy@1 { /* Marvell 88E1512 */
+               reg = <1>;
+       };
+};
+
 &pinctrl {
        sata1_pwr_pin: sata1-pwr-pin {
                marvell,pins = "mpp42";
index 4a5f99e65b512e1e1d9d77f6ae62fab9ef6c8415..5274e4ff5d621ad8e226126071a7f4f453042ff2 100644 (file)
@@ -53,6 +53,9 @@
 #include "armada-370-xp.dtsi"
 
 / {
+       #address-cells = <2>;
+       #size-cells = <2>;
+
        model = "Marvell Armada XP family SoC";
        compatible = "marvell,armadaxp", "marvell,armada-370-xp";
 
@@ -75,7 +78,7 @@ sdramc@1400 {
                                reg = <0x1400 0x500>;
                        };
 
-                       L2: l2-cache {
+                       L2: l2-cache@8000 {
                                compatible = "marvell,aurora-system-cache";
                                reg = <0x08000 0x1000>;
                                cache-id-part = <0x100>;
@@ -84,16 +87,6 @@ L2: l2-cache {
                                wt-override;
                        };
 
-                       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>;
-                       };
-
                        uart2: serial@12200 {
                                compatible = "snps,dw-apb-uart";
                                pinctrl-0 = <&uart2_pins>;
@@ -118,7 +111,7 @@ uart3: serial@12300 {
                                status = "disabled";
                        };
 
-                       system-controller@18200 {
+                       systemc: system-controller@18200 {
                                compatible = "marvell,armada-370-xp-system-controller";
                                reg = <0x18200 0x500>;
                        };
@@ -136,7 +129,7 @@ coreclk: mvebu-sar@18230 {
                                #clock-cells = <1>;
                        };
 
-                       thermal@182b0 {
+                       thermal: thermal@182b0 {
                                compatible = "marvell,armadaxp-thermal";
                                reg = <0x182b0 0x4
                                        0x184d0 0x4>;
@@ -150,27 +143,6 @@ cpuclk: clock-complex@18700 {
                                clocks = <&coreclk 1>;
                        };
 
-                       interrupt-controller@20a00 {
-                             reg = <0x20a00 0x2d0>, <0x21070 0x58>;
-                       };
-
-                       timer@20300 {
-                               compatible = "marvell,armada-xp-timer";
-                               clocks = <&coreclk 2>, <&refclk>;
-                               clock-names = "nbclk", "fixed";
-                       };
-
-                       watchdog@20300 {
-                               compatible = "marvell,armada-xp-wdt";
-                               clocks = <&coreclk 2>, <&refclk>;
-                               clock-names = "nbclk", "fixed";
-                       };
-
-                       cpurst@20800 {
-                               compatible = "marvell,armada-370-cpu-reset";
-                               reg = <0x20800 0x20>;
-                       };
-
                        cpu-config@21000 {
                                compatible = "marvell,armada-xp-cpu-config";
                                reg = <0x21000 0x8>;
@@ -184,15 +156,7 @@ eth2: ethernet@30000 {
                                status = "disabled";
                        };
 
-                       usb@50000 {
-                               clocks = <&gateclk 18>;
-                       };
-
-                       usb@51000 {
-                               clocks = <&gateclk 19>;
-                       };
-
-                       usb@52000 {
+                       usb2: usb@52000 {
                                compatible = "marvell,orion-ehci";
                                reg = <0x52000 0x500>;
                                interrupts = <47>;
@@ -200,7 +164,7 @@ usb@52000 {
                                status = "disabled";
                        };
 
-                       xor@60900 {
+                       xor1: xor@60900 {
                                compatible = "marvell,orion-xor";
                                reg = <0x60900 0x100
                                       0x60b00 0x100>;
@@ -228,7 +192,7 @@ ethernet@74000 {
                                compatible = "marvell,armada-xp-neta";
                        };
 
-                       crypto@90000 {
+                       cesa: crypto@90000 {
                                compatible = "marvell,armada-xp-crypto";
                                reg = <0x90000 0x10000>;
                                reg-names = "regs";
@@ -248,7 +212,7 @@ bm: bm@c0000 {
                                status = "disabled";
                        };
 
-                       xor@f0900 {
+                       xor0: xor@f0900 {
                                compatible = "marvell,orion-xor";
                                reg = <0xF0900 0x100
                                       0xF0B00 0x100>;
@@ -309,6 +273,44 @@ refclk: oscillator {
        };
 };
 
+&i2c0 {
+       compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+       reg = <0x11000 0x100>;
+};
+
+&i2c1 {
+       compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+       reg = <0x11100 0x100>;
+};
+
+&mpic {
+       reg = <0x20a00 0x2d0>, <0x21070 0x58>;
+};
+
+&timer {
+       compatible = "marvell,armada-xp-timer";
+       clocks = <&coreclk 2>, <&refclk>;
+       clock-names = "nbclk", "fixed";
+};
+
+&watchdog {
+       compatible = "marvell,armada-xp-wdt";
+       clocks = <&coreclk 2>, <&refclk>;
+       clock-names = "nbclk", "fixed";
+};
+
+&cpurst {
+       reg = <0x20800 0x20>;
+};
+
+&usb0 {
+       clocks = <&gateclk 18>;
+};
+
+&usb1 {
+       clocks = <&gateclk 19>;
+};
+
 &pinctrl {
        ge0_gmii_pins: ge0-gmii-pins {
                marvell,pins =
index f823ed382ac7cf5585e96ce09b35b8b6c6734705..9dfe845694cff443ffba59cf252eb7c0233f5404 100644 (file)
@@ -46,6 +46,10 @@ &uart3 {
        status = "okay";
 };
 
+&pcie {
+       status = "okay";
+};
+
 &ethernet {
        status = "okay";
 
index 3489019cc0dc1d2154923636bb145f75315fe97f..767cbe8d8557a1d111443c0c0e119b578d591b9a 100644 (file)
@@ -67,7 +67,7 @@ cpu1: cpu@1 {
                };
        };
 
-       syscon {
+       syscon: syscon@f8000000 {
                compatible = "axis,artpec6-syscon", "syscon";
                reg = <0xf8000000 0x48>;
        };
@@ -154,6 +154,33 @@ pmu {
                interrupt-parent = <&intc>;
        };
 
+       pcie: pcie@f8050000 {
+               compatible = "axis,artpec6-pcie", "snps,dw-pcie";
+               reg = <0xf8050000 0x2000
+                      0xf8040000 0x1000
+                      0xc0000000 0x2000>;
+               reg-names = "dbi", "phy", "config";
+               #address-cells = <3>;
+               #size-cells = <2>;
+               device_type = "pci";
+                         /* downstream I/O */
+               ranges = <0x81000000 0 0 0xc0002000 0 0x00010000
+                         /* non-prefetchable memory */
+                         0x82000000 0 0xc0012000 0xc0012000 0 0x1ffee000>;
+               num-lanes = <2>;
+               bus-range = <0x00 0xff>;
+               interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "msi";
+               #interrupt-cells = <1>;
+               interrupt-map-mask = <0 0 0 0x7>;
+               interrupt-map = <0 0 0 1 &intc GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 2 &intc GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 3 &intc GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 4 &intc GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+               axis,syscon-pcie = <&syscon>;
+               status = "disabled";
+       };
+
        amba@0 {
                compatible = "simple-bus";
                #address-cells = <0x1>;
index a92c6e0ca854896bb2ef5005025f7de39dfd7656..b5a5a91bc2ef83d78b8abbb6bb637cc7058ea377 100644 (file)
@@ -12,8 +12,8 @@
 #include "sama5d4.dtsi"
 
 / {
-       model = "DENX MA5D4";
-       compatible = "denx,ma5d4", "atmel,sama5d4", "atmel,sama5";
+       model = "Aries/DENX MA5D4";
+       compatible = "aries,ma5d4", "denx,ma5d4", "atmel,sama5d4", "atmel,sama5";
 
        memory {
                reg = <0x20000000 0x10000000>;
index eac4ea2744cc5650701c95edb291e9a7ce8cf5e8..84be29f38dae005f12eb0c13a1ec90eaf5b5616a 100644 (file)
@@ -13,8 +13,8 @@
 #include "at91-sama5d4_ma5d4.dtsi"
 
 / {
-       model = "DENX MA5D4EVK";
-       compatible = "denx,ma5d4evk", "atmel,sama5d4", "atmel,sama5";
+       model = "Aries/DENX MA5D4EVK";
+       compatible = "aries,ma5d4evk", "denx,ma5d4evk", "atmel,sama5d4", "atmel,sama5";
 
        chosen {
                stdout-path = "serial3:115200n8";
index 4e913c2ccb79623e5c9aff10eb1931507b6e7a2f..f057e0b15a6f5427d5018ea7d0b18555feede78c 100644 (file)
@@ -481,8 +481,8 @@ pinctrl@fffff400 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA30 periph A */
-                                                        AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA31 periph with pullup */
+                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index a3e363d79122c1a82400519735ec252883290304..9e035b21e1b6f4b781c70ac53ec7c7ad33f81986 100644 (file)
@@ -412,8 +412,8 @@ pinctrl@fffff400 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A */
-                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PB15 periph with pullup */
+                                                       <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index 2c87f58448e7b9823d6318139d7edc238a85b903..b2578feceb0894827c9ad8cf12bd6c3725fd7d96 100644 (file)
@@ -174,14 +174,14 @@ btn3 {
                        label = "Button 3";
                        gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
                        linux,code = <0x103>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                btn4 {
                        label = "Button 4";
                        gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
                        linux,code = <0x104>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 32752d7883f14edba29f56972cf1f29f2e26f88d..3fe77c38bd0db6940c2d6b5c97de020185535b43 100644 (file)
@@ -302,8 +302,8 @@ pinctrl@fffff400 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOA 9  AT91_PERIPH_A AT91_PINCTRL_NONE>,
-                                                       <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+                                                       <AT91_PIOA 9  AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index aeb1a36373f48cfbe88fec12b89c5ba9d12823f7..a1888f6d892bfce6dd9ef615df6292419ca7e532 100644 (file)
@@ -412,8 +412,8 @@ pinctrl@fffff200 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC30 periph A */
-                                                        AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC31 periph with pullup */
+                                                       <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index b3501ae2a3bd19211769bdd00ee18d4245562bdf..e567d5fd3f9d40a95972791312c10c28802719fa 100644 (file)
@@ -478,8 +478,8 @@ pinctrl_adc0_ad7: adc0_ad7 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <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 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index 3b3eb3edcb470f84a926c2c9dce951dbb0b8037d..f43d7695352d0254be6443aa73e17877f3a2cc61 100644 (file)
@@ -500,8 +500,8 @@ pinctrl@fffff400 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA9 periph A */
-                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA10 periph with pullup */
+                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index 70adf940d98c0c306bcd61456f3216563460c5ff..f4c129a98f176392336f788c933e1a4f01109b0c 100644 (file)
@@ -438,8 +438,8 @@ pinctrl_adc0_adtrg: adc0_adtrg-0 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>,
-                                                       <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+                                                       <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index ed4e4bd8a8f126ef1ca0a98d24c50f874c70fb66..f66bae925705aef7beebb4a3fd38b810d6cd722b 100644 (file)
@@ -460,8 +460,8 @@ pinctrl@fffff400 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA9 periph A */
-                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA10 periph A with pullup */
+                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
diff --git a/arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts b/arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts
new file mode 100644 (file)
index 0000000..bfde32e
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * cloudengines-pogoplug-series-3.dtsi - Device tree file for Cloud Engines PogoPlug Series 3
+ *
+ * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * Licensed under GPLv2 or later
+ */
+
+/dts-v1/;
+#include "ox820.dtsi"
+
+/ {
+       model = "Cloud Engines PogoPlug Series 3";
+
+       compatible = "cloudengines,pogoplugv3", "oxsemi,ox820";
+
+       chosen {
+               bootargs = "earlyprintk";
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               /* 128Mbytes DDR */
+               reg = <0x60000000 0x8000000>;
+       };
+
+       aliases {
+               serial0 = &uart0;
+               gpio0 = &gpio0;
+               gpio1 = &gpio1;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               blue {
+                       label = "pogoplug:blue";
+                       gpios = <&gpio0 2 0>;
+                       default-state = "keep";
+               };
+
+               orange {
+                       label = "pogoplug:orange";
+                       gpios = <&gpio1 16 1>;
+                       default-state = "keep";
+               };
+
+               green {
+                       label = "pogoplug:green";
+                       gpios = <&gpio1 17 1>;
+                       default-state = "keep";
+               };
+       };
+};
+
+&uart0 {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart0>;
+};
+
+&nandc {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_nand>;
+
+       nand@0 {
+               reg = <0>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               nand-ecc-mode = "soft";
+               nand-ecc-algo = "hamming";
+
+               partition@0 {
+                       label = "boot";
+                       reg = <0x00000000 0x00e00000>;
+                       read-only;
+               };
+
+               partition@e00000 {
+                       label = "ubi";
+                       reg = <0x00e00000 0x07200000>;
+               };
+       };
+};
+
+&etha {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_etha_mdio>;
+};
index 7b8ab21fed6c8afdbffcc1969dc53bc6f1c674b1..afcb4821deb18ffb71356a4a9c03f1e945728426 100644 (file)
@@ -13,6 +13,7 @@ / {
 
        aliases {
                serial2 = &serial2;
+               ethernet0 = &eth0;
        };
 
        chosen {
@@ -122,7 +123,7 @@ &mmc0 {
        bus-width = <4>;
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
-       cd-gpios = <&gpio 64 GPIO_ACTIVE_HIGH>;
+       cd-gpios = <&gpio 64 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
@@ -158,6 +159,14 @@ &mcasp0 {
        rx-num-evt = <32>;
 };
 
+&usb_phy {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+};
+
 &aemif {
        pinctrl-names = "default";
        pinctrl-0 = <&nand_pins>;
@@ -219,3 +228,11 @@ partition@0x0a0000 {
                };
        };
 };
+
+&prictrl {
+       status = "okay";
+};
+
+&memctrl {
+       status = "okay";
+};
index f79e1b91c68013cc2f5533a8e3894d746ced5691..4070619d823ba79770c12a3753b41df14992e135 100644 (file)
@@ -36,6 +36,7 @@ pmx_core: pinmux@14120 {
                        reg = <0x14120 0x50>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #pinctrl-cells = <2>;
                        pinctrl-single,bit-per-mux;
                        pinctrl-single,register-width = <32>;
                        pinctrl-single,function-mask = <0xf>;
@@ -186,8 +187,44 @@ mii_pins: pinmux_mii_pins {
                                        0xc 0x88888888 0xffffffff
                                >;
                        };
+                       lcd_pins: pinmux_lcd_pins {
+                               pinctrl-single,bits = <
+                                       /*
+                                        * LCD_D[2], LCD_D[3], LCD_D[4], LCD_D[5],
+                                        * LCD_D[6], LCD_D[7]
+                                        */
+                                       0x40 0x22222200 0xffffff00
+                                       /*
+                                        * LCD_D[10], LCD_D[11], LCD_D[12], LCD_D[13],
+                                        * LCD_D[14], LCD_D[15], LCD_D[0], LCD_D[1]
+                                        */
+                                       0x44 0x22222222 0xffffffff
+                                       /* LCD_D[8], LCD_D[9] */
+                                       0x48 0x00000022 0x000000ff
+
+                                       /* LCD_PCLK */
+                                       0x48 0x02000000 0x0f000000
+                                       /* LCD_AC_ENB_CS, LCD_VSYNC, LCD_HSYNC */
+                                       0x4c 0x02000022 0x0f0000ff
+                               >;
+                       };
 
                };
+               prictrl: priority-controller@14110 {
+                       compatible = "ti,da850-mstpri";
+                       reg = <0x14110 0x0c>;
+                       status = "disabled";
+               };
+               cfgchip: chip-controller@1417c {
+                       compatible = "ti,da830-cfgchip", "syscon", "simple-mfd";
+                       reg = <0x1417c 0x14>;
+
+                       usb_phy: usb-phy {
+                               compatible = "ti,da830-usb-phy";
+                               #phy-cells = <1>;
+                               status = "disabled";
+                       };
+               };
                edma0: edma@0 {
                        compatible = "ti,edma3-tpcc";
                        /* eDMA3 CC0: 0x01c0 0000 - 0x01c0 7fff */
@@ -336,6 +373,8 @@ spi0: spi@41000 {
                        num-cs = <6>;
                        ti,davinci-spi-intr-line = <1>;
                        interrupts = <20>;
+                       dmas = <&edma0 14 0>, <&edma0 15 0>;
+                       dma-names = "rx", "tx";
                        status = "disabled";
                };
                spi1: spi@30e000 {
@@ -350,6 +389,16 @@ spi1: spi@30e000 {
                        dma-names = "rx", "tx";
                        status = "disabled";
                };
+               usb0: usb@200000 {
+                       compatible = "ti,da830-musb";
+                       reg = <0x200000 0x10000>;
+                       interrupts = <58>;
+                       interrupt-names = "mc";
+                       dr_mode = "otg";
+                       phys = <&usb_phy 0>;
+                       phy-names = "usb-phy";
+                       status = "disabled";
+               };
                mdio: mdio@224000 {
                        compatible = "ti,davinci_mdio";
                        #address-cells = <1>;
@@ -399,6 +448,13 @@ mcasp0: mcasp@100000 {
                                <&edma0 0 1>;
                        dma-names = "tx", "rx";
                };
+
+               display: display@213000 {
+                       compatible = "ti,da850-tilcdc";
+                       reg = <0x213000 0x1000>;
+                       interrupts = <52>;
+                       status = "disabled";
+               };
        };
        aemif: aemif@68000000 {
                compatible = "ti,da850-aemif";
@@ -410,4 +466,9 @@ aemif: aemif@68000000 {
                          1 0 0x68000000 0x00008000>;
                status = "disabled";
        };
+       memctrl: memory-controller@b0000000 {
+               compatible = "ti,da850-ddr-controller";
+               reg = <0xb0000000 0xe8>;
+               status = "disabled";
+       };
 };
index ff90a6ce6bdc248066e895cb03916e6b1d26ccc8..1facc5f12cef700acf90e0b2f2e8594096a9bf9a 100644 (file)
@@ -373,6 +373,7 @@ pincntl: pinmux@800 {
                                        reg = <0x800 0x438>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        pinctrl-single,register-width = <32>;
                                        pinctrl-single,function-mask = <0x307ff>;
                                };
index f1e0f771ff297df8cdde113f5237e03a63bee18e..61dd2f6b02bcfe47d7d6a5ddd5734de0e5687e89 100644 (file)
@@ -83,6 +83,7 @@ scrm: scrm@48140000 {
                        reg = <0x48140000 0x21000>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       #pinctrl-cells = <1>;
                        ranges = <0 0x48140000 0x21000>;
 
                        dm816x_pinmux: pinmux@800 {
@@ -90,6 +91,7 @@ dm816x_pinmux: pinmux@800 {
                                reg = <0x800 0x50a>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               #pinctrl-cells = <1>;
                                pinctrl-single,register-width = <16>;
                                pinctrl-single,function-mask = <0xf>;
                        };
index d4fcd68f634966ac9e34361b8c677ee54b176783..addb7530cfbe0dcece696c2e84fbb5ea8896ceb2 100644 (file)
@@ -171,6 +171,7 @@ dra7_pmx_core: pinmux@1400 {
                                        reg = <0x1400 0x0468>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        #interrupt-cells = <1>;
                                        interrupt-controller;
                                        pinctrl-single,register-width = <32>;
diff --git a/arch/arm/boot/dts/dra71-evm.dts b/arch/arm/boot/dts/dra71-evm.dts
new file mode 100644 (file)
index 0000000..2b9a5a8
--- /dev/null
@@ -0,0 +1,230 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#include "dra72-evm-common.dtsi"
+#include <dt-bindings/net/ti-dp83867.h>
+
+/ {
+       compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7";
+       model = "TI DRA718 EVM";
+
+       memory {
+               device_type = "memory";
+               reg = <0x0 0x80000000 0x0 0x80000000>; /* 2GB */
+       };
+
+       vpo_sd_1v8_3v3: gpio-regulator-TPS74801 {
+               compatible = "regulator-gpio";
+
+               regulator-name = "vddshv8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3000000>;
+               regulator-boot-on;
+               vin-supply = <&evm_5v0>;
+
+               gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>;
+               states = <1800000 0x0
+                         3000000 0x1>;
+       };
+
+       poweroff: gpio-poweroff {
+               compatible = "gpio-poweroff";
+               gpios = <&gpio7 30 GPIO_ACTIVE_HIGH>;
+               input;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <400000>;
+
+       lp8733: lp8733@60 {
+               compatible = "ti,lp8733";
+               reg = <0x60>;
+
+               buck0-in-supply =<&vsys_3v3>;
+               buck1-in-supply =<&vsys_3v3>;
+               ldo0-in-supply =<&evm_5v0>;
+               ldo1-in-supply =<&evm_5v0>;
+
+               lp8733_regulators: regulators {
+                       lp8733_buck0_reg: buck0 {
+                               /* FB_B0 -> LP8733-BUCK1 - VPO_S1_AVS - VDD_CORE_AVS (core, mpu, gpu) */
+                               regulator-name = "lp8733-buck0";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       lp8733_buck1_reg: buck1 {
+                               /* FB_B1 -> LP8733-BUCK2 - VPO_S2_AVS - VDD_DSP_AVS (DSP/eve/iva) */
+                               regulator-name = "lp8733-buck1";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       lp8733_ldo0_reg: ldo0 {
+                               /* LDO0 -> LP8733-LDO1 - VPO_L1_3V3 - VDDSHV8 (optional) */
+                               regulator-name = "lp8733-ldo0";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+
+                       lp8733_ldo1_reg: ldo1 {
+                               /* LDO1 -> LP8733-LDO2 - VPO_L2_3V3 - VDDA_USB3V3 */
+                               regulator-name = "lp8733-ldo1";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+               };
+       };
+
+       lp8732: lp8732@61 {
+               compatible = "ti,lp8732";
+               reg = <0x61>;
+
+               buck0-in-supply =<&vsys_3v3>;
+               buck1-in-supply =<&vsys_3v3>;
+               ldo0-in-supply =<&vsys_3v3>;
+               ldo1-in-supply =<&vsys_3v3>;
+
+               lp8732_regulators: regulators {
+                       lp8732_buck0_reg: buck0 {
+                               /* FB_B0 -> LP8732-BUCK1 - VPO_S3_1V8 - VDDS_1V8 */
+                               regulator-name = "lp8732-buck0";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       lp8732_buck1_reg: buck1 {
+                               /* FB_B1 -> LP8732-BUCK2 - VPO_S4_DDR - VDD_DDR_1V35 */
+                               regulator-name = "lp8732-buck1";
+                               regulator-min-microvolt = <1350000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       lp8732_ldo0_reg: ldo0 {
+                               /* LDO0 -> LP8732-LDO1 - VPO_L3_1V8 - VDA_1V8_PLL */
+                               regulator-name = "lp8732-ldo0";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       lp8732_ldo1_reg: ldo1 {
+                               /* LDO1 -> LP8732-LDO2 - VPO_L4_1V8 - VDA_1V8_PHY */
+                               regulator-name = "lp8732-ldo1";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+               };
+       };
+};
+
+&pcf_gpio_21 {
+       interrupt-parent = <&gpio7>;
+       interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
+};
+
+&pcf_hdmi {
+       p0 {
+               /*
+                * PM_OEn to High: Disable routing I2C3 to PM_I2C
+                * With this PM_SEL(p3) should not matter
+                */
+               gpio-hog;
+               gpios = <0 GPIO_ACTIVE_LOW>;
+               output-high;
+               line-name = "pm_oe_n";
+       };
+};
+
+&mmc1 {
+       vmmc_aux-supply = <&vpo_sd_1v8_3v3>;
+};
+
+&mac {
+       mode-gpios = <&pcf_gpio_21 4 GPIO_ACTIVE_LOW>,
+                    <&pcf_hdmi 9 GPIO_ACTIVE_LOW>,     /* P11 */
+                    <&pcf_hdmi 10 GPIO_ACTIVE_LOW>;    /* P12 */
+       dual_emac;
+};
+
+&cpsw_emac0 {
+       phy_id = <&davinci_mdio>, <2>;
+       phy-mode = "rgmii-id";
+       dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+       phy_id = <&davinci_mdio>, <3>;
+       phy-mode = "rgmii-id";
+       dual_emac_res_vlan = <2>;
+};
+
+&davinci_mdio {
+       dp83867_0: ethernet-phy@2 {
+               reg = <2>;
+               ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+               ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
+               ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+               ti,impedance-control = <0x1f>;
+       };
+
+       dp83867_1: ethernet-phy@3 {
+               reg = <3>;
+               ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+               ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
+               ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+               ti,impedance-control = <0x1f>;
+       };
+};
+
+/* No Sata on this device */
+&sata_phy {
+       status = "disabled";
+};
+
+&sata {
+       status = "disabled";
+};
+
+/* No RTC on this device */
+&rtc {
+       status = "disabled";
+};
+
+&usb2_phy1 {
+       phy-supply = <&lp8733_ldo1_reg>;
+};
+
+&usb2_phy2 {
+       phy-supply = <&lp8733_ldo1_reg>;
+};
+
+&dss {
+       /* Supplied by VDA_1V8_PLL */
+       vdda_video-supply = <&lp8732_ldo0_reg>;
+};
+
+&hdmi {
+       /* Supplied by VDA_1V8_PHY */
+       vdda_video-supply = <&lp8732_ldo1_reg>;
+};
index c94d8d64710dde5018a465680f025dd1ebc2171d..e50fbeea96e0f80aed44cea86647026e491dcd06 100644 (file)
@@ -18,11 +18,49 @@ aliases {
                display0 = &hdmi0;
        };
 
+       evm_12v0: fixedregulator-evm12v0 {
+               /* main supply */
+               compatible = "regulator-fixed";
+               regulator-name = "evm_12v0";
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       evm_5v0: fixedregulator-evm5v0 {
+               /* Output 1 of TPS43351QDAPRQ1 on dra72-evm */
+               /* Output 1 of LM5140QRWGTQ1 on dra71-evm */
+               compatible = "regulator-fixed";
+               regulator-name = "evm_5v0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&evm_12v0>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vsys_3v3: fixedregulator-vsys3v3 {
+               /* Output 2 of TPS43351QDAPRQ1 on dra72-evm */
+               /* Output 2 of LM5140QRWGTQ1 on dra71-evm */
+               compatible = "regulator-fixed";
+               regulator-name = "vsys_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&evm_12v0>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
        evm_3v3_sw: fixedregulator-evm_3v3 {
+               /* TPS22965DSG */
                compatible = "regulator-fixed";
                regulator-name = "evm_3v3";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
+               vin-supply = <&vsys_3v3>;
+               regulator-always-on;
+               regulator-boot-on;
        };
 
        aic_dvdd: fixedregulator-aic_dvdd {
@@ -39,6 +77,7 @@ evm_3v3_sd: fixedregulator-sd {
                regulator-name = "evm_3v3_sd";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
+               vin-supply = <&evm_3v3_sw>;
                enable-active-high;
                gpio = <&pcf_gpio_21 5 GPIO_ACTIVE_HIGH>;
        };
@@ -69,9 +108,6 @@ hdmi_connector_in: endpoint {
        tpd12s015: encoder {
                compatible = "ti,tpd12s015";
 
-               pinctrl-names = "default";
-               pinctrl-0 = <&tpd12s015_pins>;
-
                gpios = <&pcf_hdmi 4 GPIO_ACTIVE_HIGH>, /* P4, CT CP HPD */
                        <&pcf_hdmi 5 GPIO_ACTIVE_HIGH>, /* P5, LS OE */
                        <&gpio7 12 GPIO_ACTIVE_HIGH>;   /* gpio7_12/sp1_cs2, HPD */
@@ -134,72 +170,6 @@ simple-audio-card,codec {
 };
 
 &dra7_pmx_core {
-       i2c1_pins: pinmux_i2c1_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3800, PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */
-                       DRA7XX_CORE_IOPAD(0x3804, PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */
-               >;
-       };
-
-       i2c5_pins: pinmux_i2c5_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x36b4, PIN_INPUT | MUX_MODE10) /* mcasp1_axr0.i2c5_sda */
-                       DRA7XX_CORE_IOPAD(0x36b8, PIN_INPUT | MUX_MODE10) /* mcasp1_axr1.i2c5_scl */
-               >;
-       };
-
-       i2c5_pins: pinmux_i2c5_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x36b4, PIN_INPUT | MUX_MODE10) /* mcasp1_axr0.i2c5_sda */
-                       DRA7XX_CORE_IOPAD(0x36b8, PIN_INPUT | MUX_MODE10) /* mcasp1_axr1.i2c5_scl */
-               >;
-       };
-
-       nand_default: nand_default {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3400, PIN_INPUT  | MUX_MODE0) /* gpmc_ad0 */
-                       DRA7XX_CORE_IOPAD(0x3404, PIN_INPUT  | MUX_MODE0) /* gpmc_ad1 */
-                       DRA7XX_CORE_IOPAD(0x3408, PIN_INPUT  | MUX_MODE0) /* gpmc_ad2 */
-                       DRA7XX_CORE_IOPAD(0x340c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad3 */
-                       DRA7XX_CORE_IOPAD(0x3410, PIN_INPUT  | MUX_MODE0) /* gpmc_ad4 */
-                       DRA7XX_CORE_IOPAD(0x3414, PIN_INPUT  | MUX_MODE0) /* gpmc_ad5 */
-                       DRA7XX_CORE_IOPAD(0x3418, PIN_INPUT  | MUX_MODE0) /* gpmc_ad6 */
-                       DRA7XX_CORE_IOPAD(0x341c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad7 */
-                       DRA7XX_CORE_IOPAD(0x3420, PIN_INPUT  | MUX_MODE0) /* gpmc_ad8 */
-                       DRA7XX_CORE_IOPAD(0x3424, PIN_INPUT  | MUX_MODE0) /* gpmc_ad9 */
-                       DRA7XX_CORE_IOPAD(0x3428, PIN_INPUT  | MUX_MODE0) /* gpmc_ad10 */
-                       DRA7XX_CORE_IOPAD(0x342c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad11 */
-                       DRA7XX_CORE_IOPAD(0x3430, PIN_INPUT  | MUX_MODE0) /* gpmc_ad12 */
-                       DRA7XX_CORE_IOPAD(0x3434, PIN_INPUT  | MUX_MODE0) /* gpmc_ad13 */
-                       DRA7XX_CORE_IOPAD(0x3438, PIN_INPUT  | MUX_MODE0) /* gpmc_ad14 */
-                       DRA7XX_CORE_IOPAD(0x343c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad15 */
-                       DRA7XX_CORE_IOPAD(0x34b4, PIN_OUTPUT | MUX_MODE0) /* gpmc_cs0 */
-                       DRA7XX_CORE_IOPAD(0x34c4, PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale */
-                       DRA7XX_CORE_IOPAD(0x34cc, PIN_OUTPUT | MUX_MODE0) /* gpmc_wen */
-                       DRA7XX_CORE_IOPAD(0x34c8, PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren */
-                       DRA7XX_CORE_IOPAD(0x34d0, PIN_OUTPUT | MUX_MODE0) /* gpmc_ben0 */
-                       DRA7XX_CORE_IOPAD(0x34d8, PIN_INPUT  | MUX_MODE0) /* gpmc_wait0 */
-               >;
-       };
-
-       usb1_pins: pinmux_usb1_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3680, PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
-               >;
-       };
-
-       usb2_pins: pinmux_usb2_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3684, PIN_INPUT_SLEW | MUX_MODE0) /* usb2_drvvbus */
-               >;
-       };
-
-       tps65917_pins_default: tps65917_pins_default {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3824, PIN_INPUT_PULLUP | MUX_MODE1) /* wakeup3.sys_nirq1 */
-               >;
-       };
-
        mmc1_pins_default: mmc1_pins_default {
                pinctrl-single,pins = <
                        DRA7XX_CORE_IOPAD(0x376c, PIN_INPUT | MUX_MODE14)       /* mmc1sdcd.gpio219 */
@@ -240,161 +210,12 @@ DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP)  /* dcan1_tx.off */
                        DRA7XX_CORE_IOPAD(0x3818, MUX_MODE15 | PULL_UP) /* wakeup0.off */
                >;
        };
-
-       hdmi_pins: pinmux_hdmi_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3808, PIN_INPUT | MUX_MODE1) /* i2c2_sda.hdmi1_ddc_scl */
-                       DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */
-               >;
-       };
-
-       tpd12s015_pins: pinmux_tpd12s015_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x37b8, PIN_INPUT_PULLDOWN | MUX_MODE14) /* gpio7_12 HPD */
-               >;
-       };
-
-       atl_pins: pinmux_atl_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3698, PIN_OUTPUT | MUX_MODE5)       /* xref_clk1.atl_clk1 */
-                       DRA7XX_CORE_IOPAD(0x369c, PIN_OUTPUT | MUX_MODE5)       /* xref_clk2.atl_clk2 */
-               >;
-       };
-
-       mcasp3_pins: pinmux_mcasp3_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3724, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_aclkx */
-                       DRA7XX_CORE_IOPAD(0x3728, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_fsx */
-                       DRA7XX_CORE_IOPAD(0x372c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_axr0 */
-                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT_PULLDOWN | MUX_MODE0)       /* mcasp3_axr1 */
-               >;
-       };
-
-       mcasp3_sleep_pins: pinmux_mcasp3_sleep_pins {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x3724, PIN_INPUT_PULLDOWN | MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x3728, PIN_INPUT_PULLDOWN | MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x372c, PIN_INPUT_PULLDOWN | MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT_PULLDOWN | MUX_MODE15)
-               >;
-       };
 };
 
 &i2c1 {
        status = "okay";
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins>;
        clock-frequency = <400000>;
 
-       tps65917: tps65917@58 {
-               compatible = "ti,tps65917";
-               reg = <0x58>;
-
-               pinctrl-names = "default";
-               pinctrl-0 = <&tps65917_pins_default>;
-
-               interrupts = <GIC_SPI 2 IRQ_TYPE_NONE>;  /* IRQ_SYS_1N */
-               interrupt-controller;
-               #interrupt-cells = <2>;
-
-               ti,system-power-controller;
-
-               tps65917_pmic {
-                       compatible = "ti,tps65917-pmic";
-
-                       tps65917_regulators: regulators {
-                               smps1_reg: smps1 {
-                                       /* VDD_MPU */
-                                       regulator-name = "smps1";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1250000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                               };
-
-                               smps2_reg: smps2 {
-                                       /* VDD_CORE */
-                                       regulator-name = "smps2";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1150000>;
-                                       regulator-boot-on;
-                                       regulator-always-on;
-                               };
-
-                               smps3_reg: smps3 {
-                                       /* VDD_GPU IVA DSPEVE */
-                                       regulator-name = "smps3";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1250000>;
-                                       regulator-boot-on;
-                                       regulator-always-on;
-                               };
-
-                               smps4_reg: smps4 {
-                                       /* VDDS1V8 */
-                                       regulator-name = "smps4";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                               };
-
-                               smps5_reg: smps5 {
-                                       /* VDD_DDR */
-                                       regulator-name = "smps5";
-                                       regulator-min-microvolt = <1350000>;
-                                       regulator-max-microvolt = <1350000>;
-                                       regulator-boot-on;
-                                       regulator-always-on;
-                               };
-
-                               ldo1_reg: ldo1 {
-                                       /* LDO1_OUT --> SDIO  */
-                                       regulator-name = "ldo1";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <3300000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                                       regulator-allow-bypass;
-                               };
-
-                               ldo3_reg: ldo3 {
-                                       /* VDDA_1V8_PHY */
-                                       regulator-name = "ldo3";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-boot-on;
-                                       regulator-always-on;
-                               };
-
-                               ldo5_reg: ldo5 {
-                                       /* VDDA_1V8_PLL */
-                                       regulator-name = "ldo5";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                               };
-
-                               ldo4_reg: ldo4 {
-                                       /* VDDA_3V_USB: VDDA_USBHS33 */
-                                       regulator-name = "ldo4";
-                                       regulator-min-microvolt = <3300000>;
-                                       regulator-max-microvolt = <3300000>;
-                                       regulator-boot-on;
-                               };
-                       };
-               };
-
-               tps65917_power_button {
-                       compatible = "ti,palmas-pwrbutton";
-                       interrupt-parent = <&tps65917>;
-                       interrupts = <1 IRQ_TYPE_NONE>;
-                       wakeup-source;
-                       ti,palmas-long-press-seconds = <6>;
-               };
-       };
-
        pcf_gpio_21: gpio@21 {
                compatible = "ti,pcf8575", "nxp,pcf8575";
                reg = <0x21>;
@@ -423,8 +244,6 @@ tlv320aic3106: tlv320aic3106@19 {
 
 &i2c5 {
        status = "okay";
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c5_pins>;
        clock-frequency = <400000>;
 
        pcf_hdmi: pcf8575@26 {
@@ -462,8 +281,6 @@ &elm {
 
 &gpmc {
        status = "okay";
-       pinctrl-names = "default";
-       pinctrl-0 = <&nand_default>;
        ranges = <0 0 0x08000000 0x01000000>;   /* minimum GPMC partition = 16MB */
        nand@0,0 {
                /* To use NAND, DIP switch SW5 must be set like so:
@@ -548,14 +365,6 @@ partition@9 {
        };
 };
 
-&usb2_phy1 {
-       phy-supply = <&ldo4_reg>;
-};
-
-&usb2_phy2 {
-       phy-supply = <&ldo4_reg>;
-};
-
 &omap_dwc3_1 {
        extcon = <&extcon_usb1>;
 };
@@ -566,14 +375,10 @@ &omap_dwc3_2 {
 
 &usb1 {
        dr_mode = "peripheral";
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb1_pins>;
 };
 
 &usb2 {
        dr_mode = "host";
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb2_pins>;
 };
 
 &mmc1 {
@@ -581,7 +386,6 @@ &mmc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc1_pins_default>;
        vmmc-supply = <&evm_3v3_sd>;
-       vmmc_aux-supply = <&ldo1_reg>;
        bus-width = <4>;
        /*
         * SDCD signal is not being used here - using the fact that GPIO mode
@@ -603,71 +407,8 @@ &mmc2 {
        max-frequency = <192000000>;
 };
 
-&dra7_pmx_core {
-       cpsw_default: cpsw_default {
-               pinctrl-single,pins = <
-                       /* Slave 2 */
-                       DRA7XX_CORE_IOPAD(0x3598, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d12.rgmii1_txc */
-                       DRA7XX_CORE_IOPAD(0x359c, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d13.rgmii1_tctl */
-                       DRA7XX_CORE_IOPAD(0x35a0, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d14.rgmii1_td3 */
-                       DRA7XX_CORE_IOPAD(0x35a4, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d15.rgmii1_td2 */
-                       DRA7XX_CORE_IOPAD(0x35a8, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d16.rgmii1_td1 */
-                       DRA7XX_CORE_IOPAD(0x35ac, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d17.rgmii1_td0 */
-                       DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT | MUX_MODE3)        /* vin2a_d18.rgmii1_rclk */
-                       DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT | MUX_MODE3)        /* vin2a_d19.rgmii1_rctl */
-                       DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT | MUX_MODE3)        /* vin2a_d20.rgmii1_rd3 */
-                       DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT | MUX_MODE3)        /* vin2a_d21.rgmii1_rd2 */
-                       DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT | MUX_MODE3)        /* vin2a_d22.rgmii1_rd1 */
-                       DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT | MUX_MODE3)        /* vin2a_d23.rgmii1_rd0 */
-               >;
-
-       };
-
-       cpsw_sleep: cpsw_sleep {
-               pinctrl-single,pins = <
-                       /* Slave 2 */
-                       DRA7XX_CORE_IOPAD(0x3598, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x359c, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35a0, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35a4, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35a8, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35ac, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35b0, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35b4, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35b8, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35bc, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35c0, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x35c4, MUX_MODE15)
-               >;
-       };
-
-       davinci_mdio_default: davinci_mdio_default {
-               pinctrl-single,pins = <
-                       /* MDIO */
-                       DRA7XX_CORE_IOPAD(0x363c, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* mdio_d.mdio_d */
-                       DRA7XX_CORE_IOPAD(0x3640, PIN_INPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
-               >;
-       };
-
-       davinci_mdio_sleep: davinci_mdio_sleep {
-               pinctrl-single,pins = <
-                       DRA7XX_CORE_IOPAD(0x363c, MUX_MODE15)
-                       DRA7XX_CORE_IOPAD(0x3640, MUX_MODE15)
-               >;
-       };
-};
-
 &mac {
        status = "okay";
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&cpsw_default>;
-       pinctrl-1 = <&cpsw_sleep>;
-};
-
-&davinci_mdio {
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&davinci_mdio_default>;
-       pinctrl-1 = <&davinci_mdio_sleep>;
 };
 
 &dcan1 {
@@ -741,16 +482,11 @@ partition@9 {
 
 &dss {
        status = "ok";
-
-       vdda_video-supply = <&ldo5_reg>;
 };
 
 &hdmi {
        status = "ok";
 
-       pinctrl-names = "default";
-       pinctrl-0 = <&hdmi_pins>;
-
        port {
                hdmi_out: endpoint {
                        remote-endpoint = <&tpd12s015_in>;
@@ -759,9 +495,6 @@ hdmi_out: endpoint {
 };
 
 &atl {
-       pinctrl-names = "default";
-       pinctrl-0 = <&atl_pins>;
-
        assigned-clocks = <&abe_dpll_sys_clk_mux>,
                          <&atl_gfclk_mux>,
                          <&dpll_abe_ck>,
@@ -780,9 +513,6 @@ atl2 {
 
 &mcasp3 {
        #sound-dai-cells = <0>;
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&mcasp3_pins>;
-       pinctrl-1 = <&mcasp3_sleep_pins>;
 
        assigned-clocks = <&mcasp3_ahclkx_mux>;
        assigned-clock-parents = <&atl_clkin2_ck>;
index 064b322a7a042e5b845b58aed03f37dabee115fd..4ea2a0c7819ef9c8b224a60ccd30623860c1f62b 100644 (file)
@@ -17,17 +17,22 @@ memory@0 {
        };
 };
 
-&tps65917_regulators {
-       ldo2_reg: ldo2 {
-               /* LDO2_OUT --> VDDA_1V8_PHY2 */
-               regulator-name = "ldo2";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <1800000>;
-               regulator-always-on;
-               regulator-boot-on;
+&i2c1 {
+       tps65917: tps65917@58 {
+               reg = <0x58>;
+
+               interrupts = <GIC_SPI 2 IRQ_TYPE_NONE>;  /* IRQ_SYS_1N */
        };
 };
 
+#include "dra72-evm-tps65917.dtsi"
+
+&ldo2_reg {
+       /* LDO2_OUT --> VDDA_1V8_PHY2 */
+       regulator-always-on;
+       regulator-boot-on;
+};
+
 &hdmi {
        vdda-supply = <&ldo2_reg>;
 };
diff --git a/arch/arm/boot/dts/dra72-evm-tps65917.dtsi b/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
new file mode 100644 (file)
index 0000000..ee6dac4
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+/*
+ * Integrated Power Management Chip
+ * http://www.ti.com/lit/ds/symlink/tps65917-q1.pdf
+ */
+
+&tps65917 {
+       compatible = "ti,tps65917";
+
+       interrupt-controller;
+       #interrupt-cells = <2>;
+
+       ti,system-power-controller;
+
+       tps65917_pmic {
+               compatible = "ti,tps65917-pmic";
+
+               smps1-in-supply = <&vsys_3v3>;
+               smps2-in-supply = <&vsys_3v3>;
+               smps3-in-supply = <&vsys_3v3>;
+               smps4-in-supply = <&vsys_3v3>;
+               smps5-in-supply = <&vsys_3v3>;
+               ldo1-in-supply = <&vsys_3v3>;
+               ldo2-in-supply = <&vsys_3v3>;
+               ldo3-in-supply = <&vsys_3v3>;
+               ldo4-in-supply = <&evm_5v0>;
+               ldo5-in-supply = <&vsys_3v3>;
+
+               tps65917_regulators: regulators {
+                       smps1_reg: smps1 {
+                               /* VDD_MPU */
+                               regulator-name = "smps1";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       smps2_reg: smps2 {
+                               /* VDD_CORE */
+                               regulator-name = "smps2";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1150000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       smps3_reg: smps3 {
+                               /* VDD_GPU IVA DSPEVE */
+                               regulator-name = "smps3";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       smps4_reg: smps4 {
+                               /* VDDS1V8 */
+                               regulator-name = "smps4";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       smps5_reg: smps5 {
+                               /* VDD_DDR */
+                               regulator-name = "smps5";
+                               regulator-min-microvolt = <1350000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo1_reg: ldo1 {
+                               /* LDO1_OUT --> SDIO  */
+                               regulator-name = "ldo1";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-allow-bypass;
+                       };
+
+                       ldo2_reg: ldo2 {
+                               regulator-name = "ldo2";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-allow-bypass;
+                       };
+
+                       ldo3_reg: ldo3 {
+                               /* VDDA_1V8_PHY */
+                               regulator-name = "ldo3";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo5_reg: ldo5 {
+                               /* VDDA_1V8_PLL */
+                               regulator-name = "ldo5";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       ldo4_reg: ldo4 {
+                               /* VDDA_3V_USB: VDDA_USBHS33 */
+                               regulator-name = "ldo4";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                       };
+               };
+       };
+
+       tps65917_power_button {
+               compatible = "ti,palmas-pwrbutton";
+               interrupt-parent = <&tps65917>;
+               interrupts = <1 IRQ_TYPE_NONE>;
+               wakeup-source;
+               ti,palmas-long-press-seconds = <6>;
+       };
+};
index e3a9b6985693fcbe3fbc23993e93f2ebbe56629e..cd9c4ff12654ce00ae443c654a888dc14b4a66c6 100644 (file)
@@ -15,16 +15,16 @@ memory@0 {
        };
 };
 
-&tps65917_regulators {
-       ldo2_reg: ldo2 {
-               /* LDO2_OUT --> TP1017 (UNUSED)  */
-               regulator-name = "ldo2";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-allow-bypass;
+&i2c1 {
+       tps65917: tps65917@58 {
+               reg = <0x58>;
+
+               interrupts = <GIC_SPI 2 IRQ_TYPE_NONE>;  /* IRQ_SYS_1N */
        };
 };
 
+#include "dra72-evm-tps65917.dtsi"
+
 &hdmi {
        vdda-supply = <&ldo3_reg>;
 };
index ec331169c3d9ba61f3adee94ba9cf576d393c76f..a149f148e659a65914ae86d88b8d3d0aec850c02 100644 (file)
@@ -362,8 +362,14 @@ gpx0: gpx0 {
 
                interrupt-controller;
                interrupt-parent = <&gic>;
-               interrupts = <0 32 0>, <0 33 0>, <0 34 0>, <0 35 0>,
-                               <0 36 0>, <0 37 0>, <0 38 0>, <0 39 0>;
+               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 36 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
                #interrupt-cells = <2>;
        };
 
@@ -373,8 +379,14 @@ gpx1: gpx1 {
 
                interrupt-controller;
                interrupt-parent = <&gic>;
-               interrupts = <0 40 0>, <0 41 0>, <0 42 0>, <0 43 0>,
-                               <0 44 0>, <0 45 0>, <0 46 0>, <0 47 0>;
+               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>,
+                            <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
                #interrupt-cells = <2>;
        };
 
index e9d2556c0dfd6050be12cc621eaadb19a1793b43..ba17ee1eb749d2eaaa1a4e4041f968ec2e06bffc 100644 (file)
@@ -20,6 +20,8 @@
 #include "exynos4-cpu-thermal.dtsi"
 #include "exynos-syscon-restart.dtsi"
 #include <dt-bindings/clock/exynos3250.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        compatible = "samsung,exynos3250";
@@ -211,7 +213,8 @@ cmu_dmc: clock-controller@105C0000 {
                rtc: rtc@10070000 {
                        compatible = "samsung,s3c6410-rtc";
                        reg = <0x10070000 0x100>;
-                       interrupts = <0 73 0>, <0 74 0>;
+                       interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-parent = <&pmu_system_controller>;
                        status = "disabled";
                };
@@ -219,7 +222,7 @@ rtc: rtc@10070000 {
                tmu: tmu@100C0000 {
                        compatible = "samsung,exynos3250-tmu";
                        reg = <0x100C0000 0x100>;
-                       interrupts = <0 216 0>;
+                       interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_TMU_APBIF>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -234,14 +237,21 @@ gic: interrupt-controller@10481000 {
                              <0x10482000 0x1000>,
                              <0x10484000 0x2000>,
                              <0x10486000 0x2000>;
-                       interrupts = <1 9 0xf04>;
+                       interrupts = <GIC_PPI 9
+                                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
                };
 
                mct@10050000 {
                        compatible = "samsung,exynos4210-mct";
                        reg = <0x10050000 0x800>;
-                       interrupts = <0 218 0>, <0 219 0>, <0 220 0>, <0 221 0>,
-                                    <0 223 0>, <0 226 0>, <0 227 0>, <0 228 0>;
+                       interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 228 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_FIN_PLL>, <&cmu CLK_MCT>;
                        clock-names = "fin_pll", "mct";
                };
@@ -249,24 +259,24 @@ mct@10050000 {
                pinctrl_1: pinctrl@11000000 {
                        compatible = "samsung,exynos3250-pinctrl";
                        reg = <0x11000000 0x1000>;
-                       interrupts = <0 225 0>;
+                       interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
 
                        wakeup-interrupt-controller {
                                compatible = "samsung,exynos4210-wakeup-eint";
-                               interrupts = <0 48 0>;
+                               interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
                        };
                };
 
                pinctrl_0: pinctrl@11400000 {
                        compatible = "samsung,exynos3250-pinctrl";
                        reg = <0x11400000 0x1000>;
-                       interrupts = <0 240 0>;
+                       interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                jpeg: codec@11830000 {
                        compatible = "samsung,exynos3250-jpeg";
                        reg = <0x11830000 0x1000>;
-                       interrupts = <0 171 0>;
+                       interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_JPEG>, <&cmu CLK_SCLK_JPEG>;
                        clock-names = "jpeg", "sclk";
                        power-domains = <&pd_cam>;
@@ -280,7 +290,8 @@ jpeg: codec@11830000 {
                sysmmu_jpeg: sysmmu@11A60000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x11a60000 0x1000>;
-                       interrupts = <0 156 0>, <0 161 0>;
+                       interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&cmu CLK_SMMUJPEG>, <&cmu CLK_JPEG>;
                        power-domains = <&pd_cam>;
@@ -291,7 +302,9 @@ fimd: fimd@11c00000 {
                        compatible = "samsung,exynos3250-fimd";
                        reg = <0x11c00000 0x30000>;
                        interrupt-names = "fifo", "vsync", "lcd_sys";
-                       interrupts = <0 84 0>, <0 85 0>, <0 86 0>;
+                       interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_SCLK_FIMD0>, <&cmu CLK_FIMD0>;
                        clock-names = "sclk_fimd", "fimd";
                        power-domains = <&pd_lcd0>;
@@ -303,7 +316,7 @@ fimd: fimd@11c00000 {
                dsi_0: dsi@11C80000 {
                        compatible = "samsung,exynos3250-mipi-dsi";
                        reg = <0x11C80000 0x10000>;
-                       interrupts = <0 83 0>;
+                       interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
                        samsung,phy-type = <0>;
                        power-domains = <&pd_lcd0>;
                        phys = <&mipi_phy 1>;
@@ -318,7 +331,8 @@ dsi_0: dsi@11C80000 {
                sysmmu_fimd0: sysmmu@11E20000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x11e20000 0x1000>;
-                       interrupts = <0 80 0>, <0 81 0>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&cmu CLK_SMMUFIMD0>, <&cmu CLK_FIMD0>;
                        power-domains = <&pd_lcd0>;
@@ -328,7 +342,7 @@ sysmmu_fimd0: sysmmu@11E20000 {
                hsotg: hsotg@12480000 {
                        compatible = "snps,dwc2";
                        reg = <0x12480000 0x20000>;
-                       interrupts = <0 141 0>;
+                       interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_USBOTG>;
                        clock-names = "otg";
                        phys = <&exynos_usbphy 0>;
@@ -339,7 +353,7 @@ hsotg: hsotg@12480000 {
                mshc_0: mshc@12510000 {
                        compatible = "samsung,exynos5420-dw-mshc";
                        reg = <0x12510000 0x1000>;
-                       interrupts = <0 142 0>;
+                       interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_SDMMC0>, <&cmu CLK_SCLK_MMC0>;
                        clock-names = "biu", "ciu";
                        fifo-depth = <0x80>;
@@ -351,7 +365,7 @@ mshc_0: mshc@12510000 {
                mshc_1: mshc@12520000 {
                        compatible = "samsung,exynos5420-dw-mshc";
                        reg = <0x12520000 0x1000>;
-                       interrupts = <0 143 0>;
+                       interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_SDMMC1>, <&cmu CLK_SCLK_MMC1>;
                        clock-names = "biu", "ciu";
                        fifo-depth = <0x80>;
@@ -363,7 +377,7 @@ mshc_1: mshc@12520000 {
                mshc_2: mshc@12530000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12530000 0x1000>;
-                       interrupts = <0 144 0>;
+                       interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_SDMMC2>, <&cmu CLK_SCLK_MMC2>;
                        clock-names = "biu", "ciu";
                        fifo-depth = <0x80>;
@@ -391,7 +405,7 @@ amba {
                        pdma0: pdma@12680000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x12680000 0x1000>;
-                               interrupts = <0 138 0>;
+                               interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&cmu CLK_PDMA0>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -402,7 +416,7 @@ pdma0: pdma@12680000 {
                        pdma1: pdma@12690000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x12690000 0x1000>;
-                               interrupts = <0 139 0>;
+                               interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&cmu CLK_PDMA1>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -415,7 +429,7 @@ adc: adc@126C0000 {
                        compatible = "samsung,exynos3250-adc",
                                     "samsung,exynos-adc-v2";
                        reg = <0x126C0000 0x100>;
-                       interrupts = <0 137 0>;
+                       interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "adc", "sclk";
                        clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
                        #io-channel-cells = <1>;
@@ -427,7 +441,7 @@ adc: adc@126C0000 {
                mfc: codec@13400000 {
                        compatible = "samsung,mfc-v7";
                        reg = <0x13400000 0x10000>;
-                       interrupts = <0 102 0>;
+                       interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "mfc", "sclk_mfc";
                        clocks = <&cmu CLK_MFC>, <&cmu CLK_SCLK_MFC>;
                        power-domains = <&pd_mfc>;
@@ -437,7 +451,8 @@ mfc: codec@13400000 {
                sysmmu_mfc: sysmmu@13620000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x13620000 0x1000>;
-                       interrupts = <0 96 0>, <0 98 0>;
+                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&cmu CLK_SMMUMFC_L>, <&cmu CLK_MFC>;
                        power-domains = <&pd_mfc>;
@@ -447,7 +462,7 @@ sysmmu_mfc: sysmmu@13620000 {
                serial_0: serial@13800000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x13800000 0x100>;
-                       interrupts = <0 109 0>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_UART0>, <&cmu CLK_SCLK_UART0>;
                        clock-names = "uart", "clk_uart_baud0";
                        pinctrl-names = "default";
@@ -458,7 +473,7 @@ serial_0: serial@13800000 {
                serial_1: serial@13810000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x13810000 0x100>;
-                       interrupts = <0 110 0>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_UART1>, <&cmu CLK_SCLK_UART1>;
                        clock-names = "uart", "clk_uart_baud0";
                        pinctrl-names = "default";
@@ -469,7 +484,7 @@ serial_1: serial@13810000 {
                serial_2: serial@13820000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x13820000 0x100>;
-                       interrupts = <0 111 0>;
+                       interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_UART2>, <&cmu CLK_SCLK_UART2>;
                        clock-names = "uart", "clk_uart_baud0";
                        pinctrl-names = "default";
@@ -482,7 +497,7 @@ i2c_0: i2c@13860000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x13860000 0x100>;
-                       interrupts = <0 113 0>;
+                       interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C0>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -495,7 +510,7 @@ i2c_1: i2c@13870000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x13870000 0x100>;
-                       interrupts = <0 114 0>;
+                       interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C1>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -508,7 +523,7 @@ i2c_2: i2c@13880000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x13880000 0x100>;
-                       interrupts = <0 115 0>;
+                       interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C2>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -521,7 +536,7 @@ i2c_3: i2c@13890000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x13890000 0x100>;
-                       interrupts = <0 116 0>;
+                       interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C3>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -534,7 +549,7 @@ i2c_4: i2c@138A0000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x138A0000 0x100>;
-                       interrupts = <0 117 0>;
+                       interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C4>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -547,7 +562,7 @@ i2c_5: i2c@138B0000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x138B0000 0x100>;
-                       interrupts = <0 118 0>;
+                       interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C5>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -560,7 +575,7 @@ i2c_6: i2c@138C0000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x138C0000 0x100>;
-                       interrupts = <0 119 0>;
+                       interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C6>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -573,7 +588,7 @@ i2c_7: i2c@138D0000 {
                        #size-cells = <0>;
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x138D0000 0x100>;
-                       interrupts = <0 120 0>;
+                       interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2C7>;
                        clock-names = "i2c";
                        pinctrl-names = "default";
@@ -584,7 +599,7 @@ i2c_7: i2c@138D0000 {
                spi_0: spi@13920000 {
                        compatible = "samsung,exynos4210-spi";
                        reg = <0x13920000 0x100>;
-                       interrupts = <0 121 0>;
+                       interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma0 7>, <&pdma0 6>;
                        dma-names = "tx", "rx";
                        #address-cells = <1>;
@@ -600,7 +615,7 @@ spi_0: spi@13920000 {
                spi_1: spi@13930000 {
                        compatible = "samsung,exynos4210-spi";
                        reg = <0x13930000 0x100>;
-                       interrupts = <0 122 0>;
+                       interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma1 7>, <&pdma1 6>;
                        dma-names = "tx", "rx";
                        #address-cells = <1>;
@@ -616,7 +631,7 @@ spi_1: spi@13930000 {
                i2s2: i2s@13970000 {
                        compatible = "samsung,s3c6410-i2s";
                        reg = <0x13970000 0x100>;
-                       interrupts = <0 126 0>;
+                       interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cmu CLK_I2S>, <&cmu CLK_SCLK_I2S>;
                        clock-names = "iis", "i2s_opclk0";
                        dmas = <&pdma0 14>, <&pdma0 13>;
@@ -629,15 +644,19 @@ i2s2: i2s@13970000 {
                pwm: pwm@139D0000 {
                        compatible = "samsung,exynos4210-pwm";
                        reg = <0x139D0000 0x1000>;
-                       interrupts = <0 104 0>, <0 105 0>, <0 106 0>,
-                                    <0 107 0>, <0 108 0>;
+                       interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
                        #pwm-cells = <3>;
                        status = "disabled";
                };
 
                pmu {
                        compatible = "arm,cortex-a7-pmu";
-                       interrupts = <0 18 0>, <0 19 0>;
+                       interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                ppmu_dmc0: ppmu_dmc0@106a0000 {
index 5f034eb5a5e271af11258480298937f8ec220bd5..c64737baa45e121144987c25e5ce6bd14d44ecba 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <dt-bindings/clock/exynos4.h>
 #include <dt-bindings/clock/exynos-audss-clk.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include "exynos-syscon-restart.dtsi"
 
 / {
@@ -78,6 +80,11 @@ chipid@10000000 {
                reg = <0x10000000 0x100>;
        };
 
+       scu: snoop-control-unit@10500000 {
+               compatible = "arm,cortex-a9-scu";
+               reg = <0x10500000 0x2000>;
+       };
+
        memory-controller@12570000 {
                compatible = "samsung,exynos4210-srom";
                reg = <0x12570000 0x14>;
@@ -168,7 +175,7 @@ pmu_system_controller: system-controller@10020000 {
        dsi_0: dsi@11C80000 {
                compatible = "samsung,exynos4210-mipi-dsi";
                reg = <0x11C80000 0x10000>;
-               interrupts = <0 79 0>;
+               interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&pd_lcd0>;
                phys = <&mipi_phy 1>;
                phy-names = "dsim";
@@ -191,7 +198,7 @@ camera {
                fimc_0: fimc@11800000 {
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11800000 0x1000>;
-                       interrupts = <0 84 0>;
+                       interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_FIMC0>, <&clock CLK_SCLK_FIMC0>;
                        clock-names = "fimc", "sclk_fimc";
                        power-domains = <&pd_cam>;
@@ -203,7 +210,7 @@ fimc_0: fimc@11800000 {
                fimc_1: fimc@11810000 {
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11810000 0x1000>;
-                       interrupts = <0 85 0>;
+                       interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_FIMC1>, <&clock CLK_SCLK_FIMC1>;
                        clock-names = "fimc", "sclk_fimc";
                        power-domains = <&pd_cam>;
@@ -215,7 +222,7 @@ fimc_1: fimc@11810000 {
                fimc_2: fimc@11820000 {
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11820000 0x1000>;
-                       interrupts = <0 86 0>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_FIMC2>, <&clock CLK_SCLK_FIMC2>;
                        clock-names = "fimc", "sclk_fimc";
                        power-domains = <&pd_cam>;
@@ -227,7 +234,7 @@ fimc_2: fimc@11820000 {
                fimc_3: fimc@11830000 {
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11830000 0x1000>;
-                       interrupts = <0 87 0>;
+                       interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_FIMC3>, <&clock CLK_SCLK_FIMC3>;
                        clock-names = "fimc", "sclk_fimc";
                        power-domains = <&pd_cam>;
@@ -239,7 +246,7 @@ fimc_3: fimc@11830000 {
                csis_0: csis@11880000 {
                        compatible = "samsung,exynos4210-csis";
                        reg = <0x11880000 0x4000>;
-                       interrupts = <0 78 0>;
+                       interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_CSIS0>, <&clock CLK_SCLK_CSIS0>;
                        clock-names = "csis", "sclk_csis";
                        bus-width = <4>;
@@ -254,7 +261,7 @@ csis_0: csis@11880000 {
                csis_1: csis@11890000 {
                        compatible = "samsung,exynos4210-csis";
                        reg = <0x11890000 0x4000>;
-                       interrupts = <0 80 0>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_CSIS1>, <&clock CLK_SCLK_CSIS1>;
                        clock-names = "csis", "sclk_csis";
                        bus-width = <2>;
@@ -270,7 +277,7 @@ csis_1: csis@11890000 {
        watchdog: watchdog@10060000 {
                compatible = "samsung,s3c2410-wdt";
                reg = <0x10060000 0x100>;
-               interrupts = <0 43 0>;
+               interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_WDT>;
                clock-names = "watchdog";
                status = "disabled";
@@ -280,7 +287,8 @@ rtc: rtc@10070000 {
                compatible = "samsung,s3c6410-rtc";
                reg = <0x10070000 0x100>;
                interrupt-parent = <&pmu_system_controller>;
-               interrupts = <0 44 0>, <0 45 0>;
+               interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_RTC>;
                clock-names = "rtc";
                status = "disabled";
@@ -289,7 +297,7 @@ rtc: rtc@10070000 {
        keypad: keypad@100A0000 {
                compatible = "samsung,s5pv210-keypad";
                reg = <0x100A0000 0x100>;
-               interrupts = <0 109 0>;
+               interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_KEYIF>;
                clock-names = "keypad";
                status = "disabled";
@@ -298,7 +306,7 @@ keypad: keypad@100A0000 {
        sdhci_0: sdhci@12510000 {
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12510000 0x100>;
-               interrupts = <0 73 0>;
+               interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SDMMC0>, <&clock CLK_SCLK_MMC0>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
@@ -307,7 +315,7 @@ sdhci_0: sdhci@12510000 {
        sdhci_1: sdhci@12520000 {
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12520000 0x100>;
-               interrupts = <0 74 0>;
+               interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SDMMC1>, <&clock CLK_SCLK_MMC1>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
@@ -316,7 +324,7 @@ sdhci_1: sdhci@12520000 {
        sdhci_2: sdhci@12530000 {
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12530000 0x100>;
-               interrupts = <0 75 0>;
+               interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SDMMC2>, <&clock CLK_SCLK_MMC2>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
@@ -325,7 +333,7 @@ sdhci_2: sdhci@12530000 {
        sdhci_3: sdhci@12540000 {
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12540000 0x100>;
-               interrupts = <0 76 0>;
+               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SDMMC3>, <&clock CLK_SCLK_MMC3>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
@@ -344,7 +352,7 @@ exynos_usbphy: exynos-usbphy@125B0000 {
        hsotg: hsotg@12480000 {
                compatible = "samsung,s3c6400-hsotg";
                reg = <0x12480000 0x20000>;
-               interrupts = <0 71 0>;
+               interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_USB_DEVICE>;
                clock-names = "otg";
                phys = <&exynos_usbphy 0>;
@@ -355,7 +363,7 @@ hsotg: hsotg@12480000 {
        ehci: ehci@12580000 {
                compatible = "samsung,exynos4210-ehci";
                reg = <0x12580000 0x100>;
-               interrupts = <0 70 0>;
+               interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_USB_HOST>;
                clock-names = "usbhost";
                status = "disabled";
@@ -381,7 +389,7 @@ port@2 {
        ohci: ohci@12590000 {
                compatible = "samsung,exynos4210-ohci";
                reg = <0x12590000 0x100>;
-               interrupts = <0 70 0>;
+               interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_USB_HOST>;
                clock-names = "usbhost";
                status = "disabled";
@@ -423,7 +431,7 @@ i2s2: i2s@13970000 {
        mfc: codec@13400000 {
                compatible = "samsung,mfc-v5";
                reg = <0x13400000 0x10000>;
-               interrupts = <0 94 0>;
+               interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
                power-domains = <&pd_mfc>;
                clocks = <&clock CLK_MFC>, <&clock CLK_SCLK_MFC>;
                clock-names = "mfc", "sclk_mfc";
@@ -434,7 +442,7 @@ mfc: codec@13400000 {
        serial_0: serial@13800000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13800000 0x100>;
-               interrupts = <0 52 0>;
+               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
                clock-names = "uart", "clk_uart_baud0";
                dmas = <&pdma0 15>, <&pdma0 16>;
@@ -445,7 +453,7 @@ serial_0: serial@13800000 {
        serial_1: serial@13810000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13810000 0x100>;
-               interrupts = <0 53 0>;
+               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
                clock-names = "uart", "clk_uart_baud0";
                dmas = <&pdma1 15>, <&pdma1 16>;
@@ -456,7 +464,7 @@ serial_1: serial@13810000 {
        serial_2: serial@13820000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13820000 0x100>;
-               interrupts = <0 54 0>;
+               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
                clock-names = "uart", "clk_uart_baud0";
                dmas = <&pdma0 17>, <&pdma0 18>;
@@ -467,7 +475,7 @@ serial_2: serial@13820000 {
        serial_3: serial@13830000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13830000 0x100>;
-               interrupts = <0 55 0>;
+               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
                clock-names = "uart", "clk_uart_baud0";
                dmas = <&pdma1 17>, <&pdma1 18>;
@@ -480,7 +488,7 @@ i2c_0: i2c@13860000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13860000 0x100>;
-               interrupts = <0 58 0>;
+               interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C0>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -493,7 +501,7 @@ i2c_1: i2c@13870000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13870000 0x100>;
-               interrupts = <0 59 0>;
+               interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C1>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -506,7 +514,7 @@ i2c_2: i2c@13880000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13880000 0x100>;
-               interrupts = <0 60 0>;
+               interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C2>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -519,7 +527,7 @@ i2c_3: i2c@13890000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13890000 0x100>;
-               interrupts = <0 61 0>;
+               interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C3>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -532,7 +540,7 @@ i2c_4: i2c@138A0000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138A0000 0x100>;
-               interrupts = <0 62 0>;
+               interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C4>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -545,7 +553,7 @@ i2c_5: i2c@138B0000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138B0000 0x100>;
-               interrupts = <0 63 0>;
+               interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C5>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -558,7 +566,7 @@ i2c_6: i2c@138C0000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138C0000 0x100>;
-               interrupts = <0 64 0>;
+               interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C6>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -571,7 +579,7 @@ i2c_7: i2c@138D0000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138D0000 0x100>;
-               interrupts = <0 65 0>;
+               interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C7>;
                clock-names = "i2c";
                pinctrl-names = "default";
@@ -584,7 +592,7 @@ i2c_8: i2c@138E0000 {
                #size-cells = <0>;
                compatible = "samsung,s3c2440-hdmiphy-i2c";
                reg = <0x138E0000 0x100>;
-               interrupts = <0 93 0>;
+               interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C_HDMI>;
                clock-names = "i2c";
                status = "disabled";
@@ -598,7 +606,7 @@ hdmi_i2c_phy: hdmiphy@38 {
        spi_0: spi@13920000 {
                compatible = "samsung,exynos4210-spi";
                reg = <0x13920000 0x100>;
-               interrupts = <0 66 0>;
+               interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
                dmas = <&pdma0 7>, <&pdma0 6>;
                dma-names = "tx", "rx";
                #address-cells = <1>;
@@ -613,7 +621,7 @@ spi_0: spi@13920000 {
        spi_1: spi@13930000 {
                compatible = "samsung,exynos4210-spi";
                reg = <0x13930000 0x100>;
-               interrupts = <0 67 0>;
+               interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
                dmas = <&pdma1 7>, <&pdma1 6>;
                dma-names = "tx", "rx";
                #address-cells = <1>;
@@ -628,7 +636,7 @@ spi_1: spi@13930000 {
        spi_2: spi@13940000 {
                compatible = "samsung,exynos4210-spi";
                reg = <0x13940000 0x100>;
-               interrupts = <0 68 0>;
+               interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
                dmas = <&pdma0 9>, <&pdma0 8>;
                dma-names = "tx", "rx";
                #address-cells = <1>;
@@ -643,7 +651,11 @@ spi_2: spi@13940000 {
        pwm: pwm@139D0000 {
                compatible = "samsung,exynos4210-pwm";
                reg = <0x139D0000 0x1000>;
-               interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, <0 41 0>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_PWM>;
                clock-names = "timers";
                #pwm-cells = <3>;
@@ -660,7 +672,7 @@ amba {
                pdma0: pdma@12680000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x12680000 0x1000>;
-                       interrupts = <0 35 0>;
+                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_PDMA0>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
@@ -671,7 +683,7 @@ pdma0: pdma@12680000 {
                pdma1: pdma@12690000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x12690000 0x1000>;
-                       interrupts = <0 36 0>;
+                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_PDMA1>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
@@ -682,7 +694,7 @@ pdma1: pdma@12690000 {
                mdma1: mdma@12850000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x12850000 0x1000>;
-                       interrupts = <0 34 0>;
+                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_MDMA>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
@@ -712,7 +724,7 @@ tmu: tmu@100C0000 {
        jpeg_codec: jpeg-codec@11840000 {
                compatible = "samsung,exynos4210-jpeg";
                reg = <0x11840000 0x1000>;
-               interrupts = <0 88 0>;
+               interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_JPEG>;
                clock-names = "jpeg";
                power-domains = <&pd_cam>;
@@ -722,7 +734,7 @@ jpeg_codec: jpeg-codec@11840000 {
        rotator: rotator@12810000 {
                compatible = "samsung,exynos4210-rotator";
                reg = <0x12810000 0x64>;
-               interrupts = <0 83 0>;
+               interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_ROTATOR>;
                clock-names = "rotator";
                iommus = <&sysmmu_rotator>;
@@ -731,7 +743,7 @@ rotator: rotator@12810000 {
        hdmi: hdmi@12D00000 {
                compatible = "samsung,exynos4210-hdmi";
                reg = <0x12D00000 0x70000>;
-               interrupts = <0 92 0>;
+               interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
                clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy",
                        "mout_hdmi";
                clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
@@ -746,7 +758,7 @@ hdmi: hdmi@12D00000 {
        hdmicec: cec@100B0000 {
                compatible = "samsung,s5p-cec";
                reg = <0x100B0000 0x200>;
-               interrupts = <0 114 0>;
+               interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_HDMI_CEC>;
                clock-names = "hdmicec";
                samsung,syscon-phandle = <&pmu_system_controller>;
@@ -757,7 +769,7 @@ hdmicec: cec@100B0000 {
 
        mixer: mixer@12C10000 {
                compatible = "samsung,exynos4210-mixer";
-               interrupts = <0 91 0>;
+               interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
                reg = <0x12C10000 0x2100>, <0x12c00000 0x300>;
                power-domains = <&pd_tv>;
                iommus = <&sysmmu_tv>;
@@ -984,7 +996,7 @@ sysmmu_fimd0: sysmmu@11E20000 {
        sss: sss@10830000 {
                compatible = "samsung,exynos4210-secss";
                reg = <0x10830000 0x300>;
-               interrupts = <0 112 0>;
+               interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SSS>;
                clock-names = "secss";
        };
index d9b6d25e4abe392de26ec5dfa4dbe8c20f147683..f280954b260ad440783b3d24f453365e1628458f 100644 (file)
@@ -537,8 +537,14 @@ gpx0: gpx0 {
 
                        interrupt-controller;
                        interrupt-parent = <&gic>;
-                       interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
-                                    <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>;
+                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
                        #interrupt-cells = <2>;
                };
 
@@ -548,8 +554,14 @@ gpx1: gpx1 {
 
                        interrupt-controller;
                        interrupt-parent = <&gic>;
-                       interrupts = <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
-                                    <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>;
+                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
                        #interrupt-cells = <2>;
                };
 
index 2d9b02967105fd7e9320adba5625d4e5bb2a0be4..7f3a18c8f60fbed10699f54705d6aef8e0306282 100644 (file)
@@ -109,12 +109,12 @@ mct_map: mct-map {
                        #interrupt-cells = <1>;
                        #address-cells = <0>;
                        #size-cells = <0>;
-                       interrupt-map = <0 &gic 0 57 0>,
-                                       <1 &gic 0 69 0>,
+                       interrupt-map = <0 &gic 0 57 IRQ_TYPE_LEVEL_HIGH>,
+                                       <1 &gic 0 69 IRQ_TYPE_LEVEL_HIGH>,
                                        <2 &combiner 12 6>,
                                        <3 &combiner 12 7>,
-                                       <4 &gic 0 42 0>,
-                                       <5 &gic 0 48 0>;
+                                       <4 &gic 0 42 IRQ_TYPE_LEVEL_HIGH>,
+                                       <5 &gic 0 48 IRQ_TYPE_LEVEL_HIGH>;
                };
        };
 
@@ -127,18 +127,18 @@ clock: clock-controller@10030000 {
        pinctrl_0: pinctrl@11400000 {
                compatible = "samsung,exynos4210-pinctrl";
                reg = <0x11400000 0x1000>;
-               interrupts = <0 47 0>;
+               interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        pinctrl_1: pinctrl@11000000 {
                compatible = "samsung,exynos4210-pinctrl";
                reg = <0x11000000 0x1000>;
-               interrupts = <0 46 0>;
+               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
 
                wakup_eint: wakeup-interrupt-controller {
                        compatible = "samsung,exynos4210-wakeup-eint";
                        interrupt-parent = <&gic>;
-                       interrupts = <0 32 0>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                };
        };
 
@@ -182,7 +182,7 @@ cpu_alert2: cpu-alert-2 {
        g2d: g2d@12800000 {
                compatible = "samsung,s5pv210-g2d";
                reg = <0x12800000 0x1000>;
-               interrupts = <0 89 0>;
+               interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SCLK_FIMG2D>, <&clock CLK_G2D>;
                clock-names = "sclk_fimg2d", "fimg2d";
                power-domains = <&pd_lcd0>;
@@ -424,10 +424,22 @@ &gic {
 
 &combiner {
        samsung,combiner-nr = <16>;
-       interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
-                    <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
-                    <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
-                    <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
+       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
+                    <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>;
 };
 
 &mdma1 {
diff --git a/arch/arm/boot/dts/exynos4412-itop-elite.dts b/arch/arm/boot/dts/exynos4412-itop-elite.dts
new file mode 100644 (file)
index 0000000..76d87f3
--- /dev/null
@@ -0,0 +1,240 @@
+/*
+ * TOPEET's Exynos4412 based itop board device tree source
+ *
+ * Copyright (c) 2016 SUMOMO Computer Association
+ *                     https://www.sumomo.mobi
+ *                     Randy Li <ayaka@soulik.info>
+ *
+ * Device tree source file for TOPEET iTop Exynos 4412 core board
+ * which is based on Samsung's Exynos4412 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/pwm/pwm.h>
+#include <dt-bindings/sound/samsung-i2s.h>
+#include "exynos4412-itop-scp-core.dtsi"
+
+/ {
+       model = "TOPEET iTop 4412 Elite board based on Exynos4412";
+       compatible = "topeet,itop4412-elite", "samsung,exynos4412", "samsung,exynos4";
+
+       chosen {
+               bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootdelay=1 rootwait";
+               stdout-path = "serial2:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led2 {
+                       label = "red:system";
+                       gpios = <&gpx1 0 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+                       linux,default-trigger = "heartbeat";
+               };
+
+               led3 {
+                       label = "red:user";
+                       gpios = <&gpk1 1 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               home {
+                       label = "GPIO Key Home";
+                       linux,code = <KEY_HOME>;
+                       gpios = <&gpx1 1 GPIO_ACTIVE_LOW>;
+               };
+
+               back {
+                       label = "GPIO Key Back";
+                       linux,code = <KEY_BACK>;
+                       gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
+               };
+
+               sleep {
+                       label = "GPIO Key Sleep";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
+               };
+
+               vol-up {
+                       label = "GPIO Key Vol+";
+                       linux,code = <KEY_UP>;
+                       gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
+               };
+
+               vol-down {
+                       label = "GPIO Key Vol-";
+                       linux,code = <KEY_DOWN>;
+                       gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "wm-sound";
+
+               assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
+                               <&clock_audss EXYNOS_MOUT_I2S>,
+                               <&clock_audss EXYNOS_DOUT_SRP>,
+                               <&clock_audss EXYNOS_DOUT_AUD_BUS>;
+               assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
+                               <&clock_audss EXYNOS_MOUT_AUDSS>;
+               assigned-clock-rates = <0>,
+                               <0>,
+                               <112896000>,
+                               <11289600>;
+
+               simple-audio-card,format = "i2s";
+               simple-audio-card,bitclock-master = <&link0_codec>;
+               simple-audio-card,frame-master = <&link0_codec>;
+
+               simple-audio-card,widgets =
+                       "Microphone", "Mic Jack",
+                       "Line", "Line In",
+                       "Line", "Line Out",
+                       "Speaker", "Speaker",
+                       "Headphone", "Headphone Jack";
+               simple-audio-card,routing =
+                       "Headphone Jack", "HP_L",
+                       "Headphone Jack", "HP_R",
+                       "Speaker", "SPK_LP",
+                       "Speaker", "SPK_LN",
+                       "Speaker", "SPK_RP",
+                       "Speaker", "SPK_RN",
+                       "LINPUT1", "Mic Jack",
+                       "LINPUT3", "Mic Jack",
+                       "RINPUT1", "Mic Jack",
+                       "RINPUT2", "Mic Jack";
+
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               link0_codec: simple-audio-card,codec {
+                       sound-dai = <&codec>;
+                       clocks = <&i2s0 CLK_I2S_CDCLK>;
+                       system-clock-frequency = <11289600>;
+               };
+       };
+
+       beep {
+               compatible = "pwm-beeper";
+               pwms = <&pwm 0 4000000 PWM_POLARITY_INVERTED>;
+       };
+
+       camera: camera {
+               pinctrl-0 = <&cam_port_a_clk_active>;
+               pinctrl-names = "default";
+               status = "okay";
+               assigned-clocks = <&clock CLK_MOUT_CAM0>;
+               assigned-clock-parents = <&clock CLK_XUSBXTI>;
+       };
+};
+
+&adc {
+       vdd-supply = <&ldo3_reg>;
+       status = "okay";
+};
+
+&ehci {
+       status = "okay";
+       /* In order to reset USB ethernet */
+       samsung,vbus-gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>;
+
+       port@0 {
+               status = "okay";
+       };
+
+       port@2 {
+               status = "okay";
+       };
+};
+
+&exynos_usbphy {
+       status = "okay";
+};
+
+&fimc_0 {
+       status = "okay";
+       assigned-clocks = <&clock CLK_MOUT_FIMC0>,
+                       <&clock CLK_SCLK_FIMC0>;
+       assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
+       assigned-clock-rates = <0>, <176000000>;
+};
+
+&hsotg {
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&i2c_4 {
+       samsung,i2c-sda-delay = <100>;
+       samsung,i2c-slave-addr = <0x10>;
+       samsung,i2c-max-bus-freq = <100000>;
+       pinctrl-0 = <&i2c4_bus>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       codec: wm8960@1a {
+               compatible = "wlf,wm8960";
+               reg = <0x1a>;
+               clocks = <&pmu_system_controller 0>;
+               clock-names = "MCLK1";
+               wlf,shared-lrclk;
+               #sound-dai-cells = <0>;
+       };
+};
+
+&i2s0 {
+       pinctrl-0 = <&i2s0_bus>;
+       pinctrl-names = "default";
+       status = "okay";
+       clocks = <&clock_audss EXYNOS_I2S_BUS>,
+                <&clock_audss EXYNOS_DOUT_AUD_BUS>,
+                <&clock_audss EXYNOS_SCLK_I2S>;
+       clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
+};
+
+&pinctrl_1 {
+       ether-reset {
+               samsung,pins = "gpc0-1";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+       };
+};
+
+&pwm {
+       status = "okay";
+       pinctrl-0 = <&pwm0_out>;
+       pinctrl-names = "default";
+       samsung,pwm-outputs = <0>;
+};
+
+&sdhci_2 {
+       bus-width = <4>;
+       pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
+       pinctrl-names = "default";
+       cd-gpio = <&gpx0 7 GPIO_ACTIVE_LOW>;
+       cap-sd-highspeed;
+       vmmc-supply = <&ldo23_reg>;
+       vqmmc-supply = <&ldo17_reg>;
+       status = "okay";
+};
+
+&serial_1 {
+       status = "okay";
+};
+
+&serial_2 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi b/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi
new file mode 100644 (file)
index 0000000..a36cd36
--- /dev/null
@@ -0,0 +1,501 @@
+/*
+ * TOPEET's Exynos4412 based itop board device tree source
+ *
+ * Copyright (c) 2016 SUMOMO Computer Association
+ *                     https://www.sumomo.mobi
+ *                     Randy Li <ayaka@soulik.info>
+ *
+ * Device tree source file for TOPEET iTop Exynos 4412 SCP package core
+ * board which is based on Samsung's Exynos4412 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.
+ */
+
+#include <dt-bindings/clock/samsung,s2mps11.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "exynos4412.dtsi"
+#include "exynos4412-ppmu-common.dtsi"
+#include "exynos-mfc-reserved-memory.dtsi"
+
+/ {
+       memory@40000000 {
+               device_type = "memory";
+               reg = <0x40000000 0x40000000>;
+       };
+
+       firmware@0203F000 {
+               compatible = "samsung,secure-firmware";
+               reg = <0x0203F000 0x1000>;
+       };
+
+       fixed-rate-clocks {
+               xxti {
+                       compatible = "samsung,clock-xxti";
+                       clock-frequency = <0>;
+               };
+
+               xusbxti {
+                       compatible = "samsung,clock-xusbxti";
+                       clock-frequency = <24000000>;
+               };
+       };
+
+       thermal-zones {
+               cpu_thermal: cpu-thermal {
+                       cooling-maps {
+                               map0 {
+                                    /* Corresponds to 800MHz at freq_table */
+                                    cooling-device = <&cpu0 7 7>;
+                               };
+                               map1 {
+                                    /* Corresponds to 200MHz at freq_table */
+                                    cooling-device = <&cpu0 13 13>;
+                              };
+                      };
+               };
+       };
+
+       usb-hub {
+               compatible = "smsc,usb3503a";
+               reset-gpios = <&gpm2 4 GPIO_ACTIVE_LOW>;
+               connect-gpios = <&gpm3 3 GPIO_ACTIVE_HIGH>;
+               intn-gpios = <&gpx2 3 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&hsic_reset>;
+       };
+};
+
+&bus_dmc {
+       devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+       vdd-supply = <&buck1_reg>;
+       status = "okay";
+};
+
+&bus_acp {
+       devfreq = <&bus_dmc>;
+       status = "okay";
+};
+
+&bus_c2c {
+       devfreq = <&bus_dmc>;
+       status = "okay";
+};
+
+&bus_leftbus {
+       devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+       vdd-supply = <&buck3_reg>;
+       status = "okay";
+};
+
+&bus_rightbus {
+       devfreq = <&bus_leftbus>;
+       status = "okay";
+};
+
+&bus_fsys {
+       devfreq = <&bus_leftbus>;
+       status = "okay";
+};
+
+&bus_peri {
+       devfreq = <&bus_leftbus>;
+       status = "okay";
+};
+
+&bus_mfc {
+       devfreq = <&bus_leftbus>;
+       status = "okay";
+};
+
+&cpu0 {
+       cpu0-supply = <&buck2_reg>;
+};
+
+&hsotg {
+       vusb_d-supply = <&ldo15_reg>;
+       vusb_a-supply = <&ldo12_reg>;
+};
+
+&i2c_1 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       samsung,i2c-sda-delay = <100>;
+       samsung,i2c-max-bus-freq = <400000>;
+       pinctrl-0 = <&i2c1_bus>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       s5m8767: s5m8767-pmic@66 {
+               compatible = "samsung,s5m8767-pmic";
+               reg = <0x66>;
+
+               s5m8767,pmic-buck-default-dvs-idx = <3>;
+
+               s5m8767,pmic-buck-dvs-gpios = <&gpb 5 GPIO_ACTIVE_HIGH>,
+                                                <&gpb 6 GPIO_ACTIVE_HIGH>,
+                                                <&gpb 7 GPIO_ACTIVE_HIGH>;
+
+               s5m8767,pmic-buck-ds-gpios = <&gpm3 5 GPIO_ACTIVE_HIGH>,
+                                               <&gpm3 6 GPIO_ACTIVE_HIGH>,
+                                               <&gpm3 7 GPIO_ACTIVE_HIGH>;
+
+               /* VDD_ARM */
+               s5m8767,pmic-buck2-dvs-voltage = <1356250>, <1300000>,
+                                                <1243750>, <1118750>,
+                                                <1068750>, <1012500>,
+                                                <956250>, <900000>;
+               /* VDD_INT */
+               s5m8767,pmic-buck3-dvs-voltage = <1000000>, <1000000>,
+                                                <925000>, <925000>,
+                                                <887500>, <887500>,
+                                                <850000>, <850000>;
+               /* VDD_G3D */
+               s5m8767,pmic-buck4-dvs-voltage = <1081250>, <1081250>,
+                                                <1025000>, <950000>,
+                                                <918750>, <900000>,
+                                                <875000>, <831250>;
+
+               regulators {
+                       ldo1_reg: LDO1 {
+                               regulator-name = "VDD_ALIVE";
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       /* SCP uses 1.5v, POP uses 1.2v */
+                       ldo2_reg: LDO2 {
+                               regulator-name = "VDDQ_M12";
+                               regulator-min-microvolt = <1500000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo3_reg: LDO3 {
+                               regulator-name = "VDDIOAP_18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo4_reg: LDO4 {
+                               regulator-name = "VDDQ_PRE";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo5_reg: LDO5 {
+                               regulator-name = "VDD_LDO5";
+                               op_mode = <0>; /* Always off Mode */
+                       };
+
+                       ldo6_reg: LDO6 {
+                               regulator-name = "VDD10_MPLL";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo7_reg: LDO7 {
+                               regulator-name = "VDD10_XPLL";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo8_reg: LDO8 {
+                               regulator-name = "VDD10_MIPI";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo9_reg: LDO9 {
+                               regulator-name = "VDD33_LCD";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo10_reg: LDO10 {
+                               regulator-name = "VDD18_MIPI";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo11_reg: LDO11 {
+                               regulator-name = "VDD18_ABB1";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo12_reg: LDO12 {
+                               regulator-name = "VDD33_UOTG";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo13_reg: LDO13 {
+                               regulator-name = "VDDIOPERI_18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo14_reg: LDO14 {
+                               regulator-name = "VDD18_ABB02";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo15_reg: LDO15 {
+                               regulator-name = "VDD10_USH";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo16_reg: LDO16 {
+                               regulator-name = "VDD18_HSIC";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo17_reg: LDO17 {
+                               regulator-name = "VDDIOAP_MMC012_28";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       /* Used by HSIC */
+                       ldo18_reg: LDO18 {
+                               regulator-name = "VDDIOPERI_28";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo19_reg: LDO19 {
+                               regulator-name = "VDD_LDO19";
+                               op_mode = <0>; /* Always off Mode */
+                       };
+
+                       ldo20_reg: LDO20 {
+                               regulator-name = "VDD28_CAM";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <2800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo21_reg: LDO21 {
+                               regulator-name = "VDD28_AF";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <2800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo22_reg: LDO22 {
+                               regulator-name = "VDDA28_2M";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo23_reg: LDO23 {
+                               regulator-name = "VDD28_TF";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo24_reg: LDO24 {
+                               regulator-name = "VDD33_A31";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo25_reg: LDO25 {
+                               regulator-name = "VDD18_CAM";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo26_reg: LDO26 {
+                               regulator-name = "VDD18_A31";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo27_reg: LDO27 {
+                               regulator-name = "GPS_1V8";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       ldo28_reg: LDO28 {
+                               regulator-name = "DVDD12";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck1_reg: BUCK1 {
+                               regulator-name = "vdd_mif";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck2_reg: BUCK2 {
+                               regulator-name = "vdd_arm";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1456250>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck3_reg: BUCK3 {
+                               regulator-name = "vdd_int";
+                               regulator-min-microvolt = <875000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck4_reg: BUCK4 {
+                               regulator-name = "vdd_g3d";
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck5_reg: BUCK5 {
+                               regulator-name = "vdd_m12";
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck6_reg: BUCK6 {
+                               regulator-name = "vdd12_5m";
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck7_reg: BUCK7 {
+                               regulator-name = "pvdd_buck7";
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck8_reg: BUCK8 {
+                               regulator-name = "pvdd_buck8";
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+
+                       buck9_reg: BUCK9 {
+                               regulator-name = "vddf28_emmc";
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <3000000>;
+                               op_mode = <1>; /* Normal Mode */
+                       };
+               };
+
+               s5m8767_osc: clocks {
+                       #clock-cells = <1>;
+                       clock-output-names = "s5m8767_ap",
+                                       "s5m8767_cp", "s5m8767_bt";
+               };
+
+       };
+};
+
+&mfc {
+       status = "okay";
+};
+
+&mshc_0 {
+       pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
+       pinctrl-names = "default";
+       status = "okay";
+       vmmc-supply = <&buck9_reg>;
+       num-slots = <1>;
+       broken-cd;
+       card-detect-delay = <200>;
+       samsung,dw-mshc-ciu-div = <3>;
+       samsung,dw-mshc-sdr-timing = <2 3>;
+       samsung,dw-mshc-ddr-timing = <1 2>;
+       bus-width = <8>;
+       cap-mmc-highspeed;
+};
+
+&pinctrl_1 {
+       hsic_reset: hsic-reset {
+               samsung,pins = "gpm2-4";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
+       };
+};
+
+&rtc {
+       status = "okay";
+       clocks = <&clock CLK_RTC>, <&s5m8767_osc S2MPS11_CLK_AP>;
+       clock-names = "rtc", "rtc_src";
+};
+
+&tmu {
+       vtmu-supply = <&ldo16_reg>;
+       status = "okay";
+};
+
+&watchdog {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/exynos4415-pinctrl.dtsi b/arch/arm/boot/dts/exynos4415-pinctrl.dtsi
deleted file mode 100644 (file)
index 76cfd87..0000000
+++ /dev/null
@@ -1,575 +0,0 @@
-/*
- * Samsung's Exynos4415 SoCs pin-mux and pin-config device tree source
- *
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Samsung's Exynos4415 SoCs pin-mux and pin-config optiosn are listed as device
- * tree nodes are listed 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.
-*/
-
-#include <dt-bindings/pinctrl/samsung.h>
-
-&pinctrl_0 {
-       gpa0: gpa0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpa1: gpa1 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpb: gpb {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpc0: gpc0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpc1: gpc1 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpd0: gpd0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpd1: gpd1 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpf0: gpf0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpf1: gpf1 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpf2: gpf2 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       uart0_data: uart0-data {
-               samsung,pins = "gpa0-0", "gpa0-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       uart0_fctl: uart0-fctl {
-               samsung,pins = "gpa0-2", "gpa0-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       uart1_data: uart1-data {
-               samsung,pins = "gpa0-4", "gpa0-5";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       uart1_fctl: uart1-fctl {
-               samsung,pins = "gpa0-6", "gpa0-7";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       uart2_data: uart2-data {
-               samsung,pins = "gpa1-0", "gpa1-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       uart2_fctl: uart2-fctl {
-               samsung,pins = "gpa1-2", "gpa1-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       uart3_data: uart3-data {
-               samsung,pins = "gpa1-4", "gpa1-5";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c2_bus: i2c2-bus {
-               samsung,pins = "gpa0-6", "gpa0-7";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c3_bus: i2c3-bus {
-               samsung,pins = "gpa1-2", "gpa1-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       spi0_bus: spi0-bus {
-               samsung,pins = "gpb-0", "gpb-2", "gpb-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c4_bus: i2c4-bus {
-               samsung,pins = "gpb-0", "gpb-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       spi1_bus: spi1-bus {
-               samsung,pins = "gpb-4", "gpb-6", "gpb-7";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c5_bus: i2c5-bus {
-               samsung,pins = "gpb-2", "gpb-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2s1_bus: i2s1-bus {
-               samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3",
-                               "gpc0-4";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2s2_bus: i2s2-bus {
-               samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
-                               "gpc1-4";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       pcm2_bus: pcm2-bus {
-               samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
-                               "gpc1-4";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c6_bus: i2c6-bus {
-               samsung,pins = "gpc1-3", "gpc1-4";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       spi2_bus: spi2-bus {
-               samsung,pins = "gpc1-1", "gpc1-3", "gpc1-4";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_5>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       pwm0_out: pwm0-out {
-               samsung,pins = "gpd0-0";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       pwm1_out: pwm1-out {
-               samsung,pins = "gpd0-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       pwm2_out: pwm2-out {
-               samsung,pins = "gpd0-2";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       pwm3_out: pwm3-out {
-               samsung,pins = "gpd0-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c7_bus: i2c7-bus {
-               samsung,pins = "gpd0-2", "gpd0-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c0_bus: i2c0-bus {
-               samsung,pins = "gpd1-0", "gpd1-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       i2c1_bus: i2c1-bus {
-               samsung,pins = "gpd1-2", "gpd1-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-};
-
-&pinctrl_1 {
-       gpk0: gpk0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpk1: gpk1 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpk2: gpk2 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpk3: gpk3 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpl0: gpl0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpm0: gpm0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpm1: gpm1 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpm2: gpm2 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpm3: gpm3 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpm4: gpm4 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpx0: gpx0 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               interrupt-parent = <&gic>;
-               interrupts = <0 32 0>, <0 33 0>, <0 34 0>, <0 35 0>,
-                               <0 36 0>, <0 37 0>, <0 38 0>, <0 39 0>;
-               #interrupt-cells = <2>;
-       };
-
-       gpx1: gpx1 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               interrupt-parent = <&gic>;
-               interrupts = <0 40 0>, <0 41 0>, <0 42 0>, <0 43 0>,
-                               <0 44 0>, <0 45 0>, <0 46 0>, <0 47 0>;
-               #interrupt-cells = <2>;
-       };
-
-       gpx2: gpx2 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       gpx3: gpx3 {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       sd0_clk: sd0-clk {
-               samsung,pins = "gpk0-0";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd0_cmd: sd0-cmd {
-               samsung,pins = "gpk0-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd0_cd: sd0-cd {
-               samsung,pins = "gpk0-2";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd0_rdqs: sd0-rdqs {
-               samsung,pins = "gpk0-7";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd0_bus1: sd0-bus-width1 {
-               samsung,pins = "gpk0-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd0_bus4: sd0-bus-width4 {
-               samsung,pins = "gpk0-4", "gpk0-5", "gpk0-6";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd0_bus8: sd0-bus-width8 {
-               samsung,pins = "gpl0-0", "gpl0-1", "gpl0-2", "gpl0-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd1_clk: sd1-clk {
-               samsung,pins = "gpk1-0";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd1_cmd: sd1-cmd {
-               samsung,pins = "gpk1-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd1_cd: sd1-cd {
-               samsung,pins = "gpk1-2";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd1_bus1: sd1-bus-width1 {
-               samsung,pins = "gpk1-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd1_bus4: sd1-bus-width4 {
-               samsung,pins = "gpk1-4", "gpk1-5", "gpk1-6";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd2_clk: sd2-clk {
-               samsung,pins = "gpk2-0";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd2_cmd: sd2-cmd {
-               samsung,pins = "gpk2-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd2_cd: sd2-cd {
-               samsung,pins = "gpk2-2";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd2_bus1: sd2-bus-width1 {
-               samsung,pins = "gpk2-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       sd2_bus4: sd2-bus-width4 {
-               samsung,pins = "gpk2-4", "gpk2-5", "gpk2-6";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       cam_port_b_io: cam-port-b-io {
-               samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3",
-                               "gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7",
-                               "gpm1-0", "gpm1-1", "gpm2-0", "gpm2-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       cam_port_b_clk_active: cam-port-b-clk-active {
-               samsung,pins = "gpm2-2";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
-       };
-
-       cam_port_b_clk_idle: cam-port-b-clk-idle {
-               samsung,pins = "gpm2-2";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       fimc_is_i2c0: fimc-is-i2c0 {
-               samsung,pins = "gpm4-0", "gpm4-1";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       fimc_is_i2c1: fimc-is-i2c1 {
-               samsung,pins = "gpm4-2", "gpm4-3";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-
-       fimc_is_uart: fimc-is-uart {
-               samsung,pins = "gpm3-5", "gpm3-7";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-};
-
-&pinctrl_2 {
-       gpz: gpz {
-               gpio-controller;
-               #gpio-cells = <2>;
-
-               interrupt-controller;
-               #interrupt-cells = <2>;
-       };
-
-       i2s0_bus: i2s0-bus {
-               samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3",
-                               "gpz-4", "gpz-5", "gpz-6";
-               samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
-               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-       };
-};
diff --git a/arch/arm/boot/dts/exynos4415.dtsi b/arch/arm/boot/dts/exynos4415.dtsi
deleted file mode 100644 (file)
index 3c40f8a..0000000
+++ /dev/null
@@ -1,650 +0,0 @@
-/*
- * Samsung's Exynos4415 SoC device tree source
- *
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Samsung's Exynos4415 SoC device nodes are listed in this file. Exynos4415
- * based board files can include this file and provide values for board
- * specific bindings.
- *
- * Note: This file does not include device nodes for all the controllers in
- * Exynos4415 SoC. As device tree coverage for Exynos4415 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 <dt-bindings/clock/exynos4415.h>
-#include <dt-bindings/clock/exynos-audss-clk.h>
-
-/ {
-       compatible = "samsung,exynos4415";
-       interrupt-parent = <&gic>;
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       aliases {
-               pinctrl0 = &pinctrl_0;
-               pinctrl1 = &pinctrl_1;
-               pinctrl2 = &pinctrl_2;
-               mshc0 = &mshc_0;
-               mshc1 = &mshc_1;
-               mshc2 = &mshc_2;
-               spi0 = &spi_0;
-               spi1 = &spi_1;
-               spi2 = &spi_2;
-               i2c0 = &i2c_0;
-               i2c1 = &i2c_1;
-               i2c2 = &i2c_2;
-               i2c3 = &i2c_3;
-               i2c4 = &i2c_4;
-               i2c5 = &i2c_5;
-               i2c6 = &i2c_6;
-               i2c7 = &i2c_7;
-       };
-
-       cpus {
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               cpu0: cpu@a00 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a9";
-                       reg = <0xa00>;
-                       clock-frequency = <1600000000>;
-               };
-
-               cpu1: cpu@a01 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a9";
-                       reg = <0xa01>;
-                       clock-frequency = <1600000000>;
-               };
-
-               cpu2: cpu@a02 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a9";
-                       reg = <0xa02>;
-                       clock-frequency = <1600000000>;
-               };
-
-               cpu3: cpu@a03 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a9";
-                       reg = <0xa03>;
-                       clock-frequency = <1600000000>;
-               };
-       };
-
-       soc: soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               sysram@02020000 {
-                       compatible = "mmio-sram";
-                       reg = <0x02020000 0x50000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges = <0 0x02020000 0x50000>;
-
-                       smp-sysram@0 {
-                               compatible = "samsung,exynos4210-sysram";
-                               reg = <0x0 0x1000>;
-                       };
-
-                       smp-sysram@4f000 {
-                               compatible = "samsung,exynos4210-sysram-ns";
-                               reg = <0x4f000 0x1000>;
-                       };
-               };
-
-               pinctrl_2: pinctrl@03860000 {
-                       compatible = "samsung,exynos4415-pinctrl";
-                       reg = <0x03860000 0x1000>;
-                       interrupts = <0 242 0>;
-               };
-
-               chipid@10000000 {
-                       compatible = "samsung,exynos4210-chipid";
-                       reg = <0x10000000 0x100>;
-               };
-
-               sysreg_system_controller: syscon@10010000 {
-                       compatible = "samsung,exynos4-sysreg", "syscon";
-                       reg = <0x10010000 0x400>;
-               };
-
-               pmu_system_controller: system-controller@10020000 {
-                       compatible = "samsung,exynos4415-pmu", "syscon";
-                       reg = <0x10020000 0x4000>;
-               };
-
-               mipi_phy: video-phy@10020710 {
-                       compatible = "samsung,s5pv210-mipi-video-phy";
-                       #phy-cells = <1>;
-                       syscon = <&pmu_system_controller>;
-               };
-
-               pd_cam: cam-power-domain@10024000 {
-                       compatible = "samsung,exynos4210-pd";
-                       reg = <0x10024000 0x20>;
-                       #power-domain-cells = <0>;
-               };
-
-               pd_tv: tv-power-domain@10024020 {
-                       compatible = "samsung,exynos4210-pd";
-                       reg = <0x10024020 0x20>;
-                       #power-domain-cells = <0>;
-               };
-
-               pd_mfc: mfc-power-domain@10024040 {
-                       compatible = "samsung,exynos4210-pd";
-                       reg = <0x10024040 0x20>;
-                       #power-domain-cells = <0>;
-               };
-
-               pd_g3d: g3d-power-domain@10024060 {
-                       compatible = "samsung,exynos4210-pd";
-                       reg = <0x10024060 0x20>;
-                       #power-domain-cells = <0>;
-               };
-
-               pd_lcd0: lcd0-power-domain@10024080 {
-                       compatible = "samsung,exynos4210-pd";
-                       reg = <0x10024080 0x20>;
-                       #power-domain-cells = <0>;
-               };
-
-               pd_isp0: isp0-power-domain@100240A0 {
-                       compatible = "samsung,exynos4210-pd";
-                       reg = <0x100240A0 0x20>;
-                       #power-domain-cells = <0>;
-               };
-
-               pd_isp1: isp1-power-domain@100240E0 {
-                       compatible = "samsung,exynos4210-pd";
-                       reg = <0x100240E0 0x20>;
-                       #power-domain-cells = <0>;
-               };
-
-               cmu: clock-controller@10030000 {
-                       compatible = "samsung,exynos4415-cmu";
-                       reg = <0x10030000 0x18000>;
-                       #clock-cells = <1>;
-               };
-
-               rtc: rtc@10070000 {
-                       compatible = "samsung,s3c6410-rtc";
-                       reg = <0x10070000 0x100>;
-                       interrupts = <0 73 0>, <0 74 0>;
-                       status = "disabled";
-               };
-
-               mct@10050000 {
-                       compatible = "samsung,exynos4210-mct";
-                       reg = <0x10050000 0x800>;
-                       interrupts = <0 218 0>, <0 219 0>, <0 220 0>, <0 221 0>,
-                                    <0 223 0>, <0 226 0>, <0 227 0>, <0 228 0>;
-                       clocks = <&cmu CLK_FIN_PLL>, <&cmu CLK_MCT>;
-                       clock-names = "fin_pll", "mct";
-               };
-
-               gic: interrupt-controller@10481000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x10481000 0x1000>,
-                             <0x10482000 0x1000>,
-                             <0x10484000 0x2000>,
-                             <0x10486000 0x2000>;
-                       interrupts = <1 9 0xf04>;
-               };
-
-               l2c: l2-cache-controller@10502000 {
-                       compatible = "arm,pl310-cache";
-                       reg = <0x10502000 0x1000>;
-                       cache-unified;
-                       cache-level = <2>;
-                       arm,tag-latency = <2 2 1>;
-                       arm,data-latency = <3 2 1>;
-                       arm,double-linefill = <1>;
-                       arm,double-linefill-incr = <0>;
-                       arm,double-linefill-wrap = <1>;
-                       arm,prefetch-drop = <1>;
-                       arm,prefetch-offset = <7>;
-               };
-
-               cmu_dmc: clock-controller@105C0000 {
-                       compatible = "samsung,exynos4415-cmu-dmc";
-                       reg = <0x105C0000 0x3000>;
-                       #clock-cells = <1>;
-               };
-
-               pinctrl_1: pinctrl@11000000 {
-                       compatible = "samsung,exynos4415-pinctrl";
-                       reg = <0x11000000 0x1000>;
-                       interrupts = <0 225 0>;
-
-                       wakeup-interrupt-controller {
-                               compatible = "samsung,exynos4210-wakeup-eint";
-                               interrupt-parent = <&gic>;
-                               interrupts = <0 48 0>;
-                       };
-               };
-
-               pinctrl_0: pinctrl@11400000 {
-                       compatible = "samsung,exynos4415-pinctrl";
-                       reg = <0x11400000 0x1000>;
-                       interrupts = <0 240 0>;
-               };
-
-               fimd: fimd@11C00000 {
-                       compatible = "samsung,exynos4415-fimd";
-                       reg = <0x11C00000 0x30000>;
-                       interrupt-names = "fifo", "vsync", "lcd_sys";
-                       interrupts = <0 84 0>, <0 85 0>, <0 86 0>;
-                       clocks = <&cmu CLK_SCLK_FIMD0>, <&cmu CLK_FIMD0>;
-                       clock-names = "sclk_fimd", "fimd";
-                       samsung,power-domain = <&pd_lcd0>;
-                       iommus = <&sysmmu_fimd0>;
-                       samsung,sysreg = <&sysreg_system_controller>;
-                       status = "disabled";
-               };
-
-               dsi_0: dsi@11C80000 {
-                       compatible = "samsung,exynos4415-mipi-dsi";
-                       reg = <0x11C80000 0x10000>;
-                       interrupts = <0 83 0>;
-                       samsung,phy-type = <0>;
-                       samsung,power-domain = <&pd_lcd0>;
-                       phys = <&mipi_phy 1>;
-                       phy-names = "dsim";
-                       clocks = <&cmu CLK_DSIM0>, <&cmu CLK_SCLK_MIPI0>;
-                       clock-names = "bus_clk", "pll_clk";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       status = "disabled";
-               };
-
-               sysmmu_fimd0: sysmmu@11E20000 {
-                       compatible = "samsung,exynos-sysmmu";
-                       reg = <0x11e20000 0x1000>;
-                       interrupts = <0 80 0>, <0 81 0>;
-                       clock-names = "sysmmu", "master";
-                       clocks = <&cmu CLK_SMMUFIMD0>, <&cmu CLK_FIMD0>;
-                       power-domains = <&pd_lcd0>;
-                       #iommu-cells = <0>;
-               };
-
-               hsotg: hsotg@12480000 {
-                       compatible = "samsung,s3c6400-hsotg";
-                       reg = <0x12480000 0x20000>;
-                       interrupts = <0 141 0>;
-                       clocks = <&cmu CLK_USBDEVICE>;
-                       clock-names = "otg";
-                       phys = <&exynos_usbphy 0>;
-                       phy-names = "usb2-phy";
-                       status = "disabled";
-               };
-
-               mshc_0: mshc@12510000 {
-                       compatible = "samsung,exynos5250-dw-mshc";
-                       reg = <0x12510000 0x1000>;
-                       interrupts = <0 142 0>;
-                       clocks = <&cmu CLK_SDMMC0>, <&cmu CLK_SCLK_MMC0>;
-                       clock-names = "biu", "ciu";
-                       fifo-depth = <0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       status = "disabled";
-               };
-
-               mshc_1: mshc@12520000 {
-                       compatible = "samsung,exynos5250-dw-mshc";
-                       reg = <0x12520000 0x1000>;
-                       interrupts = <0 143 0>;
-                       clocks = <&cmu CLK_SDMMC1>, <&cmu CLK_SCLK_MMC1>;
-                       clock-names = "biu", "ciu";
-                       fifo-depth = <0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       status = "disabled";
-               };
-
-               mshc_2: mshc@12530000 {
-                       compatible = "samsung,exynos5250-dw-mshc";
-                       reg = <0x12530000 0x1000>;
-                       interrupts = <0 144 0>;
-                       clocks = <&cmu CLK_SDMMC2>, <&cmu CLK_SCLK_MMC2>;
-                       clock-names = "biu", "ciu";
-                       fifo-depth = <0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       status = "disabled";
-               };
-
-               ehci: ehci@12580000 {
-                       compatible = "samsung,exynos4210-ehci";
-                       reg = <0x12580000 0x100>;
-                       interrupts = <0 140 0>;
-                       clocks = <&cmu CLK_USBHOST>;
-                       clock-names = "usbhost";
-                       status = "disabled";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       port@0 {
-                               reg = <0>;
-                               phys = <&exynos_usbphy 1>;
-                               status = "disabled";
-                       };
-                       port@1 {
-                               reg = <1>;
-                               phys = <&exynos_usbphy 2>;
-                               status = "disabled";
-                       };
-                       port@2 {
-                               reg = <2>;
-                               phys = <&exynos_usbphy 3>;
-                               status = "disabled";
-                       };
-               };
-
-               ohci: ohci@12590000 {
-                       compatible = "samsung,exynos4210-ohci";
-                       reg = <0x12590000 0x100>;
-                       interrupts = <0 140 0>;
-                       clocks = <&cmu CLK_USBHOST>;
-                       clock-names = "usbhost";
-                       status = "disabled";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       port@0 {
-                               reg = <0>;
-                               phys = <&exynos_usbphy 1>;
-                               status = "disabled";
-                       };
-               };
-
-               exynos_usbphy: exynos-usbphy@125B0000 {
-                       compatible = "samsung,exynos4x12-usb2-phy";
-                       reg = <0x125B0000 0x100>;
-                       samsung,pmureg-phandle = <&pmu_system_controller>;
-                       samsung,sysreg-phandle = <&sysreg_system_controller>;
-                       clocks = <&cmu CLK_USBDEVICE>, <&xusbxti>;
-                       clock-names = "phy", "ref";
-                       #phy-cells = <1>;
-                       status = "disabled";
-               };
-
-               amba {
-                       compatible = "simple-bus";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       interrupt-parent = <&gic>;
-                       ranges;
-
-                       pdma0: pdma@12680000 {
-                               compatible = "arm,pl330", "arm,primecell";
-                               reg = <0x12680000 0x1000>;
-                               interrupts = <0 138 0>;
-                               clocks = <&cmu CLK_PDMA0>;
-                               clock-names = "apb_pclk";
-                               #dma-cells = <1>;
-                               #dma-channels = <8>;
-                               #dma-requests = <32>;
-                       };
-
-                       pdma1: pdma@12690000 {
-                               compatible = "arm,pl330", "arm,primecell";
-                               reg = <0x12690000 0x1000>;
-                               interrupts = <0 139 0>;
-                               clocks = <&cmu CLK_PDMA1>;
-                               clock-names = "apb_pclk";
-                               #dma-cells = <1>;
-                               #dma-channels = <8>;
-                               #dma-requests = <32>;
-                       };
-               };
-
-               adc: adc@126C0000 {
-                       compatible = "samsung,exynos3250-adc",
-                                    "samsung,exynos-adc-v2";
-                       reg = <0x126C0000 0x100>, <0x10020718 0x4>;
-                       interrupts = <0 137 0>;
-                       clock-names = "adc", "sclk";
-                       clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
-                       #io-channel-cells = <1>;
-                       io-channel-ranges;
-                       status = "disabled";
-               };
-
-               serial_0: serial@13800000 {
-                       compatible = "samsung,exynos4210-uart";
-                       reg = <0x13800000 0x100>;
-                       interrupts = <0 109 0>;
-                       clocks = <&cmu CLK_UART0>, <&cmu CLK_SCLK_UART0>;
-                       clock-names = "uart", "clk_uart_baud0";
-                       status = "disabled";
-               };
-
-               serial_1: serial@13810000 {
-                       compatible = "samsung,exynos4210-uart";
-                       reg = <0x13810000 0x100>;
-                       interrupts = <0 110 0>;
-                       clocks = <&cmu CLK_UART1>, <&cmu CLK_SCLK_UART1>;
-                       clock-names = "uart", "clk_uart_baud0";
-                       status = "disabled";
-               };
-
-               serial_2: serial@13820000 {
-                       compatible = "samsung,exynos4210-uart";
-                       reg = <0x13820000 0x100>;
-                       interrupts = <0 111 0>;
-                       clocks = <&cmu CLK_UART2>, <&cmu CLK_SCLK_UART2>;
-                       clock-names = "uart", "clk_uart_baud0";
-                       status = "disabled";
-               };
-
-               serial_3: serial@13830000 {
-                       compatible = "samsung,exynos4210-uart";
-                       reg = <0x13830000 0x100>;
-                       interrupts = <0 112 0>;
-                       clocks = <&cmu CLK_UART3>, <&cmu CLK_SCLK_UART3>;
-                       clock-names = "uart", "clk_uart_baud0";
-                       status = "disabled";
-               };
-
-               i2c_0: i2c@13860000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x13860000 0x100>;
-                       interrupts = <0 113 0>;
-                       clocks = <&cmu CLK_I2C0>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c0_bus>;
-                       status = "disabled";
-               };
-
-               i2c_1: i2c@13870000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x13870000 0x100>;
-                       interrupts = <0 114 0>;
-                       clocks = <&cmu CLK_I2C1>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c1_bus>;
-                       status = "disabled";
-               };
-
-               i2c_2: i2c@13880000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x13880000 0x100>;
-                       interrupts = <0 115 0>;
-                       clocks = <&cmu CLK_I2C2>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c2_bus>;
-                       status = "disabled";
-               };
-
-               i2c_3: i2c@13890000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x13890000 0x100>;
-                       interrupts = <0 116 0>;
-                       clocks = <&cmu CLK_I2C3>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c3_bus>;
-                       status = "disabled";
-               };
-
-               i2c_4: i2c@138A0000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x138A0000 0x100>;
-                       interrupts = <0 117 0>;
-                       clocks = <&cmu CLK_I2C4>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c4_bus>;
-                       status = "disabled";
-               };
-
-               i2c_5: i2c@138B0000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x138B0000 0x100>;
-                       interrupts = <0 118 0>;
-                       clocks = <&cmu CLK_I2C5>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c5_bus>;
-                       status = "disabled";
-               };
-
-               i2c_6: i2c@138C0000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x138C0000 0x100>;
-                       interrupts = <0 119 0>;
-                       clocks = <&cmu CLK_I2C6>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c6_bus>;
-                       status = "disabled";
-               };
-
-               i2c_7: i2c@138D0000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       compatible = "samsung,s3c2440-i2c";
-                       reg = <0x138D0000 0x100>;
-                       interrupts = <0 120 0>;
-                       clocks = <&cmu CLK_I2C7>;
-                       clock-names = "i2c";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c7_bus>;
-                       status = "disabled";
-               };
-
-               spi_0: spi@13920000 {
-                       compatible = "samsung,exynos4210-spi";
-                       reg = <0x13920000 0x100>;
-                       interrupts = <0 121 0>;
-                       dmas = <&pdma0 7>, <&pdma0 6>;
-                       dma-names = "tx", "rx";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       clocks = <&cmu CLK_SPI0>, <&cmu CLK_SCLK_SPI0>;
-                       clock-names = "spi", "spi_busclk0";
-                       samsung,spi-src-clk = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&spi0_bus>;
-                       status = "disabled";
-               };
-
-               spi_1: spi@13930000 {
-                       compatible = "samsung,exynos4210-spi";
-                       reg = <0x13930000 0x100>;
-                       interrupts = <0 122 0>;
-                       dmas = <&pdma1 7>, <&pdma1 6>;
-                       dma-names = "tx", "rx";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       clocks = <&cmu CLK_SPI1>, <&cmu CLK_SCLK_SPI1>;
-                       clock-names = "spi", "spi_busclk0";
-                       samsung,spi-src-clk = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&spi1_bus>;
-                       status = "disabled";
-               };
-
-               spi_2: spi@13940000 {
-                       compatible = "samsung,exynos4210-spi";
-                       reg = <0x13940000 0x100>;
-                       interrupts = <0 123 0>;
-                       dmas = <&pdma0 9>, <&pdma0 8>;
-                       dma-names = "tx", "rx";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       clocks = <&cmu CLK_SPI2>, <&cmu CLK_SCLK_SPI2>;
-                       clock-names = "spi", "spi_busclk0";
-                       samsung,spi-src-clk = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&spi2_bus>;
-                       status = "disabled";
-               };
-
-               clock_audss: clock-controller@03810000 {
-                       compatible = "samsung,exynos4210-audss-clock";
-                       reg = <0x03810000 0x0C>;
-                       #clock-cells = <1>;
-               };
-
-               i2s0: i2s@3830000 {
-                       compatible = "samsung,s5pv210-i2s";
-                       reg = <0x03830000 0x100>;
-                       interrupts = <0 124 0>;
-                       clocks = <&clock_audss EXYNOS_I2S_BUS>,
-                               <&clock_audss EXYNOS_SCLK_I2S>;
-                       clock-names = "iis", "i2s_opclk0";
-                       dmas = <&pdma1 10>, <&pdma1 9>, <&pdma1 8>;
-                       dma-names = "tx", "rx", "tx-sec";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2s0_bus>;
-                       samsung,idma-addr = <0x03000000>;
-                       status = "disabled";
-               };
-
-               pwm: pwm@139D0000 {
-                       compatible = "samsung,exynos4210-pwm";
-                       reg = <0x139D0000 0x1000>;
-                       interrupts = <0 104 0>, <0 105 0>, <0 106 0>,
-                                    <0 107 0>, <0 108 0>;
-                       #pwm-cells = <3>;
-                       status = "disabled";
-               };
-
-               pmu {
-                       compatible = "arm,cortex-a9-pmu";
-                       interrupts = <0 18 0>, <0 19 0>, <0 20 0>, <0 21 0>;
-               };
-       };
-};
-
-#include "exynos4415-pinctrl.dtsi"
index a56bf9b1a4129c4cb61d162d29b87c96b7bdd2f9..2f866f6e583847ff958580ad37ab4fa1c3618cf4 100644 (file)
@@ -572,8 +572,14 @@ gpx0: gpx0 {
 
                        interrupt-controller;
                        interrupt-parent = <&gic>;
-                       interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
-                                    <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>;
+                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
                        #interrupt-cells = <2>;
                };
 
@@ -583,8 +589,14 @@ gpx1: gpx1 {
 
                        interrupt-controller;
                        interrupt-parent = <&gic>;
-                       interrupts = <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
-                                    <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>;
+                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
                        #interrupt-cells = <2>;
                };
 
index 3394bdcf10ae481ec4bdc2af3f614c9db74237ff..85a7122658f104117d2f1031f040be9a5155b0bf 100644 (file)
@@ -88,11 +88,11 @@ mct_map: mct-map {
                        #interrupt-cells = <1>;
                        #address-cells = <0>;
                        #size-cells = <0>;
-                       interrupt-map = <0 &gic 0 57 0>,
+                       interrupt-map = <0 &gic 0 57 IRQ_TYPE_LEVEL_HIGH>,
                                        <1 &combiner 12 5>,
                                        <2 &combiner 12 6>,
                                        <3 &combiner 12 7>,
-                                       <4 &gic 1 12 0>;
+                                       <4 &gic 1 12 IRQ_TYPE_LEVEL_HIGH>;
                };
        };
 
@@ -112,7 +112,7 @@ adc: adc@126C0000 {
        g2d: g2d@10800000 {
                compatible = "samsung,exynos4212-g2d";
                reg = <0x10800000 0x1000>;
-               interrupts = <0 89 0>;
+               interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SCLK_FIMG2D>, <&clock CLK_G2D>;
                clock-names = "sclk_fimg2d", "fimg2d";
                iommus = <&sysmmu_g2d>;
@@ -127,7 +127,7 @@ camera {
                fimc_lite_0: fimc-lite@12390000 {
                        compatible = "samsung,exynos4212-fimc-lite";
                        reg = <0x12390000 0x1000>;
-                       interrupts = <0 105 0>;
+                       interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_isp>;
                        clocks = <&clock CLK_FIMC_LITE0>;
                        clock-names = "flite";
@@ -138,7 +138,7 @@ fimc_lite_0: fimc-lite@12390000 {
                fimc_lite_1: fimc-lite@123A0000 {
                        compatible = "samsung,exynos4212-fimc-lite";
                        reg = <0x123A0000 0x1000>;
-                       interrupts = <0 106 0>;
+                       interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_isp>;
                        clocks = <&clock CLK_FIMC_LITE1>;
                        clock-names = "flite";
@@ -147,9 +147,10 @@ fimc_lite_1: fimc-lite@123A0000 {
                };
 
                fimc_is: fimc-is@12000000 {
-                       compatible = "samsung,exynos4212-fimc-is", "simple-bus";
+                       compatible = "samsung,exynos4212-fimc-is";
                        reg = <0x12000000 0x260000>;
-                       interrupts = <0 90 0>, <0 95 0>;
+                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_isp>;
                        clocks = <&clock CLK_FIMC_LITE0>,
                                 <&clock CLK_FIMC_LITE1>, <&clock CLK_PPMUISPX>,
@@ -200,7 +201,7 @@ i2c1_isp: i2c-isp@12140000 {
        mshc_0: mmc@12550000 {
                compatible = "samsung,exynos4412-dw-mshc";
                reg = <0x12550000 0x1000>;
-               interrupts = <0 77 0>;
+               interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                #size-cells = <0>;
                fifo-depth = <0x80>;
@@ -461,11 +462,26 @@ opp@100000000 {
 };
 
 &combiner {
-       interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
-                    <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
-                    <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
-                    <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
-                    <0 107 0>, <0 108 0>, <0 48 0>, <0 42 0>;
+       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
+                    <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>,
+                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
 };
 
 &exynos_usbphy {
@@ -529,18 +545,18 @@ &mixer {
 &pinctrl_0 {
        compatible = "samsung,exynos4x12-pinctrl";
        reg = <0x11400000 0x1000>;
-       interrupts = <0 47 0>;
+       interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
 };
 
 &pinctrl_1 {
        compatible = "samsung,exynos4x12-pinctrl";
        reg = <0x11000000 0x1000>;
-       interrupts = <0 46 0>;
+       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
 
        wakup_eint: wakeup-interrupt-controller {
                compatible = "samsung,exynos4210-wakeup-eint";
                interrupt-parent = <&gic>;
-               interrupts = <0 32 0>;
+               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
        };
 };
 
@@ -554,7 +570,7 @@ &pinctrl_2 {
 &pinctrl_3 {
        compatible = "samsung,exynos4x12-pinctrl";
        reg = <0x106E0000 0x1000>;
-       interrupts = <0 72 0>;
+       interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
 };
 
 &pmu_system_controller {
index 8f06609879f5745055adef2eaa115d190f19216c..7fd870ee5093d98f217b161b39d5f626651d441b 100644 (file)
@@ -13,6 +13,8 @@
  * published by the Free Software Foundation.
  */
 
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include "exynos-syscon-restart.dtsi"
 
 / {
@@ -53,14 +55,38 @@ combiner: interrupt-controller@10440000 {
                        interrupt-controller;
                        samsung,combiner-nr = <32>;
                        reg = <0x10440000 0x1000>;
-                       interrupts =    <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
-                                       <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
-                                       <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
-                                       <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
-                                       <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
-                                       <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>,
-                                       <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
-                                       <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>;
+                       interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 1 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 2 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 3 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 4 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 5 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 6 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 7 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 8 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 9 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 10 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 11 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 12 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 13 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 14 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 15 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 16 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 17 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 19 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 20 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 21 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 22 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 23 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 24 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 25 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 26 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 27 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 28 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 29 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 30 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 31 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                gic: interrupt-controller@10481000 {
@@ -71,7 +97,8 @@ gic: interrupt-controller@10481000 {
                                <0x10482000 0x1000>,
                                <0x10484000 0x2000>,
                                <0x10486000 0x2000>;
-                       interrupts = <1 9 0xf04>;
+                       interrupts = <GIC_PPI 9
+                                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
                };
 
                sysreg_system_controller: syscon@10050000 {
@@ -82,31 +109,31 @@ sysreg_system_controller: syscon@10050000 {
                serial_0: serial@12C00000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12C00000 0x100>;
-                       interrupts = <0 51 0>;
+                       interrupts = <0 51 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                serial_1: serial@12C10000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12C10000 0x100>;
-                       interrupts = <0 52 0>;
+                       interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                serial_2: serial@12C20000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12C20000 0x100>;
-                       interrupts = <0 53 0>;
+                       interrupts = <0 53 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                serial_3: serial@12C30000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12C30000 0x100>;
-                       interrupts = <0 54 0>;
+                       interrupts = <0 54 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                i2c_0: i2c@12C60000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12C60000 0x100>;
-                       interrupts = <0 56 0>;
+                       interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        samsung,sysreg-phandle = <&sysreg_system_controller>;
@@ -116,7 +143,7 @@ i2c_0: i2c@12C60000 {
                i2c_1: i2c@12C70000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12C70000 0x100>;
-                       interrupts = <0 57 0>;
+                       interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        samsung,sysreg-phandle = <&sysreg_system_controller>;
@@ -126,7 +153,7 @@ i2c_1: i2c@12C70000 {
                i2c_2: i2c@12C80000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12C80000 0x100>;
-                       interrupts = <0 58 0>;
+                       interrupts = <0 58 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        samsung,sysreg-phandle = <&sysreg_system_controller>;
@@ -136,7 +163,7 @@ i2c_2: i2c@12C80000 {
                i2c_3: i2c@12C90000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12C90000 0x100>;
-                       interrupts = <0 59 0>;
+                       interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        samsung,sysreg-phandle = <&sysreg_system_controller>;
@@ -153,7 +180,8 @@ pwm: pwm@12DD0000 {
                rtc: rtc@101E0000 {
                        compatible = "samsung,s3c6410-rtc";
                        reg = <0x101E0000 0x100>;
-                       interrupts = <0 43 0>, <0 44 0>;
+                       interrupts = <0 43 IRQ_TYPE_LEVEL_HIGH>,
+                                    <0 44 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
index d5d51916bb742ca988e2eb6f937b2b2d6ae46699..8f3a804307488575fbf6b98e8252a7b0a92306ee 100644 (file)
@@ -523,6 +523,7 @@ &i2s0 {
        status = "okay";
 };
 
+/* eMMC flash */
 &mmc_0 {
        status = "okay";
        num-slots = <1>;
@@ -536,6 +537,7 @@ &mmc_0 {
        cap-mmc-highspeed;
 };
 
+/* uSD card */
 &mmc_2 {
        status = "okay";
        num-slots = <1>;
@@ -553,6 +555,8 @@ &mmc_2 {
 /*
  * On Snow we've got SIP WiFi and so can keep drive strengths low to
  * reduce EMI.
+ *
+ * WiFi SDIO module
  */
 &mmc_3 {
        status = "okay";
index f7357d99b47cea3a88a4c8f91662ec33d1239302..b6d7444d85858e6ab16ef59deaf763e60b95370d 100644 (file)
@@ -181,8 +181,8 @@ mct_map: mct-map {
                                                <0x1 0 &combiner 23 4>,
                                                <0x2 0 &combiner 25 2>,
                                                <0x3 0 &combiner 25 3>,
-                                               <0x4 0 &gic 0 120 0>,
-                                               <0x5 0 &gic 0 121 0>;
+                                               <0x4 0 &gic 0 120 IRQ_TYPE_LEVEL_HIGH>,
+                                               <0x5 0 &gic 0 121 IRQ_TYPE_LEVEL_HIGH>;
                        };
                };
 
@@ -195,31 +195,31 @@ pmu {
                pinctrl_0: pinctrl@11400000 {
                        compatible = "samsung,exynos5250-pinctrl";
                        reg = <0x11400000 0x1000>;
-                       interrupts = <0 46 0>;
+                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
 
                        wakup_eint: wakeup-interrupt-controller {
                                compatible = "samsung,exynos4210-wakeup-eint";
                                interrupt-parent = <&gic>;
-                               interrupts = <0 32 0>;
+                               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                        };
                };
 
                pinctrl_1: pinctrl@13400000 {
                        compatible = "samsung,exynos5250-pinctrl";
                        reg = <0x13400000 0x1000>;
-                       interrupts = <0 45 0>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_2: pinctrl@10d10000 {
                        compatible = "samsung,exynos5250-pinctrl";
                        reg = <0x10d10000 0x1000>;
-                       interrupts = <0 50 0>;
+                       interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_3: pinctrl@03860000 {
                        compatible = "samsung,exynos5250-pinctrl";
                        reg = <0x03860000 0x1000>;
-                       interrupts = <0 47 0>;
+                       interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pmu_system_controller: system-controller@10040000 {
@@ -236,7 +236,7 @@ pmu_system_controller: system-controller@10040000 {
                watchdog@101D0000 {
                        compatible = "samsung,exynos5250-wdt";
                        reg = <0x101D0000 0x100>;
-                       interrupts = <0 42 0>;
+                       interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_WDT>;
                        clock-names = "watchdog";
                        samsung,syscon-phandle = <&pmu_system_controller>;
@@ -245,7 +245,7 @@ watchdog@101D0000 {
                g2d@10850000 {
                        compatible = "samsung,exynos5250-g2d";
                        reg = <0x10850000 0x1000>;
-                       interrupts = <0 91 0>;
+                       interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_G2D>;
                        clock-names = "fimg2d";
                        iommus = <&sysmmu_g2d>;
@@ -254,7 +254,7 @@ g2d@10850000 {
                mfc: codec@11000000 {
                        compatible = "samsung,mfc-v6";
                        reg = <0x11000000 0x10000>;
-                       interrupts = <0 96 0>;
+                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_mfc>;
                        clocks = <&clock CLK_MFC>;
                        clock-names = "mfc";
@@ -265,7 +265,7 @@ mfc: codec@11000000 {
                rotator: rotator@11C00000 {
                        compatible = "samsung,exynos5250-rotator";
                        reg = <0x11C00000 0x64>;
-                       interrupts = <0 84 0>;
+                       interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_ROTATOR>;
                        clock-names = "rotator";
                        iommus = <&sysmmu_rotator>;
@@ -274,7 +274,7 @@ rotator: rotator@11C00000 {
                tmu: tmu@10060000 {
                        compatible = "samsung,exynos5250-tmu";
                        reg = <0x10060000 0x100>;
-                       interrupts = <0 65 0>;
+                       interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -284,7 +284,7 @@ sata: sata@122F0000 {
                        compatible = "snps,dwc-ahci";
                        samsung,sata-freq = <66>;
                        reg = <0x122F0000 0x1ff>;
-                       interrupts = <0 115 0>;
+                       interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_SATA>, <&clock CLK_SCLK_SATA>;
                        clock-names = "sata", "sclk_sata";
                        phys = <&sata_phy>;
@@ -306,7 +306,7 @@ sata_phy: sata-phy@12170000 {
                i2c_4: i2c@12CA0000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12CA0000 0x100>;
-                       interrupts = <0 60 0>;
+                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_I2C4>;
@@ -319,7 +319,7 @@ i2c_4: i2c@12CA0000 {
                i2c_5: i2c@12CB0000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12CB0000 0x100>;
-                       interrupts = <0 61 0>;
+                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_I2C5>;
@@ -332,7 +332,7 @@ i2c_5: i2c@12CB0000 {
                i2c_6: i2c@12CC0000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12CC0000 0x100>;
-                       interrupts = <0 62 0>;
+                       interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_I2C6>;
@@ -345,7 +345,7 @@ i2c_6: i2c@12CC0000 {
                i2c_7: i2c@12CD0000 {
                        compatible = "samsung,s3c2440-i2c";
                        reg = <0x12CD0000 0x100>;
-                       interrupts = <0 63 0>;
+                       interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_I2C7>;
@@ -358,7 +358,7 @@ i2c_7: i2c@12CD0000 {
                i2c_8: i2c@12CE0000 {
                        compatible = "samsung,s3c2440-hdmiphy-i2c";
                        reg = <0x12CE0000 0x1000>;
-                       interrupts = <0 64 0>;
+                       interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_I2C_HDMI>;
@@ -380,7 +380,7 @@ spi_0: spi@12d20000 {
                        compatible = "samsung,exynos4210-spi";
                        status = "disabled";
                        reg = <0x12d20000 0x100>;
-                       interrupts = <0 66 0>;
+                       interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma0 5
                                &pdma0 4>;
                        dma-names = "tx", "rx";
@@ -396,7 +396,7 @@ spi_1: spi@12d30000 {
                        compatible = "samsung,exynos4210-spi";
                        status = "disabled";
                        reg = <0x12d30000 0x100>;
-                       interrupts = <0 67 0>;
+                       interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma1 5
                                &pdma1 4>;
                        dma-names = "tx", "rx";
@@ -412,7 +412,7 @@ spi_2: spi@12d40000 {
                        compatible = "samsung,exynos4210-spi";
                        status = "disabled";
                        reg = <0x12d40000 0x100>;
-                       interrupts = <0 68 0>;
+                       interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma0 7
                                &pdma0 6>;
                        dma-names = "tx", "rx";
@@ -426,7 +426,7 @@ spi_2: spi@12d40000 {
 
                mmc_0: mmc@12200000 {
                        compatible = "samsung,exynos5250-dw-mshc";
-                       interrupts = <0 75 0>;
+                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x12200000 0x1000>;
@@ -438,7 +438,7 @@ mmc_0: mmc@12200000 {
 
                mmc_1: mmc@12210000 {
                        compatible = "samsung,exynos5250-dw-mshc";
-                       interrupts = <0 76 0>;
+                       interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x12210000 0x1000>;
@@ -450,7 +450,7 @@ mmc_1: mmc@12210000 {
 
                mmc_2: mmc@12220000 {
                        compatible = "samsung,exynos5250-dw-mshc";
-                       interrupts = <0 77 0>;
+                       interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x12220000 0x1000>;
@@ -463,7 +463,7 @@ mmc_2: mmc@12220000 {
                mmc_3: mmc@12230000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12230000 0x1000>;
-                       interrupts = <0 78 0>;
+                       interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_SDMMC3>, <&clock CLK_SCLK_MMC3>;
@@ -526,7 +526,7 @@ usb_dwc3 {
                        usbdrd_dwc3: dwc3@12000000 {
                                compatible = "synopsys,dwc3";
                                reg = <0x12000000 0x10000>;
-                               interrupts = <0 72 0>;
+                               interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
                                phys = <&usbdrd_phy 0>, <&usbdrd_phy 1>;
                                phy-names = "usb2-phy", "usb3-phy";
                        };
@@ -544,7 +544,7 @@ usbdrd_phy: phy@12100000 {
                ehci: usb@12110000 {
                        compatible = "samsung,exynos4210-ehci";
                        reg = <0x12110000 0x100>;
-                       interrupts = <0 71 0>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
 
                        clocks = <&clock CLK_USB2>;
                        clock-names = "usbhost";
@@ -559,7 +559,7 @@ port@0 {
                ohci: usb@12120000 {
                        compatible = "samsung,exynos4210-ohci";
                        reg = <0x12120000 0x100>;
-                       interrupts = <0 71 0>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
 
                        clocks = <&clock CLK_USB2>;
                        clock-names = "usbhost";
@@ -591,7 +591,7 @@ amba {
                        pdma0: pdma@121A0000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x121A0000 0x1000>;
-                               interrupts = <0 34 0>;
+                               interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_PDMA0>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -602,7 +602,7 @@ pdma0: pdma@121A0000 {
                        pdma1: pdma@121B0000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x121B0000 0x1000>;
-                               interrupts = <0 35 0>;
+                               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_PDMA1>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -613,7 +613,7 @@ pdma1: pdma@121B0000 {
                        mdma0: mdma@10800000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x10800000 0x1000>;
-                               interrupts = <0 33 0>;
+                               interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_MDMA0>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -624,7 +624,7 @@ mdma0: mdma@10800000 {
                        mdma1: mdma@11C10000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x11C10000 0x1000>;
-                               interrupts = <0 124 0>;
+                               interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_MDMA1>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -636,7 +636,7 @@ mdma1: mdma@11C10000 {
                gsc_0:  gsc@13e00000 {
                        compatible = "samsung,exynos5-gsc";
                        reg = <0x13e00000 0x1000>;
-                       interrupts = <0 85 0>;
+                       interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_gsc>;
                        clocks = <&clock CLK_GSCL0>;
                        clock-names = "gscl";
@@ -646,7 +646,7 @@ gsc_0:  gsc@13e00000 {
                gsc_1:  gsc@13e10000 {
                        compatible = "samsung,exynos5-gsc";
                        reg = <0x13e10000 0x1000>;
-                       interrupts = <0 86 0>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_gsc>;
                        clocks = <&clock CLK_GSCL1>;
                        clock-names = "gscl";
@@ -656,7 +656,7 @@ gsc_1:  gsc@13e10000 {
                gsc_2:  gsc@13e20000 {
                        compatible = "samsung,exynos5-gsc";
                        reg = <0x13e20000 0x1000>;
-                       interrupts = <0 87 0>;
+                       interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_gsc>;
                        clocks = <&clock CLK_GSCL2>;
                        clock-names = "gscl";
@@ -666,7 +666,7 @@ gsc_2:  gsc@13e20000 {
                gsc_3:  gsc@13e30000 {
                        compatible = "samsung,exynos5-gsc";
                        reg = <0x13e30000 0x1000>;
-                       interrupts = <0 88 0>;
+                       interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
                        power-domains = <&pd_gsc>;
                        clocks = <&clock CLK_GSCL3>;
                        clock-names = "gscl";
@@ -677,7 +677,7 @@ hdmi: hdmi@14530000 {
                        compatible = "samsung,exynos4212-hdmi";
                        reg = <0x14530000 0x70000>;
                        power-domains = <&pd_disp1>;
-                       interrupts = <0 95 0>;
+                       interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
                                 <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
                                 <&clock CLK_MOUT_HDMI>;
@@ -690,7 +690,7 @@ mixer@14450000 {
                        compatible = "samsung,exynos5250-mixer";
                        reg = <0x14450000 0x10000>;
                        power-domains = <&pd_disp1>;
-                       interrupts = <0 94 0>;
+                       interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
                                 <&clock CLK_SCLK_HDMI>;
                        clock-names = "mixer", "hdmi", "sclk_hdmi";
@@ -706,7 +706,7 @@ dp_phy: video-phy {
                adc: adc@12D10000 {
                        compatible = "samsung,exynos-adc-v1";
                        reg = <0x12D10000 0x100>;
-                       interrupts = <0 106 0>;
+                       interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_ADC>;
                        clock-names = "adc";
                        #io-channel-cells = <1>;
@@ -718,7 +718,7 @@ adc: adc@12D10000 {
                sss@10830000 {
                        compatible = "samsung,exynos4210-secss";
                        reg = <0x10830000 0x300>;
-                       interrupts = <0 112 0>;
+                       interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_SSS>;
                        clock-names = "secss";
                };
index a86a4898d077ffca3050e4dc0cc90971e64453fb..5818718618b1e75867a9c5dbaba744d7c2e23d8c 100644 (file)
@@ -10,6 +10,8 @@
 */
 
 #include <dt-bindings/clock/exynos5260-clk.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        compatible = "samsung,exynos5260", "samsung,exynos5";
@@ -168,7 +170,8 @@ gic: interrupt-controller@10481000 {
                                <0x10482000 0x1000>,
                                <0x10484000 0x2000>,
                                <0x10486000 0x2000>;
-                       interrupts = <1 9 0xf04>;
+                       interrupts = <GIC_PPI 9
+                                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
                };
 
                chipid: chipid@10000000 {
@@ -181,10 +184,18 @@ mct: mct@100B0000 {
                        reg = <0x100B0000 0x1000>;
                        clocks = <&fin_pll>, <&clock_peri PERI_CLK_MCT>;
                        clock-names = "fin_pll", "mct";
-                       interrupts = <0 104 0>, <0 105 0>, <0 106 0>,
-                                       <0 107 0>, <0 122 0>, <0 123 0>,
-                                       <0 124 0>, <0 125 0>, <0 126 0>,
-                                       <0 127 0>, <0 128 0>, <0 129 0>;
+                       interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                cci: cci@10F00000 {
@@ -210,25 +221,25 @@ cci_control1: slave-if@5000 {
                pinctrl_0: pinctrl@11600000 {
                        compatible = "samsung,exynos5260-pinctrl";
                        reg = <0x11600000 0x1000>;
-                       interrupts = <0 79 0>;
+                       interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
 
                        wakeup-interrupt-controller {
                                compatible = "samsung,exynos4210-wakeup-eint";
                                interrupt-parent = <&gic>;
-                               interrupts = <0 32 0>;
+                               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                        };
                };
 
                pinctrl_1: pinctrl@12290000 {
                        compatible = "samsung,exynos5260-pinctrl";
                        reg = <0x12290000 0x1000>;
-                       interrupts = <0 157 0>;
+                       interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_2: pinctrl@128B0000 {
                        compatible = "samsung,exynos5260-pinctrl";
                        reg = <0x128B0000 0x1000>;
-                       interrupts = <0 243 0>;
+                       interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pmu_system_controller: system-controller@10D50000 {
@@ -239,7 +250,7 @@ pmu_system_controller: system-controller@10D50000 {
                uart0: serial@12C00000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12C00000 0x100>;
-                       interrupts = <0 146 0>;
+                       interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock_peri PERI_CLK_UART0>, <&clock_peri PERI_SCLK_UART0>;
                        clock-names = "uart", "clk_uart_baud0";
                        status = "disabled";
@@ -248,7 +259,7 @@ uart0: serial@12C00000 {
                uart1: serial@12C10000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12C10000 0x100>;
-                       interrupts = <0 147 0>;
+                       interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock_peri PERI_CLK_UART1>, <&clock_peri PERI_SCLK_UART1>;
                        clock-names = "uart", "clk_uart_baud0";
                        status = "disabled";
@@ -257,7 +268,7 @@ uart1: serial@12C10000 {
                uart2: serial@12C20000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12C20000 0x100>;
-                       interrupts = <0 148 0>;
+                       interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock_peri PERI_CLK_UART2>, <&clock_peri PERI_SCLK_UART2>;
                        clock-names = "uart", "clk_uart_baud0";
                        status = "disabled";
@@ -266,7 +277,7 @@ uart2: serial@12C20000 {
                uart3: serial@12860000 {
                        compatible = "samsung,exynos4210-uart";
                        reg = <0x12860000 0x100>;
-                       interrupts = <0 145 0>;
+                       interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock_aud AUD_CLK_AUD_UART>, <&clock_aud AUD_SCLK_AUD_UART>;
                        clock-names = "uart", "clk_uart_baud0";
                        status = "disabled";
@@ -275,7 +286,7 @@ uart3: serial@12860000 {
                mmc_0: mmc@12140000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12140000 0x2000>;
-                       interrupts = <0 156 0>;
+                       interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock_fsys FSYS_CLK_MMC0>, <&clock_top TOP_SCLK_MMC0>;
@@ -287,7 +298,7 @@ mmc_0: mmc@12140000 {
                mmc_1: mmc@12150000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12150000 0x2000>;
-                       interrupts = <0 158 0>;
+                       interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock_fsys FSYS_CLK_MMC1>, <&clock_top TOP_SCLK_MMC1>;
@@ -299,7 +310,7 @@ mmc_1: mmc@12150000 {
                mmc_2: mmc@12160000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12160000 0x2000>;
-                       interrupts = <0 159 0>;
+                       interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock_fsys FSYS_CLK_MMC2>, <&clock_top TOP_SCLK_MMC2>;
index 3c271cb4b2be323733de846ba9875f0a0a0069fc..c4de1353e5dfe6616a06f5a596a9a30929dd0022 100644 (file)
@@ -15,6 +15,7 @@
 #include <dt-bindings/clock/maxim,max77802.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/sound/samsung-i2s.h>
 #include "exynos54xx-odroidxu-leds.dtsi"
 
 / {
@@ -57,6 +58,61 @@ firmware@02073000 {
                compatible = "samsung,secure-firmware";
                reg = <0x02073000 0x1000>;
        };
+
+       sound: sound {
+               compatible = "simple-audio-card";
+
+               simple-audio-card,name = "Odroid-XU";
+               simple-audio-card,widgets =
+                       "Headphone", "Headphone Jack",
+                       "Speakers", "Speakers";
+               simple-audio-card,routing =
+                       "Headphone Jack", "HPL",
+                       "Headphone Jack", "HPR",
+                       "Headphone Jack", "MICBIAS",
+                       "IN1", "Headphone Jack",
+                       "Speakers", "SPKL",
+                       "Speakers", "SPKR";
+
+               simple-audio-card,format = "i2s";
+               simple-audio-card,bitclock-master = <&link0_codec>;
+               simple-audio-card,frame-master = <&link0_codec>;
+
+               simple-audio-card,cpu {
+                       sound-dai = <&audi2s0 0>;
+                       system-clock-frequency = <19200000>;
+               };
+
+               link0_codec: simple-audio-card,codec {
+                       sound-dai = <&max98090>;
+                       clocks = <&audi2s0 CLK_I2S_CDCLK>;
+               };
+       };
+};
+
+&audi2s0 {
+       status = "okay";
+};
+
+&clock {
+       clocks = <&fin_pll>;
+       assigned-clocks = <&clock CLK_FOUT_EPLL>;
+       assigned-clock-rates = <192000000>;
+};
+
+&clock_audss {
+       assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
+                       <&clock_audss EXYNOS_MOUT_I2S>,
+                       <&clock_audss EXYNOS_DOUT_SRP>,
+                       <&clock_audss EXYNOS_DOUT_AUD_BUS>;
+
+       assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
+                       <&clock_audss EXYNOS_MOUT_AUDSS>;
+
+       assigned-clock-rates =  <0>,
+                               <0>,
+                               <96000000>,
+                               <19200000>;
 };
 
 &cpu0_thermal {
@@ -440,6 +496,19 @@ ldo35_reg: LDO35 {
        };
 };
 
+&i2c_1 {
+       status = "okay";
+       max98090: max98090@10 {
+               compatible = "maxim,max98090";
+               reg = <0x10>;
+               interrupt-parent = <&gpj3>;
+               interrupts = <0 IRQ_TYPE_NONE>;
+               clocks = <&audi2s0 CLK_I2S_CDCLK>;
+               clock-names = "mclk";
+               #sound-dai-cells = <0>;
+       };
+};
+
 &mmc_0 {
        status = "okay";
        mmc-pwrseq = <&emmc_pwrseq>;
index a083d23fdee309c85a621ec001e77eb297dd57c3..ff46a1c2718288cdf362e111a8741ae68f35cdb4 100644 (file)
@@ -615,4 +615,13 @@ gpz: gpz {
                interrupt-controller;
                #interrupt-cells = <2>;
        };
+
+       audi2s0_bus: audi2s0-bus {
+               samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3",
+                               "gpz-4";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <0>;
+               samsung,pin-drv = <0>;
+       };
+
 };
index 137f48464f8b4ff4def1696252a814a65b2a5f20..bb90bbdbe2d919f97ad5e8291b6a09a662b0ef65 100644 (file)
@@ -16,6 +16,7 @@
 #include "exynos54xx.dtsi"
 #include "exynos-syscon-restart.dtsi"
 #include <dt-bindings/clock/exynos5410.h>
+#include <dt-bindings/clock/exynos-audss-clk.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
 / {
@@ -82,10 +83,18 @@ clock: clock-controller@10010000 {
                        #clock-cells = <1>;
                };
 
+               clock_audss: audss-clock-controller@3810000 {
+                       compatible = "samsung,exynos5410-audss-clock";
+                       reg = <0x03810000 0x0C>;
+                       #clock-cells = <1>;
+                       clocks = <&fin_pll>, <&clock CLK_FOUT_EPLL>;
+                       clock-names = "pll_ref", "pll_in";
+               };
+
                tmu_cpu0: tmu@10060000 {
                        compatible = "samsung,exynos5420-tmu";
                        reg = <0x10060000 0x100>;
-                       interrupts = <GIC_SPI 65 0>;
+                       interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -94,7 +103,7 @@ tmu_cpu0: tmu@10060000 {
                tmu_cpu1: tmu@10064000 {
                        compatible = "samsung,exynos5420-tmu";
                        reg = <0x10064000 0x100>;
-                       interrupts = <GIC_SPI 183 0>;
+                       interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -103,7 +112,7 @@ tmu_cpu1: tmu@10064000 {
                tmu_cpu2: tmu@10068000 {
                        compatible = "samsung,exynos5420-tmu";
                        reg = <0x10068000 0x100>;
-                       interrupts = <GIC_SPI 184 0>;
+                       interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -112,7 +121,7 @@ tmu_cpu2: tmu@10068000 {
                tmu_cpu3: tmu@1006c000 {
                        compatible = "samsung,exynos5420-tmu";
                        reg = <0x1006c000 0x100>;
-                       interrupts = <GIC_SPI 185 0>;
+                       interrupts = <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -121,7 +130,7 @@ tmu_cpu3: tmu@1006c000 {
                mmc_0: mmc@12200000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12200000 0x1000>;
-                       interrupts = <0 75 0>;
+                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_MMC0>, <&clock CLK_SCLK_MMC0>;
@@ -133,7 +142,7 @@ mmc_0: mmc@12200000 {
                mmc_1: mmc@12210000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12210000 0x1000>;
-                       interrupts = <0 76 0>;
+                       interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_MMC1>, <&clock CLK_SCLK_MMC1>;
@@ -145,7 +154,7 @@ mmc_1: mmc@12210000 {
                mmc_2: mmc@12220000 {
                        compatible = "samsung,exynos5250-dw-mshc";
                        reg = <0x12220000 0x1000>;
-                       interrupts = <0 77 0>;
+                       interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        clocks = <&clock CLK_MMC2>, <&clock CLK_SCLK_MMC2>;
@@ -157,31 +166,81 @@ mmc_2: mmc@12220000 {
                pinctrl_0: pinctrl@13400000 {
                        compatible = "samsung,exynos5410-pinctrl";
                        reg = <0x13400000 0x1000>;
-                       interrupts = <0 45 0>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
 
                        wakeup-interrupt-controller {
                                compatible = "samsung,exynos4210-wakeup-eint";
                                interrupt-parent = <&gic>;
-                               interrupts = <0 32 0>;
+                               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                        };
                };
 
                pinctrl_1: pinctrl@14000000 {
                        compatible = "samsung,exynos5410-pinctrl";
                        reg = <0x14000000 0x1000>;
-                       interrupts = <0 46 0>;
+                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_2: pinctrl@10d10000 {
                        compatible = "samsung,exynos5410-pinctrl";
                        reg = <0x10d10000 0x1000>;
-                       interrupts = <0 50 0>;
+                       interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_3: pinctrl@03860000 {
                        compatible = "samsung,exynos5410-pinctrl";
                        reg = <0x03860000 0x1000>;
-                       interrupts = <0 47 0>;
+                       interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               amba {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       interrupt-parent = <&gic>;
+                       ranges;
+
+                       pdma0: pdma@12680000 {
+                               compatible = "arm,pl330", "arm,primecell";
+                               reg = <0x121A0000 0x1000>;
+                               interrupts = <GIC_SPI 34 IRQ_TYPE_NONE>;
+                               clocks = <&clock CLK_PDMA0>;
+                               clock-names = "apb_pclk";
+                               #dma-cells = <1>;
+                               #dma-channels = <8>;
+                               #dma-requests = <32>;
+                       };
+
+                       pdma1: pdma@12690000 {
+                               compatible = "arm,pl330", "arm,primecell";
+                               reg = <0x121B0000 0x1000>;
+                               interrupts = <GIC_SPI 35 IRQ_TYPE_NONE>;
+                               clocks = <&clock CLK_PDMA1>;
+                               clock-names = "apb_pclk";
+                               #dma-cells = <1>;
+                               #dma-channels = <8>;
+                               #dma-requests = <32>;
+                       };
+               };
+
+               audi2s0: i2s@03830000 {
+                       compatible = "samsung,exynos5420-i2s";
+                       reg = <0x03830000 0x100>;
+                       dmas = <&pdma0 10
+                               &pdma0 9
+                               &pdma0 8>;
+                       dma-names = "tx", "rx", "tx-sec";
+                       clocks = <&clock_audss EXYNOS_I2S_BUS>,
+                               <&clock_audss EXYNOS_I2S_BUS>,
+                               <&clock_audss EXYNOS_SCLK_I2S>;
+                       clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
+                       #clock-cells = <1>;
+                       clock-output-names = "i2s_cdclk0";
+                       #sound-dai-cells = <1>;
+                       samsung,idma-addr = <0x03000000>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&audi2s0_bus>;
+                       status = "disabled";
                };
        };
 
@@ -329,7 +388,7 @@ &usbdrd3_1 {
 };
 
 &usbdrd_dwc3_1 {
-       interrupts = <GIC_SPI 200 0>;
+       interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
 };
 
 &usbdrd_phy1 {
index ec4a00f1ce01e7a607844dcfb38a951e4d49eec4..1f964ec35c5ec87d9ed433a38f07d3bcea146886 100644 (file)
@@ -697,6 +697,7 @@ &i2s0 {
        status = "okay";
 };
 
+/* eMMC flash */
 &mmc_0 {
        status = "okay";
        num-slots = <1>;
@@ -714,6 +715,7 @@ &mmc_0 {
        bus-width = <8>;
 };
 
+/* WiFi SDIO module */
 &mmc_1 {
        status = "okay";
        num-slots = <1>;
@@ -733,6 +735,7 @@ &mmc_1 {
        vqmmc-supply = <&buck10_reg>;
 };
 
+/* uSD card */
 &mmc_2 {
        status = "okay";
        num-slots = <1>;
index 00c4cfa54839cdaa31a283e83a3f53df8563e842..906a1a42a7ea4e9a41d60f89ff8701cc10f44872 100644 (file)
@@ -193,7 +193,7 @@ clock_audss: audss-clock-controller@3810000 {
                mfc: codec@11000000 {
                        compatible = "samsung,mfc-v7";
                        reg = <0x11000000 0x10000>;
-                       interrupts = <0 96 0>;
+                       interrupts = <0 96 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_MFC>;
                        clock-names = "mfc";
                        power-domains = <&mfc_pd>;
@@ -203,7 +203,7 @@ mfc: codec@11000000 {
 
                mmc_0: mmc@12200000 {
                        compatible = "samsung,exynos5420-dw-mshc-smu";
-                       interrupts = <0 75 0>;
+                       interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x12200000 0x2000>;
@@ -215,7 +215,7 @@ mmc_0: mmc@12200000 {
 
                mmc_1: mmc@12210000 {
                        compatible = "samsung,exynos5420-dw-mshc-smu";
-                       interrupts = <0 76 0>;
+                       interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x12210000 0x2000>;
@@ -227,7 +227,7 @@ mmc_1: mmc@12210000 {
 
                mmc_2: mmc@12220000 {
                        compatible = "samsung,exynos5420-dw-mshc";
-                       interrupts = <0 77 0>;
+                       interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x12220000 0x1000>;
@@ -320,37 +320,37 @@ disp_pd: power-domain@100440C0 {
                pinctrl_0: pinctrl@13400000 {
                        compatible = "samsung,exynos5420-pinctrl";
                        reg = <0x13400000 0x1000>;
-                       interrupts = <0 45 0>;
+                       interrupts = <0 45 IRQ_TYPE_LEVEL_HIGH>;
 
                        wakeup-interrupt-controller {
                                compatible = "samsung,exynos4210-wakeup-eint";
                                interrupt-parent = <&gic>;
-                               interrupts = <0 32 0>;
+                               interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>;
                        };
                };
 
                pinctrl_1: pinctrl@13410000 {
                        compatible = "samsung,exynos5420-pinctrl";
                        reg = <0x13410000 0x1000>;
-                       interrupts = <0 78 0>;
+                       interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_2: pinctrl@14000000 {
                        compatible = "samsung,exynos5420-pinctrl";
                        reg = <0x14000000 0x1000>;
-                       interrupts = <0 46 0>;
+                       interrupts = <0 46 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_3: pinctrl@14010000 {
                        compatible = "samsung,exynos5420-pinctrl";
                        reg = <0x14010000 0x1000>;
-                       interrupts = <0 50 0>;
+                       interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pinctrl_4: pinctrl@03860000 {
                        compatible = "samsung,exynos5420-pinctrl";
                        reg = <0x03860000 0x1000>;
-                       interrupts = <0 47 0>;
+                       interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                amba {
@@ -363,7 +363,7 @@ amba {
                        adma: adma@03880000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x03880000 0x1000>;
-                               interrupts = <0 110 0>;
+                               interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock_audss EXYNOS_ADMA>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -374,7 +374,7 @@ adma: adma@03880000 {
                        pdma0: pdma@121A0000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x121A0000 0x1000>;
-                               interrupts = <0 34 0>;
+                               interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_PDMA0>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -385,7 +385,7 @@ pdma0: pdma@121A0000 {
                        pdma1: pdma@121B0000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x121B0000 0x1000>;
-                               interrupts = <0 35 0>;
+                               interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_PDMA1>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -396,7 +396,7 @@ pdma1: pdma@121B0000 {
                        mdma0: mdma@10800000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x10800000 0x1000>;
-                               interrupts = <0 33 0>;
+                               interrupts = <0 33 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_MDMA0>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -407,7 +407,7 @@ mdma0: mdma@10800000 {
                        mdma1: mdma@11C10000 {
                                compatible = "arm,pl330", "arm,primecell";
                                reg = <0x11C10000 0x1000>;
-                               interrupts = <0 124 0>;
+                               interrupts = <0 124 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clock CLK_MDMA1>;
                                clock-names = "apb_pclk";
                                #dma-cells = <1>;
@@ -479,7 +479,7 @@ i2s2: i2s@12D70000 {
                spi_0: spi@12d20000 {
                        compatible = "samsung,exynos4210-spi";
                        reg = <0x12d20000 0x100>;
-                       interrupts = <0 68 0>;
+                       interrupts = <0 68 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma0 5
                                &pdma0 4>;
                        dma-names = "tx", "rx";
@@ -495,7 +495,7 @@ spi_0: spi@12d20000 {
                spi_1: spi@12d30000 {
                        compatible = "samsung,exynos4210-spi";
                        reg = <0x12d30000 0x100>;
-                       interrupts = <0 69 0>;
+                       interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma1 5
                                &pdma1 4>;
                        dma-names = "tx", "rx";
@@ -511,7 +511,7 @@ spi_1: spi@12d30000 {
                spi_2: spi@12d40000 {
                        compatible = "samsung,exynos4210-spi";
                        reg = <0x12d40000 0x100>;
-                       interrupts = <0 70 0>;
+                       interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
                        dmas = <&pdma0 7
                                &pdma0 6>;
                        dma-names = "tx", "rx";
@@ -539,7 +539,7 @@ mipi_phy: mipi-video-phy {
                dsi@14500000 {
                        compatible = "samsung,exynos5410-mipi-dsi";
                        reg = <0x14500000 0x10000>;
-                       interrupts = <0 82 0>;
+                       interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
                        phys = <&mipi_phy 1>;
                        phy-names = "dsim";
                        clocks = <&clock CLK_DSIM1>, <&clock CLK_SCLK_MIPI1>;
@@ -552,7 +552,7 @@ dsi@14500000 {
                adc: adc@12D10000 {
                        compatible = "samsung,exynos-adc-v2";
                        reg = <0x12D10000 0x100>;
-                       interrupts = <0 106 0>;
+                       interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TSADC>;
                        clock-names = "adc";
                        #io-channel-cells = <1>;
@@ -564,7 +564,7 @@ adc: adc@12D10000 {
                hsi2c_8: i2c@12E00000 {
                        compatible = "samsung,exynos5250-hsi2c";
                        reg = <0x12E00000 0x1000>;
-                       interrupts = <0 87 0>;
+                       interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        pinctrl-names = "default";
@@ -577,7 +577,7 @@ hsi2c_8: i2c@12E00000 {
                hsi2c_9: i2c@12E10000 {
                        compatible = "samsung,exynos5250-hsi2c";
                        reg = <0x12E10000 0x1000>;
-                       interrupts = <0 88 0>;
+                       interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        pinctrl-names = "default";
@@ -590,7 +590,7 @@ hsi2c_9: i2c@12E10000 {
                hsi2c_10: i2c@12E20000 {
                        compatible = "samsung,exynos5250-hsi2c";
                        reg = <0x12E20000 0x1000>;
-                       interrupts = <0 203 0>;
+                       interrupts = <0 203 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        pinctrl-names = "default";
@@ -603,7 +603,7 @@ hsi2c_10: i2c@12E20000 {
                hdmi: hdmi@14530000 {
                        compatible = "samsung,exynos5420-hdmi";
                        reg = <0x14530000 0x70000>;
-                       interrupts = <0 95 0>;
+                       interrupts = <0 95 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
                                 <&clock CLK_DOUT_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
                                 <&clock CLK_MOUT_HDMI>;
@@ -622,7 +622,7 @@ hdmiphy: hdmiphy@145D0000 {
                mixer: mixer@14450000 {
                        compatible = "samsung,exynos5420-mixer";
                        reg = <0x14450000 0x10000>;
-                       interrupts = <0 94 0>;
+                       interrupts = <0 94 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>,
                                 <&clock CLK_SCLK_HDMI>;
                        clock-names = "mixer", "hdmi", "sclk_hdmi";
@@ -633,7 +633,7 @@ mixer: mixer@14450000 {
                rotator: rotator@11C00000 {
                        compatible = "samsung,exynos5250-rotator";
                        reg = <0x11C00000 0x64>;
-                       interrupts = <0 84 0>;
+                       interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_ROTATOR>;
                        clock-names = "rotator";
                        iommus = <&sysmmu_rotator>;
@@ -642,7 +642,7 @@ rotator: rotator@11C00000 {
                gsc_0: video-scaler@13e00000 {
                        compatible = "samsung,exynos5-gsc";
                        reg = <0x13e00000 0x1000>;
-                       interrupts = <0 85 0>;
+                       interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_GSCL0>;
                        clock-names = "gscl";
                        power-domains = <&gsc_pd>;
@@ -652,7 +652,7 @@ gsc_0: video-scaler@13e00000 {
                gsc_1: video-scaler@13e10000 {
                        compatible = "samsung,exynos5-gsc";
                        reg = <0x13e10000 0x1000>;
-                       interrupts = <0 86 0>;
+                       interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_GSCL1>;
                        clock-names = "gscl";
                        power-domains = <&gsc_pd>;
@@ -662,7 +662,7 @@ gsc_1: video-scaler@13e10000 {
                jpeg_0: jpeg@11F50000 {
                        compatible = "samsung,exynos5420-jpeg";
                        reg = <0x11F50000 0x1000>;
-                       interrupts = <0 89 0>;
+                       interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "jpeg";
                        clocks = <&clock CLK_JPEG>;
                        iommus = <&sysmmu_jpeg0>;
@@ -671,7 +671,7 @@ jpeg_0: jpeg@11F50000 {
                jpeg_1: jpeg@11F60000 {
                        compatible = "samsung,exynos5420-jpeg";
                        reg = <0x11F60000 0x1000>;
-                       interrupts = <0 168 0>;
+                       interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "jpeg";
                        clocks = <&clock CLK_JPEG2>;
                        iommus = <&sysmmu_jpeg1>;
@@ -691,7 +691,7 @@ pmu_system_controller: system-controller@10040000 {
                tmu_cpu0: tmu@10060000 {
                        compatible = "samsung,exynos5420-tmu";
                        reg = <0x10060000 0x100>;
-                       interrupts = <0 65 0>;
+                       interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -700,7 +700,7 @@ tmu_cpu0: tmu@10060000 {
                tmu_cpu1: tmu@10064000 {
                        compatible = "samsung,exynos5420-tmu";
                        reg = <0x10064000 0x100>;
-                       interrupts = <0 183 0>;
+                       interrupts = <0 183 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>;
                        clock-names = "tmu_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -709,7 +709,7 @@ tmu_cpu1: tmu@10064000 {
                tmu_cpu2: tmu@10068000 {
                        compatible = "samsung,exynos5420-tmu-ext-triminfo";
                        reg = <0x10068000 0x100>, <0x1006c000 0x4>;
-                       interrupts = <0 184 0>;
+                       interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>, <&clock CLK_TMU>;
                        clock-names = "tmu_apbif", "tmu_triminfo_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -718,7 +718,7 @@ tmu_cpu2: tmu@10068000 {
                tmu_cpu3: tmu@1006c000 {
                        compatible = "samsung,exynos5420-tmu-ext-triminfo";
                        reg = <0x1006c000 0x100>, <0x100a0000 0x4>;
-                       interrupts = <0 185 0>;
+                       interrupts = <0 185 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>;
                        clock-names = "tmu_apbif", "tmu_triminfo_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -727,7 +727,7 @@ tmu_cpu3: tmu@1006c000 {
                tmu_gpu: tmu@100a0000 {
                        compatible = "samsung,exynos5420-tmu-ext-triminfo";
                        reg = <0x100a0000 0x100>, <0x10068000 0x4>;
-                       interrupts = <0 215 0>;
+                       interrupts = <0 215 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>;
                        clock-names = "tmu_apbif", "tmu_triminfo_apbif";
                        #include "exynos4412-tmu-sensor-conf.dtsi"
@@ -799,7 +799,7 @@ sysmmu_scaler0r: sysmmu@0x12880000 {
                sysmmu_scaler1r: sysmmu@0x12890000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x12890000 0x1000>;
-                       interrupts = <0 186 0>;
+                       interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&clock CLK_SMMU_MSCL1>, <&clock CLK_MSCL1>;
                        #iommu-cells = <0>;
@@ -808,7 +808,7 @@ sysmmu_scaler1r: sysmmu@0x12890000 {
                sysmmu_scaler2r: sysmmu@0x128A0000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x128A0000 0x1000>;
-                       interrupts = <0 188 0>;
+                       interrupts = <0 188 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&clock CLK_SMMU_MSCL2>, <&clock CLK_MSCL2>;
                        #iommu-cells = <0>;
@@ -867,7 +867,7 @@ sysmmu_jpeg0: sysmmu@0x11F10000 {
                sysmmu_jpeg1: sysmmu@0x11F20000 {
                        compatible = "samsung,exynos-sysmmu";
                        reg = <0x11F20000 0x1000>;
-                       interrupts = <0 169 0>;
+                       interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
                        clock-names = "sysmmu", "master";
                        clocks = <&clock CLK_SMMU_JPEG2>, <&clock CLK_JPEG2>;
                        #iommu-cells = <0>;
@@ -1445,7 +1445,7 @@ &usbdrd3_1 {
 };
 
 &usbdrd_dwc3_1 {
-       interrupts = <GIC_SPI 73 0>;
+       interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
 };
 
 &usbdrd_phy1 {
index e6bffd13cedd68da96ede7f60e0a933bb2005117..97c9f0e38526adb7594e26331f6e61fd782570bb 100644 (file)
@@ -10,6 +10,8 @@
 */
 
 #include <dt-bindings/clock/exynos5440.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        compatible = "samsung,exynos5440", "samsung,exynos5";
@@ -41,7 +43,8 @@ gic: interrupt-controller@2E0000 {
                        <0x2E2000 0x1000>,
                        <0x2E4000 0x2000>,
                        <0x2E6000 0x2000>;
-               interrupts = <1 9 0xf04>;
+               interrupts = <GIC_PPI 9
+                               (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
        };
 
        cpus {
@@ -72,26 +75,26 @@ cpu@3 {
 
        arm-pmu {
                compatible = "arm,cortex-a15-pmu", "arm,cortex-a9-pmu";
-               interrupts = <0 52 4>,
-                            <0 53 4>,
-                            <0 54 4>,
-                            <0 55 4>;
+               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        timer {
                compatible = "arm,cortex-a15-timer",
                             "arm,armv7-timer";
-               interrupts = <1 13 0xf08>,
-                            <1 14 0xf08>,
-                            <1 11 0xf08>,
-                            <1 10 0xf08>;
+               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)>;
                clock-frequency = <50000000>;
        };
 
        cpufreq@160000 {
                compatible = "samsung,exynos5440-cpufreq";
                reg = <0x160000 0x1000>;
-               interrupts = <0 57 0>;
+               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
                operating-points = <
                                /* KHz    uV */
                                1500000 1100000
@@ -108,7 +111,7 @@ cpufreq@160000 {
        serial_0: serial@B0000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0xB0000 0x1000>;
-               interrupts = <0 2 0>;
+               interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_B_125>, <&clock CLK_B_125>;
                clock-names = "uart", "clk_uart_baud0";
        };
@@ -116,7 +119,7 @@ serial_0: serial@B0000 {
        serial_1: serial@C0000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0xC0000 0x1000>;
-               interrupts = <0 3 0>;
+               interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_B_125>, <&clock CLK_B_125>;
                clock-names = "uart", "clk_uart_baud0";
        };
@@ -124,7 +127,7 @@ serial_1: serial@C0000 {
        spi_0: spi@D0000 {
                compatible = "samsung,exynos5440-spi";
                reg = <0xD0000 0x100>;
-               interrupts = <0 4 0>;
+               interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                #size-cells = <0>;
                samsung,spi-src-clk = <0>;
@@ -136,8 +139,14 @@ spi_0: spi@D0000 {
        pin_ctrl: pinctrl@E0000 {
                compatible = "samsung,exynos5440-pinctrl";
                reg = <0xE0000 0x1000>;
-               interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>,
-                            <0 41 0>, <0 42 0>, <0 43 0>, <0 44 0>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+                            <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>,
+                            <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
                interrupt-controller;
                #interrupt-cells = <2>;
                #gpio-cells = <2>;
@@ -162,7 +171,7 @@ uart1: uart1 {
        i2c@F0000 {
                compatible = "samsung,exynos5440-i2c";
                reg = <0xF0000 0x1000>;
-               interrupts = <0 5 0>;
+               interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                #size-cells = <0>;
                clocks = <&clock CLK_B_125>;
@@ -172,7 +181,7 @@ i2c@F0000 {
        i2c@100000 {
                compatible = "samsung,exynos5440-i2c";
                reg = <0x100000 0x1000>;
-               interrupts = <0 6 0>;
+               interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                #size-cells = <0>;
                clocks = <&clock CLK_B_125>;
@@ -182,7 +191,7 @@ i2c@100000 {
        watchdog@110000 {
                compatible = "samsung,s3c2410-wdt";
                reg = <0x110000 0x1000>;
-               interrupts = <0 1 0>;
+               interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_B_125>;
                clock-names = "watchdog";
        };
@@ -191,7 +200,7 @@ gmac: ethernet@00230000 {
                compatible = "snps,dwmac-3.70a";
                reg = <0x00230000 0x8000>;
                interrupt-parent = <&gic>;
-               interrupts = <0 31 4>;
+               interrupts = <GIC_SPI 31 4>;
                interrupt-names = "macirq";
                phy-mode = "sgmii";
                clocks = <&clock CLK_GMAC0>;
@@ -209,7 +218,8 @@ amba {
        rtc@130000 {
                compatible = "samsung,s3c6410-rtc";
                reg = <0x130000 0x1000>;
-               interrupts = <0 17 0>, <0 16 0>;
+               interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_B_125>;
                clock-names = "rtc";
        };
@@ -217,7 +227,7 @@ rtc@130000 {
        tmuctrl_0: tmuctrl@160118 {
                compatible = "samsung,exynos5440-tmu";
                reg = <0x160118 0x230>, <0x160368 0x10>;
-               interrupts = <0 58 0>;
+               interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_B_125>;
                clock-names = "tmu_apbif";
                #include "exynos5440-tmu-sensor-conf.dtsi"
@@ -226,7 +236,7 @@ tmuctrl_0: tmuctrl@160118 {
        tmuctrl_1: tmuctrl@16011C {
                compatible = "samsung,exynos5440-tmu";
                reg = <0x16011C 0x230>, <0x160368 0x10>;
-               interrupts = <0 58 0>;
+               interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_B_125>;
                clock-names = "tmu_apbif";
                #include "exynos5440-tmu-sensor-conf.dtsi"
@@ -235,7 +245,7 @@ tmuctrl_1: tmuctrl@16011C {
        tmuctrl_2: tmuctrl@160120 {
                compatible = "samsung,exynos5440-tmu";
                reg = <0x160120 0x230>, <0x160368 0x10>;
-               interrupts = <0 58 0>;
+               interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_B_125>;
                clock-names = "tmu_apbif";
                #include "exynos5440-tmu-sensor-conf.dtsi"
@@ -259,7 +269,7 @@ cpu2_thermal: cpu2-thermal {
        sata@210000 {
                compatible = "snps,exynos5440-ahci";
                reg = <0x210000 0x10000>;
-               interrupts = <0 30 0>;
+               interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_SATA>;
                clock-names = "sata";
        };
@@ -267,7 +277,7 @@ sata@210000 {
        ohci@220000 {
                compatible = "samsung,exynos5440-ohci";
                reg = <0x220000 0x1000>;
-               interrupts = <0 29 0>;
+               interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_USB>;
                clock-names = "usbhost";
        };
@@ -275,7 +285,7 @@ ohci@220000 {
        ehci@221000 {
                compatible = "samsung,exynos5440-ehci";
                reg = <0x221000 0x1000>;
-               interrupts = <0 29 0>;
+               interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_USB>;
                clock-names = "usbhost";
        };
@@ -285,7 +295,9 @@ pcie_0: pcie@290000 {
                reg = <0x290000 0x1000
                        0x270000 0x1000
                        0x271000 0x40>;
-               interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
+               interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_PR0_250_O>, <&clock CLK_PB0_250_O>;
                clock-names = "pcie", "pcie_bus";
                #address-cells = <3>;
@@ -306,7 +318,9 @@ pcie_1: pcie@2a0000 {
                reg = <0x2a0000 0x1000
                        0x272000 0x1000
                        0x271040 0x40>;
-               interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
+               interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_PR1_250_O>, <&clock CLK_PB0_250_O>;
                clock-names = "pcie", "pcie_bus";
                #address-cells = <3>;
index 9d31cdce195918fb21ee3ff37531a53b8e60ff93..0389e8a10d0bd353744e176360c4485fffdcd759 100644 (file)
@@ -62,34 +62,34 @@ mct_map: mct-map {
                                                <1 &combiner 23 4>,
                                                <2 &combiner 25 2>,
                                                <3 &combiner 25 3>,
-                                               <4 &gic 0 120 0>,
-                                               <5 &gic 0 121 0>,
-                                               <6 &gic 0 122 0>,
-                                               <7 &gic 0 123 0>,
-                                               <8 &gic 0 128 0>,
-                                               <9 &gic 0 129 0>,
-                                               <10 &gic 0 130 0>,
-                                               <11 &gic 0 131 0>;
+                                               <4 &gic 0 120 IRQ_TYPE_LEVEL_HIGH>,
+                                               <5 &gic 0 121 IRQ_TYPE_LEVEL_HIGH>,
+                                               <6 &gic 0 122 IRQ_TYPE_LEVEL_HIGH>,
+                                               <7 &gic 0 123 IRQ_TYPE_LEVEL_HIGH>,
+                                               <8 &gic 0 128 IRQ_TYPE_LEVEL_HIGH>,
+                                               <9 &gic 0 129 IRQ_TYPE_LEVEL_HIGH>,
+                                               <10 &gic 0 130 IRQ_TYPE_LEVEL_HIGH>,
+                                               <11 &gic 0 131 IRQ_TYPE_LEVEL_HIGH>;
                        };
                };
 
                watchdog: watchdog@101d0000 {
                        compatible = "samsung,exynos5420-wdt";
                        reg = <0x101d0000 0x100>;
-                       interrupts = <0 42 0>;
+                       interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                sss: sss@10830000 {
                        compatible = "samsung,exynos4210-secss";
                        reg = <0x10830000 0x300>;
-                       interrupts = <0 112 0>;
+                       interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                /* i2c_0-3 are defined in exynos5.dtsi */
                hsi2c_4: i2c@12ca0000 {
                        compatible = "samsung,exynos5250-hsi2c";
                        reg = <0x12ca0000 0x1000>;
-                       interrupts = <0 60 0>;
+                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
@@ -98,7 +98,7 @@ hsi2c_4: i2c@12ca0000 {
                hsi2c_5: i2c@12cb0000 {
                        compatible = "samsung,exynos5250-hsi2c";
                        reg = <0x12cb0000 0x1000>;
-                       interrupts = <0 61 0>;
+                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
@@ -107,7 +107,7 @@ hsi2c_5: i2c@12cb0000 {
                hsi2c_6: i2c@12cc0000 {
                        compatible = "samsung,exynos5250-hsi2c";
                        reg = <0x12cc0000 0x1000>;
-                       interrupts = <0 62 0>;
+                       interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
@@ -116,7 +116,7 @@ hsi2c_6: i2c@12cc0000 {
                hsi2c_7: i2c@12cd0000 {
                        compatible = "samsung,exynos5250-hsi2c";
                        reg = <0x12cd0000 0x1000>;
-                       interrupts = <0 63 0>;
+                       interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
@@ -131,7 +131,7 @@ usbdrd3_0: usb3-0 {
                        usbdrd_dwc3_0: dwc3@12000000 {
                                compatible = "snps,dwc3";
                                reg = <0x12000000 0x10000>;
-                               interrupts = <0 72 0>;
+                               interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
                                phys = <&usbdrd_phy0 0>, <&usbdrd_phy0 1>;
                                phy-names = "usb2-phy", "usb3-phy";
                        };
@@ -166,7 +166,7 @@ usbdrd_phy1: phy@12500000 {
                usbhost2: usb@12110000 {
                        compatible = "samsung,exynos4210-ehci";
                        reg = <0x12110000 0x100>;
-                       interrupts = <0 71 0>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
@@ -179,7 +179,7 @@ port@0 {
                usbhost1: usb@12120000 {
                        compatible = "samsung,exynos4210-ohci";
                        reg = <0x12120000 0x100>;
-                       interrupts = <0 71 0>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
index 01f466816fea714f1056c041965205dead9db615..f9ff7f07ae0c4c171a96fb75c6cc13725e06da74 100644 (file)
@@ -665,6 +665,7 @@ &i2s0 {
        status = "okay";
 };
 
+/* eMMC flash */
 &mmc_0 {
        status = "okay";
        num-slots = <1>;
@@ -683,6 +684,7 @@ &mmc_0 {
        bus-width = <8>;
 };
 
+/* WiFi SDIO module */
 &mmc_1 {
        status = "okay";
        num-slots = <1>;
@@ -702,6 +704,7 @@ &mmc_1 {
        vqmmc-supply = <&buck10_reg>;
 };
 
+/* uSD card */
 &mmc_2 {
        status = "okay";
        num-slots = <1>;
index c85d07e6db6121c39870b3bb5f07f58700975901..541d70094544437c39fef7d23fb9bd21acc03af2 100644 (file)
  * publishhed by the Free Software Foundation.
  */
 
-#include "skeleton.dtsi"
 #include <dt-bindings/clock/hi3620-clock.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                serial0 = &uart0;
                serial1 = &uart1;
@@ -537,6 +539,7 @@ pmx0: pinmux@803000 {
                        reg = <0x803000 0x188>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       #pinctrl-cells = <1>;
                        #gpio-range-cells = <3>;
                        ranges;
 
@@ -558,6 +561,7 @@ pmx1: pinmux@803800 {
                        reg = <0x803800 0x2dc>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       #pinctrl-cells = <1>;
                        ranges;
 
                        pinctrl-single,register-width = <32>;
index 4e9562f806a2162cff8671003fe85559e8dc67a5..9d5fd5cfefa668d068adfd13ea720bc7267e4844 100644 (file)
@@ -11,8 +11,6 @@
  * published by the Free Software Foundation.
  */
 
-#include "skeleton.dtsi"
-
 / {
        interrupt-parent = <&gic>;
        #address-cells = <1>;
index fdcc23d203e5d3f5d331b41a08f5d06b19fb6759..506fdc10706d87b5a5e2a13e71325cdaadff3206 100644 (file)
@@ -7,10 +7,12 @@
  * publishhed by the Free Software Foundation.
  */
 
-#include "skeleton.dtsi"
 #include <dt-bindings/clock/hix5hd2-clock.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                serial0 = &uart0;
        };
index 22f5d1db5b318deae33d114304011a93760acc3d..b792eee3899b25e7a7a206d16f5737f5fd631a9d 100644 (file)
@@ -9,7 +9,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
 #include "imx1-pinfunc.h"
 
 #include <dt-bindings/clock/imx1-clock.h>
@@ -17,6 +16,9 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                gpio0 = &gpio1;
                gpio1 = &gpio2;
index 440ee9a4a158dd777defb38274ead1ecaf69241b..ac2a9da62b6ce81e4130c44185300ac95c31b2ca 100644 (file)
@@ -9,10 +9,12 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
 #include "imx23-pinfunc.h"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        interrupt-parent = <&icoll>;
 
        aliases {
@@ -464,7 +466,7 @@ tvenc@80038000 {
                                reg = <0x80038000 0x2000>;
                                status = "disabled";
                        };
-                };
+               };
 
                apbx@80040000 {
                        compatible = "simple-bus";
index af6af8741fe57098680c6fdd94494bd95ac76534..831d09a28155c5caa0b26ee6be42c20986067536 100644 (file)
@@ -9,10 +9,12 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
 #include "imx25-pinfunc.h"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                gpio0 = &gpio1;
index f818ea483aeb57ee804e34d07e4b8383fae2eb63..9d8b5969ee3b0d9455afee96c666e77cae1cc713 100644 (file)
@@ -9,7 +9,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
 #include "imx27-pinfunc.h"
 
 #include <dt-bindings/clock/imx27-clock.h>
@@ -18,6 +17,9 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                gpio0 = &gpio1;
index 214bb1506b532998169c6507e8f6db0b29211cda..a69856e41ba4ca2b8c7acc2bd8749a4046715788 100644 (file)
@@ -12,8 +12,8 @@
 #include "imx28.dtsi"
 
 / {
-       model = "DENX M28";
-       compatible = "denx,m28", "fsl,imx28";
+       model = "Aries/DENX M28";
+       compatible = "aries,m28", "denx,m28", "fsl,imx28";
 
        memory {
                reg = <0x40000000 0x08000000>;
index 8d04e57039bcfcc1126c03db9e9dab588682ae8b..dbfb8aab505f76e986e301aab30632b7df43a20a 100644 (file)
@@ -13,8 +13,8 @@
 #include "imx28-m28.dtsi"
 
 / {
-       model = "DENX M28EVK";
-       compatible = "denx,m28evk", "fsl,imx28";
+       model = "Aries/DENX M28EVK";
+       compatible = "aries,m28evk", "denx,m28evk", "fsl,imx28";
 
        apb@80000000 {
                apbh@80000000 {
index 0ad893bf5f431c545199a04dafb4d894940ea0c3..3aabf65a6a5224f5681d6ba189087a550824e964 100644 (file)
  */
 
 #include <dt-bindings/gpio/gpio.h>
-#include "skeleton.dtsi"
 #include "imx28-pinfunc.h"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        interrupt-parent = <&icoll>;
 
        aliases {
index 1ce7ae94e7ad26a3d1e89bbc5804bab6e3a5f71c..c534c1fd185ae2f6f31d1f1755828b6fb55264be 100644 (file)
@@ -9,9 +9,10 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
-
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                serial0 = &uart1;
                serial1 = &uart2;
index f812d586c5ce7f09659ec67e90da77c96a77e6be..9f40e6229189f3c6cb72c99bc11c351598e7f0e3 100644 (file)
@@ -8,10 +8,12 @@
  * Free Software Foundation.
  */
 
-#include "skeleton.dtsi"
 #include "imx35-pinfunc.h"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                gpio0 = &gpio1;
index 8fe8beeb68a4baf42cc0d02c6b030fbb04d85328..fe0221e4cbf7b108f81c2695507a9450653b53f8 100644 (file)
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
 #include "imx50-pinfunc.h"
 #include <dt-bindings/clock/imx5-clock.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                gpio0 = &gpio1;
@@ -103,8 +105,8 @@ esdhc1: esdhc@50004000 {
                                        reg = <0x50004000 0x4000>;
                                        interrupts = <1>;
                                        clocks = <&clks IMX5_CLK_ESDHC1_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC1_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC1_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -115,8 +117,8 @@ esdhc2: esdhc@50008000 {
                                        reg = <0x50008000 0x4000>;
                                        interrupts = <2>;
                                        clocks = <&clks IMX5_CLK_ESDHC2_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC2_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC2_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -127,7 +129,7 @@ uart3: serial@5000c000 {
                                        reg = <0x5000c000 0x4000>;
                                        interrupts = <33>;
                                        clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
-                                                <&clks IMX5_CLK_UART3_PER_GATE>;
+                                                <&clks IMX5_CLK_UART3_PER_GATE>;
                                        clock-names = "ipg", "per";
                                        status = "disabled";
                                };
@@ -139,7 +141,7 @@ ecspi1: ecspi@50010000 {
                                        reg = <0x50010000 0x4000>;
                                        interrupts = <36>;
                                        clocks = <&clks IMX5_CLK_ECSPI1_IPG_GATE>,
-                                                <&clks IMX5_CLK_ECSPI1_PER_GATE>;
+                                                <&clks IMX5_CLK_ECSPI1_PER_GATE>;
                                        clock-names = "ipg", "per";
                                        status = "disabled";
                                };
@@ -164,8 +166,8 @@ esdhc3: esdhc@50020000 {
                                        reg = <0x50020000 0x4000>;
                                        interrupts = <3>;
                                        clocks = <&clks IMX5_CLK_ESDHC3_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC3_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC3_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -176,8 +178,8 @@ esdhc4: esdhc@50024000 {
                                        reg = <0x50024000 0x4000>;
                                        interrupts = <4>;
                                        clocks = <&clks IMX5_CLK_ESDHC4_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC4_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC4_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -279,7 +281,7 @@ gpt: timer@53fa0000 {
                                reg = <0x53fa0000 0x4000>;
                                interrupts = <39>;
                                clocks = <&clks IMX5_CLK_GPT_IPG_GATE>,
-                                        <&clks IMX5_CLK_GPT_HF_GATE>;
+                                        <&clks IMX5_CLK_GPT_HF_GATE>;
                                clock-names = "ipg", "per";
                        };
 
@@ -298,7 +300,7 @@ pwm1: pwm@53fb4000 {
                                compatible = "fsl,imx50-pwm", "fsl,imx27-pwm";
                                reg = <0x53fb4000 0x4000>;
                                clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
-                                        <&clks IMX5_CLK_PWM1_HF_GATE>;
+                                        <&clks IMX5_CLK_PWM1_HF_GATE>;
                                clock-names = "ipg", "per";
                                interrupts = <61>;
                        };
@@ -308,7 +310,7 @@ pwm2: pwm@53fb8000 {
                                compatible = "fsl,imx50-pwm", "fsl,imx27-pwm";
                                reg = <0x53fb8000 0x4000>;
                                clocks = <&clks IMX5_CLK_PWM2_IPG_GATE>,
-                                        <&clks IMX5_CLK_PWM2_HF_GATE>;
+                                        <&clks IMX5_CLK_PWM2_HF_GATE>;
                                clock-names = "ipg", "per";
                                interrupts = <94>;
                        };
@@ -318,7 +320,7 @@ uart1: serial@53fbc000 {
                                reg = <0x53fbc000 0x4000>;
                                interrupts = <31>;
                                clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART1_PER_GATE>;
+                                        <&clks IMX5_CLK_UART1_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -328,7 +330,7 @@ uart2: serial@53fc0000 {
                                reg = <0x53fc0000 0x4000>;
                                interrupts = <32>;
                                clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART2_PER_GATE>;
+                                        <&clks IMX5_CLK_UART2_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -383,7 +385,7 @@ uart4: serial@53ff0000 {
                                reg = <0x53ff0000 0x4000>;
                                interrupts = <13>;
                                clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART4_PER_GATE>;
+                                        <&clks IMX5_CLK_UART4_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -401,7 +403,7 @@ uart5: serial@63f90000 {
                                reg = <0x63f90000 0x4000>;
                                interrupts = <86>;
                                clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART5_PER_GATE>;
+                                        <&clks IMX5_CLK_UART5_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -420,7 +422,7 @@ ecspi2: ecspi@63fac000 {
                                reg = <0x63fac000 0x4000>;
                                interrupts = <37>;
                                clocks = <&clks IMX5_CLK_ECSPI2_IPG_GATE>,
-                                        <&clks IMX5_CLK_ECSPI2_PER_GATE>;
+                                        <&clks IMX5_CLK_ECSPI2_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -430,7 +432,7 @@ sdma: sdma@63fb0000 {
                                reg = <0x63fb0000 0x4000>;
                                interrupts = <6>;
                                clocks = <&clks IMX5_CLK_SDMA_GATE>,
-                                        <&clks IMX5_CLK_SDMA_GATE>;
+                                        <&clks IMX5_CLK_SDMA_GATE>;
                                clock-names = "ipg", "ahb";
                                fsl,sdma-ram-script-name = "imx/sdma/sdma-imx50.bin";
                        };
@@ -442,7 +444,7 @@ cspi: cspi@63fc0000 {
                                reg = <0x63fc0000 0x4000>;
                                interrupts = <38>;
                                clocks = <&clks IMX5_CLK_CSPI_IPG_GATE>,
-                                        <&clks IMX5_CLK_CSPI_IPG_GATE>;
+                                        <&clks IMX5_CLK_CSPI_IPG_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -492,8 +494,8 @@ fec: ethernet@63fec000 {
                                reg = <0x63fec000 0x4000>;
                                interrupts = <87>;
                                clocks = <&clks IMX5_CLK_FEC_GATE>,
-                                        <&clks IMX5_CLK_FEC_GATE>,
-                                        <&clks IMX5_CLK_FEC_GATE>;
+                                        <&clks IMX5_CLK_FEC_GATE>,
+                                        <&clks IMX5_CLK_FEC_GATE>;
                                clock-names = "ipg", "ahb", "ptp";
                                status = "disabled";
                        };
index f46fe9bf0bcb37a903d7ee05d67cc3289516acac..33526cade73582766f68972301d349c72fccb9a6 100644 (file)
@@ -10,7 +10,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
 #include "imx51-pinfunc.h"
 #include <dt-bindings/clock/imx5-clock.h>
 #include <dt-bindings/gpio/gpio.h>
@@ -18,6 +17,9 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                gpio0 = &gpio1;
@@ -130,8 +132,8 @@ ipu: ipu@40000000 {
                        reg = <0x40000000 0x20000000>;
                        interrupts = <11 10>;
                        clocks = <&clks IMX5_CLK_IPU_GATE>,
-                                <&clks IMX5_CLK_IPU_DI0_GATE>,
-                                <&clks IMX5_CLK_IPU_DI1_GATE>;
+                                <&clks IMX5_CLK_IPU_DI0_GATE>,
+                                <&clks IMX5_CLK_IPU_DI1_GATE>;
                        clock-names = "bus", "di0", "di1";
                        resets = <&src 2>;
 
@@ -169,8 +171,8 @@ esdhc1: esdhc@70004000 {
                                        reg = <0x70004000 0x4000>;
                                        interrupts = <1>;
                                        clocks = <&clks IMX5_CLK_ESDHC1_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC1_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC1_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        status = "disabled";
                                };
@@ -180,8 +182,8 @@ esdhc2: esdhc@70008000 {
                                        reg = <0x70008000 0x4000>;
                                        interrupts = <2>;
                                        clocks = <&clks IMX5_CLK_ESDHC2_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC2_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC2_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -192,7 +194,7 @@ uart3: serial@7000c000 {
                                        reg = <0x7000c000 0x4000>;
                                        interrupts = <33>;
                                        clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
-                                                <&clks IMX5_CLK_UART3_PER_GATE>;
+                                                <&clks IMX5_CLK_UART3_PER_GATE>;
                                        clock-names = "ipg", "per";
                                        status = "disabled";
                                };
@@ -204,7 +206,7 @@ ecspi1: ecspi@70010000 {
                                        reg = <0x70010000 0x4000>;
                                        interrupts = <36>;
                                        clocks = <&clks IMX5_CLK_ECSPI1_IPG_GATE>,
-                                                <&clks IMX5_CLK_ECSPI1_PER_GATE>;
+                                                <&clks IMX5_CLK_ECSPI1_PER_GATE>;
                                        clock-names = "ipg", "per";
                                        status = "disabled";
                                };
@@ -229,8 +231,8 @@ esdhc3: esdhc@70020000 {
                                        reg = <0x70020000 0x4000>;
                                        interrupts = <3>;
                                        clocks = <&clks IMX5_CLK_ESDHC3_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC3_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC3_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -241,8 +243,8 @@ esdhc4: esdhc@70024000 {
                                        reg = <0x70024000 0x4000>;
                                        interrupts = <4>;
                                        clocks = <&clks IMX5_CLK_ESDHC4_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC4_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC4_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -364,7 +366,7 @@ gpt: timer@73fa0000 {
                                reg = <0x73fa0000 0x4000>;
                                interrupts = <39>;
                                clocks = <&clks IMX5_CLK_GPT_IPG_GATE>,
-                                        <&clks IMX5_CLK_GPT_HF_GATE>;
+                                        <&clks IMX5_CLK_GPT_HF_GATE>;
                                clock-names = "ipg", "per";
                        };
 
@@ -378,7 +380,7 @@ pwm1: pwm@73fb4000 {
                                compatible = "fsl,imx51-pwm", "fsl,imx27-pwm";
                                reg = <0x73fb4000 0x4000>;
                                clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
-                                        <&clks IMX5_CLK_PWM1_HF_GATE>;
+                                        <&clks IMX5_CLK_PWM1_HF_GATE>;
                                clock-names = "ipg", "per";
                                interrupts = <61>;
                        };
@@ -388,7 +390,7 @@ pwm2: pwm@73fb8000 {
                                compatible = "fsl,imx51-pwm", "fsl,imx27-pwm";
                                reg = <0x73fb8000 0x4000>;
                                clocks = <&clks IMX5_CLK_PWM2_IPG_GATE>,
-                                        <&clks IMX5_CLK_PWM2_HF_GATE>;
+                                        <&clks IMX5_CLK_PWM2_HF_GATE>;
                                clock-names = "ipg", "per";
                                interrupts = <94>;
                        };
@@ -398,7 +400,7 @@ uart1: serial@73fbc000 {
                                reg = <0x73fbc000 0x4000>;
                                interrupts = <31>;
                                clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART1_PER_GATE>;
+                                        <&clks IMX5_CLK_UART1_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -408,7 +410,7 @@ uart2: serial@73fc0000 {
                                reg = <0x73fc0000 0x4000>;
                                interrupts = <32>;
                                clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART2_PER_GATE>;
+                                        <&clks IMX5_CLK_UART2_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -456,7 +458,7 @@ ecspi2: ecspi@83fac000 {
                                reg = <0x83fac000 0x4000>;
                                interrupts = <37>;
                                clocks = <&clks IMX5_CLK_ECSPI2_IPG_GATE>,
-                                        <&clks IMX5_CLK_ECSPI2_PER_GATE>;
+                                        <&clks IMX5_CLK_ECSPI2_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -466,7 +468,7 @@ sdma: sdma@83fb0000 {
                                reg = <0x83fb0000 0x4000>;
                                interrupts = <6>;
                                clocks = <&clks IMX5_CLK_SDMA_GATE>,
-                                        <&clks IMX5_CLK_SDMA_GATE>;
+                                        <&clks IMX5_CLK_SDMA_GATE>;
                                clock-names = "ipg", "ahb";
                                #dma-cells = <3>;
                                fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin";
@@ -479,7 +481,7 @@ cspi: cspi@83fc0000 {
                                reg = <0x83fc0000 0x4000>;
                                interrupts = <38>;
                                clocks = <&clks IMX5_CLK_CSPI_IPG_GATE>,
-                                        <&clks IMX5_CLK_CSPI_IPG_GATE>;
+                                        <&clks IMX5_CLK_CSPI_IPG_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -582,8 +584,8 @@ fec: ethernet@83fec000 {
                                reg = <0x83fec000 0x4000>;
                                interrupts = <87>;
                                clocks = <&clks IMX5_CLK_FEC_GATE>,
-                                        <&clks IMX5_CLK_FEC_GATE>,
-                                        <&clks IMX5_CLK_FEC_GATE>;
+                                        <&clks IMX5_CLK_FEC_GATE>,
+                                        <&clks IMX5_CLK_FEC_GATE>;
                                clock-names = "ipg", "ahb", "ptp";
                                status = "disabled";
                        };
index d259f57bfd98a2955167689c8ed283689677e06f..ec390aa562c3313c09c77c222ad631edcfacf0c4 100644 (file)
@@ -12,8 +12,8 @@
 #include "imx53.dtsi"
 
 / {
-       model = "DENX M53";
-       compatible = "denx,imx53-m53", "fsl,imx53";
+       model = "Aries/DENX M53";
+       compatible = "aries,imx53-m53", "denx,imx53-m53", "fsl,imx53";
 
        memory {
                reg = <0x70000000 0x20000000>,
index dcee1e0f968fced3944ee2b6693bf22c61449ec0..4347a321c78216087e0cfbf79563af73dc3b7577 100644 (file)
@@ -13,8 +13,8 @@
 #include "imx53-m53.dtsi"
 
 / {
-       model = "DENX M53EVK";
-       compatible = "denx,imx53-m53evk", "fsl,imx53";
+       model = "Aries/DENX M53EVK";
+       compatible = "aries,imx53-m53evk", "denx,imx53-m53evk", "fsl,imx53";
 
        display1: display@di1 {
                compatible = "fsl,imx-parallel-display";
index 0777b41cdfe89d17299ffe42d504a3d0eda4fa7d..ca51dc03e327b3f89b3836ea8ba41d55359af58e 100644 (file)
@@ -10,7 +10,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-#include "skeleton.dtsi"
 #include "imx53-pinfunc.h"
 #include <dt-bindings/clock/imx5-clock.h>
 #include <dt-bindings/gpio/gpio.h>
@@ -18,6 +17,9 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                gpio0 = &gpio1;
@@ -131,8 +133,8 @@ ipu: ipu@18000000 {
                        reg = <0x18000000 0x08000000>;
                        interrupts = <11 10>;
                        clocks = <&clks IMX5_CLK_IPU_GATE>,
-                                <&clks IMX5_CLK_IPU_DI0_GATE>,
-                                <&clks IMX5_CLK_IPU_DI1_GATE>;
+                                <&clks IMX5_CLK_IPU_DI0_GATE>,
+                                <&clks IMX5_CLK_IPU_DI1_GATE>;
                        clock-names = "bus", "di0", "di1";
                        resets = <&src 2>;
 
@@ -199,8 +201,8 @@ esdhc1: esdhc@50004000 {
                                        reg = <0x50004000 0x4000>;
                                        interrupts = <1>;
                                        clocks = <&clks IMX5_CLK_ESDHC1_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC1_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC1_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -211,8 +213,8 @@ esdhc2: esdhc@50008000 {
                                        reg = <0x50008000 0x4000>;
                                        interrupts = <2>;
                                        clocks = <&clks IMX5_CLK_ESDHC2_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC2_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC2_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -223,7 +225,7 @@ uart3: serial@5000c000 {
                                        reg = <0x5000c000 0x4000>;
                                        interrupts = <33>;
                                        clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
-                                                <&clks IMX5_CLK_UART3_PER_GATE>;
+                                                <&clks IMX5_CLK_UART3_PER_GATE>;
                                        clock-names = "ipg", "per";
                                        dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
                                        dma-names = "rx", "tx";
@@ -237,7 +239,7 @@ ecspi1: ecspi@50010000 {
                                        reg = <0x50010000 0x4000>;
                                        interrupts = <36>;
                                        clocks = <&clks IMX5_CLK_ECSPI1_IPG_GATE>,
-                                                <&clks IMX5_CLK_ECSPI1_PER_GATE>;
+                                                <&clks IMX5_CLK_ECSPI1_PER_GATE>;
                                        clock-names = "ipg", "per";
                                        status = "disabled";
                                };
@@ -264,8 +266,8 @@ esdhc3: esdhc@50020000 {
                                        reg = <0x50020000 0x4000>;
                                        interrupts = <3>;
                                        clocks = <&clks IMX5_CLK_ESDHC3_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC3_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC3_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -276,8 +278,8 @@ esdhc4: esdhc@50024000 {
                                        reg = <0x50024000 0x4000>;
                                        interrupts = <4>;
                                        clocks = <&clks IMX5_CLK_ESDHC4_IPG_GATE>,
-                                                <&clks IMX5_CLK_DUMMY>,
-                                                <&clks IMX5_CLK_ESDHC4_PER_GATE>;
+                                                <&clks IMX5_CLK_DUMMY>,
+                                                <&clks IMX5_CLK_ESDHC4_PER_GATE>;
                                        clock-names = "ipg", "ahb", "per";
                                        bus-width = <4>;
                                        status = "disabled";
@@ -419,7 +421,7 @@ gpt: timer@53fa0000 {
                                reg = <0x53fa0000 0x4000>;
                                interrupts = <39>;
                                clocks = <&clks IMX5_CLK_GPT_IPG_GATE>,
-                                        <&clks IMX5_CLK_GPT_HF_GATE>;
+                                        <&clks IMX5_CLK_GPT_HF_GATE>;
                                clock-names = "ipg", "per";
                        };
 
@@ -440,11 +442,11 @@ ldb: ldb@53fa8008 {
                                reg = <0x53fa8008 0x4>;
                                gpr = <&gpr>;
                                clocks = <&clks IMX5_CLK_LDB_DI0_SEL>,
-                                        <&clks IMX5_CLK_LDB_DI1_SEL>,
-                                        <&clks IMX5_CLK_IPU_DI0_SEL>,
-                                        <&clks IMX5_CLK_IPU_DI1_SEL>,
-                                        <&clks IMX5_CLK_LDB_DI0_GATE>,
-                                        <&clks IMX5_CLK_LDB_DI1_GATE>;
+                                        <&clks IMX5_CLK_LDB_DI1_SEL>,
+                                        <&clks IMX5_CLK_IPU_DI0_SEL>,
+                                        <&clks IMX5_CLK_IPU_DI1_SEL>,
+                                        <&clks IMX5_CLK_LDB_DI0_GATE>,
+                                        <&clks IMX5_CLK_LDB_DI1_GATE>;
                                clock-names = "di0_pll", "di1_pll",
                                              "di0_sel", "di1_sel",
                                              "di0", "di1";
@@ -486,7 +488,7 @@ pwm1: pwm@53fb4000 {
                                compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
                                reg = <0x53fb4000 0x4000>;
                                clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
-                                        <&clks IMX5_CLK_PWM1_HF_GATE>;
+                                        <&clks IMX5_CLK_PWM1_HF_GATE>;
                                clock-names = "ipg", "per";
                                interrupts = <61>;
                        };
@@ -496,7 +498,7 @@ pwm2: pwm@53fb8000 {
                                compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
                                reg = <0x53fb8000 0x4000>;
                                clocks = <&clks IMX5_CLK_PWM2_IPG_GATE>,
-                                        <&clks IMX5_CLK_PWM2_HF_GATE>;
+                                        <&clks IMX5_CLK_PWM2_HF_GATE>;
                                clock-names = "ipg", "per";
                                interrupts = <94>;
                        };
@@ -506,7 +508,7 @@ uart1: serial@53fbc000 {
                                reg = <0x53fbc000 0x4000>;
                                interrupts = <31>;
                                clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART1_PER_GATE>;
+                                        <&clks IMX5_CLK_UART1_PER_GATE>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
                                dma-names = "rx", "tx";
@@ -518,7 +520,7 @@ uart2: serial@53fc0000 {
                                reg = <0x53fc0000 0x4000>;
                                interrupts = <32>;
                                clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART2_PER_GATE>;
+                                        <&clks IMX5_CLK_UART2_PER_GATE>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
                                dma-names = "rx", "tx";
@@ -530,7 +532,7 @@ can1: can@53fc8000 {
                                reg = <0x53fc8000 0x4000>;
                                interrupts = <82>;
                                clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>,
-                                        <&clks IMX5_CLK_CAN1_SERIAL_GATE>;
+                                        <&clks IMX5_CLK_CAN1_SERIAL_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -540,7 +542,7 @@ can2: can@53fcc000 {
                                reg = <0x53fcc000 0x4000>;
                                interrupts = <83>;
                                clocks = <&clks IMX5_CLK_CAN2_IPG_GATE>,
-                                        <&clks IMX5_CLK_CAN2_SERIAL_GATE>;
+                                        <&clks IMX5_CLK_CAN2_SERIAL_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -603,7 +605,7 @@ uart4: serial@53ff0000 {
                                reg = <0x53ff0000 0x4000>;
                                interrupts = <13>;
                                clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART4_PER_GATE>;
+                                        <&clks IMX5_CLK_UART4_PER_GATE>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
                                dma-names = "rx", "tx";
@@ -635,7 +637,7 @@ uart5: serial@63f90000 {
                                reg = <0x63f90000 0x4000>;
                                interrupts = <86>;
                                clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
-                                        <&clks IMX5_CLK_UART5_PER_GATE>;
+                                        <&clks IMX5_CLK_UART5_PER_GATE>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
                                dma-names = "rx", "tx";
@@ -656,7 +658,7 @@ ecspi2: ecspi@63fac000 {
                                reg = <0x63fac000 0x4000>;
                                interrupts = <37>;
                                clocks = <&clks IMX5_CLK_ECSPI2_IPG_GATE>,
-                                        <&clks IMX5_CLK_ECSPI2_PER_GATE>;
+                                        <&clks IMX5_CLK_ECSPI2_PER_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -666,7 +668,7 @@ sdma: sdma@63fb0000 {
                                reg = <0x63fb0000 0x4000>;
                                interrupts = <6>;
                                clocks = <&clks IMX5_CLK_SDMA_GATE>,
-                                        <&clks IMX5_CLK_SDMA_GATE>;
+                                        <&clks IMX5_CLK_SDMA_GATE>;
                                clock-names = "ipg", "ahb";
                                #dma-cells = <3>;
                                fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin";
@@ -679,7 +681,7 @@ cspi: cspi@63fc0000 {
                                reg = <0x63fc0000 0x4000>;
                                interrupts = <38>;
                                clocks = <&clks IMX5_CLK_CSPI_IPG_GATE>,
-                                        <&clks IMX5_CLK_CSPI_IPG_GATE>;
+                                        <&clks IMX5_CLK_CSPI_IPG_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
@@ -755,8 +757,8 @@ fec: ethernet@63fec000 {
                                reg = <0x63fec000 0x4000>;
                                interrupts = <87>;
                                clocks = <&clks IMX5_CLK_FEC_GATE>,
-                                        <&clks IMX5_CLK_FEC_GATE>,
-                                        <&clks IMX5_CLK_FEC_GATE>;
+                                        <&clks IMX5_CLK_FEC_GATE>,
+                                        <&clks IMX5_CLK_FEC_GATE>;
                                clock-names = "ipg", "ahb", "ptp";
                                status = "disabled";
                        };
@@ -766,7 +768,7 @@ tve: tve@63ff0000 {
                                reg = <0x63ff0000 0x1000>;
                                interrupts = <92>;
                                clocks = <&clks IMX5_CLK_TVE_GATE>,
-                                        <&clks IMX5_CLK_IPU_DI1_SEL>;
+                                        <&clks IMX5_CLK_IPU_DI1_SEL>;
                                clock-names = "tve", "di_sel";
                                status = "disabled";
 
@@ -782,7 +784,7 @@ vpu: vpu@63ff4000 {
                                reg = <0x63ff4000 0x1000>;
                                interrupts = <9>;
                                clocks = <&clks IMX5_CLK_VPU_REFERENCE_GATE>,
-                                        <&clks IMX5_CLK_VPU_GATE>;
+                                        <&clks IMX5_CLK_VPU_GATE>;
                                clock-names = "per", "ahb";
                                resets = <&src 1>;
                                iram = <&ocram>;
@@ -793,7 +795,7 @@ sahara: crypto@63ff8000 {
                                reg = <0x63ff8000 0x4000>;
                                interrupts = <19 20>;
                                clocks = <&clks IMX5_CLK_SAHARA_IPG_GATE>,
-                                        <&clks IMX5_CLK_SAHARA_IPG_GATE>;
+                                        <&clks IMX5_CLK_SAHARA_IPG_GATE>;
                                clock-names = "ipg", "ahb";
                        };
                };
diff --git a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
new file mode 100644 (file)
index 0000000..e0c2172
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+ * Copyright 2014-2016 Toradex AG
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "imx6dl.dtsi"
+#include "imx6qdl-colibri.dtsi"
+
+/ {
+       model = "Toradex Colibri iMX6DL/S on Colibri Evaluation Board V3";
+       compatible = "toradex,colibri_imx6dl-eval-v3", "toradex,colibri_imx6dl",
+                    "fsl,imx6dl";
+
+       aliases {
+               i2c0 = &i2c2;
+               i2c1 = &i2c3;
+       };
+
+       aliases {
+               rtc0 = &rtc_i2c;
+               rtc1 = &snvs_rtc;
+       };
+
+       clocks {
+               /* Fixed crystal dedicated to mcp251x */
+               clk16m: clk@1 {
+                       compatible = "fixed-clock";
+                       reg = <1>;
+                       #clock-cells = <0>;
+                       clock-frequency = <16000000>;
+                       clock-output-names = "clk16m";
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+
+               wakeup {
+                       label = "Wake-Up";
+                       gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>; /* SODIMM 45 */
+                       linux,code = <KEY_WAKEUP>;
+                       debounce-interval = <10>;
+                       wakeup-source;
+               };
+       };
+
+       lcd_display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interface-pix-fmt = "bgr666";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_ipu1_lcdif>;
+               status = "okay";
+
+               port@0 {
+                       reg = <0>;
+
+                       lcd_display_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               port@1 {
+                       reg = <1>;
+
+                       lcd_display_out: endpoint {
+                               remote-endpoint = <&lcd_panel_in>;
+                       };
+               };
+       };
+
+       panel: panel {
+               /*
+                * edt,et057090dhu: EDT 5.7" LCD TFT
+                * edt,et070080dh6: EDT 7.0" LCD TFT
+                */
+               compatible = "edt,et057090dhu";
+               backlight = <&backlight>;
+
+               port {
+                       lcd_panel_in: endpoint {
+                               remote-endpoint = <&lcd_display_out>;
+                       };
+               };
+       };
+};
+
+&backlight {
+       brightness-levels = <0 127 191 223 239 247 251 255>;
+       default-brightness-level = <1>;
+       status = "okay";
+};
+
+/* Colibri SSP */
+&ecspi4 {
+       status = "okay";
+
+       mcp251x0: mcp251x@1 {
+               compatible = "microchip,mcp2515";
+               reg = <0>;
+               clocks = <&clk16m>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <27 0x2>;
+               spi-max-frequency = <10000000>;
+               status = "okay";
+       };
+};
+
+&hdmi {
+       status = "okay";
+};
+
+/*
+ * Colibri I2C: I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board)
+ */
+&i2c3 {
+       status = "okay";
+
+       /* M41T0M6 real time clock on carrier board */
+       rtc_i2c: rtc@68 {
+               compatible = "st,m41t00";
+               reg = <0x68>;
+       };
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&lcd_display_in>;
+};
+
+&pwm1 {
+       status = "okay";
+};
+
+&pwm2 {
+       status = "okay";
+};
+
+&pwm3 {
+       status = "okay";
+};
+
+&pwm4 {
+       status = "okay";
+};
+
+&reg_usb_host_vbus {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&uart3 {
+       status = "okay";
+};
+
+&usbh1 {
+       vbus-supply = <&reg_usb_host_vbus>;
+       status = "okay";
+};
+
+&usbotg {
+       status = "okay";
+};
+
+/* Colibri MMC */
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_mmc_cd>;
+       cd-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; /* MMCD */
+       status = "okay";
+};
+
+&weim {
+       status = "okay";
+
+       /* weim memory map: 32MB on CS0, 32MB on CS1, 32MB on CS2 */
+       ranges = <0 0 0x08000000 0x02000000
+                 1 0 0x0a000000 0x02000000
+                 2 0 0x0c000000 0x02000000>;
+
+       /* SRAM on Colibri nEXT_CS0 */
+       sram@0,0 {
+               compatible = "cypress,cy7c1019dv33-10zsxi, mtd-ram";
+               reg = <0 0 0x00010000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               bank-width = <2>;
+               fsl,weim-cs-timing = <0x00010081 0x00000000 0x04000000
+                                     0x00000000 0x04000040 0x00000000>;
+       };
+
+       /* SRAM on Colibri nEXT_CS1 */
+       sram@1,0 {
+               compatible = "cypress,cy7c1019dv33-10zsxi, mtd-ram";
+               reg = <1 0 0x00010000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               bank-width = <2>;
+               fsl,weim-cs-timing = <0x00010081 0x00000000 0x04000000
+                                     0x00000000 0x04000040 0x00000000>;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6dl-icore.dts b/arch/arm/boot/dts/imx6dl-icore.dts
new file mode 100644 (file)
index 0000000..aec332c
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2016 Amarula Solutions B.V.
+ * Copyright (C) 2016 Engicam S.r.l.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "imx6dl.dtsi"
+#include "imx6qdl-icore.dtsi"
+
+/ {
+       model = "Engicam i.CoreM6 DualLite/Solo Starter Kit";
+       compatible = "engicam,imx6-icore", "fsl,imx6dl";
+};
+
+&can1 {
+       status = "okay";
+};
+
+&can2 {
+       status = "okay";
+};
index 75d73437adf7ee239425565d91eddf1dd35090a1..2cb72824e8004801526cdbd1b6261ba81b3c3ca3 100644 (file)
@@ -390,7 +390,7 @@ MX6QDL_PAD_RGMII_RD2__RGMII_RD2             0x1b030         /* AR8035 pin strapping: MODE#1: pull
                                MX6QDL_PAD_RGMII_RD3__RGMII_RD3         0x1b030         /* AR8035 pin strapping: MODE#3: pull up */
                                MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x130b0         /* AR8035 pin strapping: MODE#0: pull down */
                                MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0x4001b0a8      /* GPIO16 -> AR8035 25MHz */
-                               MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x130b0         /* RGMII_nRST */
+                               MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x130b0         /* RGMII_nRST */
                                MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28       0x180b0         /* AR8035 interrupt */
                                MX6QDL_PAD_GPIO_6__ENET_IRQ             0x000b1
                        >;
index 063fe7510da5f7652e0fcbb52c0f8fd95806a70f..aac42ac465b64619a82773bf097cc49051c5aa08 100644 (file)
@@ -105,7 +105,7 @@ ET070001DM6: CoMTFT { /* same as ET0700 but with inverted pixel clock */
                                pixelclk-active = <1>;
                        };
                };
-        };
+       };
 };
 
 &can1 {
index b7a72840b7f0c73c72e676187442e9299a3157f0..d1f1298ec55a8f28e80a297ee9e15d62d8385d28 100644 (file)
@@ -199,7 +199,7 @@ ETQ570 {
                                pixelclk-active = <0>;
                        };
                };
-        };
+       };
 };
 
 &ipu1_di0_disp0 {
index 207b85b91ada27a4da7557213aa9a050ce797480..0ea75f7b6039dec9eb66c70a061f152128f3fb84 100644 (file)
@@ -147,28 +147,6 @@ led5-red {
                        gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
                };
        };
-
-       pwmleds {
-               compatible = "pwm-leds";
-
-               ledpwm1 {
-                       label = "PWM1";
-                       pwms = <&pwm1 0 50000>;
-                       max-brightness = <255>;
-               };
-
-               ledpwm2 {
-                       label = "PWM2";
-                       pwms = <&pwm2 0 50000>;
-                       max-brightness = <255>;
-               };
-
-               ledpwm3 {
-                       label = "PWM3";
-                       pwms = <&pwm3 0 50000>;
-                       max-brightness = <255>;
-               };
-       };
 };
 
 &backlight {
index d853887254268aae304f3a90b244bef3cdc07990..1dcaee23ed9c2c13052617bc479ff7979269c513 100644 (file)
@@ -98,3 +98,9 @@ P05 {
                line-name = "PCA9539-P05";
        };
 };
+
+&usbphy1 {
+       fsl,tx-cal-45-dn-ohms = <55>;
+       fsl,tx-cal-45-dp-ohms = <55>;
+       fsl,tx-d-cal = <100>;
+};
index 6de21ff47c3a74e2325a7bfe7543b369d6bdce8f..7c7c1a855ece095e780ba55a9705615599a72cdf 100644 (file)
@@ -232,10 +232,7 @@ &usdhc1 {
 };
 
 &weim {
-       #address-cells = <2>;
-       #size-cells = <1>;
        ranges = <0 0 0x08000000 0x08000000>;
-       fsl,weim-cs-gpr = <&gpr>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_weimfpga &pinctrl_weimcs>;
        status = "okay";
diff --git a/arch/arm/boot/dts/imx6q-icore.dts b/arch/arm/boot/dts/imx6q-icore.dts
new file mode 100644 (file)
index 0000000..025f543
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2016 Amarula Solutions B.V.
+ * Copyright (C) 2016 Engicam S.r.l.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6qdl-icore.dtsi"
+
+/ {
+       model = "Engicam i.CoreM6 Quad/Dual Starter Kit";
+       compatible = "engicam,imx6-icore", "fsl,imx6q";
+};
+
+&can1 {
+       status = "okay";
+};
+
+&can2 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6q-nitrogen6_som2.dts b/arch/arm/boot/dts/imx6q-nitrogen6_som2.dts
new file mode 100644 (file)
index 0000000..cf4feef
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2016 Boundary Devices, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6qdl-nitrogen6_som2.dtsi"
+
+/ {
+       model = "Boundary Devices i.MX6 Quad Nitrogen6_SOM2 Board";
+       compatible = "boundary,imx6q-nitrogen6_som2", "fsl,imx6q";
+};
+
+&sata {
+       status = "okay";
+};
index 1723e89e3acce0ec95c58c1f3fac218356cf5b49..758bca96786f93cdfe975ada600153600863aa3e 100644 (file)
@@ -451,6 +451,10 @@ &pcie {
        status = "okay";
 };
 
+&pwm1 {
+       status = "okay";
+};
+
 &sata {
        target-supply = <&reg_sata>;
        fsl,transmit-level-mV = <1025>;
index c139ac0ebe15ff0c0d1bdc7b06e0f01eba4273f3..1f4771304da8b49ba4f59aefd792bdab345089db 100644 (file)
@@ -23,5 +23,5 @@ chosen {
 };
 
 &sata {
-        status = "okay";
+       status = "okay";
 };
index 65e95ae7509a45cd408fe5fc58bfed2111c605b7..71746edc2ee9218d21cd8a738188ff24370862b0 100644 (file)
@@ -105,7 +105,7 @@ ET070001DM6: CoMTFT { /* same as ET0700 but with inverted pixel clock */
                                pixelclk-active = <1>;
                        };
                };
-        };
+       };
 };
 
 &can1 {
index 20cd0e7b3e210231f6c834e3f5f2104c12abd1e1..f9cd21a41a797c8b2dc81a04f1485de650611e3e 100644 (file)
@@ -199,7 +199,7 @@ ETQ570 {
                                pixelclk-active = <0>;
                        };
                };
-        };
+       };
 };
 
 &ipu1_di0_disp0 {
index 9ed243b704ff5c490e46bfa17320cb040e5ad5e5..959ff3fb7304e4c3aef373eb6801e54ddb086d90 100644 (file)
@@ -105,7 +105,7 @@ ET070001DM6: CoMTFT { /* same as ET0700 but with inverted pixel clock */
                                pixelclk-active = <1>;
                        };
                };
-        };
+       };
 };
 
 &can1 {
index 347b531d37637a31cb5c89ca7a52b3239cea451f..b49133d25d80995e7a38d87195fc1c588c753efc 100644 (file)
@@ -199,7 +199,7 @@ ETQ570 {
                                pixelclk-active = <0>;
                        };
                };
-        };
+       };
 };
 
 &ds1339 {
index 61990630a74887167784903670a63cec66a6b63d..22009947cebcc86f7100b25c07c6693c94021257 100644 (file)
@@ -68,7 +68,41 @@ power {
                        label = "Power Button";
                        gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_POWER>;
-                       gpio-key,wakeup;
+                       wakeup-source;
+               };
+       };
+
+       i2cmux {
+               compatible = "i2c-mux-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1mux>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               mux-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+               i2c-parent = <&i2c1>;
+
+               i2c@0 {
+                       reg = <0>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       eeprom@50 {
+                               compatible = "at24,24c02";
+                               reg = <0x50>;
+                               pagesize = <16>;
+                       };
+
+                       em3027: rtc@56 {
+                               compatible = "emmicro,em3027";
+                               reg = <0x56>;
+                       };
+               };
+
+               i2c_dvi_ddc: i2c@1 {
+                       reg = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                };
        };
 };
@@ -82,17 +116,6 @@ &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
-
-       eeprom@50 {
-               compatible = "at24,24c02";
-               reg = <0x50>;
-               pagesize = <16>;
-       };
-
-       em3027: rtc@56 {
-               compatible = "emmicro,em3027";
-               reg = <0x56>;
-       };
 };
 
 &i2c2 {
@@ -115,6 +138,12 @@ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
                >;
        };
 
+       pinctrl_i2c1mux: i2c1muxgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x1b0b0
+               >;
+       };
+
        pinctrl_i2c2: i2c2grp {
                fsl,pins = <
                        MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
index 99e323b57261c047e7aa558289346926e2dab397..8c8a049eb3d09d2e8481ad3c8dcb2daf3280329d 100644 (file)
@@ -49,7 +49,10 @@ / {
 
        backlight: backlight {
                compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_bl_on>;
                pwms = <&pwm4 0 5000000>;
+               enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
                status = "disabled";
        };
 
@@ -620,6 +623,12 @@ MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0x1b0b0
                >;
        };
 
+       pinctrl_gpio_bl_on: gpioblon {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_DA13__GPIO3_IO13 0x1b0b0
+               >;
+       };
+
        pinctrl_gpio_keys: gpio1io04grp {
                fsl,pins = <
                        /* Power button */
index edbce222c7826d827b826a32978676fc02cbe004..5e7792d6bf582b07d9d1a1da3ec07ad55518c00f 100644 (file)
@@ -347,13 +347,13 @@ pinctrl_gpios: gpiosgrp {
                        fsl,pins = <
                                MX6QDL_PAD_DI0_PIN4__GPIO4_IO20         0x100b1
                                MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12      0x100b1
-                               MX6QDL_PAD_DISP0_DAT19__GPIO5_IO13      0x100b1
-                               MX6QDL_PAD_DISP0_DAT20__GPIO5_IO14      0x100b1
-                               MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15      0x100b1
-                               MX6QDL_PAD_DISP0_DAT22__GPIO5_IO16      0x100b1
-                               MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17      0x100b1
-                               MX6QDL_PAD_CSI0_PIXCLK__GPIO5_IO18      0x100b1
-                               MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21       0x100b1
+                               MX6QDL_PAD_DISP0_DAT19__GPIO5_IO13      0x100b1
+                               MX6QDL_PAD_DISP0_DAT20__GPIO5_IO14      0x100b1
+                               MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15      0x100b1
+                               MX6QDL_PAD_DISP0_DAT22__GPIO5_IO16      0x100b1
+                               MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17      0x100b1
+                               MX6QDL_PAD_CSI0_PIXCLK__GPIO5_IO18      0x100b1
+                               MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21       0x100b1
                        >;
                };
 
diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi
new file mode 100644 (file)
index 0000000..e6faa65
--- /dev/null
@@ -0,0 +1,890 @@
+/*
+ * Copyright 2014-2016 Toradex AG
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "Toradex Colibri iMX6DL/S Module";
+       compatible = "toradex,colibri_imx6dl", "fsl,imx6dl";
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_bl_on>;
+               pwms = <&pwm3 0 5000000>;
+               enable-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* Colibri BL_ON */
+               status = "disabled";
+       };
+
+       reg_1p8v: regulator-1p8v {
+               compatible = "regulator-fixed";
+               regulator-name = "1P8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+       };
+
+       reg_2p5v: regulator-2p5v {
+               compatible = "regulator-fixed";
+               regulator-name = "2P5V";
+               regulator-min-microvolt = <2500000>;
+               regulator-max-microvolt = <2500000>;
+               regulator-always-on;
+       };
+
+       reg_3p3v: regulator-3p3v {
+               compatible = "regulator-fixed";
+               regulator-name = "3P3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_usb_host_vbus: regulator-usb-host-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_regulator_usbh_pwr>;
+               regulator-name = "usb_host_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; /* USBH_PEN */
+               status = "disabled";
+       };
+
+       sound {
+               compatible = "fsl,imx-audio-sgtl5000";
+               model = "imx6dl-colibri-sgtl5000";
+               ssi-controller = <&ssi1>;
+               audio-codec = <&codec>;
+               audio-routing =
+                       "Headphone Jack", "HP_OUT",
+                       "LINE_IN", "Line In Jack",
+                       "MIC_IN", "Mic Jack",
+                       "Mic Jack", "Mic Bias";
+               mux-int-port = <1>;
+               mux-ext-port = <5>;
+       };
+
+       /* Optional S/PDIF in on SODIMM 88 and out on SODIMM 90, 137 or 168 */
+       sound_spdif: sound-spdif {
+               compatible = "fsl,imx-audio-spdif";
+               model = "imx-spdif";
+               spdif-controller = <&spdif>;
+               spdif-in;
+               spdif-out;
+               status = "disabled";
+       };
+};
+
+&audmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_audmux &pinctrl_mic_gnd>;
+       status = "okay";
+};
+
+/* Optional on SODIMM 55/63 */
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       status = "disabled";
+};
+
+/* Optional on SODIMM 178/188 */
+&can2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan2>;
+       status = "disabled";
+};
+
+/* Colibri SSP */
+&ecspi4 {
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi4>;
+       status = "disabled";
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-mode = "rmii";
+       status = "okay";
+};
+
+&hdmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hdmi_ddc>;
+       status = "disabled";
+};
+
+/*
+ * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
+ * touch screen controller
+ */
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+
+       pmic: pfuze100@08 {
+               compatible = "fsl,pfuze100";
+               reg = <0x08>;
+
+               regulators {
+                       sw1a_reg: sw1ab {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw1c_reg: sw1c {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw3a_reg: sw3a {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       swbst_reg: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       snvs_reg: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vref_reg: vrefddr {
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* vgen1: unused */
+
+                       vgen2_reg: vgen2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       /* vgen3: unused */
+
+                       vgen4_reg: vgen4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vgen5_reg: vgen5 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vgen6_reg: vgen6 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+               };
+       };
+
+       codec: sgtl5000@0a {
+               compatible = "fsl,sgtl5000";
+               reg = <0x0a>;
+               clocks = <&clks IMX6QDL_CLK_CKO>;
+               VDDA-supply = <&reg_2p5v>;
+               VDDIO-supply = <&reg_3p3v>;
+       };
+
+       /* STMPE811 touch screen controller */
+       stmpe811@41 {
+               compatible = "st,stmpe811";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_touch_int>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x41>;
+               interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-parent = <&gpio6>;
+               interrupt-controller;
+               id = <0>;
+               blocks = <0x5>;
+               irq-trigger = <0x1>;
+
+               stmpe_touchscreen {
+                       compatible = "st,stmpe-ts";
+                       reg = <0>;
+                       /* 3.25 MHz ADC clock speed */
+                       st,adc-freq = <1>;
+                       /* 8 sample average control */
+                       st,ave-ctrl = <3>;
+                       /* 7 length fractional part in z */
+                       st,fraction-z = <7>;
+                       /*
+                        * 50 mA typical 80 mA max touchscreen drivers
+                        * current limit value
+                        */
+                       st,i-drive = <1>;
+                       /* 12-bit ADC */
+                       st,mod-12b = <1>;
+                       /* internal ADC reference */
+                       st,ref-sel = <0>;
+                       /* ADC converstion time: 80 clocks */
+                       st,sample-time = <4>;
+                       /* 1 ms panel driver settling time */
+                       st,settling = <3>;
+                       /* 5 ms touch detect interrupt delay */
+                       st,touch-det-delay = <5>;
+               };
+       };
+};
+
+/*
+ * I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board)
+ */
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default", "recovery";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       pinctrl-1 = <&pinctrl_i2c3_recovery>;
+       scl-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+       sda-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
+       status = "disabled";
+};
+
+/* Colibri PWM<B> */
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm1>;
+       status = "disabled";
+};
+
+/* Colibri PWM<D> */
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>;
+       status = "disabled";
+};
+
+/* Colibri PWM<A> */
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>;
+       status = "disabled";
+};
+
+/* Colibri PWM<C> */
+&pwm4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm4>;
+       status = "disabled";
+};
+
+/* Optional S/PDIF out on SODIMM 137 */
+&spdif {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_spdif>;
+       status = "disabled";
+};
+
+&ssi1 {
+       status = "okay";
+};
+
+/* Colibri UART_A */
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1_dte &pinctrl_uart1_ctrl>;
+       fsl,dte-mode;
+       uart-has-rtscts;
+       status = "disabled";
+};
+
+/* Colibri UART_B */
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2_dte>;
+       fsl,dte-mode;
+       uart-has-rtscts;
+       status = "disabled";
+};
+
+/* Colibri UART_C */
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3_dte>;
+       fsl,dte-mode;
+       status = "disabled";
+};
+
+&usbotg {
+       pinctrl-names = "default";
+       disable-over-current;
+       dr_mode = "peripheral";
+       status = "disabled";
+};
+
+/* Colibri MMC */
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       vqmmc-supply = <&reg_3p3v>;
+       bus-width = <4>;
+       voltage-ranges = <3300 3300>;
+       status = "disabled";
+};
+
+/* eMMC */
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       vqmmc-supply = <&reg_3p3v>;
+       bus-width = <8>;
+       voltage-ranges = <3300 3300>;
+       non-removable;
+       status = "okay";
+};
+
+&weim {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_weim_sram  &pinctrl_weim_cs0
+                    &pinctrl_weim_cs1   &pinctrl_weim_cs2
+                    &pinctrl_weim_rdnwr &pinctrl_weim_npwe>;
+       #address-cells = <2>;
+       #size-cells = <1>;
+       status = "disabled";
+};
+
+&iomuxc {
+       pinctrl_audmux: audmuxgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL0__AUD5_TXC   0x130b0
+                       MX6QDL_PAD_KEY_ROW0__AUD5_TXD   0x130b0
+                       MX6QDL_PAD_KEY_COL1__AUD5_TXFS  0x130b0
+                       MX6QDL_PAD_KEY_ROW1__AUD5_RXD   0x130b0
+                       /* SGTL5000 sys_mclk */
+                       MX6QDL_PAD_GPIO_0__CCM_CLKO1    0x000b0
+               >;
+       };
+
+       pinctrl_cam_mclk: cammclkgrp {
+               fsl,pins = <
+                       /* Parallel Camera CAM sys_mclk */
+                       MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x00b0
+               >;
+       };
+
+       pinctrl_ecspi4: ecspi4grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D22__ECSPI4_MISO 0x100b1
+                       MX6QDL_PAD_EIM_D28__ECSPI4_MOSI 0x100b1
+                       MX6QDL_PAD_EIM_D21__ECSPI4_SCLK 0x100b1
+                       /* SPI CS */
+                       MX6QDL_PAD_EIM_A25__GPIO5_IO02  0x000b1
+               >;
+       };
+
+       pinctrl_enet: enetgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                       MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                       MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0     0x1b0b0
+                       MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1     0x1b0b0
+                       MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER       0x1b0b0
+                       MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN       0x1b0b0
+                       MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0     0x1b0b0
+                       MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1     0x1b0b0
+                       MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN      0x1b0b0
+                       MX6QDL_PAD_GPIO_16__ENET_REF_CLK     ((1<<30) | 0x1b0b0)
+               >;
+       };
+
+       pinctrl_flexcan1: flexcan1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_7__FLEXCAN1_TX          0x1b0b0
+                       MX6QDL_PAD_GPIO_8__FLEXCAN1_RX          0x1b0b0
+               >;
+       };
+
+       pinctrl_flexcan2: flexcan2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX        0x1b0b0
+                       MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX        0x1b0b0
+               >;
+       };
+
+       pinctrl_gpio_bl_on: gpioblon {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D26__GPIO3_IO26          0x1b0b0
+               >;
+       };
+
+       pinctrl_gpio_keys: gpiokeys {
+               fsl,pins = <
+                       /* Power button */
+                       MX6QDL_PAD_EIM_A16__GPIO2_IO22          0x1b0b0
+               >;
+       };
+
+       pinctrl_hdmi_ddc: hdmiddcgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL3__HDMI_TX_DDC_SCL 0x4001b8b1
+                       MX6QDL_PAD_KEY_ROW3__HDMI_TX_DDC_SDA 0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_EB2__I2C2_SCL 0x4001b8b1
+                       MX6QDL_PAD_EIM_D16__I2C2_SDA 0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
+                       MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c3_recovery: i2c3recoverygrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_3__GPIO1_IO03 0x4001b8b1
+                       MX6QDL_PAD_GPIO_6__GPIO1_IO06 0x4001b8b1
+               >;
+       };
+
+       pinctrl_ipu1_csi0: ipu1csi0grp { /* Parallel Camera */
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_A17__IPU1_CSI1_DATA12    0xb0b1
+                       MX6QDL_PAD_EIM_A18__IPU1_CSI1_DATA13    0xb0b1
+                       MX6QDL_PAD_EIM_A19__IPU1_CSI1_DATA14    0xb0b1
+                       MX6QDL_PAD_EIM_A20__IPU1_CSI1_DATA15    0xb0b1
+                       MX6QDL_PAD_EIM_A21__IPU1_CSI1_DATA16    0xb0b1
+                       MX6QDL_PAD_EIM_A22__IPU1_CSI1_DATA17    0xb0b1
+                       MX6QDL_PAD_EIM_A23__IPU1_CSI1_DATA18    0xb0b1
+                       MX6QDL_PAD_EIM_A24__IPU1_CSI1_DATA19    0xb0b1
+                       MX6QDL_PAD_EIM_D17__IPU1_CSI1_PIXCLK    0xb0b1
+                       MX6QDL_PAD_EIM_EB3__IPU1_CSI1_HSYNC     0xb0b1
+                       MX6QDL_PAD_EIM_D29__IPU1_CSI1_VSYNC     0xb0b1
+                       /* Disable PWM pins on camera interface */
+                       MX6QDL_PAD_SD4_DAT1__GPIO2_IO09         0x40
+                       MX6QDL_PAD_GPIO_1__GPIO1_IO01           0x40
+               >;
+       };
+
+       pinctrl_ipu1_lcdif: ipu1lcdifgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK      0xa1
+                       MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15            0xa1
+                       MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02             0xa1
+                       MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03             0xa1
+                       MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00        0xa1
+                       MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01        0xa1
+                       MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02        0xa1
+                       MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03        0xa1
+                       MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04        0xa1
+                       MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05        0xa1
+                       MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06        0xa1
+                       MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07        0xa1
+                       MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08        0xa1
+                       MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09        0xa1
+                       MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10       0xa1
+                       MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11       0xa1
+                       MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12       0xa1
+                       MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13       0xa1
+                       MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14       0xa1
+                       MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15       0xa1
+                       MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16       0xa1
+                       MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17       0xa1
+               >;
+       };
+
+       pinctrl_mic_gnd: gpiomicgnd {
+               fsl,pins = <
+                       /* Controls Mic GND, PU or '1' pull Mic GND to GND */
+                       MX6QDL_PAD_RGMII_TD1__GPIO6_IO21 0x1b0b0
+               >;
+       };
+
+       pinctrl_mmc_cd: gpiommccd {
+               fsl,pins = <
+                       MX6QDL_PAD_NANDF_D5__GPIO2_IO05 0x80000000
+               >;
+       };
+
+       pinctrl_pwm1: pwm1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_9__PWM1_OUT     0x1b0b1
+               >;
+       };
+
+       pinctrl_pwm2: pwm2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_1__PWM2_OUT     0x1b0b1
+                       MX6QDL_PAD_EIM_A21__GPIO2_IO17  0x00040
+               >;
+       };
+
+       pinctrl_pwm3: pwm3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_DAT1__PWM3_OUT   0x1b0b1
+                       MX6QDL_PAD_EIM_A22__GPIO2_IO16  0x00040
+               >;
+       };
+
+       pinctrl_pwm4: pwm4grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_DAT2__PWM4_OUT   0x1b0b1
+               >;
+       };
+
+       pinctrl_regulator_usbh_pwr: gpioregusbhpwrgrp {
+               fsl,pins = <
+                       /* USBH_EN */
+                       MX6QDL_PAD_EIM_D31__GPIO3_IO31  0x0f058
+               >;
+       };
+
+       pinctrl_spdif: spdifgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x1b0b0
+               >;
+       };
+
+       pinctrl_touch_int: gpiotouchintgrp {
+               fsl,pins = <
+                       /* STMPE811 interrupt */
+                       MX6QDL_PAD_RGMII_TD0__GPIO6_IO20 0x1b0b0
+               >;
+       };
+
+       pinctrl_uart1_dce: uart1dcegrp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
+               >;
+       };
+
+       /* DTE mode */
+       pinctrl_uart1_dte: uart1dtegrp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT10__UART1_RX_DATA 0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT11__UART1_TX_DATA 0x1b0b1
+                       MX6QDL_PAD_EIM_D19__UART1_RTS_B 0x1b0b1
+                       MX6QDL_PAD_EIM_D20__UART1_CTS_B 0x1b0b1
+               >;
+       };
+
+       /* Additional DTR, DSR, DCD */
+       pinctrl_uart1_ctrl: uart1ctrlgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D23__UART1_DCD_B 0x1b0b0
+                       MX6QDL_PAD_EIM_D24__UART1_DTR_B 0x1b0b0
+                       MX6QDL_PAD_EIM_D25__UART1_DSR_B 0x1b0b0
+               >;
+       };
+
+       pinctrl_uart2_dte: uart2dtegrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_DAT4__UART2_TX_DATA      0x1b0b1
+                       MX6QDL_PAD_SD4_DAT7__UART2_RX_DATA      0x1b0b1
+                       MX6QDL_PAD_SD4_DAT6__UART2_RTS_B        0x1b0b1
+                       MX6QDL_PAD_SD4_DAT5__UART2_CTS_B        0x1b0b1
+               >;
+       };
+
+       pinctrl_uart3_dte: uart3dtegrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_CLK__UART3_TX_DATA       0x1b0b1
+                       MX6QDL_PAD_SD4_CMD__UART3_RX_DATA       0x1b0b1
+               >;
+       };
+
+       pinctrl_usbc_det: usbcdetgrp {
+               fsl,pins = <
+                       /* USBC_DET */
+                       MX6QDL_PAD_GPIO_17__GPIO7_IO12          0x1b0b0
+                       /* USBC_DET_EN */
+                       MX6QDL_PAD_RGMII_TX_CTL__GPIO6_IO26     0x0f058
+                       /* USBC_DET_OVERWRITE */
+                       MX6QDL_PAD_RGMII_RXC__GPIO6_IO30        0x0f058
+               >;
+       };
+
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_CMD__SD1_CMD     0x17071
+                       MX6QDL_PAD_SD1_CLK__SD1_CLK     0x10071
+                       MX6QDL_PAD_SD1_DAT0__SD1_DATA0  0x17071
+                       MX6QDL_PAD_SD1_DAT1__SD1_DATA1  0x17071
+                       MX6QDL_PAD_SD1_DAT2__SD1_DATA2  0x17071
+                       MX6QDL_PAD_SD1_DAT3__SD1_DATA3  0x17071
+               >;
+       };
+
+       pinctrl_usdhc3: usdhc3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_CMD__SD3_CMD     0x17059
+                       MX6QDL_PAD_SD3_CLK__SD3_CLK     0x10059
+                       MX6QDL_PAD_SD3_DAT0__SD3_DATA0  0x17059
+                       MX6QDL_PAD_SD3_DAT1__SD3_DATA1  0x17059
+                       MX6QDL_PAD_SD3_DAT2__SD3_DATA2  0x17059
+                       MX6QDL_PAD_SD3_DAT3__SD3_DATA3  0x17059
+                       MX6QDL_PAD_SD3_DAT4__SD3_DATA4  0x17059
+                       MX6QDL_PAD_SD3_DAT5__SD3_DATA5  0x17059
+                       MX6QDL_PAD_SD3_DAT6__SD3_DATA6  0x17059
+                       MX6QDL_PAD_SD3_DAT7__SD3_DATA7  0x17059
+                       /* eMMC reset */
+                       MX6QDL_PAD_SD3_RST__SD3_RESET   0x17059
+               >;
+       };
+
+       pinctrl_usdhc3_100mhz: usdhc3100mhzgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_CMD__SD3_CMD     0x170b9
+                       MX6QDL_PAD_SD3_CLK__SD3_CLK     0x100b9
+                       MX6QDL_PAD_SD3_DAT0__SD3_DATA0  0x170b9
+                       MX6QDL_PAD_SD3_DAT1__SD3_DATA1  0x170b9
+                       MX6QDL_PAD_SD3_DAT2__SD3_DATA2  0x170b9
+                       MX6QDL_PAD_SD3_DAT3__SD3_DATA3  0x170b9
+                       MX6QDL_PAD_SD3_DAT4__SD3_DATA4  0x170b9
+                       MX6QDL_PAD_SD3_DAT5__SD3_DATA5  0x170b9
+                       MX6QDL_PAD_SD3_DAT6__SD3_DATA6  0x170b9
+                       MX6QDL_PAD_SD3_DAT7__SD3_DATA7  0x170b9
+                       /* eMMC reset */
+                       MX6QDL_PAD_SD3_RST__SD3_RESET   0x170b9
+               >;
+       };
+
+       pinctrl_usdhc3_200mhz: usdhc3200mhzgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_CMD__SD3_CMD     0x170f9
+                       MX6QDL_PAD_SD3_CLK__SD3_CLK     0x100f9
+                       MX6QDL_PAD_SD3_DAT0__SD3_DATA0  0x170f9
+                       MX6QDL_PAD_SD3_DAT1__SD3_DATA1  0x170f9
+                       MX6QDL_PAD_SD3_DAT2__SD3_DATA2  0x170f9
+                       MX6QDL_PAD_SD3_DAT3__SD3_DATA3  0x170f9
+                       MX6QDL_PAD_SD3_DAT4__SD3_DATA4  0x170f9
+                       MX6QDL_PAD_SD3_DAT5__SD3_DATA5  0x170f9
+                       MX6QDL_PAD_SD3_DAT6__SD3_DATA6  0x170f9
+                       MX6QDL_PAD_SD3_DAT7__SD3_DATA7  0x170f9
+                       /* eMMC reset */
+                       MX6QDL_PAD_SD3_RST__SD3_RESET   0x170f9
+               >;
+       };
+
+       pinctrl_weim_cs0: weimcs0grp {
+               fsl,pins = <
+                       /* nEXT_CS0 */
+                       MX6QDL_PAD_EIM_CS0__EIM_CS0_B   0xb0b1
+               >;
+       };
+
+       pinctrl_weim_cs1: weimcs1grp {
+               fsl,pins = <
+                       /* nEXT_CS1 */
+                       MX6QDL_PAD_EIM_CS1__EIM_CS1_B   0xb0b1
+               >;
+       };
+
+       pinctrl_weim_cs2: weimcs2grp {
+               fsl,pins = <
+                       /* nEXT_CS2 */
+                       MX6QDL_PAD_SD2_DAT1__EIM_CS2_B  0xb0b1
+               >;
+       };
+
+       pinctrl_weim_sram: weimsramgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_OE__EIM_OE_B             0xb0b1
+                       MX6QDL_PAD_EIM_RW__EIM_RW               0xb0b1
+                       /* Data */
+                       MX6QDL_PAD_CSI0_DATA_EN__EIM_DATA00     0x1b0b0
+                       MX6QDL_PAD_CSI0_VSYNC__EIM_DATA01       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT4__EIM_DATA02        0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT5__EIM_DATA03        0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT6__EIM_DATA04        0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT7__EIM_DATA05        0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT8__EIM_DATA06        0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT9__EIM_DATA07        0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT12__EIM_DATA08       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT13__EIM_DATA09       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT14__EIM_DATA10       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT15__EIM_DATA11       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT16__EIM_DATA12       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT17__EIM_DATA13       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT18__EIM_DATA14       0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT19__EIM_DATA15       0x1b0b0
+                       /* Address */
+                       MX6QDL_PAD_EIM_DA15__EIM_AD15           0xb0b1
+                       MX6QDL_PAD_EIM_DA14__EIM_AD14           0xb0b1
+                       MX6QDL_PAD_EIM_DA13__EIM_AD13           0xb0b1
+                       MX6QDL_PAD_EIM_DA12__EIM_AD12           0xb0b1
+                       MX6QDL_PAD_EIM_DA11__EIM_AD11           0xb0b1
+                       MX6QDL_PAD_EIM_DA10__EIM_AD10           0xb0b1
+                       MX6QDL_PAD_EIM_DA9__EIM_AD09            0xb0b1
+                       MX6QDL_PAD_EIM_DA8__EIM_AD08            0xb0b1
+                       MX6QDL_PAD_EIM_DA7__EIM_AD07            0xb0b1
+                       MX6QDL_PAD_EIM_DA6__EIM_AD06            0xb0b1
+                       MX6QDL_PAD_EIM_DA5__EIM_AD05            0xb0b1
+                       MX6QDL_PAD_EIM_DA4__EIM_AD04            0xb0b1
+                       MX6QDL_PAD_EIM_DA3__EIM_AD03            0xb0b1
+                       MX6QDL_PAD_EIM_DA2__EIM_AD02            0xb0b1
+                       MX6QDL_PAD_EIM_DA1__EIM_AD01            0xb0b1
+                       MX6QDL_PAD_EIM_DA0__EIM_AD00            0xb0b1
+               >;
+       };
+
+       pinctrl_weim_rdnwr: weimrdnwr {
+               fsl,pins = <
+                       MX6QDL_PAD_SD2_CLK__GPIO1_IO10          0x0040
+                       MX6QDL_PAD_RGMII_TD3__GPIO6_IO23        0x130b0
+               >;
+       };
+
+       pinctrl_weim_npwe: weimnpwe {
+               fsl,pins = <
+                       MX6QDL_PAD_SD2_DAT3__GPIO1_IO12         0x0040
+                       MX6QDL_PAD_RGMII_TD2__GPIO6_IO22        0x130b0
+               >;
+       };
+
+       /* ADDRESS[16:18] [25] used as GPIO */
+       pinctrl_weim_gpio_1: weimgpio-1 {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_ROW4__GPIO4_IO15         0x1b0b0
+                       MX6QDL_PAD_KEY_ROW2__GPIO4_IO11         0x1b0b0
+                       MX6QDL_PAD_KEY_COL2__GPIO4_IO10         0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT22__GPIO5_IO16      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT20__GPIO5_IO14      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT19__GPIO5_IO13      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12      0x1b0b0
+                       MX6QDL_PAD_NANDF_D1__GPIO2_IO01         0x1b0b0
+               >;
+       };
+
+       /* ADDRESS[19:24] used as GPIO */
+       pinctrl_weim_gpio_2: weimgpio-2 {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_ROW2__GPIO4_IO11         0x1b0b0
+                       MX6QDL_PAD_KEY_COL2__GPIO4_IO10         0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT22__GPIO5_IO16      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT20__GPIO5_IO14      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT19__GPIO5_IO13      0x1b0b0
+                       MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12      0x1b0b0
+                       MX6QDL_PAD_NANDF_D1__GPIO2_IO01         0x1b0b0
+               >;
+       };
+
+       /* DATA[16:31] used as GPIO */
+       pinctrl_weim_gpio_3: weimgpio-3 {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_LBA__GPIO2_IO27          0x1b0b0
+                       MX6QDL_PAD_EIM_BCLK__GPIO6_IO31         0x1b0b0
+                       MX6QDL_PAD_NANDF_CS3__GPIO6_IO16        0x1b0b0
+                       MX6QDL_PAD_NANDF_CS1__GPIO6_IO14        0x1b0b0
+                       MX6QDL_PAD_NANDF_RB0__GPIO6_IO10        0x1b0b0
+                       MX6QDL_PAD_NANDF_ALE__GPIO6_IO08        0x1b0b0
+                       MX6QDL_PAD_NANDF_WP_B__GPIO6_IO09       0x1b0b0
+                       MX6QDL_PAD_NANDF_CS0__GPIO6_IO11        0x1b0b0
+                       MX6QDL_PAD_NANDF_CLE__GPIO6_IO07        0x1b0b0
+                       MX6QDL_PAD_GPIO_19__GPIO4_IO05          0x1b0b0
+                       MX6QDL_PAD_CSI0_MCLK__GPIO5_IO19        0x1b0b0
+                       MX6QDL_PAD_CSI0_PIXCLK__GPIO5_IO18      0x1b0b0
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x1b0b0
+                       MX6QDL_PAD_GPIO_5__GPIO1_IO05           0x1b0b0
+                       MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x1b0b0
+               >;
+       };
+
+       /* DQM[0:3] used as GPIO */
+       pinctrl_weim_gpio_4: weimgpio-4 {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_EB0__GPIO2_IO28          0x1b0b0
+                       MX6QDL_PAD_EIM_EB1__GPIO2_IO29          0x1b0b0
+                       MX6QDL_PAD_SD2_DAT2__GPIO1_IO13         0x1b0b0
+                       MX6QDL_PAD_NANDF_D0__GPIO2_IO00         0x1b0b0
+               >;
+       };
+
+       /* RDY used as GPIO */
+       pinctrl_weim_gpio_5: weimgpio-5 {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_WAIT__GPIO5_IO00         0x1b0b0
+               >;
+       };
+
+       /* ADDRESS[16] DATA[30] used as GPIO */
+       pinctrl_weim_gpio_6: weimgpio-6 {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_ROW4__GPIO4_IO15         0x1b0b0
+                       MX6QDL_PAD_KEY_COL4__GPIO4_IO14         0x1b0b0
+               >;
+       };
+};
index a7100f99123e9593dac8941c9dc379a3782e8a18..54aca3a07ce49a679cd995699157690c19b2b1e3 100644 (file)
@@ -153,9 +153,9 @@ &can1 {
 
 &clks {
        assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
-                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
        assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
-                         <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+                                <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
 };
 
 &ecspi3 {
index 8953eba0573daa8844c52e1671a25046b850aad2..88e5cb3b6be97db98934075b5375f52b18e95515 100644 (file)
@@ -154,9 +154,9 @@ &can1 {
 
 &clks {
        assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
-                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
        assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
-                         <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+                                <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
 };
 
 &fec {
index 6ac41c7ed32e03b84154aa72fc3c22b034e76ffb..1753ab720b0be2676f90e2fe6c8a16dbee9925ab 100644 (file)
@@ -144,9 +144,9 @@ &can1 {
 
 &clks {
        assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
-                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
        assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
-                         <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+                                <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
 };
 
 &fec {
index 805e23674a9472c30093689176d20bc382eb3f33..ee83161f674b70a233e3e016641d428be78f16fc 100644 (file)
@@ -291,7 +291,7 @@ pinctrl_uart5: uart5grp {
                                MX6QDL_PAD_KEY_COL1__UART5_TX_DATA      0x1b0b1
                                MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA      0x1b0b1
                        >;
-                };
+               };
 
                pinctrl_wdog: wdoggrp {
                        fsl,pins = <
diff --git a/arch/arm/boot/dts/imx6qdl-icore.dtsi b/arch/arm/boot/dts/imx6qdl-icore.dtsi
new file mode 100644 (file)
index 0000000..023839a
--- /dev/null
@@ -0,0 +1,265 @@
+/*
+ * Copyright (C) 2016 Amarula Solutions B.V.
+ * Copyright (C) 2016 Engicam S.r.l.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       memory {
+               reg = <0x10000000 0x80000000>;
+       };
+
+       reg_3p3v: regulator-3p3v {
+               compatible = "regulator-fixed";
+               regulator-name = "3P3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       reg_usb_h1_vbus: regulator-usb-h1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_h1_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       reg_usb_otg_vbus: regulator-usb-otg-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_otg_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       rmii_clk: clock-rmii-clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <25000000>;  /* 25MHz for example */
+       };
+};
+
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       xceiver-supply = <&reg_3p3v>;
+};
+
+&can2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan2>;
+       xceiver-supply = <&reg_3p3v>;
+};
+
+&clks {
+       assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>;
+       assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>;
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
+       clocks = <&clks IMX6QDL_CLK_ENET>, <&clks IMX6QDL_CLK_ENET>, <&rmii_clk>;
+       phy-mode = "rmii";
+       status = "okay";
+};
+
+&gpmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_gpmi_nand>;
+       nand-on-flash-bbt;
+       status = "okay";
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4>;
+       status = "okay";
+};
+
+&usbh1 {
+       vbus-supply = <&reg_usb_h1_vbus>;
+       disable-over-current;
+       status = "okay";
+};
+
+&usbotg {
+       vbus-supply = <&reg_usb_otg_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       disable-over-current;
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+       no-1-8-v;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_enet: enetgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN      0x1b0b0
+                       MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0x1b0b1
+                       MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN       0x1b0b0
+                       MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1     0x1b0b0
+                       MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0     0x1b0b0
+                       MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1     0x1b0b0
+                       MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0     0x1b0b0
+                       MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                       MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                       MX6QDL_PAD_ENET_REF_CLK__GPIO1_IO23     0x1b0b0
+                       MX6QDL_PAD_GPIO_17__GPIO7_IO12          0x1b0b0
+               >;
+       };
+
+       pinctrl_flexcan1: flexcan1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x1b020
+                       MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX 0x1b020
+               >;
+       };
+
+       pinctrl_flexcan2: flexcan2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX 0x1b020
+                       MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0x1b020
+               >;
+       };
+
+       pinctrl_gpmi_nand: gpmi-nand {
+               fsl,pins = <
+                       MX6QDL_PAD_NANDF_CLE__NAND_CLE     0xb0b1
+                       MX6QDL_PAD_NANDF_ALE__NAND_ALE     0xb0b1
+                       MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
+                       MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
+                       MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
+                       MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
+                       MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
+                       MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
+                       MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
+                       MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
+                       MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
+                       MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
+                       MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
+                       MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
+                       MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
+                       MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
+                       MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
+               >;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
+                       MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_EB2__I2C2_SCL  0x4001b8b1
+                       MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_5__I2C3_SCL  0x4001b8b1
+                       MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
+                       MX6QDL_PAD_GPIO_0__CCM_CLKO1    0x130b0
+               >;
+       };
+
+       pinctrl_uart4: uart4grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
+                       MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
+               >;
+       };
+
+       pinctrl_usbotg: usbotggrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
+               >;
+       };
+
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17070
+                       MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10070
+                       MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17070
+                       MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17070
+                       MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17070
+                       MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17070
+               >;
+       };
+};
index 880bd782a5b70ac510d8a40855b32845e7ce59bd..63acd54f527845f172dfdad2b438b6b5f637c7e1 100644 (file)
@@ -97,15 +97,6 @@ reg_wlan_vmmc: regulator@3 {
                };
        };
 
-       bt_rfkill {
-               compatible = "rfkill-gpio";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_bt_rfkill>;
-               gpios = <&gpio6 8 GPIO_ACTIVE_HIGH>;
-               name = "bt_rfkill";
-               type = <2>;
-       };
-
        gpio-keys {
                compatible = "gpio-keys";
                pinctrl-names = "default";
@@ -160,7 +151,7 @@ j46-pin3 {
                };
        };
 
-       backlight_lcd {
+       backlight-lcd {
                compatible = "pwm-backlight";
                pwms = <&pwm1 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -169,7 +160,7 @@ backlight_lcd {
                status = "okay";
        };
 
-       backlight_lvds0: backlight_lvds0 {
+       backlight_lvds0: backlight-lvds0 {
                compatible = "pwm-backlight";
                pwms = <&pwm4 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -178,7 +169,7 @@ backlight_lvds0: backlight_lvds0 {
                status = "okay";
        };
 
-       panel_lvds0 {
+       panel-lvds0 {
                compatible = "hannstar,hsd100pxn1";
                backlight = <&backlight_lvds0>;
 
@@ -328,19 +319,6 @@ MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS            0x130b0
                        >;
                };
 
-               pinctrl_bt_rfkill: bt_rfkillgrp {
-                       fsl,pins = <
-                               /* BT wake */
-                               MX6QDL_PAD_NANDF_D2__GPIO2_IO02         0x1b0b0
-                               /* BT reset */
-                               MX6QDL_PAD_NANDF_ALE__GPIO6_IO08        0x0b0b0
-                               /* BT reg en */
-                               MX6QDL_PAD_NANDF_CS2__GPIO6_IO15        0x1b0b0
-                               /* BT host wake irq */
-                               MX6QDL_PAD_NANDF_CS3__GPIO6_IO16        0x100b0
-                       >;
-               };
-
                pinctrl_ecspi1: ecspi1grp {
                        fsl,pins = <
                                MX6QDL_PAD_EIM_D17__ECSPI1_MISO         0x100b1
@@ -374,7 +352,7 @@ MX6QDL_PAD_GPIO_6__ENET_IRQ         0x000b1
                        >;
                };
 
-               pinctrl_gpio_keys: gpio_keysgrp {
+               pinctrl_gpio_keys: gpio-keysgrp {
                        fsl,pins = <
                                /* Home Button: J14 pin 5 */
                                MX6QDL_PAD_GPIO_18__GPIO7_IO13          0x1b0b0
@@ -457,7 +435,7 @@ MX6QDL_PAD_SD1_CMD__PWM4_OUT                0x1b0b1
                        >;
                };
 
-               pinctrl_wlan_vmmc: wlan_vmmcgrp {
+               pinctrl_wlan_vmmc: wlan-vmmcgrp {
                        fsl,pins = <
                                MX6QDL_PAD_NANDF_CLE__GPIO6_IO07        0x030b0
                        >;
index b0b3220a1fd90530586b29e84fe276ee79858844..34887a10c5f1712e62c0b953405ef330676a6940 100644 (file)
@@ -229,7 +229,7 @@ ttymxc4-rs232 {
                };
        };
 
-       backlight_lcd: backlight_lcd {
+       backlight_lcd: backlight-lcd {
                compatible = "pwm-backlight";
                pwms = <&pwm1 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -238,7 +238,7 @@ backlight_lcd: backlight_lcd {
                status = "okay";
        };
 
-       backlight_lvds0: backlight_lvds0 {
+       backlight_lvds0: backlight-lvds0 {
                compatible = "pwm-backlight";
                pwms = <&pwm4 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -247,7 +247,7 @@ backlight_lvds0: backlight_lvds0 {
                status = "okay";
        };
 
-       backlight_lvds1: backlight_lvds1 {
+       backlight_lvds1: backlight-lvds1 {
                compatible = "pwm-backlight";
                pwms = <&pwm2 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -282,7 +282,7 @@ lcd_display_out: endpoint {
                };
        };
 
-       panel_lcd {
+       panel-lcd {
                compatible = "okaya,rs800480t-7x0gp";
                backlight = <&backlight_lcd>;
 
@@ -293,7 +293,7 @@ lcd_panel_in: endpoint {
                };
        };
 
-       panel_lvds0 {
+       panel-lvds0 {
                compatible = "hannstar,hsd100pxn1";
                backlight = <&backlight_lvds0>;
 
@@ -304,7 +304,7 @@ panel_in_lvds0: endpoint {
                };
        };
 
-       panel_lvds1 {
+       panel-lvds1 {
                compatible = "hannstar,hsd100pxn1";
                backlight = <&backlight_lvds1>;
 
@@ -447,7 +447,7 @@ touchscreen@38 {
 };
 
 &iomuxc {
-       imx6q-nitrogen6_max {
+       imx6q-nitrogen6-max {
                pinctrl_audmux: audmuxgrp {
                        fsl,pins = <
                                MX6QDL_PAD_CSI0_DAT7__AUD3_RXD          0x130b0
@@ -504,7 +504,7 @@ MX6QDL_PAD_GPIO_6__ENET_IRQ         0x000b1
                        >;
                };
 
-               pinctrl_gpio_keys: gpio_keysgrp {
+               pinctrl_gpio_keys: gpio-keysgrp {
                        fsl,pins = <
                                /* Power Button */
                                MX6QDL_PAD_NANDF_D3__GPIO2_IO03         0x1b0b0
@@ -720,7 +720,7 @@ MX6QDL_PAD_SD4_DAT7__SD4_DATA7              0x17059
                        >;
                };
 
-               pinctrl_wlan_vmmc: wlan_vmmcgrp {
+               pinctrl_wlan_vmmc: wlan-vmmcgrp {
                        fsl,pins = <
                                MX6QDL_PAD_NANDF_CS0__GPIO6_IO11        0x100b0
                                MX6QDL_PAD_NANDF_CS2__GPIO6_IO15        0x000b0
diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
new file mode 100644 (file)
index 0000000..d80f21a
--- /dev/null
@@ -0,0 +1,770 @@
+/*
+ * Copyright 2016 Boundary Devices, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       chosen {
+               stdout-path = &uart2;
+       };
+
+       memory {
+               reg = <0x10000000 0x40000000>;
+       };
+
+       backlight_lcd: backlight-lcd {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 5000000>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <7>;
+               power-supply = <&reg_3p3v>;
+               status = "okay";
+       };
+
+       backlight_lvds0: backlight-lvds0 {
+               compatible = "pwm-backlight";
+               pwms = <&pwm4 0 5000000>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <7>;
+               power-supply = <&reg_3p3v>;
+               status = "okay";
+       };
+
+       backlight_lvds1: backlight-lvds1 {
+               compatible = "gpio-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_backlight_lvds1>;
+               gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>;
+               default-on;
+               status = "okay";
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+
+               power {
+                       label = "Power Button";
+                       gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
+                       wakeup-source;
+               };
+
+               menu {
+                       label = "Menu";
+                       gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_MENU>;
+               };
+
+               home {
+                       label = "Home";
+                       gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_HOME>;
+               };
+
+               back {
+                       label = "Back";
+                       gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_BACK>;
+               };
+
+               volume-up {
+                       label = "Volume Up";
+                       gpios = <&gpio7 13 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+
+               volume-down {
+                       label = "Volume Down";
+                       gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+       };
+
+       lcd_display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interface-pix-fmt = "bgr666";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_j15>;
+               status = "okay";
+
+               port@0 {
+                       reg = <0>;
+
+                       lcd_display_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               port@1 {
+                       reg = <1>;
+
+                       lcd_display_out: endpoint {
+                               remote-endpoint = <&lcd_panel_in>;
+                       };
+               };
+       };
+
+       panel-lcd {
+               compatible = "okaya,rs800480t-7x0gp";
+               backlight = <&backlight_lcd>;
+
+               port {
+                       lcd_panel_in: endpoint {
+                               remote-endpoint = <&lcd_display_out>;
+                       };
+               };
+       };
+
+       panel-lvds0 {
+               compatible = "hannstar,hsd100pxn1";
+               backlight = <&backlight_lvds0>;
+
+               port {
+                       panel_in_lvds0: endpoint {
+                               remote-endpoint = <&lvds0_out>;
+                       };
+               };
+       };
+
+       panel-lvds1 {
+               compatible = "hannstar,hsd100pxn1";
+               backlight = <&backlight_lvds1>;
+
+               port {
+                       panel_in_lvds1: endpoint {
+                               remote-endpoint = <&lvds1_out>;
+                       };
+               };
+       };
+
+       reg_1p8v: regulator-1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "1P8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+       };
+
+       reg_2p5v: regulator-2v5 {
+               compatible = "regulator-fixed";
+               regulator-name = "2P5V";
+               regulator-min-microvolt = <2500000>;
+               regulator-max-microvolt = <2500000>;
+               regulator-always-on;
+       };
+
+       reg_3p3v: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3P3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_can_xcvr: regulator-can-xcvr {
+               compatible = "regulator-fixed";
+               regulator-name = "CAN XCVR";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_can_xcvr>;
+               gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
+       };
+
+       reg_usb_h1_vbus: regulator-usb-h1-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usbh1>;
+               regulator-name = "usb_h1_vbus";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               regulator-always-on;
+       };
+
+       reg_usb_otg_vbus: regulator-usb-otg-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_otg_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_wlan_vmmc: regulator-wlan-vmmc {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_wlan_vmmc>;
+               regulator-name = "reg_wlan_vmmc";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+               startup-delay-us = <70000>;
+               enable-active-high;
+       };
+
+       sound {
+               compatible = "fsl,imx6q-nitrogen6_som2-sgtl5000",
+                            "fsl,imx-audio-sgtl5000";
+               model = "imx6q-nitrogen6_som2-sgtl5000";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_sgtl5000>;
+               ssi-controller = <&ssi1>;
+               audio-codec = <&codec>;
+               audio-routing =
+                       "MIC_IN", "Mic Jack",
+                       "Mic Jack", "Mic Bias",
+                       "Headphone Jack", "HP_OUT";
+               mux-int-port = <1>;
+               mux-ext-port = <3>;
+       };
+};
+
+&audmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_audmux>;
+       status = "okay";
+};
+
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_can1>;
+       xceiver-supply = <&reg_can_xcvr>;
+       status = "okay";
+};
+
+&clks {
+       assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+       assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
+                                <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+};
+
+&ecspi1 {
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi1>;
+       status = "okay";
+
+       flash: m25p80@0 {
+               compatible = "microchip,sst25vf016b";
+               spi-max-frequency = <20000000>;
+               reg = <0>;
+       };
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-mode = "rgmii";
+       interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
+                             <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
+       fsl,err006687-workaround-present;
+       status = "okay";
+};
+
+&hdmi {
+       ddc-i2c-bus = <&i2c2>;
+       status = "okay";
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       codec: sgtl5000@0a {
+               compatible = "fsl,sgtl5000";
+               reg = <0x0a>;
+               clocks = <&clks IMX6QDL_CLK_CKO>;
+               VDDA-supply = <&reg_2p5v>;
+               VDDIO-supply = <&reg_3p3v>;
+       };
+
+       rtc@68 {
+               compatible = "st,rv4162";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_rv4162>;
+               reg = <0x68>;
+               interrupts-extended = <&gpio6 7 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+
+       touchscreen@04 {
+               compatible = "eeti,egalax_ts";
+               reg = <0x04>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+               wakeup-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+       };
+
+       touchscreen@38 {
+               compatible = "edt,edt-ft5x06";
+               reg = <0x38>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+       };
+};
+
+&iomuxc {
+       pinctrl_audmux: audmuxgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT7__AUD3_RXD          0x130b0
+                       MX6QDL_PAD_CSI0_DAT4__AUD3_TXC          0x130b0
+                       MX6QDL_PAD_CSI0_DAT5__AUD3_TXD          0x110b0
+                       MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS         0x130b0
+               >;
+       };
+
+       pinctrl_backlight_lvds1: backlight-lvds1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_EB3__GPIO2_IO31          0x0b0b0
+               >;
+       };
+
+       pinctrl_can1: can1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX        0x1b0b0
+                       MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX        0x1b0b0
+               >;
+       };
+
+       pinctrl_can_xcvr: can-xcvrgrp {
+               fsl,pins = <
+                       /* Flexcan XCVR enable */
+                       MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x0b0b0
+               >;
+       };
+
+       pinctrl_ecspi1: ecspi1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D17__ECSPI1_MISO         0x100b1
+                       MX6QDL_PAD_EIM_D18__ECSPI1_MOSI         0x100b1
+                       MX6QDL_PAD_EIM_D16__ECSPI1_SCLK         0x100b1
+                       MX6QDL_PAD_EIM_D19__GPIO3_IO19          0x000b1
+               >;
+       };
+
+       pinctrl_enet: enetgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                       MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                       MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x100b0
+                       MX6QDL_PAD_RGMII_TD0__RGMII_TD0         0x100b0
+                       MX6QDL_PAD_RGMII_TD1__RGMII_TD1         0x100b0
+                       MX6QDL_PAD_RGMII_TD2__RGMII_TD2         0x100b0
+                       MX6QDL_PAD_RGMII_TD3__RGMII_TD3         0x100b0
+                       MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x100b0
+                       MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK    0x100b0
+                       MX6QDL_PAD_RGMII_RXC__RGMII_RXC         0x1b0b0
+                       MX6QDL_PAD_RGMII_RD0__RGMII_RD0         0x130b0
+                       MX6QDL_PAD_RGMII_RD1__RGMII_RD1         0x1b0b0
+                       MX6QDL_PAD_RGMII_RD2__RGMII_RD2         0x130b0
+                       MX6QDL_PAD_RGMII_RD3__RGMII_RD3         0x1b0b0
+                       MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x130b0
+                       MX6QDL_PAD_ENET_RXD0__GPIO1_IO27        0x030b0
+                       MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28       0x1b0b0
+                       MX6QDL_PAD_GPIO_6__ENET_IRQ             0x000b1
+               >;
+       };
+
+       pinctrl_gpio_keys: gpio-keysgrp {
+               fsl,pins = <
+                       /* Power Button */
+                       MX6QDL_PAD_NANDF_D3__GPIO2_IO03         0x1b0b0
+                       /* Menu Button */
+                       MX6QDL_PAD_NANDF_D1__GPIO2_IO01         0x1b0b0
+                       /* Home Button */
+                       MX6QDL_PAD_NANDF_D4__GPIO2_IO04         0x1b0b0
+                       /* Back Button */
+                       MX6QDL_PAD_NANDF_D2__GPIO2_IO02         0x1b0b0
+                       /* Volume Up Button */
+                       MX6QDL_PAD_GPIO_18__GPIO7_IO13          0x1b0b0
+                       /* Volume Down Button */
+                       MX6QDL_PAD_SD3_DAT4__GPIO7_IO01         0x1b0b0
+               >;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D21__I2C1_SCL    0x4001b8b1
+                       MX6QDL_PAD_EIM_D28__I2C1_SDA    0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_COL3__I2C2_SCL   0x4001b8b1
+                       MX6QDL_PAD_KEY_ROW3__I2C2_SDA   0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c3: i2c3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_5__I2C3_SCL     0x4001b8b1
+                       MX6QDL_PAD_GPIO_16__I2C3_SDA    0x4001b8b1
+                       MX6QDL_PAD_GPIO_9__GPIO1_IO09   0x1b0b0
+               >;
+       };
+
+       pinctrl_i2c3mux: i2c3muxgrp {
+               fsl,pins = <
+                       /* PCIe I2C enable */
+                       MX6QDL_PAD_EIM_OE__GPIO2_IO25   0x000b0
+               >;
+       };
+
+       pinctrl_j15: j15grp {
+               fsl,pins = <
+                       MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10
+                       MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x10
+                       MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x10
+                       MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x10
+                       MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x10
+                       MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x10
+                       MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x10
+                       MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x10
+                       MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x10
+                       MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x10
+                       MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x10
+                       MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x10
+                       MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x10
+                       MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x10
+                       MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x10
+                       MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x10
+                       MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x10
+                       MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x10
+                       MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x10
+                       MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x10
+                       MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x10
+                       MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x10
+                       MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x10
+                       MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x10
+                       MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x10
+                       MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x10
+                       MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x10
+                       MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x10
+               >;
+       };
+
+       pinctrl_pcie: pciegrp {
+               fsl,pins = <
+                       /* PCIe reset */
+                       MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0x030b0
+                       MX6QDL_PAD_EIM_DA4__GPIO3_IO04  0x030b0
+               >;
+       };
+
+       pinctrl_pwm1: pwm1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_DAT3__PWM1_OUT   0x030b1
+               >;
+       };
+
+       pinctrl_pwm3: pwm3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_DAT1__PWM3_OUT   0x030b1
+               >;
+       };
+
+       pinctrl_pwm4: pwm4grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_CMD__PWM4_OUT    0x030b1
+               >;
+       };
+
+       pinctrl_rv4162: rv4162grp {
+               fsl,pins = <
+                       MX6QDL_PAD_NANDF_CLE__GPIO6_IO07        0x1b0b0
+               >;
+       };
+
+       pinctrl_sgtl5000: sgtl5000grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_0__CCM_CLKO1            0x000b0
+                       MX6QDL_PAD_EIM_D29__GPIO3_IO29          0x130b0
+                       MX6QDL_PAD_EIM_DA2__GPIO3_IO02          0x130b0
+                       MX6QDL_PAD_ENET_RX_ER__GPIO1_IO24       0x130b0
+               >;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA      0x1b0b1
+                       MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA      0x1b0b1
+               >;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D26__UART2_TX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_D27__UART2_RX_DATA       0x1b0b1
+               >;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D24__UART3_TX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_D25__UART3_RX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_D23__UART3_CTS_B         0x1b0b1
+                       MX6QDL_PAD_EIM_D31__UART3_RTS_B         0x1b0b1
+               >;
+       };
+
+       pinctrl_usbh1: usbh1grp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_17__GPIO7_IO12          0x030b0
+               >;
+       };
+
+       pinctrl_usbotg: usbotggrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_1__USB_OTG_ID           0x17059
+                       MX6QDL_PAD_KEY_COL4__USB_OTG_OC         0x1b0b0
+                       /* power enable, high active */
+                       MX6QDL_PAD_EIM_D22__GPIO3_IO22          0x030b0
+               >;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD2_CLK__SD2_CLK             0x10071
+                       MX6QDL_PAD_SD2_CMD__SD2_CMD             0x17071
+                       MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x17071
+                       MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x17071
+                       MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x17071
+                       MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x17071
+               >;
+       };
+
+       pinctrl_usdhc3: usdhc3grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_CLK__SD3_CLK             0x10071
+                       MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17071
+                       MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x17071
+                       MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17071
+                       MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17071
+                       MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17071
+                       MX6QDL_PAD_SD3_DAT5__GPIO7_IO00         0x1b0b0
+               >;
+       };
+
+       pinctrl_usdhc4: usdhc4grp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD4_CMD__SD4_CMD             0x17059
+                       MX6QDL_PAD_SD4_CLK__SD4_CLK             0x10059
+                       MX6QDL_PAD_SD4_DAT0__SD4_DATA0          0x17059
+                       MX6QDL_PAD_SD4_DAT1__SD4_DATA1          0x17059
+                       MX6QDL_PAD_SD4_DAT2__SD4_DATA2          0x17059
+                       MX6QDL_PAD_SD4_DAT3__SD4_DATA3          0x17059
+                       MX6QDL_PAD_SD4_DAT4__SD4_DATA4          0x17059
+                       MX6QDL_PAD_SD4_DAT5__SD4_DATA5          0x17059
+                       MX6QDL_PAD_SD4_DAT6__SD4_DATA6          0x17059
+                       MX6QDL_PAD_SD4_DAT7__SD4_DATA7          0x17059
+               >;
+       };
+
+       pinctrl_wlan_vmmc: wlan-vmmcgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_NANDF_CS1__GPIO6_IO14        0x100b0
+                       MX6QDL_PAD_NANDF_CS2__GPIO6_IO15        0x030b0
+                       MX6QDL_PAD_NANDF_CS3__GPIO6_IO16        0x030b0
+                       MX6QDL_PAD_SD1_CLK__OSC32K_32K_OUT      0x000b0
+               >;
+       };
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&lcd_display_in>;
+};
+
+&ldb {
+       status = "okay";
+
+       lvds-channel@0 {
+               fsl,data-mapping = "spwg";
+               fsl,data-width = <18>;
+               status = "okay";
+
+               port@4 {
+                       reg = <4>;
+
+                       lvds0_out: endpoint {
+                               remote-endpoint = <&panel_in_lvds0>;
+                       };
+               };
+       };
+
+       lvds-channel@1 {
+               fsl,data-mapping = "spwg";
+               fsl,data-width = <18>;
+               status = "okay";
+
+               port@4 {
+                       reg = <4>;
+
+                       lvds1_out: endpoint {
+                               remote-endpoint = <&panel_in_lvds1>;
+                       };
+               };
+       };
+};
+
+&pcie {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pcie>;
+       reset-gpio = <&gpio6 31 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm1>;
+       status = "okay";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>;
+       status = "okay";
+};
+
+&pwm4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm4>;
+       status = "okay";
+};
+
+&ssi1 {
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       uart-has-rtscts;
+       status = "okay";
+};
+
+&usbh1 {
+       vbus-supply = <&reg_usb_h1_vbus>;
+       status = "okay";
+};
+
+&usbotg {
+       vbus-supply = <&reg_usb_otg_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       disable-over-current;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       bus-width = <4>;
+       non-removable;
+       vmmc-supply = <&reg_wlan_vmmc>;
+       cap-power-off-card;
+       keep-power-in-suspend;
+       status = "okay";
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio6>;
+               interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
+               ref-clock-frequency = <38400000>;
+       };
+};
+
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
+       bus-width = <4>;
+       vmmc-supply = <&reg_3p3v>;
+       status = "okay";
+};
+
+&usdhc4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc4>;
+       bus-width = <8>;
+       non-removable;
+       vmmc-supply = <&reg_1p8v>;
+       keep-power-in-suspend;
+       status = "okay";
+};
index db868bc42c0f0b7316b8a1ad62c21629b002865a..e476d01959ea3f337eb966559c241b3ef82f7fba 100644 (file)
@@ -167,7 +167,7 @@ sound {
                mux-ext-port = <3>;
        };
 
-       backlight_lcd: backlight_lcd {
+       backlight_lcd: backlight-lcd {
                compatible = "pwm-backlight";
                pwms = <&pwm1 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -176,7 +176,7 @@ backlight_lcd: backlight_lcd {
                status = "okay";
        };
 
-       backlight_lvds: backlight_lvds {
+       backlight_lvds: backlight-lvds {
                compatible = "pwm-backlight";
                pwms = <&pwm4 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -211,7 +211,7 @@ lcd_display_out: endpoint {
                };
        };
 
-       lcd_panel {
+       panel-lcd {
                compatible = "okaya,rs800480t-7x0gp";
                backlight = <&backlight_lcd>;
 
@@ -222,7 +222,7 @@ lcd_panel_in: endpoint {
                };
        };
 
-       panel {
+       panel-lvds0 {
                compatible = "hannstar,hsd100pxn1";
                backlight = <&backlight_lvds>;
 
@@ -413,7 +413,7 @@ MX6QDL_PAD_GPIO_6__ENET_IRQ         0x000b1
                        >;
                };
 
-               pinctrl_gpio_keys: gpio_keysgrp {
+               pinctrl_gpio_keys: gpio-keysgrp {
                        fsl,pins = <
                                /* Power Button */
                                MX6QDL_PAD_NANDF_D3__GPIO2_IO03         0x1b0b0
@@ -561,7 +561,7 @@ MX6QDL_PAD_NANDF_D6__GPIO2_IO06 0x1b0b0     /* CD */
                        >;
                };
 
-               pinctrl_wlan_vmmc: wlan_vmmcgrp {
+               pinctrl_wlan_vmmc: wlan-vmmcgrp {
                        fsl,pins = <
                                MX6QDL_PAD_NANDF_CS0__GPIO6_IO11        0x100b0
                                MX6QDL_PAD_NANDF_CS2__GPIO6_IO15        0x000b0
index e0280cac24846962dceacab5d10a6a8321c3ddc5..e9801a26f3b44f627de01a887dd8c35b11f21904 100644 (file)
@@ -427,10 +427,10 @@ &usdhc2 {
 };
 
 &usdhc3 {
-        pinctrl-names = "default";
-        pinctrl-0 = <&pinctrl_usdhc3
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3
                     &pinctrl_usdhc3_cdwp>;
        cd-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
        wp-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
-        status = "disabled";
+       status = "disabled";
 };
index e000e6f12bf527d2ea937baf889a0ab07aca2d61..52390ba83e81687aa2c2d3b73ed1271f530b6324 100644 (file)
@@ -283,7 +283,7 @@ codec: cs42888@48 {
                VD-supply = <&reg_audio>;
                VLS-supply = <&reg_audio>;
                VLC-supply = <&reg_audio>;
-        };
+       };
 
 };
 
@@ -613,8 +613,6 @@ &usdhc3 {
 &weim {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_weim_nor &pinctrl_weim_cs0>;
-       #address-cells = <2>;
-       #size-cells = <1>;
        ranges = <0 0 0x08000000 0x08000000>;
        status = "disabled"; /* pin conflict with SPI NOR */
 
index 81dd6cd1937d4c22f110d7073e01b1869c942950..1f9076e271e42098b58a230d38b38d0fef5c2ed5 100644 (file)
@@ -153,7 +153,7 @@ sound {
                mux-ext-port = <4>;
        };
 
-       backlight_lcd: backlight_lcd {
+       backlight_lcd: backlight-lcd {
                compatible = "pwm-backlight";
                pwms = <&pwm1 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -162,7 +162,7 @@ backlight_lcd: backlight_lcd {
                status = "okay";
        };
 
-       backlight_lvds: backlight_lvds {
+       backlight_lvds: backlight-lvds {
                compatible = "pwm-backlight";
                pwms = <&pwm4 0 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -197,7 +197,7 @@ lcd_display_out: endpoint {
                };
        };
 
-       lcd_panel {
+       panel-lcd {
                compatible = "okaya,rs800480t-7x0gp";
                backlight = <&backlight_lcd>;
 
@@ -208,7 +208,7 @@ lcd_panel_in: endpoint {
                };
        };
 
-       panel {
+       panel-lvds0 {
                compatible = "hannstar,hsd100pxn1";
                backlight = <&backlight_lvds>;
 
@@ -378,7 +378,7 @@ MX6QDL_PAD_GPIO_6__ENET_IRQ         0x000b1
                        >;
                };
 
-               pinctrl_gpio_keys: gpio_keysgrp {
+               pinctrl_gpio_keys: gpio-keysgrp {
                        fsl,pins = <
                                /* Power Button */
                                MX6QDL_PAD_NANDF_D3__GPIO2_IO03         0x1b0b0
index 8e9e0d98db2fd88109423cbaf112611875e2f451..55ef53571fddd9d06caa7a66c3daa2b87d72a721 100644 (file)
@@ -129,8 +129,8 @@ leds {
                pinctrl-0 = <&pinctrl_gpio_leds>;
 
                red {
-                       gpios = <&gpio1 2 0>;
-                       default-state = "on";
+                       gpios = <&gpio1 2 0>;
+                       default-state = "on";
                };
        };
 
index ac9529f855930ce3b0aa584208e0d9fe233f4a0f..2bf2e623ac1e8bd53d0623d44f5de8e0c31111bc 100644 (file)
@@ -429,8 +429,8 @@ MX6QDL_PAD_EIM_D19__GPIO3_IO19              0x0b0b0 /* SPI CS1 */
        pinctrl_edt_ft5x06: edt-ft5x06grp {
                fsl,pins = <
                        MX6QDL_PAD_NANDF_CS2__GPIO6_IO15        0x1b0b0 /* Interrupt */
-                       MX6QDL_PAD_EIM_A16__GPIO2_IO22          0x1b0b0 /* Reset */
-                       MX6QDL_PAD_EIM_A17__GPIO2_IO21          0x1b0b0 /* Wake */
+                       MX6QDL_PAD_EIM_A16__GPIO2_IO22          0x1b0b0 /* Reset */
+                       MX6QDL_PAD_EIM_A17__GPIO2_IO21          0x1b0b0 /* Wake */
                >;
        };
 
@@ -481,21 +481,21 @@ MX6QDL_PAD_DISP0_DAT0__GPIO4_IO21 0x1b0b0 /* Flexcan XCVR enable */
 
        pinctrl_gpmi_nand: gpminandgrp {
                fsl,pins = <
-                       MX6QDL_PAD_NANDF_CLE__NAND_CLE          0x0b0b1
-                       MX6QDL_PAD_NANDF_ALE__NAND_ALE          0x0b0b1
-                       MX6QDL_PAD_NANDF_WP_B__NAND_WP_B        0x0b0b1
+                       MX6QDL_PAD_NANDF_CLE__NAND_CLE          0x0b0b1
+                       MX6QDL_PAD_NANDF_ALE__NAND_ALE          0x0b0b1
+                       MX6QDL_PAD_NANDF_WP_B__NAND_WP_B        0x0b0b1
                        MX6QDL_PAD_NANDF_RB0__NAND_READY_B      0x0b000
-                       MX6QDL_PAD_NANDF_CS0__NAND_CE0_B        0x0b0b1
-                       MX6QDL_PAD_SD4_CMD__NAND_RE_B           0x0b0b1
-                       MX6QDL_PAD_SD4_CLK__NAND_WE_B           0x0b0b1
-                       MX6QDL_PAD_NANDF_D0__NAND_DATA00        0x0b0b1
-                       MX6QDL_PAD_NANDF_D1__NAND_DATA01        0x0b0b1
-                       MX6QDL_PAD_NANDF_D2__NAND_DATA02        0x0b0b1
-                       MX6QDL_PAD_NANDF_D3__NAND_DATA03        0x0b0b1
-                       MX6QDL_PAD_NANDF_D4__NAND_DATA04        0x0b0b1
-                       MX6QDL_PAD_NANDF_D5__NAND_DATA05        0x0b0b1
-                       MX6QDL_PAD_NANDF_D6__NAND_DATA06        0x0b0b1
-                       MX6QDL_PAD_NANDF_D7__NAND_DATA07        0x0b0b1
+                       MX6QDL_PAD_NANDF_CS0__NAND_CE0_B        0x0b0b1
+                       MX6QDL_PAD_SD4_CMD__NAND_RE_B           0x0b0b1
+                       MX6QDL_PAD_SD4_CLK__NAND_WE_B           0x0b0b1
+                       MX6QDL_PAD_NANDF_D0__NAND_DATA00        0x0b0b1
+                       MX6QDL_PAD_NANDF_D1__NAND_DATA01        0x0b0b1
+                       MX6QDL_PAD_NANDF_D2__NAND_DATA02        0x0b0b1
+                       MX6QDL_PAD_NANDF_D3__NAND_DATA03        0x0b0b1
+                       MX6QDL_PAD_NANDF_D4__NAND_DATA04        0x0b0b1
+                       MX6QDL_PAD_NANDF_D5__NAND_DATA05        0x0b0b1
+                       MX6QDL_PAD_NANDF_D6__NAND_DATA06        0x0b0b1
+                       MX6QDL_PAD_NANDF_D7__NAND_DATA07        0x0b0b1
                >;
        };
 
index ef7fa62b989861984773adfaa685f364024e6695..a3208913226395ebfc98665770bc5faefb0129b2 100644 (file)
@@ -28,7 +28,7 @@ MX6QDL_PAD_ENET_TXD0__GPIO1_IO30      0x80000000      /* WL_WAKE */
                                MX6QDL_PAD_EIM_D29__GPIO3_IO29          0x80000000      /* RGMII_nRST */
                                MX6QDL_PAD_EIM_DA13__GPIO3_IO13         0x80000000      /* BT_ON */
                                MX6QDL_PAD_EIM_DA14__GPIO3_IO14         0x80000000      /* BT_WAKE */
-                               MX6QDL_PAD_EIM_DA15__GPIO3_IO15         0x80000000      /* BT_HOST_WAKE */                              
+                               MX6QDL_PAD_EIM_DA15__GPIO3_IO15         0x80000000      /* BT_HOST_WAKE */
                        >;
                };
        };
index 2b9c2be436f944d9e10265351a62bbaac2180ffc..82dc5744ae19b175dd18b953598f90cbef31bd18 100644 (file)
@@ -129,8 +129,8 @@ MX6QDL_PAD_GPIO_6__ENET_IRQ         0x000b1
 
                pinctrl_i2c1: i2c1grp {
                        fsl,pins = <
-                               MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
-                               MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                               MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
+                               MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
                        >;
                };
 
index b13b0b2db88163eec89f9b4fb4c5b241b41577c9..53e6e63cbb0235d634f108f12ad1fd75001817dd 100644 (file)
 #include <dt-bindings/clock/imx6qdl-clock.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
-#include "skeleton.dtsi"
-
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                can0 = &can1;
@@ -204,9 +205,9 @@ pcie: pcie@0x01000000 {
                        #interrupt-cells = <1>;
                        interrupt-map-mask = <0 0 0 0x7>;
                        interrupt-map = <0 0 0 1 &gpc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
-                                       <0 0 0 2 &gpc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
-                                       <0 0 0 3 &gpc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
-                                       <0 0 0 4 &gpc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+                                       <0 0 0 2 &gpc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0 0 0 3 &gpc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0 0 0 4 &gpc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clks IMX6QDL_CLK_PCIE_AXI>,
                                 <&clks IMX6QDL_CLK_LVDS1_GATE>,
                                 <&clks IMX6QDL_CLK_PCIE_REF_125M>;
@@ -1092,10 +1093,13 @@ mmdc1: mmdc@021b4000 { /* MMDC1 */
                        };
 
                        weim: weim@021b8000 {
+                               #address-cells = <2>;
+                               #size-cells = <1>;
                                compatible = "fsl,imx6q-weim";
                                reg = <0x021b8000 0x4000>;
                                interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX6QDL_CLK_EIM_SLOW>;
+                               fsl,weim-cs-gpr = <&gpr>;
                        };
 
                        ocotp: ocotp@021bc000 {
index 886dbf2eca49b8d24866f31cca6a5975cd71d463..e0fdd0fda3614694bd2d3b4466638c3ccbd28ade 100644 (file)
@@ -85,5 +85,12 @@ ipu2: ipu@02800000 {
                pcie: pcie@0x01000000 {
                        compatible = "fsl,imx6qp-pcie", "snps,dw-pcie";
                };
+
+               aips-bus@02100000 {
+                       mmdc0: mmdc@021b0000 { /* MMDC0 */
+                               compatible = "fsl,imx6qp-mmdc", "fsl,imx6q-mmdc";
+                               reg = <0x021b0000 0x4000>;
+                       };
+               };
        };
 };
index 02378db3f5fce2154e55d7af2b2bd3e60e3a95aa..4fd6de29f07db21ba1c4552b8d4e37c59858699f 100644 (file)
@@ -8,11 +8,13 @@
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
-#include "skeleton.dtsi"
 #include "imx6sl-pinfunc.h"
 #include <dt-bindings/clock/imx6sl-clock.h>
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec;
                gpio0 = &gpio1;
@@ -893,8 +895,11 @@ rngb: rngb@021b4000 {
                        };
 
                        weim: weim@021b8000 {
+                               #address-cells = <2>;
+                               #size-cells = <1>;
                                reg = <0x021b8000 0x4000>;
                                interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
+                               fsl,weim-cs-gpr = <&gpr>;
                        };
 
                        ocotp: ocotp@021bc000 {
index 9d70cfd40aff662bd9ede619f79a7f34d992f44d..da815527a7f8f1c9a2bbc667f9725fc24baed585 100644 (file)
@@ -192,10 +192,10 @@ &i2c3 {
 };
 
 &i2c4 {
-        clock-frequency = <100000>;
-        pinctrl-names = "default";
-        pinctrl-0 = <&pinctrl_i2c4>;
-        status = "okay";
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c4>;
+       status = "okay";
 
        codec: wm8962@1a {
                compatible = "wlf,wm8962";
@@ -290,6 +290,14 @@ &usbotg2 {
        status = "okay";
 };
 
+&usbphy1 {
+       fsl,tx-d-cal = <106>;
+};
+
+&usbphy2 {
+       fsl,tx-d-cal = <106>;
+};
+
 &usdhc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usdhc2>;
diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo-basic.dts b/arch/arm/boot/dts/imx6sx-udoo-neo-basic.dts
new file mode 100644 (file)
index 0000000..0c1fc1a
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2016 Andreas Färber
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library 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 library 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "imx6sx-udoo-neo.dtsi"
+
+/ {
+       model = "UDOO Neo Basic";
+       compatible = "udoo,neobasic", "fsl,imx6sx";
+
+       memory {
+               reg = <0x80000000 0x20000000>;
+       };
+};
+
+&fec1 {
+       phy-handle = <&ethphy1>;
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy1: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts b/arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts
new file mode 100644 (file)
index 0000000..5d6c227
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2016 Andreas Färber
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library 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 library 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "imx6sx-udoo-neo.dtsi"
+
+/ {
+       model = "UDOO Neo Extended";
+       compatible = "udoo,neoextended", "fsl,imx6sx";
+
+       memory {
+               reg = <0x80000000 0x40000000>;
+       };
+};
diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo-full.dts b/arch/arm/boot/dts/imx6sx-udoo-neo-full.dts
new file mode 100644 (file)
index 0000000..653ceb2
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2016 Andreas Färber
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library 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 library 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "imx6sx-udoo-neo.dtsi"
+
+/ {
+       model = "UDOO Neo Full";
+       compatible = "udoo,neofull", "fsl,imx6sx";
+
+       memory {
+               reg = <0x80000000 0x40000000>;
+       };
+};
+
+&fec1 {
+       phy-handle = <&ethphy1>;
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy1: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
new file mode 100644 (file)
index 0000000..2b65d26
--- /dev/null
@@ -0,0 +1,293 @@
+/*
+ * Copyright (c) 2016 Andreas Färber
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library 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 library 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "imx6sx.dtsi"
+
+/ {
+       compatible = "fsl,imx6sx";
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               red {
+                       label = "udoo-neo:red:mmc";
+                       gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+                       linux,default-trigger = "mmc0";
+               };
+
+               orange {
+                       label = "udoo-neo:orange:user";
+                       gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;
+                       default-state = "keep";
+               };
+       };
+
+       reg_sdio_pwr: regulator-sdio-pwr {
+               compatible = "regulator-fixed";
+               gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               regulator-name = "SDIO_PWR";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+       };
+};
+
+&cpu0 {
+       arm-supply = <&sw1a_reg>;
+       soc-supply = <&sw1c_reg>;
+};
+
+&fec1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet1>;
+       phy-mode = "rmii";
+       phy-reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       clock-frequency = <100000>;
+       status = "okay";
+
+       pmic: pmic@08 {
+               compatible = "fsl,pfuze3000";
+               reg = <0x08>;
+
+               regulators {
+                       sw1a_reg: sw1a {
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1475000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw1c_reg: sw1b {
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1475000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw2_reg: sw2 {
+                               regulator-min-microvolt = <1500000>;
+                               regulator-max-microvolt = <1850000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3a_reg: sw3 {
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <1650000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       swbst_reg: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                       };
+
+                       snvs_reg: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vref_reg: vrefddr {
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vgen1_reg: vldo1 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen2_reg: vldo2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       vgen3_reg: vccsd {
+                               regulator-min-microvolt = <2850000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen4_reg: v33 {
+                               regulator-min-microvolt = <2850000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen5_reg: vldo3 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen6_reg: vldo4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&iomuxc {
+       pinctrl_enet1: enet1grp {
+               fsl,pins =
+                       <MX6SX_PAD_ENET1_CRS__GPIO2_IO_1        0xa0b1>,
+                       <MX6SX_PAD_ENET1_MDC__ENET1_MDC         0xa0b1>,
+                       <MX6SX_PAD_ENET1_MDIO__ENET1_MDIO       0xa0b1>,
+                       <MX6SX_PAD_RGMII1_TD0__ENET1_TX_DATA_0  0xa0b1>,
+                       <MX6SX_PAD_RGMII1_TD1__ENET1_TX_DATA_1  0xa0b1>,
+                       <MX6SX_PAD_RGMII1_TX_CTL__ENET1_TX_EN   0xa0b1>,
+
+                       <MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x3081>,
+                       <MX6SX_PAD_ENET2_TX_CLK__GPIO2_IO_9     0x3081>,
+                       <MX6SX_PAD_RGMII1_RD0__ENET1_RX_DATA_0  0x3081>,
+                       <MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1  0x3081>,
+                       <MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN   0x3081>,
+                       <MX6SX_PAD_RGMII1_RXC__ENET1_RX_ER      0x3081>,
+
+                       <MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M      0x91>;
+       };
+
+       pinctrl_i2c1: i2c1grp {
+               fsl,pins =
+                       <MX6SX_PAD_GPIO1_IO00__I2C1_SCL         0x4001b8b1>,
+                       <MX6SX_PAD_GPIO1_IO01__I2C1_SDA         0x4001b8b1>;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins =
+                       <MX6SX_PAD_GPIO1_IO04__UART1_TX         0x1b0b1>,
+                       <MX6SX_PAD_GPIO1_IO05__UART1_RX         0x1b0b1>;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins =
+                       <MX6SX_PAD_GPIO1_IO06__UART2_TX         0x1b0b1>,
+                       <MX6SX_PAD_GPIO1_IO07__UART2_RX         0x1b0b1>;
+       };
+
+       pinctrl_uart5: uart5grp {
+               fsl,pins =
+                       <MX6SX_PAD_SD4_DATA4__UART5_RX          0x1b0b1>,
+                       <MX6SX_PAD_SD4_DATA5__UART5_TX          0x1b0b1>;
+       };
+
+       pinctrl_uart6: uart6grp {
+               fsl,pins =
+                       <MX6SX_PAD_CSI_DATA00__UART6_RI_B       0x1b0b1>,
+                       <MX6SX_PAD_CSI_DATA01__UART6_DSR_B      0x1b0b1>,
+                       <MX6SX_PAD_CSI_DATA02__UART6_DTR_B      0x1b0b1>,
+                       <MX6SX_PAD_CSI_DATA03__UART6_DCD_B      0x1b0b1>,
+                       <MX6SX_PAD_CSI_DATA04__UART6_RX         0x1b0b1>,
+                       <MX6SX_PAD_CSI_DATA05__UART6_TX         0x1b0b1>,
+                       <MX6SX_PAD_CSI_DATA06__UART6_RTS_B      0x1b0b1>,
+                       <MX6SX_PAD_CSI_DATA07__UART6_CTS_B      0x1b0b1>;
+       };
+
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins =
+                       <MX6SX_PAD_SD2_CMD__USDHC2_CMD          0x17059>,
+                       <MX6SX_PAD_SD2_CLK__USDHC2_CLK          0x10059>,
+                       <MX6SX_PAD_SD2_DATA0__USDHC2_DATA0      0x17059>,
+                       <MX6SX_PAD_SD2_DATA1__USDHC2_DATA1      0x17059>,
+                       <MX6SX_PAD_SD2_DATA2__USDHC2_DATA2      0x17059>,
+                       <MX6SX_PAD_SD2_DATA3__USDHC2_DATA3      0x17059>,
+                       <MX6SX_PAD_SD1_DATA0__GPIO6_IO_2        0x17059>; /* CD */
+       };
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+/* Cortex-M4 serial */
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "disabled";
+};
+
+/* Arduino serial */
+&uart5 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart5>;
+       status = "disabled";
+};
+
+&uart6 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart6>;
+       uart-has-rtscts;
+       status = "disabled";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       vmmc-supply = <&reg_sdio_pwr>;
+       bus-width = <4>;
+       cd-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>;
+       no-1-8-v;
+       keep-power-in-suspend;
+       wakeup-source;
+       status = "okay";
+};
index 1a473e83efbfd8960ac0af7f25469d227caa2d3f..076a30f9bcae26d8e62b119ee92fd71d1944e922 100644 (file)
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include "imx6sx-pinfunc.h"
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                can0 = &flexcan1;
                can1 = &flexcan2;
@@ -858,7 +860,7 @@ fec1: ethernet@02188000 {
                                fsl,num-tx-queues=<3>;
                                fsl,num-rx-queues=<3>;
                                status = "disabled";
-                        };
+                       };
 
                        mlb: mlb@0218c000 {
                                reg = <0x0218c000 0x4000>;
@@ -968,10 +970,13 @@ fec2: ethernet@021b4000 {
                        };
 
                        weim: weim@021b8000 {
+                               #address-cells = <2>;
+                               #size-cells = <1>;
                                compatible = "fsl,imx6sx-weim", "fsl,imx6q-weim";
                                reg = <0x021b8000 0x4000>;
                                interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX6SX_CLK_EIM_SLOW>;
+                               fsl,weim-cs-gpr = <&gpr>;
                        };
 
                        ocotp: ocotp@021bc000 {
@@ -1143,7 +1148,7 @@ csi2: csi@0221c000 {
                                lcdif1: lcdif@02220000 {
                                        compatible = "fsl,imx6sx-lcdif", "fsl,imx28-lcdif";
                                        reg = <0x02220000 0x4000>;
-                                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                                       interrupts = <GIC_SPI 5 IRQ_TYPE_EDGE_RISING>;
                                        clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
                                                 <&clks IMX6SX_CLK_LCDIF_APB>,
                                                 <&clks IMX6SX_CLK_DISPLAY_AXI>;
@@ -1154,7 +1159,7 @@ lcdif1: lcdif@02220000 {
                                lcdif2: lcdif@02224000 {
                                        compatible = "fsl,imx6sx-lcdif", "fsl,imx28-lcdif";
                                        reg = <0x02224000 0x4000>;
-                                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                                       interrupts = <GIC_SPI 6 IRQ_TYPE_EDGE_RISING>;
                                        clocks = <&clks IMX6SX_CLK_LCDIF2_PIX>,
                                                 <&clks IMX6SX_CLK_LCDIF_APB>,
                                                 <&clks IMX6SX_CLK_DISPLAY_AXI>;
@@ -1181,7 +1186,7 @@ adc1: adc@02280000 {
                                fsl,adck-max-frequency = <30000000>, <40000000>,
                                                         <20000000>;
                                status = "disabled";
-                        };
+                       };
 
                        adc2: adc@02284000 {
                                compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
@@ -1192,7 +1197,7 @@ adc2: adc@02284000 {
                                fsl,adck-max-frequency = <30000000>, <40000000>,
                                                         <20000000>;
                                status = "disabled";
-                        };
+                       };
 
                        wdog3: wdog@02288000 {
                                compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
index e281d5087d4ad66c99accfb8980c6c027ef4cc51..00f98e5bfcaf3196fd8e9f24f439da97e18315b4 100644 (file)
@@ -225,7 +225,7 @@ &uart2 {
 };
 
 &usbotg1 {
-       dr_mode = "peripheral";
+       dr_mode = "otg";
        status = "okay";
 };
 
@@ -235,6 +235,14 @@ &usbotg2 {
        status = "okay";
 };
 
+&usbphy1 {
+       fsl,tx-d-cal = <106>;
+};
+
+&usbphy2 {
+       fsl,tx-d-cal = <106>;
+};
+
 &usdhc1 {
        pinctrl-names = "default", "state_100mhz", "state_200mhz";
        pinctrl-0 = <&pinctrl_usdhc1>;
diff --git a/arch/arm/boot/dts/imx6ul-liteboard.dts b/arch/arm/boot/dts/imx6ul-liteboard.dts
new file mode 100644 (file)
index 0000000..6e04cb9
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2016 Grinn
+ *
+ * Author: Marcin Niestroj <m.niestroj@grinn-global.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "imx6ul-litesom.dtsi"
+
+/ {
+       model = "Grinn i.MX6UL liteBoard";
+       compatible = "grinn,imx6ul-liteboard", "grinn,imx6ul-litesom",
+                    "fsl,imx6ul";
+
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       reg_usb_otg1_vbus: regulator-usb-otg1-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb_otg1_vbus>;
+               regulator-name = "usb_otg1_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio2 8 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&iomuxc {
+       pinctrl_enet1: enet1grp {
+               fsl,pins = <
+                       MX6UL_PAD_GPIO1_IO07__ENET1_MDC         0x1b0b0
+                       MX6UL_PAD_GPIO1_IO06__ENET1_MDIO        0x1b0b0
+                       MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN      0x1b0b0
+                       MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER      0x1b0b0
+                       MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
+                       MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
+                       MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN      0x1b0b0
+                       MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
+                       MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
+                       MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1  0x4001b031
+               >;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX   0x1b0b1
+                       MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX   0x1b0b1
+               >;
+       };
+
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART1_RTS_B__GPIO1_IO19       0x17059
+                       MX6UL_PAD_SD1_CMD__USDHC1_CMD           0x17059
+                       MX6UL_PAD_SD1_CLK__USDHC1_CLK           0x10071
+                       MX6UL_PAD_SD1_DATA0__USDHC1_DATA0       0x17059
+                       MX6UL_PAD_SD1_DATA1__USDHC1_DATA1       0x17059
+                       MX6UL_PAD_SD1_DATA2__USDHC1_DATA2       0x17059
+                       MX6UL_PAD_SD1_DATA3__USDHC1_DATA3       0x17059
+               >;
+       };
+
+       pinctrl_usb_otg1_vbus: usb-otg1-vbus {
+               fsl,pins = <
+                       MX6UL_PAD_ENET2_RX_DATA0__GPIO2_IO08    0x79
+               >;
+       };
+};
+
+&fec1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet1>;
+       phy-mode = "rmii";
+       phy-handle = <&ethphy0>;
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy0: ethernet-phy@0 {
+                       reg = <0>;
+               };
+       };
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&usbotg1 {
+       vbus-supply = <&reg_usb_otg1_vbus>;
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
+       no-1-8-v;
+       keep-power-in-suspend;
+       wakeup-source;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6ul-litesom.dtsi b/arch/arm/boot/dts/imx6ul-litesom.dtsi
new file mode 100644 (file)
index 0000000..461292d
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2016 Grinn
+ *
+ * Author: Marcin Niestroj <m.niestroj@grinn-global.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "imx6ul.dtsi"
+
+/ {
+       model = "Grinn i.MX6UL liteSOM";
+       compatible = "grinn,imx6ul-litesom", "fsl,imx6ul";
+
+       memory {
+               reg = <0x80000000 0x20000000>;
+       };
+};
+
+&iomuxc {
+       pinctrl_usdhc2: usdhc2grp {
+               fsl,pins = <
+                       MX6UL_PAD_NAND_RE_B__USDHC2_CLK     0x10069
+                       MX6UL_PAD_NAND_WE_B__USDHC2_CMD     0x17059
+                       MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059
+                       MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059
+                       MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059
+                       MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
+                       MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059
+                       MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059
+                       MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059
+                       MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059
+                       MX6UL_PAD_NAND_ALE__USDHC2_RESET_B  0x17059
+               >;
+       };
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       no-1-8-v;
+       non-removable;
+       keep-power-in-suspend;
+       wakeup-source;
+       bus-width = <8>;
+       status = "okay";
+};
index c5c05fdccc783dc65b1612d56d228c07c8e4e70c..39845a7e046303e6448e506d7199a49b7530de74 100644 (file)
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include "imx6ul-pinfunc.h"
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                ethernet0 = &fec1;
                ethernet1 = &fec2;
diff --git a/arch/arm/boot/dts/imx6ull-14x14-evk.dts b/arch/arm/boot/dts/imx6ull-14x14-evk.dts
new file mode 100644 (file)
index 0000000..db5bc07
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "imx6ul-14x14-evk.dts"
+
+/ {
+       model = "Freescale i.MX6 UlltraLite 14x14 EVK Board";
+       compatible = "fsl,imx6ull-14x14-evk", "fsl,imx6ull";
+};
+
+&clks {
+       assigned-clocks = <&clks IMX6UL_CLK_PLL3_PFD2>;
+       assigned-clock-rates = <320000000>;
+};
diff --git a/arch/arm/boot/dts/imx6ull-pinfunc.h b/arch/arm/boot/dts/imx6ull-pinfunc.h
new file mode 100644 (file)
index 0000000..1182023
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2016 Freescale Semiconductor, 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.
+ */
+
+#ifndef __DTS_IMX6ULL_PINFUNC_H
+#define __DTS_IMX6ULL_PINFUNC_H
+
+#include "imx6ul-pinfunc.h"
+/*
+ * The pin function ID is a tuple of
+ * <mux_reg conf_reg input_reg mux_mode input_val>
+ */
+#define MX6ULL_PAD_ENET2_RX_DATA0__EPDC_SDDO08                    0x00E4 0x0370 0x0000 0x9 0x0
+#define MX6ULL_PAD_ENET2_RX_DATA1__EPDC_SDDO09                    0x00E8 0x0374 0x0000 0x9 0x0
+#define MX6ULL_PAD_ENET2_RX_EN__EPDC_SDDO10                       0x00EC 0x0378 0x0000 0x9 0x0
+#define MX6ULL_PAD_ENET2_TX_DATA0__EPDC_SDDO11                    0x00F0 0x037C 0x0000 0x9 0x0
+#define MX6ULL_PAD_ENET2_TX_DATA1__EPDC_SDDO12                    0x00F4 0x0380 0x0000 0x9 0x0
+#define MX6ULL_PAD_ENET2_TX_EN__EPDC_SDDO13                       0x00F8 0x0384 0x0000 0x9 0x0
+#define MX6ULL_PAD_ENET2_TX_CLK__EPDC_SDDO14                      0x00FC 0x0388 0x0000 0x9 0x0
+#define MX6ULL_PAD_ENET2_RX_ER__EPDC_SDDO15                       0x0100 0x038C 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_CLK__EPDC_SDCLK                            0x0104 0x0390 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_ENABLE__EPDC_SDLE                          0x0108 0x0394 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_HSYNC__EPDC_SDOE                           0x010C 0x0398 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_VSYNC__EPDC_SDCE0                          0x0110 0x039C 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_RESET__EPDC_GDOE                           0x0114 0x03A0 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA00__EPDC_SDDO00                        0x0118 0x03A4 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA01__EPDC_SDDO01                        0x011C 0x03A8 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA02__EPDC_SDDO02                        0x0120 0x03AC 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA03__EPDC_SDDO03                        0x0124 0x03B0 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA04__EPDC_SDDO04                        0x0128 0x03B4 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA05__EPDC_SDDO05                        0x012C 0x03B8 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA06__EPDC_SDDO06                        0x0130 0x03BC 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA07__EPDC_SDDO07                        0x0134 0x03C0 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA14__EPDC_SDSHR                         0x0150 0x03DC 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA15__EPDC_GDRL                          0x0154 0x03E0 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA16__EPDC_GDCLK                         0x0158 0x03E4 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA17__EPDC_GDSP                          0x015C 0x03E8 0x0000 0x9 0x0
+#define MX6ULL_PAD_LCD_DATA21__EPDC_SDCE1                         0x016C 0x03F8 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_MCLK__ESAI_TX3_RX2                         0x01D4 0x0460 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_PIXCLK__ESAI_TX2_RX3                       0x01D8 0x0464 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_VSYNC__ESAI_TX4_RX1                        0x01DC 0x0468 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_HSYNC__ESAI_TX1                            0x01E0 0x046C 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA00__ESAI_TX_HF_CLK                     0x01E4 0x0470 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA01__ESAI_RX_HF_CLK                     0x01E8 0x0474 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA02__ESAI_RX_FS                         0x01EC 0x0478 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA03__ESAI_RX_CLK                        0x01F0 0x047C 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA04__ESAI_TX_FS                         0x01F4 0x0480 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA05__ESAI_TX_CLK                        0x01F8 0x0484 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA06__ESAI_TX5_RX0                       0x01FC 0x0488 0x0000 0x9 0x0
+#define MX6ULL_PAD_CSI_DATA07__ESAI_T0                            0x0200 0x048C 0x0000 0x9 0x0
+
+#endif /* __DTS_IMX6ULL_PINFUNC_H */
diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi
new file mode 100644 (file)
index 0000000..dee8ab8
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2016 Freescale Semiconductor, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "imx6ul.dtsi"
+#include "imx6ull-pinfunc.h"
index 0d7d5ac6257b5080f84b855d62f9edc93af74fea..51dfcc16e4b882126aa93468ed24d31283124dee 100644 (file)
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include "imx7d-pinfunc.h"
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        aliases {
                gpio0 = &gpio1;
                gpio1 = &gpio2;
index 6f16d09dc5a4142037bdb7a7439f1049a0ab2370..e8b249f92fb3ae274bd50895545a1fd40a46845b 100644 (file)
@@ -10,6 +10,41 @@ / {
        compatible = "arm,integrator-ap";
        dma-ranges = <0x80000000 0x0 0x80000000>;
 
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       /*
+                        * Since the board has pluggable CPU modules, we
+                        * cannot define a proper compatible here. Let the
+                        * boot loader fill in the apropriate compatible
+                        * string if necessary.
+                        */
+                       /* compatible = "arm,arm926ej-s"; */
+                       reg = <0>;
+                       /*
+                        * The documentation in ARM DUI 0138E page 3-12 states
+                        * that the maximum frequency for this clock is 200 MHz
+                        * but painful trial-and-error has proved to me that it
+                        * is actually just hanging the system above 71 MHz.
+                        * Sad but true.
+                        */
+                                        /* kHz     uV   */
+                       operating-points = <71000  0
+                                           66000  0
+                                           60000  0
+                                           48000  0
+                                           36000  0
+                                           24000  0
+                                           12000  0>;
+                       clocks = <&cmosc>;
+                       clock-names = "cpu";
+                       clock-latency = <1000000>; /* 1 ms */
+               };
+       };
+
        aliases {
                arm,timer-primary = &timer2;
                arm,timer-secondary = &timer1;
index 1b5e4b006b7249ade96593da67f57ec3d237618d..97f38b57a702f3cf0c0a5f2233f4803c016f9964 100644 (file)
@@ -13,6 +13,32 @@ chosen {
                bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
        };
 
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       /*
+                        * Since the board has pluggable CPU modules, we
+                        * cannot define a proper compatible here. Let the
+                        * boot loader fill in the apropriate compatible
+                        * string if necessary.
+                        */
+                       /* compatible = "arm,arm920t"; */
+                       reg = <0>;
+                       /*
+                        * TBD comment.
+                        */
+                                        /* kHz     uV   */
+                       operating-points = <50000  0
+                                           48000  0>;
+                       clocks = <&cmcore>;
+                       clock-names = "cpu";
+                       clock-latency = <1000000>; /* 1 ms */
+               };
+       };
+
        /*
         * The Integrator/CP overall clocking architecture can be found in
         * ARM DUI 0184B page 7-28 "Integrator/CP922T system clocks" which
index 2919c5190653dabffec16ddc6e36bd1c223c0705..63c7cf0c6b6dc36d762cc0ef3c1617f001b35a9b 100644 (file)
@@ -72,6 +72,7 @@ pmu {
        soc {
                #address-cells = <1>;
                #size-cells = <1>;
+               #pinctrl-cells = <1>;
                compatible = "ti,keystone","simple-bus";
                ranges = <0x0 0x0 0x0 0xc0000000>;
                dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
index 2ee3d0ac2816b956e9aa6ec21a80525d82bf77fa..0c5e74e79ba2d73163eea0f9eb3800a75499fa91 100644 (file)
@@ -59,6 +59,7 @@ k2l_pmx: pinmux@02620690 {
                        reg = <0x02620690 0xc>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #pinctrl-cells = <2>;
                        pinctrl-single,bit-per-mux;
                        pinctrl-single,register-width = <32>;
                        pinctrl-single,function-mask = <0x1>;
index 1e9a72100a450dacb3ebcc8d5d44460708b8f3d2..330aada6d33fb512795a0068f1831a8a7acf4499 100644 (file)
@@ -4,7 +4,7 @@
 #include "kirkwood-6282.dtsi"
 
 / {
-       model = "Univeral Scientific Industrial Co. Topkick-1281P2";
+       model = "Universal Scientific Industrial Co. Topkick-1281P2";
        compatible = "usi,topkick-1281P2", "usi,topkick", "marvell,kirkwood-88f6282", "marvell,kirkwood";
 
        memory {
index b5841fab51c10c31733447c1a61a65fac3984539..d81fe433e3c82eafa0ea1703a5b6fe7905e6f7ac 100644 (file)
@@ -479,6 +479,8 @@ pwm1: pwm@4005C000 {
                                compatible = "nxp,lpc3220-pwm";
                                reg = <0x4005C000 0x4>;
                                clocks = <&clk LPC32XX_CLK_PWM1>;
+                               assigned-clocks = <&clk LPC32XX_CLK_PWM1>;
+                               assigned-clock-parents = <&clk LPC32XX_CLK_PERIPH>;
                                status = "disabled";
                        };
 
@@ -486,6 +488,8 @@ pwm2: pwm@4005C004 {
                                compatible = "nxp,lpc3220-pwm";
                                reg = <0x4005C004 0x4>;
                                clocks = <&clk LPC32XX_CLK_PWM2>;
+                               assigned-clocks = <&clk LPC32XX_CLK_PWM2>;
+                               assigned-clock-parents = <&clk LPC32XX_CLK_PERIPH>;
                                status = "disabled";
                        };
 
index 368e2193428547382edb01b1b3e645fa2921f302..282d854f43426d8515dd19200cf8e05fa5d5d16d 100644 (file)
@@ -47,6 +47,7 @@
 
 #include "skeleton64.dtsi"
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
        compatible = "fsl,ls1021a";
@@ -70,14 +71,15 @@ cpus {
                #address-cells = <1>;
                #size-cells = <0>;
 
-               cpu@f00 {
+               cpu0: cpu@f00 {
                        compatible = "arm,cortex-a7";
                        device_type = "cpu";
                        reg = <0xf00>;
                        clocks = <&cluster1_clk>;
+                       #cooling-cells = <2>;
                };
 
-               cpu@f01 {
+               cpu1: cpu@f01 {
                        compatible = "arm,cortex-a7";
                        device_type = "cpu";
                        reg = <0xf01>;
@@ -251,6 +253,84 @@ cluster1_clk: clk0c0@0 {
                        };
                };
 
+               tmu: tmu@1f00000 {
+                       compatible = "fsl,qoriq-tmu";
+                       reg = <0x0 0x1f00000 0x0 0x10000>;
+                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+                       fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x30061>;
+                       fsl,tmu-calibration = <0x00000000 0x0000000f
+                                              0x00000001 0x00000017
+                                              0x00000002 0x0000001e
+                                              0x00000003 0x00000026
+                                              0x00000004 0x0000002e
+                                              0x00000005 0x00000035
+                                              0x00000006 0x0000003d
+                                              0x00000007 0x00000044
+                                              0x00000008 0x0000004c
+                                              0x00000009 0x00000053
+                                              0x0000000a 0x0000005b
+                                              0x0000000b 0x00000064
+
+                                              0x00010000 0x00000011
+                                              0x00010001 0x0000001c
+                                              0x00010002 0x00000024
+                                              0x00010003 0x0000002b
+                                              0x00010004 0x00000034
+                                              0x00010005 0x00000039
+                                              0x00010006 0x00000042
+                                              0x00010007 0x0000004c
+                                              0x00010008 0x00000051
+                                              0x00010009 0x0000005a
+                                              0x0001000a 0x00000063
+
+                                              0x00020000 0x00000013
+                                              0x00020001 0x00000019
+                                              0x00020002 0x00000024
+                                              0x00020003 0x0000002c
+                                              0x00020004 0x00000035
+                                              0x00020005 0x0000003d
+                                              0x00020006 0x00000046
+                                              0x00020007 0x00000050
+                                              0x00020008 0x00000059
+
+                                              0x00030000 0x00000002
+                                              0x00030001 0x0000000d
+                                              0x00030002 0x00000019
+                                              0x00030003 0x00000024>;
+                       #thermal-sensor-cells = <1>;
+               };
+
+               thermal-zones {
+                       cpu_thermal: cpu-thermal {
+                               polling-delay-passive = <1000>;
+                               polling-delay = <5000>;
+
+                               thermal-sensors = <&tmu 0>;
+
+                               trips {
+                                       cpu_alert: cpu-alert {
+                                               temperature = <85000>;
+                                               hysteresis = <2000>;
+                                               type = "passive";
+                                       };
+                                       cpu_crit: cpu-crit {
+                                               temperature = <95000>;
+                                               hysteresis = <2000>;
+                                               type = "critical";
+                                       };
+                               };
+
+                               cooling-maps {
+                                       map0 {
+                                               trip = <&cpu_alert>;
+                                               cooling-device =
+                                                       <&cpu0 THERMAL_NO_LIMIT
+                                                       THERMAL_NO_LIMIT>;
+                                       };
+                               };
+                       };
+               };
+
                dspi0: dspi@2100000 {
                        compatible = "fsl,ls1021a-v1.0-dspi";
                        #address-cells = <1>;
index 31c374d72a6faad814848317e67886e563898eeb..aebbebfc25d11e01baf09d7aac025ee743e557c9 100644 (file)
@@ -59,7 +59,7 @@ chosen {
                stdout-path = "serial0:9600n8";
        };
 
-       memory {
+       memory@21000000 {
                device_type = "memory";
                reg = <0x21000000 0x1000000>;
        };
index 5e7e5ca2edbfe636c1fc09e6102be6434dcc1525..349abf70b2a58587d4c530ef32a8d6d9e0b0352c 100644 (file)
@@ -59,7 +59,7 @@ chosen {
                stdout-path = "serial0:9600n8";
        };
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x1000000>;
        };
index efb8a03cb9709de52130c29ba1fceeb4e6361225..23467390558da238aee51958b2155d6f375f7720 100644 (file)
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include "skeleton.dtsi"
 #include "armv7-m.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        oscclk0: clk-osc0 {
                compatible = "fixed-clock";
                #clock-cells = <0>;
index 18596a2c58a15edc4d13b4fbb6503045690c763b..7eab6f4c4665746af3a5e7bcaa237d5115d6a428 100644 (file)
  * GNU General Public License for more details.
  */
 
+#include <dt-bindings/clock/mt2701-clk.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/mt2701-resets.h>
 #include "skeleton64.dtsi"
 #include "mt2701-pinfunc.h"
 
@@ -71,10 +73,18 @@ rtc_clk: dummy32k {
                #clock-cells = <0>;
        };
 
-       uart_clk: dummy26m {
+       clk26m: oscillator@0 {
                compatible = "fixed-clock";
+               #clock-cells = <0>;
                clock-frequency = <26000000>;
+               clock-output-names = "clk26m";
+       };
+
+       rtc32k: oscillator@1 {
+               compatible = "fixed-clock";
                #clock-cells = <0>;
+               clock-frequency = <32000>;
+               clock-output-names = "rtc32k";
        };
 
        timer {
@@ -104,6 +114,26 @@ syscfg_pctl_a: syscfg@10005000 {
                reg = <0 0x10005000 0 0x1000>;
        };
 
+       topckgen: syscon@10000000 {
+               compatible = "mediatek,mt2701-topckgen", "syscon";
+               reg = <0 0x10000000 0 0x1000>;
+               #clock-cells = <1>;
+       };
+
+       infracfg: syscon@10001000 {
+               compatible = "mediatek,mt2701-infracfg", "syscon";
+               reg = <0 0x10001000 0 0x1000>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
+       pericfg: syscon@10003000 {
+               compatible = "mediatek,mt2701-pericfg", "syscon";
+               reg = <0 0x10003000 0 0x1000>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
        watchdog: watchdog@10007000 {
                compatible = "mediatek,mt2701-wdt",
                             "mediatek,mt6589-wdt";
@@ -128,6 +158,12 @@ sysirq: interrupt-controller@10200100 {
                reg = <0 0x10200100 0 0x1c>;
        };
 
+       apmixedsys: syscon@10209000 {
+               compatible = "mediatek,mt2701-apmixedsys", "syscon";
+               reg = <0 0x10209000 0 0x1000>;
+               #clock-cells = <1>;
+       };
+
        gic: interrupt-controller@10211000 {
                compatible = "arm,cortex-a7-gic";
                interrupt-controller;
@@ -144,7 +180,8 @@ uart0: serial@11002000 {
                             "mediatek,mt6577-uart";
                reg = <0 0x11002000 0 0x400>;
                interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
-               clocks = <&uart_clk>;
+               clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
+               clock-names = "baud", "bus";
                status = "disabled";
        };
 
@@ -153,7 +190,8 @@ uart1: serial@11003000 {
                             "mediatek,mt6577-uart";
                reg = <0 0x11003000 0 0x400>;
                interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
-               clocks = <&uart_clk>;
+               clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
+               clock-names = "baud", "bus";
                status = "disabled";
        };
 
@@ -162,7 +200,8 @@ uart2: serial@11004000 {
                             "mediatek,mt6577-uart";
                reg = <0 0x11004000 0 0x400>;
                interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_LOW>;
-               clocks = <&uart_clk>;
+               clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
+               clock-names = "baud", "bus";
                status = "disabled";
        };
 
@@ -171,7 +210,8 @@ uart3: serial@11005000 {
                             "mediatek,mt6577-uart";
                reg = <0 0x11005000 0 0x400>;
                interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>;
-               clocks = <&uart_clk>;
+               clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
+               clock-names = "baud", "bus";
                status = "disabled";
        };
 };
index fb712b9aa87462bf0879dcc4331383fdb064e337..aba542d63d6d7cc9dc358236346961d5a486a3b8 100644 (file)
@@ -38,6 +38,7 @@ scm: scm@0 {
                                reg = <0x0 0x1000>;
                                #address-cells = <1>;
                                #size-cells = <1>;
+                               #pinctrl-cells = <1>;
                                ranges = <0 0x0 0x1000>;
 
                                omap2420_pmx: pinmux@30 {
@@ -46,6 +47,7 @@ omap2420_pmx: pinmux@30 {
                                        reg = <0x30 0x0113>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        pinctrl-single,register-width = <8>;
                                        pinctrl-single,function-mask = <0x3f>;
                                };
index 455aaea407ddeb1f34449bd917a07bd95d69e166..84635eeb99cd46ae4d7240dfffbe551cb20a6af8 100644 (file)
@@ -38,6 +38,7 @@ scm: scm@2000 {
                                reg = <0x2000 0x1000>;
                                #address-cells = <1>;
                                #size-cells = <1>;
+                               #pinctrl-cells = <1>;
                                ranges = <0 0x2000 0x1000>;
 
                                omap2430_pmx: pinmux@30 {
@@ -46,6 +47,7 @@ omap2430_pmx: pinmux@30 {
                                        reg = <0x30 0x0154>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        pinctrl-single,register-width = <8>;
                                        pinctrl-single,function-mask = <0x3f>;
                                };
index 353d818ce5a6dc059488db7a842bd217b4836ff6..ecf5eb584c75058598b9c90bc3f3568bf3a7ce7e 100644 (file)
@@ -106,6 +106,7 @@ omap3_pmx_core: pinmux@30 {
                                        reg = <0x30 0x238>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        #interrupt-cells = <1>;
                                        interrupt-controller;
                                        pinctrl-single,register-width = <16>;
@@ -145,6 +146,7 @@ omap3_pmx_wkup: pinmux@a00 {
                                        reg = <0xa00 0x5c>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        #interrupt-cells = <1>;
                                        interrupt-controller;
                                        pinctrl-single,register-width = <16>;
index e41c52d3b11312f3a57afc15851215d265440c36..834fdf13601feb261a3660491e3f0480f622c85b 100644 (file)
@@ -34,6 +34,7 @@ omap3_pmx_core2: pinmux@480025d8 {
                        reg = <0x480025d8 0x24>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #pinctrl-cells = <1>;
                        #interrupt-cells = <1>;
                        interrupt-controller;
                        pinctrl-single,register-width = <16>;
index 718fa88407cdb4321bec1890a5893d8f9430ba8e..d1a3e56b50cebf80c64a243e499d648101a34ddf 100644 (file)
@@ -66,6 +66,7 @@ omap3_pmx_core2: pinmux@480025a0 {
                        reg = <0x480025a0 0x5c>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #pinctrl-cells = <1>;
                        #interrupt-cells = <1>;
                        interrupt-controller;
                        pinctrl-single,register-width = <16>;
diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
new file mode 100644 (file)
index 0000000..f3ccb4c
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * 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 "omap443x.dtsi"
+
+/ {
+       model = "Motorola Droid 4 XT894";
+       compatible = "motorola,droid4", "ti,omap4430", "ti,omap4";
+
+       chosen {
+               stdout-path = &uart3;
+       };
+
+       /*
+        * We seem to have only 1021 MB accessible, 1021 - 1022 is locked,
+        * then 1023 - 1024 seems to contain mbm. For SRAM, see the notes
+        * below about SRAM and L3_ICLK2 being unused by default,
+        */
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x3fd00000>;  /* 1021 MB */
+       };
+
+       /* CPCAP really supports 1650000 to 3400000 range */
+       vmmc: regulator-mmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmc";
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+               regulator-always-on;
+       };
+
+       /* CPCAP really supports 3000000 to 3100000 range */
+       vemmc: regulator-emmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vemmc";
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+               regulator-always-on;
+       };
+
+       /* CPCAP really supports 1650000 to 1950000 range */
+       wl12xx_vmmc: regulator-wl12xx {
+               compatible = "regulator-fixed";
+               regulator-name = "vwl1271";
+               regulator-min-microvolt = <1650000>;
+               regulator-max-microvolt = <1650000>;
+               gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;    /* gpio94 */
+               startup-delay-us = <70000>;
+               enable-active-high;
+       };
+};
+
+/* L3_2 interconnect is unused, SRAM, GPMC and L3_ICLK2 disabled */
+&gpmc {
+       status = "disabled";
+};
+
+&mmc1 {
+       vmmc-supply = <&vmmc>;
+       bus-width = <4>;
+       cd-gpios = <&gpio4 10 GPIO_ACTIVE_LOW>; /* gpio106 */
+};
+
+&mmc2 {
+       vmmc-supply = <&vemmc>;
+       bus-width = <8>;
+       non-removable;
+};
+
+&mmc3 {
+       vmmc-supply = <&wl12xx_vmmc>;
+       interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core 0xde>;
+
+       non-removable;
+       bus-width = <4>;
+       cap-power-off-card;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1283";
+               reg = <2>;
+               interrupt-parent = <&gpio4>;
+               interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; /* gpio100 */
+               ref-clock-frequency = <26000000>;
+               tcxo-clock-frequency = <26000000>;
+       };
+};
+
+/* L3_2 interconnect is unused, SRAM, GPMC and L3_ICLK2 disabled */
+&ocmcram {
+       status = "disabled";
+};
+
+&omap4_pmx_core {
+       usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
+               /* gpio_60 */
+               pinctrl-single,pins = <
+               OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)
+               >;
+       };
+
+       usb_ulpi_pins: pinmux_usb_ulpi_pins {
+               pinctrl-single,pins = <
+               OMAP4_IOPAD(0x196, MUX_MODE7)
+               OMAP4_IOPAD(0x198, MUX_MODE7)
+               OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE0)
+               OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE0)
+               >;
+       };
+
+       /* usb0_otg_dp and usb0_otg_dm */
+       usb_utmi_pins: pinmux_usb_utmi_pins {
+               pinctrl-single,pins = <
+               OMAP4_IOPAD(0x196, PIN_INPUT | MUX_MODE0)
+               OMAP4_IOPAD(0x198, PIN_INPUT | MUX_MODE0)
+               OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
+               >;
+       };
+
+       /* uart3_tx_irtx and uart3_rx_irrx */
+       uart3_pins: pinmux_uart3_pins {
+               pinctrl-single,pins = <
+               OMAP4_IOPAD(0x196, MUX_MODE7)
+               OMAP4_IOPAD(0x198, MUX_MODE7)
+               OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1ba, MUX_MODE2)
+               OMAP4_IOPAD(0x1bc, PIN_INPUT | MUX_MODE2)
+               OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
+               OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
+               >;
+       };
+};
+
+&omap4_pmx_wkup {
+       usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
+               /* gpio_wk0 */
+               pinctrl-single,pins = <
+               OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
+               >;
+       };
+};
+
+&uart3 {
+       interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core 0x17c>;
+};
+
+/* Internal UTMI+ PHY used for OTG, CPCAP ULPI PHY for detection and charger */
+&usb_otg_hs {
+       interface-type = <1>;
+       mode = <3>;
+       power = <50>;
+};
index 0ced079b7ae3d715ff4dc1d20b6353c96f0ec224..8087456b5fbec60c9379e5937b299ce820a7cb03 100644 (file)
@@ -184,6 +184,7 @@ omap4_pmx_core: pinmux@40 {
                                        reg = <0x40 0x0196>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        #interrupt-cells = <1>;
                                        interrupt-controller;
                                        pinctrl-single,register-width = <16>;
@@ -256,6 +257,7 @@ omap4_pmx_wkup: pinmux@1e040 {
                                        reg = <0x1e040 0x0038>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        #interrupt-cells = <1>;
                                        interrupt-controller;
                                        pinctrl-single,register-width = <16>;
index 53d31a87b44bd7386c1b50333f130c4d8c9e0ec8..2fcdc516da45e1fc12ec8eebedb585a32882f053 100644 (file)
@@ -27,12 +27,98 @@ led1 {
                        default-state = "off";
                };
        };
+
+       evm_keys {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&evm_keys_pins>;
+
+               #address-cells = <7>;
+               #size-cells = <0>;
+
+               btn1 {
+                       label = "BTN1";
+                       linux,code = <169>;
+                       gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;    /* gpio3_83 */
+                       gpio-key,wakeup;
+                       autorepeat;
+                       debounce_interval = <50>;
+               };
+       };
+
+       evm_leds {
+               compatible = "gpio-leds";
+
+               led1 {
+                       label = "omap5:red:led";
+                       gpios = <&gpio9 17 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "mmc0";
+                       default-state = "off";
+               };
+
+               led2 {
+                       label = "omap5:green:led";
+                       gpios = <&gpio9 18 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "mmc1";
+                       default-state = "off";
+               };
+
+               led3 {
+                       label = "omap5:blue:led";
+                       gpios = <&gpio9 19 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "mmc2";
+                       default-state = "off";
+               };
+
+               led4 {
+                       label = "omap5:green:led1";
+                       gpios = <&gpio9 2 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+                       default-state = "off";
+               };
+
+               led5 {
+                       label = "omap5:green:led2";
+                       gpios = <&gpio9 3 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-on";
+                       default-state = "off";
+               };
+
+               led6 {
+                       label = "omap5:green:led3";
+                       gpios = <&gpio9 4 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+                       default-state = "off";
+               };
+
+               led7 {
+                       label = "omap5:green:led4";
+                       gpios = <&gpio9 5 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-on";
+                       default-state = "off";
+               };
+
+               led8 {
+                       label = "omap5:green:led5";
+                       gpios = <&gpio9 6 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+                       default-state = "off";
+               };
+       };
 };
 
 &hdmi {
        vdda-supply = <&ldo4_reg>;
 };
 
+&i2c1 {
+       eeprom@50 {
+               compatible = "atmel,24c02";
+               reg = <0x50>;
+       };
+};
+
 &i2c5 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c5_pins>;
@@ -48,6 +134,12 @@ gpio9: gpio@22 {
 };
 
 &omap5_pmx_core {
+       evm_keys_pins: pinmux_evm_keys_gpio_pins {
+               pinctrl-single,pins = <
+                       OMAP5_IOPAD(0x0b6, PIN_INPUT | MUX_MODE6)       /* gpio3_83 */
+               >;
+       };
+
        i2c5_pins: pinmux_i2c5_pins {
                pinctrl-single,pins = <
                        OMAP5_IOPAD(0x1c6, PIN_INPUT | MUX_MODE0)               /* i2c5_scl */
index 25262118ec3d042f01479daba0808b683d9976ff..968c67a49dbd158b3b3ca24ad2bd85b6f45687d6 100644 (file)
@@ -171,6 +171,7 @@ omap5_pmx_core: pinmux@40 {
                                        reg = <0x40 0x01b6>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
+                                       #pinctrl-cells = <1>;
                                        #interrupt-cells = <1>;
                                        interrupt-controller;
                                        pinctrl-single,register-width = <16>;
@@ -270,6 +271,7 @@ omap5_pmx_wkup: pinmux@c840 {
                                reg = <0xc840 0x003c>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               #pinctrl-cells = <1>;
                                #interrupt-cells = <1>;
                                interrupt-controller;
                                pinctrl-single,register-width = <16>;
diff --git a/arch/arm/boot/dts/orion5x-lschl.dts b/arch/arm/boot/dts/orion5x-lschl.dts
new file mode 100644 (file)
index 0000000..9474092
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * Device Tree file for Buffalo Linkstation LS-CHLv3
+ *
+ * Copyright (C) 2016 Ash Hughes <ashley.hughes@blueyonder.co.uk>
+ * Copyright (C) 2015, 2016
+ * Roger Shimizu <rogershimizu@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "orion5x-linkstation.dtsi"
+#include "mvebu-linkstation-gpio-simple.dtsi"
+#include "mvebu-linkstation-fan.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "Buffalo Linkstation Live v3 (LS-CHL)";
+       compatible = "buffalo,lschl", "marvell,orion5x-88f5182", "marvell,orion5x";
+
+       memory { /* 128 MB */
+               device_type = "memory";
+               reg = <0x00000000 0x8000000>;
+       };
+
+       gpio_keys {
+               func {
+                       label = "Function Button";
+                       linux,code = <KEY_OPTION>;
+                       gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+               };
+
+               power-on-switch {
+                       gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+               };
+
+               power-auto-switch {
+                       gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       gpio_leds {
+               pinctrl-0 = <&pmx_led_power &pmx_led_alarm &pmx_led_info &pmx_led_func>;
+               blue-power-led {
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+               };
+
+               red-alarm-led {
+                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+               };
+
+               amber-info-led {
+                       gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+               };
+
+               func {
+                       label = "lschl:func:blue:top";
+                       gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       gpio_fan {
+               gpios = <&gpio0 14 GPIO_ACTIVE_LOW
+                        &gpio0 16 GPIO_ACTIVE_LOW>;
+
+               alarm-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&pinctrl {
+       pmx_led_power: pmx-leds {
+               marvell,pins = "mpp0";
+               marvell,function = "gpio";
+       };
+
+       pmx_power_hdd: pmx-power-hdd {
+               marvell,pins = "mpp1";
+               marvell,function = "gpio";
+       };
+
+       pmx_led_alarm: pmx-leds {
+               marvell,pins = "mpp2";
+               marvell,function = "gpio";
+       };
+
+       pmx_led_info: pmx-leds {
+               marvell,pins = "mpp3";
+               marvell,function = "gpio";
+       };
+
+       pmx_fan_lock: pmx-fan-lock {
+               marvell,pins = "mpp6";
+               marvell,function = "gpio";
+       };
+
+       pmx_power_switch: pmx-power-switch {
+               marvell,pins = "mpp8", "mpp10", "mpp15";
+               marvell,function = "gpio";
+       };
+
+       pmx_power_usb: pmx-power-usb {
+               marvell,pins = "mpp9";
+               marvell,function = "gpio";
+       };
+
+       pmx_fan_high: pmx-fan-high {
+               marvell,pins = "mpp14";
+               marvell,function = "gpio";
+       };
+
+       pmx_fan_low: pmx-fan-low {
+               marvell,pins = "mpp16";
+               marvell,function = "gpio";
+       };
+
+       pmx_led_func: pmx-leds {
+               marvell,pins = "mpp17";
+               marvell,function = "gpio";
+       };
+
+       pmx_sw_init: pmx-sw-init {
+               marvell,pins = "mpp7";
+               marvell,function = "gpio";
+       };
+};
+
+&hdd_power {
+       gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+};
+
+&usb_power {
+       gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+};
+
diff --git a/arch/arm/boot/dts/ox820.dtsi b/arch/arm/boot/dts/ox820.dtsi
new file mode 100644 (file)
index 0000000..e40f282
--- /dev/null
@@ -0,0 +1,296 @@
+/*
+ * ox820.dtsi - Device tree file for Oxford Semiconductor OX820 SoC
+ *
+ * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * Licensed under GPLv2 or later
+ */
+
+/include/ "skeleton.dtsi"
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       compatible = "oxsemi,ox820";
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "oxsemi,ox820-smp";
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,arm11mpcore";
+                       clocks = <&armclk>;
+                       reg = <0>;
+               };
+
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,arm11mpcore";
+                       clocks = <&armclk>;
+                       reg = <1>;
+               };
+       };
+
+       memory {
+               /* Max 512MB @ 0x60000000 */
+               reg = <0x60000000 0x20000000>;
+       };
+
+       clocks {
+               osc: oscillator {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <25000000>;
+               };
+
+               gmacclk: gmacclk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <125000000>;
+               };
+
+               sysclk: sysclk {
+                       compatible = "fixed-factor-clock";
+                       #clock-cells = <0>;
+                       clock-div = <4>;
+                       clock-mult = <1>;
+                       clocks = <&osc>;
+               };
+
+               plla: plla {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <850000000>;
+               };
+
+               armclk: armclk {
+                       compatible = "fixed-factor-clock";
+                       #clock-cells = <0>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+                       clocks = <&plla>;
+               };
+       };
+
+       soc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "simple-bus";
+               ranges;
+               interrupt-parent = <&gic>;
+
+               nandc: nand-controller@41000000 {
+                       compatible = "oxsemi,ox820-nand";
+                       reg = <0x41000000 0x100000>;
+                       clocks = <&stdclk 11>;
+                       resets = <&reset 15>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               etha: ethernet@40400000 {
+                       compatible = "oxsemi,ox820-dwmac", "snps,dwmac";
+                       reg = <0x40400000 0x2000>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "macirq", "eth_wake_irq";
+                       mac-address = [000000000000]; /* Filled in by U-Boot */
+                       phy-mode = "rgmii";
+
+                       clocks = <&stdclk 9>, <&gmacclk>;
+                       clock-names = "gmac", "stmmaceth";
+                       resets = <&reset 6>;
+
+                       /* Regmap for sys registers */
+                       oxsemi,sys-ctrl = <&sys>;
+
+                       status = "disabled";
+               };
+
+               apb-bridge@44000000 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       ranges = <0 0x44000000 0x1000000>;
+
+                       pinctrl: pinctrl {
+                               compatible = "oxsemi,ox820-pinctrl";
+
+                               /* Regmap for sys registers */
+                               oxsemi,sys-ctrl = <&sys>;
+
+                               pinctrl_uart0: uart0 {
+                                       uart0 {
+                                               pins = "gpio30", "gpio31";
+                                               function = "fct5";
+                                       };
+                               };
+
+                               pinctrl_uart0_modem: uart0_modem {
+                                       uart0_modem_a {
+                                               pins = "gpio24", "gpio24", "gpio26", "gpio27";
+                                               function = "fct4";
+                                       };
+                                       uart0_modem_b {
+                                               pins = "gpio28", "gpio29";
+                                               function = "fct5";
+                                       };
+                               };
+
+                               pinctrl_uart1: uart1 {
+                                       uart1 {
+                                               pins = "gpio7", "gpio8";
+                                               function = "fct4";
+                                       };
+                               };
+
+                               pinctrl_uart1_modem: uart1_modem {
+                                       uart1_modem {
+                                               pins = "gpio5", "gpio6", "gpio40", "gpio41", "gpio42", "gpio43";
+                                               function = "fct4";
+                                       };
+                               };
+
+                               pinctrl_etha_mdio: etha_mdio {
+                                       etha_mdio {
+                                               pins = "gpio3", "gpio4";
+                                               function = "fct1";
+                                       };
+                               };
+
+                               pinctrl_nand: nand {
+                                       nand {
+                                               pins = "gpio12", "gpio13", "gpio14", "gpio15",
+                                                    "gpio16", "gpio17", "gpio18", "gpio19",
+                                                    "gpio20", "gpio21", "gpio22", "gpio23",
+                                                    "gpio24";
+                                               function = "fct1";
+                                       };
+                               };
+                       };
+
+                       gpio0: gpio@000000 {
+                               compatible = "oxsemi,ox820-gpio";
+                               reg = <0x000000 0x100000>;
+                               interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               ngpios = <32>;
+                               oxsemi,gpio-bank = <0>;
+                               gpio-ranges = <&pinctrl 0 0 32>;
+                       };
+
+                       gpio1: gpio@100000 {
+                               compatible = "oxsemi,ox820-gpio";
+                               reg = <0x100000 0x100000>;
+                               interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               ngpios = <18>;
+                               oxsemi,gpio-bank = <1>;
+                               gpio-ranges = <&pinctrl 0 32 18>;
+                       };
+
+                       uart0: serial@200000 {
+                              compatible = "ns16550a";
+                              reg = <0x200000 0x100000>;
+                              interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                              reg-shift = <0>;
+                              fifo-size = <16>;
+                              reg-io-width = <1>;
+                              current-speed = <115200>;
+                              no-loopback-test;
+                              status = "disabled";
+                              clocks = <&sysclk>;
+                              resets = <&reset 17>;
+                       };
+
+                       uart1: serial@300000 {
+                              compatible = "ns16550a";
+                              reg = <0x200000 0x100000>;
+                              interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+                              reg-shift = <0>;
+                              fifo-size = <16>;
+                              reg-io-width = <1>;
+                              current-speed = <115200>;
+                              no-loopback-test;
+                              status = "disabled";
+                              clocks = <&sysclk>;
+                              resets = <&reset 18>;
+                       };
+
+                       rps@400000 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "simple-bus";
+                               ranges = <0 0x400000 0x100000>;
+
+                               intc: interrupt-controller@0 {
+                                       compatible = "oxsemi,ox820-rps-irq", "oxsemi,ox810se-rps-irq";
+                                       interrupt-controller;
+                                       reg = <0 0x200>;
+                                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                                       #interrupt-cells = <1>;
+                                       valid-mask = <0xFFFFFFFF>;
+                                       clear-mask = <0>;
+                               };
+
+                               timer0: timer@200 {
+                                       compatible = "oxsemi,ox820-rps-timer";
+                                       reg = <0x200 0x40>;
+                                       clocks = <&sysclk>;
+                                       interrupt-parent = <&intc>;
+                                       interrupts = <4>;
+                               };
+                       };
+
+                       sys: sys-ctrl@e00000 {
+                               compatible = "oxsemi,ox820-sys-ctrl", "syscon", "simple-mfd";
+                               reg = <0xe00000 0x200000>;
+
+                               reset: reset-controller {
+                                       compatible = "oxsemi,ox820-reset", "oxsemi,ox810se-reset";
+                                       #reset-cells = <1>;
+                               };
+
+                               stdclk: stdclk {
+                                       compatible = "oxsemi,ox820-stdclk", "oxsemi,ox810se-stdclk";
+                                       #clock-cells = <1>;
+                               };
+                       };
+               };
+
+               apb-bridge@47000000 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       ranges = <0 0x47000000 0x1000000>;
+
+                       scu: scu@0 {
+                               compatible = "arm,arm11mp-scu";
+                               reg = <0x0 0x100>;
+                       };
+
+                       local-timer@600 {
+                               compatible = "arm,arm11mp-twd-timer";
+                               reg = <0x600 0x20>;
+                               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3)|IRQ_TYPE_LEVEL_HIGH)>;
+                               clocks = <&armclk>;
+                       };
+
+                       gic: gic@1000 {
+                               compatible = "arm,arm11mp-gic";
+                               interrupt-controller;
+                               #interrupt-cells = <3>;
+                               reg = <0x1000 0x1000>,
+                                     <0x100 0x500>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/pxa25x.dtsi b/arch/arm/boot/dts/pxa25x.dtsi
new file mode 100644 (file)
index 0000000..f9f4726
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2016 Robert Jarzmik <robert.jarzmik@free.fr>
+ *
+ * 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 "pxa2xx.dtsi"
+#include "dt-bindings/clock/pxa-clock.h"
+
+/ {
+       model = "Marvell PXA25x family SoC";
+       compatible = "marvell,pxa250";
+
+       clocks {
+              /*
+               * The muxing of external clocks/internal dividers for osc* clock
+               * sources has been hidden under the carpet by now.
+               */
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               clks: pxa2xx_clks@41300004 {
+                       compatible = "marvell,pxa250-core-clocks";
+                       #clock-cells = <1>;
+                       status = "okay";
+               };
+
+               /* timer oscillator */
+               clktimer: oscillator {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency  = <3686400>;
+                       clock-output-names = "ostimer";
+               };
+       };
+
+       pxabus {
+               pdma: dma-controller@40000000 {
+                       compatible = "marvell,pdma-1.0";
+                       reg = <0x40000000 0x10000>;
+                       interrupts = <25>;
+                       #dma-channels = <16>;
+                       #dma-cells = <2>;
+                       #dma-requests = <40>;
+                       status = "okay";
+               };
+
+               pxairq: interrupt-controller@40d00000 {
+                       marvell,intc-priority;
+                       marvell,intc-nr-irqs = <32>;
+               };
+
+               pinctrl: pinctrl@40e00000 {
+                       reg = <0x40e00054 0x20 0x40e0000c 0xc 0x40e0010c 4
+                              0x40f00020 0x10>;
+                       compatible = "marvell,pxa25x-pinctrl";
+               };
+
+               gpio: gpio@40e00000 {
+                       compatible = "intel,pxa25x-gpio";
+                       gpio-ranges = <&pinctrl 0 0 84>;
+                       clocks = <&clks CLK_NONE>;
+               };
+
+               pwm0: pwm@40b00000 {
+                       compatible = "marvell,pxa250-pwm";
+                       reg = <0x40b00000 0x10>;
+                       #pwm-cells = <1>;
+                       clocks = <&clks CLK_PWM0>;
+               };
+
+               pwm1: pwm@40b00010 {
+                       compatible = "marvell,pxa250-pwm";
+                       reg = <0x40b00010 0x10>;
+                       #pwm-cells = <1>;
+                       clocks = <&clks CLK_PWM1>;
+               };
+       };
+
+       timer@40a00000 {
+               compatible = "marvell,pxa-timer";
+               reg = <0x40a00000 0x20>;
+               interrupts = <26>;
+               clocks = <&clktimer>;
+               status = "okay";
+       };
+
+       pxa250_opp_table: opp_table0 {
+               compatible = "operating-points-v2";
+
+               opp@99532800 {
+                       opp-hz = /bits/ 64 <99532800>;
+                       opp-microvolt = <1000000 950000 1650000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@199065600 {
+                       opp-hz = /bits/ 64 <199065600>;
+                       opp-microvolt = <1000000 950000 1650000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@298598400 {
+                       opp-hz = /bits/ 64 <298598400>;
+                       opp-microvolt = <1100000 1045000 1650000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@398131200 {
+                       opp-hz = /bits/ 64 <398131200>;
+                       opp-microvolt = <1300000 1235000 1650000>;
+                       clock-latency-ns = <20>;
+               };
+       };
+};
index 9e73dc6b3ed3ef269474c4fb05867f0b18166752..e0fab48ba6fab12f19e369490d7df2353b67af0f 100644 (file)
@@ -137,4 +137,44 @@ timer@40a00000 {
                clocks = <&clks CLK_OSTIMER>;
                status = "okay";
        };
+
+       pxa270_opp_table: opp_table0 {
+               compatible = "operating-points-v2";
+
+               opp@104000000 {
+                       opp-hz = /bits/ 64 <104000000>;
+                       opp-microvolt = <900000 900000 1705000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@156000000 {
+                       opp-hz = /bits/ 64 <156000000>;
+                       opp-microvolt = <1000000 1000000 1705000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@208000000 {
+                       opp-hz = /bits/ 64 <208000000>;
+                       opp-microvolt = <1180000 1180000 1705000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@312000000 {
+                       opp-hz = /bits/ 64 <312000000>;
+                       opp-microvolt = <1250000 1250000 1705000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@416000000 {
+                       opp-hz = /bits/ 64 <416000000>;
+                       opp-microvolt = <1350000 1350000 1705000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@520000000 {
+                       opp-hz = /bits/ 64 <520000000>;
+                       opp-microvolt = <1450000 1450000 1705000>;
+                       clock-latency-ns = <20>;
+               };
+               opp@624000000 {
+                       opp-hz = /bits/ 64 <624000000>;
+                       opp-microvolt = <1550000 1550000 1705000>;
+                       clock-latency-ns = <20>;
+               };
+       };
 };
index 3ff077ca440028a7a1bc6a01f7a36258286927bf..e4ebcde17837c38807544efac9e5ce22c1699047 100644 (file)
@@ -54,8 +54,8 @@ gpio: gpio@40e00000 {
                        reg = <0x40e00000 0x10000>;
                        gpio-controller;
                        #gpio-cells = <0x2>;
-                       interrupts = <10>;
-                       interrupt-names = "gpio_mux";
+                       interrupts = <8>, <9>, <10>;
+                       interrupt-names = "gpio0", "gpio1", "gpio_mux";
                        interrupt-controller;
                        #interrupt-cells = <0x2>;
                        ranges;
index 9d6f3aacedb709e4cd086d0df0bcac4dd3e7586b..7a0cc4ea819adc4f6873f8a5c588d16a4d13ca9f 100644 (file)
@@ -138,6 +138,7 @@ pinctrl: pinctrl@40e10000 {
                        reg = <0x40e10000 0xffff>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #pinctrl-cells = <1>;
                        pinctrl-single,register-width = <32>;
                        pinctrl-single,function-mask = <0x7>;
                };
index 6c0038398ef280f6dad863f030b1c5ed9a5b5144..4b8872cc8bf935393550c2f6b04c7d0ba50ae0c1 100644 (file)
@@ -51,6 +51,29 @@ vph: regulator-fixed {
                        regulator-boot-on;
                };
 
+               /* GPIO controlled ethernet power regulator */
+               dragon_veth: xc622a331mrg {
+                       compatible = "regulator-fixed";
+                       regulator-name = "XC6222A331MR-G";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       vin-supply = <&vph>;
+                       gpio = <&pm8058_gpio 40 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&dragon_veth_gpios>;
+                       regulator-always-on;
+               };
+
+               /* VDDvario fixed regulator */
+               dragon_vario: nds332p {
+                       compatible = "regulator-fixed";
+                       regulator-name = "NDS332P";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       vin-supply = <&pm8058_s3>;
+               };
+
                /* This is a levelshifter for SDCC5 */
                dragon_vio_txb: txb0104rgyr {
                        compatible = "regulator-fixed";
@@ -167,6 +190,36 @@ rx {
                                        bias-pull-up;
                                };
                        };
+
+                       dragon_ebi2_pins: ebi2 {
+                               /*
+                                * Pins used by EBI2 on the Dragonboard, actually only
+                                * CS2 is used by a real peripheral. CS0 is just
+                                * routed to a test point.
+                                */
+                               mux0 {
+                                       pins =
+                                           /* "gpio39", CS1A_N this is not good to mux */
+                                           "gpio40", /* CS2A_N */
+                                           "gpio134"; /* CS0_N testpoint TP29 */
+                                       function = "ebi2cs";
+                               };
+                               mux1 {
+                                       pins =
+                                           /* EBI2_ADDR_7 downto EBI2_ADDR_0 address bus */
+                                           "gpio123", "gpio124", "gpio125", "gpio126",
+                                           "gpio127", "gpio128", "gpio129", "gpio130",
+                                           /* EBI2_DATA_15 downto EBI2_DATA_0 data bus */
+                                           "gpio135", "gpio136", "gpio137", "gpio138",
+                                           "gpio139", "gpio140", "gpio141", "gpio142",
+                                           "gpio143", "gpio144", "gpio145", "gpio146",
+                                           "gpio147", "gpio148", "gpio149", "gpio150",
+                                           "gpio151", /* EBI2_OE_N */
+                                           "gpio153", /* EBI2_ADV */
+                                           "gpio157"; /* EBI2_WE_N */
+                                       function = "ebi2";
+                               };
+                       };
                };
 
                qcom,ssbi@500000 {
@@ -201,6 +254,15 @@ MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
                                };
 
                                gpio@150 {
+                                       dragon_ethernet_gpios: ethernet-gpios {
+                                               pinconf {
+                                                       pins = "gpio7";
+                                                       function = "normal";
+                                                       input-enable;
+                                                       bias-disable;
+                                                       power-source = <PM8058_GPIO_S3>;
+                                               };
+                                       };
                                        dragon_bmp085_gpios: bmp085-gpios {
                                                pinconf {
                                                        pins = "gpio16";
@@ -238,6 +300,14 @@ pinconf {
                                                        power-source = <PM8058_GPIO_S3>;
                                                };
                                        };
+                                       dragon_veth_gpios: veth-gpios {
+                                               pinconf {
+                                                       pins = "gpio40";
+                                                       function = "normal";
+                                                       bias-disable;
+                                                       drive-push-pull;
+                                               };
+                                       };
                                };
 
                                led@48 {
@@ -322,6 +392,55 @@ bmp085@77 {
                        };
                };
 
+               external-bus@1a100000 {
+                       /* The EBI2 will instantiate first, then populate its children */
+                       status = "ok";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&dragon_ebi2_pins>;
+
+                       /*
+                        * An on-board SMSC LAN9221 chip for "debug ethernet",
+                        * which is actually just an ordinary ethernet on the
+                        * EBI2. This has a 25MHz chrystal next to it, so no
+                        * clocking is needed.
+                        */
+                       ethernet-ebi2@2,0 {
+                               compatible = "smsc,lan9221", "smsc,lan9115";
+                               reg = <2 0x0 0x100>;
+                               /*
+                                * GPIO7 has interrupt 198 on the PM8058
+                                * The second interrupt is the PME interrupt
+                                * for network wakeup, connected to the TLMM.
+                                */
+                               interrupts-extended = <&pmicintc 198 IRQ_TYPE_EDGE_FALLING>,
+                                                   <&tlmm 29 IRQ_TYPE_EDGE_RISING>;
+                               reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
+                               vdd33a-supply = <&dragon_veth>;
+                               vddvario-supply = <&dragon_vario>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&dragon_ethernet_gpios>;
+                               phy-mode = "mii";
+                               reg-io-width = <2>;
+                               smsc,force-external-phy;
+                               /* IRQ on edge falling = active low */
+                               smsc,irq-active-low;
+                               smsc,irq-push-pull;
+
+                               /*
+                                * SLOW chipselect config
+                                * Delay 9 cycles (140ns@64MHz) between SMSC
+                                * LAN9221 Ethernet controller reads and writes
+                                * on CS2.
+                                */
+                               qcom,xmem-recovery-cycles = <0>;
+                               qcom,xmem-write-hold-cycles = <3>;
+                               qcom,xmem-write-delta-cycles = <31>;
+                               qcom,xmem-read-delta-cycles = <28>;
+                               qcom,xmem-write-wait-cycles = <9>;
+                               qcom,xmem-read-wait-cycles = <9>;
+                       };
+               };
+
                rpm@104000 {
                        /*
                         * Set up of the PMIC RPM regulators for this board
index b72e09506448d40da5f46cc6beee4109bde4def7..e39440a867399f7a4876c92adfd9302531baeb8e 100644 (file)
@@ -15,6 +15,20 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               ramoops@88d00000{
+                       compatible = "ramoops";
+                       reg = <0x88d00000 0x100000>;
+                       record-size     = <0x00020000>;
+                       console-size    = <0x00020000>;
+                       ftrace-size     = <0x00020000>;
+               };
+       };
+
        ext_3p3v: regulator-fixed@1 {
                compatible = "regulator-fixed";
                regulator-min-microvolt = <3300000>;
@@ -99,6 +113,7 @@ s7 {
                                l2 {
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
                                };
 
                                /* msm_otg-HSUSB_3p3 */
@@ -133,13 +148,14 @@ l11 {
                                        regulator-min-microvolt = <3000000>;
                                        regulator-max-microvolt = <3000000>;
                                        bias-pull-down;
+                                       regulator-always-on;
                                };
 
                                /* pwm_power for backlight */
                                l17 {
                                        regulator-min-microvolt = <3000000>;
-                                       regulator-max-microvolt = <3600000>;
-                                       bias-pull-down;
+                                       regulator-max-microvolt = <3000000>;
+                                       regulator-always-on;
                                };
 
                                /* camera, qdsp6 */
@@ -184,6 +200,63 @@ lvs7 {
                        };
                };
 
+               mdp@5100000 {
+                       status = "okay";
+                       ports {
+                               port@1 {
+                                       mdp_dsi1_out: endpoint {
+                                               remote-endpoint = <&dsi0_in>;
+                                       };
+                               };
+                       };
+               };
+
+               dsi0: mdss_dsi@4700000 {
+                       status = "okay";
+                       vdda-supply = <&pm8921_l2>;/*VDD_MIPI1 to 4*/
+                       vdd-supply = <&pm8921_l8>;
+                       vddio-supply = <&pm8921_lvs7>;
+                       avdd-supply = <&pm8921_l11>;
+                       vcss-supply = <&ext_3p3v>;
+
+                       panel@0 {
+                               reg = <0>;
+                               compatible = "jdi,lt070me05000";
+
+                               vddp-supply = <&pm8921_l17>;
+                               iovcc-supply = <&pm8921_lvs7>;
+
+                               enable-gpios = <&pm8921_gpio 36 GPIO_ACTIVE_HIGH>;
+                               reset-gpios = <&tlmm_pinmux 54 GPIO_ACTIVE_LOW>;
+                               dcdc-en-gpios = <&pm8921_gpio 23 GPIO_ACTIVE_HIGH>;
+
+                               port {
+                                       panel_in: endpoint {
+                                               remote-endpoint = <&dsi0_out>;
+                                       };
+                               };
+                       };
+                       ports {
+                               port@0 {
+                                       dsi0_in: endpoint {
+                                               remote-endpoint = <&mdp_dsi1_out>;
+                                       };
+                               };
+
+                               port@1 {
+                                       dsi0_out: endpoint {
+                                               remote-endpoint = <&panel_in>;
+                                               data-lanes = <0 1 2 3>;
+                                       };
+                               };
+                       };
+               };
+
+               dsi-phy@4700200 {
+                       status = "okay";
+                       vddio-supply = <&pm8921_lvs7>;/*VDD_PLL2_1 to 7*/
+               };
+
                gsbi@16200000 {
                        status = "okay";
                        qcom,mode = <GSBI_PROT_I2C>;
index 2eeb0904eaa794169b756fd3a9e3a8044c5ddca2..3d37cab3b9a9cb5c9a9f8dcd314c059fc9b1545a 100644 (file)
@@ -43,6 +43,17 @@ led@1 {
                };
        };
 
+       hdmi-out {
+               compatible = "hdmi-connector";
+               type = "d";
+
+               port {
+                       hdmi_con: endpoint {
+                               remote-endpoint = <&hdmi_out>;
+                       };
+               };
+       };
+
        soc {
                pinctrl@800000 {
                        card_detect: card_detect {
@@ -64,6 +75,25 @@ conf {
                                        bias-disable;
                                };
                        };
+
+                       hdmi_pinctrl: hdmi-pinctrl {
+                               mux {
+                                       pins = "gpio70", "gpio71", "gpio72";
+                                       function = "hdmi";
+                               };
+
+                               pinconf_ddc {
+                                       pins = "gpio70", "gpio71";
+                                       bias-pull-up;
+                                       drive-strength = <2>;
+                               };
+
+                               pinconf_hpd {
+                                       pins = "gpio72";
+                                       bias-pull-down;
+                                       drive-strength = <16>;
+                               };
+                       };
                };
 
                rpm@108000 {
@@ -329,5 +359,49 @@ sdcc4: sdcc@121c0000 {
                                mmc-pwrseq = <&sdcc4_pwrseq>;
                        };
                };
+
+               hdmi-tx@4a00000 {
+                       status = "okay";
+
+                       core-vdda-supply = <&pm8921_hdmi_switch>;
+                       hdmi-mux-supply = <&ext_3p3v>;
+
+                       hpd-gpios = <&tlmm_pinmux 72 GPIO_ACTIVE_HIGH>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&hdmi_pinctrl>;
+
+                       ports {
+                               port@0 {
+                                       endpoint {
+                                               remote-endpoint = <&mdp_dtv_out>;
+                                       };
+                               };
+
+                               port@1 {
+                                       endpoint {
+                                               remote-endpoint = <&hdmi_con>;
+                                       };
+                               };
+                       };
+               };
+
+               hdmi-phy@4a00400 {
+                       status = "okay";
+
+                       core-vdda-supply = <&pm8921_hdmi_switch>;
+               };
+
+               mdp@5100000 {
+                       status = "okay";
+
+                       ports {
+                               port@3 {
+                                       endpoint {
+                                               remote-endpoint = <&hdmi_in>;
+                                       };
+                               };
+                       };
+               };
        };
 };
index 1dbe697b2e90c9cd59da89e999b852fb24bb750b..268bd470c865e6022d907ca495b6913acfd7c1ef 100644 (file)
@@ -1060,6 +1060,231 @@ tcsr: syscon@1a400000 {
                        reg = <0x1a400000 0x100>;
                };
 
+               gpu: adreno-3xx@4300000 {
+                       compatible = "qcom,adreno-3xx";
+                       reg = <0x04300000 0x20000>;
+                       reg-names = "kgsl_3d0_reg_memory";
+                       interrupts = <GIC_SPI 80 0>;
+                       interrupt-names = "kgsl_3d0_irq";
+                       clock-names =
+                           "core_clk",
+                           "iface_clk",
+                           "mem_clk",
+                           "mem_iface_clk";
+                       clocks =
+                           <&mmcc GFX3D_CLK>,
+                           <&mmcc GFX3D_AHB_CLK>,
+                           <&mmcc GFX3D_AXI_CLK>,
+                           <&mmcc MMSS_IMEM_AHB_CLK>;
+                       qcom,chipid = <0x03020002>;
+
+                       iommus = <&gfx3d 0
+                                 &gfx3d 1
+                                 &gfx3d 2
+                                 &gfx3d 3
+                                 &gfx3d 4
+                                 &gfx3d 5
+                                 &gfx3d 6
+                                 &gfx3d 7
+                                 &gfx3d 8
+                                 &gfx3d 9
+                                 &gfx3d 10
+                                 &gfx3d 11
+                                 &gfx3d 12
+                                 &gfx3d 13
+                                 &gfx3d 14
+                                 &gfx3d 15
+                                 &gfx3d 16
+                                 &gfx3d 17
+                                 &gfx3d 18
+                                 &gfx3d 19
+                                 &gfx3d 20
+                                 &gfx3d 21
+                                 &gfx3d 22
+                                 &gfx3d 23
+                                 &gfx3d 24
+                                 &gfx3d 25
+                                 &gfx3d 26
+                                 &gfx3d 27
+                                 &gfx3d 28
+                                 &gfx3d 29
+                                 &gfx3d 30
+                                 &gfx3d 31
+                                 &gfx3d1 0
+                                 &gfx3d1 1
+                                 &gfx3d1 2
+                                 &gfx3d1 3
+                                 &gfx3d1 4
+                                 &gfx3d1 5
+                                 &gfx3d1 6
+                                 &gfx3d1 7
+                                 &gfx3d1 8
+                                 &gfx3d1 9
+                                 &gfx3d1 10
+                                 &gfx3d1 11
+                                 &gfx3d1 12
+                                 &gfx3d1 13
+                                 &gfx3d1 14
+                                 &gfx3d1 15
+                                 &gfx3d1 16
+                                 &gfx3d1 17
+                                 &gfx3d1 18
+                                 &gfx3d1 19
+                                 &gfx3d1 20
+                                 &gfx3d1 21
+                                 &gfx3d1 22
+                                 &gfx3d1 23
+                                 &gfx3d1 24
+                                 &gfx3d1 25
+                                 &gfx3d1 26
+                                 &gfx3d1 27
+                                 &gfx3d1 28
+                                 &gfx3d1 29
+                                 &gfx3d1 30
+                                 &gfx3d1 31>;
+
+                       qcom,gpu-pwrlevels {
+                               compatible = "qcom,gpu-pwrlevels";
+                               qcom,gpu-pwrlevel@0 {
+                                       qcom,gpu-freq = <450000000>;
+                               };
+                               qcom,gpu-pwrlevel@1 {
+                                       qcom,gpu-freq = <27000000>;
+                               };
+                       };
+               };
+
+               mmss_sfpb: syscon@5700000 {
+                       compatible = "syscon";
+                       reg = <0x5700000 0x70>;
+               };
+
+               dsi0: mdss_dsi@4700000 {
+                       compatible = "qcom,mdss-dsi-ctrl";
+                       label = "MDSS DSI CTRL->0";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <GIC_SPI 82 0>;
+                       reg = <0x04700000 0x200>;
+                       reg-names = "dsi_ctrl";
+
+                       clocks = <&mmcc DSI_M_AHB_CLK>,
+                               <&mmcc DSI_S_AHB_CLK>,
+                               <&mmcc AMP_AHB_CLK>,
+                               <&mmcc DSI_CLK>,
+                               <&mmcc DSI1_BYTE_CLK>,
+                               <&mmcc DSI_PIXEL_CLK>,
+                               <&mmcc DSI1_ESC_CLK>;
+                       clock-names = "iface_clk", "bus_clk", "core_mmss_clk",
+                                       "src_clk", "byte_clk", "pixel_clk",
+                                       "core_clk";
+
+                       assigned-clocks = <&mmcc DSI1_BYTE_SRC>,
+                                       <&mmcc DSI1_ESC_SRC>,
+                                       <&mmcc DSI_SRC>,
+                                       <&mmcc DSI_PIXEL_SRC>;
+                       assigned-clock-parents = <&dsi0_phy 0>,
+                                               <&dsi0_phy 0>,
+                                               <&dsi0_phy 1>,
+                                               <&dsi0_phy 1>;
+                       syscon-sfpb = <&mmss_sfpb>;
+                       phys = <&dsi0_phy>;
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       dsi0_in: endpoint {
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       dsi0_out: endpoint {
+                                       };
+                               };
+                       };
+               };
+
+
+               dsi0_phy: dsi-phy@4700200 {
+                       compatible = "qcom,dsi-phy-28nm-8960";
+                       #clock-cells = <1>;
+
+                       reg = <0x04700200 0x100>,
+                               <0x04700300 0x200>,
+                               <0x04700500 0x5c>;
+                       reg-names = "dsi_pll", "dsi_phy", "dsi_phy_regulator";
+                       clock-names = "iface_clk";
+                       clocks = <&mmcc DSI_M_AHB_CLK>;
+               };
+
+
+               mdp_port0: iommu@7500000 {
+                       compatible = "qcom,apq8064-iommu";
+                       #iommu-cells = <1>;
+                       clock-names =
+                           "smmu_pclk",
+                           "iommu_clk";
+                       clocks =
+                           <&mmcc SMMU_AHB_CLK>,
+                           <&mmcc MDP_AXI_CLK>;
+                       reg = <0x07500000 0x100000>;
+                       interrupts =
+                           <GIC_SPI 63 0>,
+                           <GIC_SPI 64 0>;
+                       qcom,ncb = <2>;
+               };
+
+               mdp_port1: iommu@7600000 {
+                       compatible = "qcom,apq8064-iommu";
+                       #iommu-cells = <1>;
+                       clock-names =
+                           "smmu_pclk",
+                           "iommu_clk";
+                       clocks =
+                           <&mmcc SMMU_AHB_CLK>,
+                           <&mmcc MDP_AXI_CLK>;
+                       reg = <0x07600000 0x100000>;
+                       interrupts =
+                           <GIC_SPI 61 0>,
+                           <GIC_SPI 62 0>;
+                       qcom,ncb = <2>;
+               };
+
+               gfx3d: iommu@7c00000 {
+                       compatible = "qcom,apq8064-iommu";
+                       #iommu-cells = <1>;
+                       clock-names =
+                           "smmu_pclk",
+                           "iommu_clk";
+                       clocks =
+                           <&mmcc SMMU_AHB_CLK>,
+                           <&mmcc GFX3D_AXI_CLK>;
+                       reg = <0x07c00000 0x100000>;
+                       interrupts =
+                           <GIC_SPI 69 0>,
+                           <GIC_SPI 70 0>;
+                       qcom,ncb = <3>;
+               };
+
+               gfx3d1: iommu@7d00000 {
+                       compatible = "qcom,apq8064-iommu";
+                       #iommu-cells = <1>;
+                       clock-names =
+                           "smmu_pclk",
+                           "iommu_clk";
+                       clocks =
+                           <&mmcc SMMU_AHB_CLK>,
+                           <&mmcc GFX3D_AXI_CLK>;
+                       reg = <0x07d00000 0x100000>;
+                       interrupts =
+                           <GIC_SPI 210 0>,
+                           <GIC_SPI 211 0>;
+                       qcom,ncb = <3>;
+               };
+
                pcie: pci@1b500000 {
                        compatible = "qcom,pcie-apq8064", "snps,dw-pcie";
                        reg = <0x1b500000 0x1000
@@ -1095,6 +1320,102 @@ pcie: pci@1b500000 {
                        reset-names = "axi", "ahb", "por", "pci", "phy";
                        status = "disabled";
                };
+
+               hdmi: hdmi-tx@4a00000 {
+                       compatible = "qcom,hdmi-tx-8960";
+                       reg = <0x04a00000 0x2f0>;
+                       reg-names = "core_physical";
+                       interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&mmcc HDMI_APP_CLK>,
+                                <&mmcc HDMI_M_AHB_CLK>,
+                                <&mmcc HDMI_S_AHB_CLK>;
+                       clock-names = "core_clk",
+                                     "master_iface_clk",
+                                     "slave_iface_clk";
+
+                       phys = <&hdmi_phy>;
+                       phy-names = "hdmi-phy";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       hdmi_in: endpoint {
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       hdmi_out: endpoint {
+                                       };
+                               };
+                       };
+               };
+
+               hdmi_phy: hdmi-phy@4a00400 {
+                       compatible = "qcom,hdmi-phy-8960";
+                       reg = <0x4a00400 0x60>,
+                             <0x4a00500 0x100>;
+                       reg-names = "hdmi_phy",
+                                   "hdmi_pll";
+
+                       clocks = <&mmcc HDMI_S_AHB_CLK>;
+                       clock-names = "slave_iface_clk";
+               };
+
+               mdp: mdp@5100000 {
+                       compatible = "qcom,mdp4";
+                       reg = <0x05100000 0xf0000>;
+                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&mmcc MDP_CLK>,
+                                <&mmcc MDP_AHB_CLK>,
+                                <&mmcc MDP_AXI_CLK>,
+                                <&mmcc MDP_LUT_CLK>,
+                                <&mmcc HDMI_TV_CLK>,
+                                <&mmcc MDP_TV_CLK>;
+                       clock-names = "core_clk",
+                                     "iface_clk",
+                                     "bus_clk",
+                                     "lut_clk",
+                                     "hdmi_clk",
+                                     "tv_clk";
+
+                       iommus = <&mdp_port0 0
+                                 &mdp_port0 2
+                                 &mdp_port1 0
+                                 &mdp_port1 2>;
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       mdp_lvds_out: endpoint {
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       mdp_dsi1_out: endpoint {
+                                       };
+                               };
+
+                               port@2 {
+                                       reg = <2>;
+                                       mdp_dsi2_out: endpoint {
+                                       };
+                               };
+
+                               port@3 {
+                                       reg = <3>;
+                                       mdp_dtv_out: endpoint {
+                                       };
+                               };
+                       };
+               };
        };
 };
 #include "qcom-apq8064-pins.dtsi"
diff --git a/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts b/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts
new file mode 100644 (file)
index 0000000..26160c3
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * Device Tree Source for mangOH Green Board with WP8548 Module
+ *
+ * Copyright (C) 2016 BayLibre, SAS.
+ * Author : Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <dt-bindings/input/input.h>
+
+#include "qcom-mdm9615-wp8548.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "MangOH Green with WP8548 Module";
+       compatible = "swir,mangoh-green-wp8548", "swir,wp8548", "qcom,mdm9615";
+
+       aliases {
+               spi0 = &gsbi3_spi;
+               serial0 = &gsbi4_serial;
+               serial1 = &gsbi5_serial;
+               i2c0 = &gsbi5_i2c;
+               mmc0 = &sdcc1;
+       };
+
+       chosen {
+               stdout-path = "serial1:115200n8";
+       };
+};
+
+&msmgpio {
+       /* MangOH GPIO Mapping :
+        * - 2 : GPIOEXP_INT2
+        * - 7 : IOT1_GPIO2
+        * - 8 : IOT0_GPIO4
+        * - 13: IOT0_GPIO3
+        * - 21: IOT1_GPIO4
+        * - 22: IOT2_GPIO1
+        * - 23: IOT2_GPIO2
+        * - 24: IOT2_GPIO3
+        * - 25: IOT1_GPIO1
+        * - 32: IOT1_GPIO3
+        * - 33: IOT0_GPIO2
+        * - 42: IOT0_GPIO1 and SD Card Detect
+        */
+
+       gpioext1_pins: gpioext1_pins {
+               pins {
+                       pins = "gpio2";
+                       function = "gpio";
+                       input-enable;
+                       bias-disable;
+               };
+       };
+
+       sdc_cd_pins: sdc_cd_pins {
+               pins {
+                       pins = "gpio42";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+       };
+};
+
+&gsbi3_spi {
+       spi@0 {
+               compatible = "swir,mangoh-iotport-spi", "spidev";
+               spi-max-frequency = <24000000>;
+               reg = <0>;
+       };
+};
+
+&gsbi5_i2c {
+       mux@71 {
+               compatible = "nxp,pca9548";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x71>;
+
+               i2c_iot0: i2c@0 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0>;
+               };
+
+               i2c_iot1: i2c@1 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <1>;
+               };
+
+               i2c_iot2: i2c@2 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <2>;
+               };
+
+               i2c@3 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <3>;
+
+                       usbhub: hub@8 {
+                               compatible = "smsc,usb3503a";
+                               reg = <0x8>;
+                               connect-gpios = <&gpioext2 1 GPIO_ACTIVE_HIGH>;
+                               intn-gpios = <&gpioext2 0 GPIO_ACTIVE_LOW>;
+                               initial-mode = <1>;
+                       };
+               };
+
+               i2c@4 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <4>;
+
+                       gpioext0: gpio@3e {
+                               /* GPIO Expander 0 Mapping :
+                                * - 0: ARDUINO_RESET_Level shift
+                                * - 1: BattChrgr_PG_N
+                                * - 2: BattGauge_GPIO
+                                * - 3: LED_ON (out active high)
+                                * - 4: ATmega_reset_GPIO
+                                * - 5: X
+                                * - 6: PCM_ANALOG_SELECT (out active high)
+                                * - 7: X
+                                * - 8: Board_rev_res1 (in)
+                                * - 9: Board_rev_res2 (in)
+                                * - 10: UART_EXP1_ENn (out active low / pull-down)
+                                * - 11: UART_EXP1_IN (out pull-down)
+                                * - 12: UART_EXP2_IN (out pull-down)
+                                * - 13: SDIO_SEL (out pull-down)
+                                * - 14: SPI_EXP1_ENn (out active low / pull-down)
+                                * - 15: SPI_EXP1_IN (out pull-down)
+                                */
+                               #gpio-cells = <2>;
+                               #interrupt-cells = <2>;
+                               compatible = "semtech,sx1509q";
+                               reg = <0x3e>;
+                               interrupt-parent = <&gpioext1>;
+                               interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+
+                               probe-reset;
+
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+               };
+
+               i2c@5 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <5>;
+
+                       gpioext1: gpio@3f {
+                               /* GPIO Expander 1 Mapping :
+                                * - 0: GPIOEXP_INT1
+                                * - 1: Battery detect
+                                * - 2: GPIO_SCF3_RESET
+                                * - 3: LED_CARD_DETECT_IOT0 (in)
+                                * - 4: LED_CARD_DETECT_IOT1 (in)
+                                * - 5: LED_CARD_DETECT_IOT2 (in)
+                                * - 6: UIM2_PWM_SELECT
+                                * - 7: UIM2_M2_S_SELECT
+                                * - 8: TP900
+                                * - 9: SENSOR_INT1 (in)
+                                * - 10: SENSOR_INT2 (in)
+                                * - 11: CARD_DETECT_IOT0 (in pull-up)
+                                * - 12: CARD_DETECT_IOT2 (in pull-up)
+                                * - 13: CARD_DETECT_IOT1 (in pull-up)
+                                * - 14: GPIOEXP_INT3 (in active low / pull-up)
+                                * - 15: BattChrgr_INT_N
+                                */
+                               pinctrl-0 = <&gpioext1_pins>;
+                               pinctrl-names = "default";
+
+                               #gpio-cells = <2>;
+                               #interrupt-cells = <2>;
+                               compatible = "semtech,sx1509q";
+                               reg = <0x3f>;
+                               interrupt-parent = <&msmgpio>;
+                               interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+
+                               probe-reset;
+
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+               };
+
+               i2c@6 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <6>;
+
+                       gpioext2: gpio@70 {
+                               /* GPIO Expander 2 Mapping :
+                                * - 0: USB_HUB_INTn
+                                * - 1: HUB_CONNECT
+                                * - 2: GPIO_IOT2_RESET (out active low / pull-up)
+                                * - 3: GPIO_IOT1_RESET (out active low / pull-up)
+                                * - 4: GPIO_IOT0_RESET (out active low / pull-up)
+                                * - 5: TP901
+                                * - 6: TP902
+                                * - 7: TP903
+                                * - 8: UART_EXP2_ENn (out active low / pull-down)
+                                * - 9: PCM_EXP1_ENn (out active low)
+                                * - 10: PCM_EXP1_SEL (out)
+                                * - 11: ARD_FTDI
+                                * - 12: TP904
+                                * - 13: TP905
+                                * - 14: TP906
+                                * - 15: RS232_Enable (out active high / pull-up)
+                                */
+                               #gpio-cells = <2>;
+                               #interrupt-cells = <2>;
+                               compatible = "semtech,sx1509q";
+                               reg = <0x70>;
+                               interrupt-parent = <&gpioext1>;
+                               interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
+
+                               probe-reset;
+
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+               };
+
+               i2c@7 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <7>;
+               };
+       };
+};
+
+&sdcc1 {
+       pinctrl-0 = <&sdc_cd_pins>;
+       pinctrl-names = "default";
+       disable-wp;
+       cd-gpios = <&msmgpio 42 GPIO_ACTIVE_LOW>; /* Active low CD */
+};
diff --git a/arch/arm/boot/dts/qcom-mdm9615-wp8548.dtsi b/arch/arm/boot/dts/qcom-mdm9615-wp8548.dtsi
new file mode 100644 (file)
index 0000000..7869898
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Device Tree Source for Sierra Wireless WP8548 Module
+ *
+ * Copyright (C) 2016 BayLibre, SAS.
+ * Author : Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "qcom-mdm9615.dtsi"
+
+/ {
+       model = "Sierra Wireless WP8548 Module";
+       compatible = "swir,wp8548", "qcom,mdm9615";
+
+       memory {
+               reg = <0x48000000 0x7F00000>;
+       };
+};
+
+&msmgpio {
+       pinctrl-0 = <&reset_out_pins>;
+       pinctrl-names = "default";
+
+       gsbi3_pins: gsbi3_pins {
+               mux {
+                       pins = "gpio8", "gpio9", "gpio10", "gpio11";
+                       function = "gsbi3";
+                       drive-strength = <8>;
+                       bias-disable;
+               };
+       };
+
+       gsbi4_pins: gsbi4_pins {
+               mux {
+                       pins = "gpio12", "gpio13", "gpio14", "gpio15";
+                       function = "gsbi4";
+                       drive-strength = <8>;
+                       bias-disable;
+               };
+       };
+
+       gsbi5_i2c_pins: gsbi5_i2c_pins {
+               pin16 {
+                       pins = "gpio16";
+                       function = "gsbi5_i2c";
+                       drive-strength = <8>;
+                       bias-disable;
+               };
+
+               pin17 {
+                       pins = "gpio17";
+                       function = "gsbi5_i2c";
+                       drive-strength = <2>;
+                       bias-disable;
+               };
+       };
+
+       gsbi5_uart_pins: gsbi5_uart_pins {
+               mux {
+                       pins = "gpio18", "gpio19";
+                       function = "gsbi5_uart";
+                       drive-strength = <8>;
+                       bias-disable;
+               };
+       };
+
+       reset_out_pins: reset_out_pins {
+               pins {
+                       pins = "gpio66";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-up;
+                       output-high;
+               };
+       };
+};
+
+&pmicgpio {
+       usb_vbus_5v_pins: usb_vbus_5v_pins {
+               pins = "gpio4";
+               function = "normal";
+               output-high;
+               bias-disable;
+               qcom,drive-strength = <1>;
+               power-source = <2>;
+       };
+};
+
+&gsbi3 {
+       status = "ok";
+       qcom,mode = <GSBI_PROT_SPI>;
+};
+
+&gsbi3_spi {
+       status = "ok";
+       pinctrl-0 = <&gsbi3_pins>;
+       pinctrl-names = "default";
+       assigned-clocks = <&gcc GSBI3_QUP_CLK>;
+       assigned-clock-rates = <24000000>;
+};
+
+&gsbi4 {
+       status = "ok";
+       qcom,mode = <GSBI_PROT_UART_W_FC>;
+};
+
+&gsbi4_serial {
+       status = "ok";
+       pinctrl-0 = <&gsbi4_pins>;
+       pinctrl-names = "default";
+};
+
+&gsbi5 {
+       status = "ok";
+       qcom,mode = <GSBI_PROT_I2C_UART>;
+};
+
+&gsbi5_i2c {
+       status = "ok";
+       clock-frequency = <200000>;
+       pinctrl-0 = <&gsbi5_i2c_pins>;
+       pinctrl-names = "default";
+};
+
+&gsbi5_serial {
+       status = "ok";
+       pinctrl-0 = <&gsbi5_uart_pins>;
+       pinctrl-names = "default";
+};
+
+&sdcc1 {
+       status = "ok";
+};
diff --git a/arch/arm/boot/dts/qcom-mdm9615.dtsi b/arch/arm/boot/dts/qcom-mdm9615.dtsi
new file mode 100644 (file)
index 0000000..5ae4ec5
--- /dev/null
@@ -0,0 +1,557 @@
+/*
+ * Device Tree Source for Qualcomm MDM9615 SoC
+ *
+ * Copyright (C) 2016 BayLibre, SAS.
+ * Author : Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+/include/ "skeleton.dtsi"
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,gcc-mdm9615.h>
+#include <dt-bindings/reset/qcom,gcc-mdm9615.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
+#include <dt-bindings/soc/qcom,gsbi.h>
+
+/ {
+       model = "Qualcomm MDM9615";
+       compatible = "qcom,mdm9615";
+       interrupt-parent = <&intc>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       compatible = "arm,cortex-a5";
+                       device_type = "cpu";
+                       next-level-cache = <&L2>;
+               };
+       };
+
+       cpu-pmu {
+               compatible = "arm,cortex-a5-pmu";
+               interrupts = <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>;
+       };
+
+       clocks {
+               cxo_board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;
+               };
+       };
+
+       regulators {
+               vsdcc_fixed: vsdcc-regulator {
+                       compatible = "regulator-fixed";
+                       regulator-name = "SDCC Power";
+                       regulator-min-microvolt = <2700000>;
+                       regulator-max-microvolt = <2700000>;
+                       regulator-always-on;
+               };
+       };
+
+       soc: soc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               compatible = "simple-bus";
+
+               L2: l2-cache@2040000 {
+                       compatible = "arm,pl310-cache";
+                       reg = <0x02040000 0x1000>;
+                       arm,data-latency = <2 2 0>;
+                       cache-unified;
+                       cache-level = <2>;
+               };
+
+               intc: interrupt-controller@2000000 {
+                       compatible = "qcom,msm-qgic2";
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       reg = <0x02000000 0x1000>,
+                             <0x02002000 0x1000>;
+               };
+
+               timer@200a000 {
+                       compatible = "qcom,kpss-timer", "qcom,msm-timer";
+                       interrupts = <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_EDGE_RISING)>,
+                                    <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_EDGE_RISING)>,
+                                    <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_EDGE_RISING)>;
+                       reg = <0x0200a000 0x100>;
+                       clock-frequency = <27000000>,
+                                         <32768>;
+                       cpu-offset = <0x80000>;
+               };
+
+               msmgpio: pinctrl@800000 {
+                       compatible = "qcom,mdm9615-pinctrl";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       reg = <0x800000 0x4000>;
+               };
+
+               gcc: clock-controller@900000 {
+                       compatible = "qcom,gcc-mdm9615";
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+                       reg = <0x900000 0x4000>;
+               };
+
+               lcc: clock-controller@28000000 {
+                       compatible = "qcom,lcc-mdm9615";
+                       reg = <0x28000000 0x1000>;
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+               };
+
+               l2cc: clock-controller@2011000 {
+                       compatible = "syscon";
+                       reg = <0x02011000 0x1000>;
+               };
+
+               rng@1a500000 {
+                       compatible = "qcom,prng";
+                       reg = <0x1a500000 0x200>;
+                       clocks = <&gcc PRNG_CLK>;
+                       clock-names = "core";
+                       assigned-clocks = <&gcc PRNG_CLK>;
+                       assigned-clock-rates = <32000000>;
+               };
+
+               gsbi2: gsbi@16100000 {
+                       compatible = "qcom,gsbi-v1.0.0";
+                       cell-index = <2>;
+                       reg = <0x16100000 0x100>;
+                       clocks = <&gcc GSBI2_H_CLK>;
+                       clock-names = "iface";
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       gsbi2_i2c: i2c@16180000 {
+                               compatible = "qcom,i2c-qup-v1.1.1";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x16180000 0x1000>;
+                               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+
+                               clocks = <&gcc GSBI2_QUP_CLK>, <&gcc GSBI2_H_CLK>;
+                               clock-names = "core", "iface";
+                               status = "disabled";
+                       };
+               };
+
+               gsbi3: gsbi@16200000 {
+                       compatible = "qcom,gsbi-v1.0.0";
+                       cell-index = <3>;
+                       reg = <0x16200000 0x100>;
+                       clocks = <&gcc GSBI3_H_CLK>;
+                       clock-names = "iface";
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       gsbi3_spi: spi@16280000 {
+                               compatible = "qcom,spi-qup-v1.1.1";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x16280000 0x1000>;
+                               interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
+                               spi-max-frequency = <24000000>;
+
+                               clocks = <&gcc GSBI3_QUP_CLK>, <&gcc GSBI3_H_CLK>;
+                               clock-names = "core", "iface";
+                               status = "disabled";
+                       };
+               };
+
+               gsbi4: gsbi@16300000 {
+                       compatible = "qcom,gsbi-v1.0.0";
+                       cell-index = <4>;
+                       reg = <0x16300000 0x100>;
+                       clocks = <&gcc GSBI4_H_CLK>;
+                       clock-names = "iface";
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       syscon-tcsr = <&tcsr>;
+
+                       gsbi4_serial: serial@16340000 {
+                               compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
+                               reg = <0x16340000 0x1000>,
+                                     <0x16300000 0x1000>;
+                               interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&gcc GSBI4_UART_CLK>, <&gcc GSBI4_H_CLK>;
+                               clock-names = "core", "iface";
+                               status = "disabled";
+                       };
+               };
+
+               gsbi5: gsbi@16400000 {
+                       compatible = "qcom,gsbi-v1.0.0";
+                       cell-index = <5>;
+                       reg = <0x16400000 0x100>;
+                       clocks = <&gcc GSBI5_H_CLK>;
+                       clock-names = "iface";
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       syscon-tcsr = <&tcsr>;
+
+                       gsbi5_i2c: i2c@16480000 {
+                               compatible = "qcom,i2c-qup-v1.1.1";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x16480000 0x1000>;
+                               interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
+
+                               /* QUP clock is not initialized, set rate */
+                               assigned-clocks = <&gcc GSBI5_QUP_CLK>;
+                               assigned-clock-rates = <24000000>;
+
+                               clocks = <&gcc GSBI5_QUP_CLK>, <&gcc GSBI5_H_CLK>;
+                               clock-names = "core", "iface";
+                               status = "disabled";
+                       };
+
+                       gsbi5_serial: serial@16440000 {
+                               compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
+                               reg = <0x16440000 0x1000>,
+                                     <0x16400000 0x1000>;
+                               interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>;
+                               clock-names = "core", "iface";
+                               status = "disabled";
+                       };
+               };
+
+               qcom,ssbi@500000 {
+                       compatible = "qcom,ssbi";
+                       reg = <0x500000 0x1000>;
+                       qcom,controller-type = "pmic-arbiter";
+
+                       pmicintc: pmic@0 {
+                               compatible = "qcom,pm8018", "qcom,pm8921";
+                               interrupts = <GIC_PPI 226 IRQ_TYPE_LEVEL_HIGH>;
+                               #interrupt-cells = <2>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               pwrkey@1c {
+                                       compatible = "qcom,pm8018-pwrkey", "qcom,pm8921-pwrkey";
+                                       reg = <0x1c>;
+                                       interrupt-parent = <&pmicintc>;
+                                       interrupts = <50 IRQ_TYPE_EDGE_RISING>,
+                                                    <51 IRQ_TYPE_EDGE_RISING>;
+                                       debounce = <15625>;
+                                       pull-up;
+                               };
+
+                               pmicmpp: mpp@50 {
+                                       compatible = "qcom,pm8018-mpp", "qcom,ssbi-mpp";
+                                       interrupt-parent = <&pmicintc>;
+                                       interrupts = <24 IRQ_TYPE_NONE>,
+                                                    <25 IRQ_TYPE_NONE>,
+                                                    <26 IRQ_TYPE_NONE>,
+                                                    <27 IRQ_TYPE_NONE>,
+                                                    <28 IRQ_TYPE_NONE>,
+                                                    <29 IRQ_TYPE_NONE>;
+                                       reg = <0x50>;
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                               };
+
+                               rtc@11d {
+                                       compatible = "qcom,pm8018-rtc", "qcom,pm8921-rtc";
+                                       interrupt-parent = <&pmicintc>;
+                                       interrupts = <39 IRQ_TYPE_EDGE_RISING>;
+                                       reg = <0x11d>;
+                                       allow-set-time;
+                               };
+
+                               pmicgpio: gpio@150 {
+                                       compatible = "qcom,pm8018-gpio", "qcom,ssbi-gpio";
+                                       interrupt-parent = <&pmicintc>;
+                                       interrupts = <24 IRQ_TYPE_NONE>,
+                                                    <25 IRQ_TYPE_NONE>,
+                                                    <26 IRQ_TYPE_NONE>,
+                                                    <27 IRQ_TYPE_NONE>,
+                                                    <28 IRQ_TYPE_NONE>,
+                                                    <29 IRQ_TYPE_NONE>;
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                               };
+                       };
+               };
+
+               sdcc1bam: dma@12182000{
+                       compatible = "qcom,bam-v1.3.0";
+                       reg = <0x12182000 0x8000>;
+                       interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&gcc SDC1_H_CLK>;
+                       clock-names = "bam_clk";
+                       #dma-cells = <1>;
+                       qcom,ee = <0>;
+               };
+
+               sdcc2bam: dma@12142000{
+                       compatible = "qcom,bam-v1.3.0";
+                       reg = <0x12142000 0x8000>;
+                       interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&gcc SDC2_H_CLK>;
+                       clock-names = "bam_clk";
+                       #dma-cells = <1>;
+                       qcom,ee = <0>;
+               };
+
+               amba {
+                       compatible = "arm,amba-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       sdcc1: sdcc@12180000 {
+                               status = "disabled";
+                               compatible = "arm,pl18x", "arm,primecell";
+                               arm,primecell-periphid = <0x00051180>;
+                               reg = <0x12180000 0x2000>;
+                               interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "cmd_irq";
+                               clocks = <&gcc SDC1_CLK>, <&gcc SDC1_H_CLK>;
+                               clock-names = "mclk", "apb_pclk";
+                               bus-width = <8>;
+                               max-frequency = <48000000>;
+                               cap-sd-highspeed;
+                               cap-mmc-highspeed;
+                               vmmc-supply = <&vsdcc_fixed>;
+                               dmas = <&sdcc1bam 2>, <&sdcc1bam 1>;
+                               dma-names = "tx", "rx";
+                               assigned-clocks = <&gcc SDC1_CLK>;
+                               assigned-clock-rates = <400000>;
+                       };
+
+                       sdcc2: sdcc@12140000 {
+                               compatible = "arm,pl18x", "arm,primecell";
+                               arm,primecell-periphid = <0x00051180>;
+                               status = "disabled";
+                               reg = <0x12140000 0x2000>;
+                               interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "cmd_irq";
+                               clocks = <&gcc SDC2_CLK>, <&gcc SDC2_H_CLK>;
+                               clock-names = "mclk", "apb_pclk";
+                               bus-width = <4>;
+                               cap-sd-highspeed;
+                               cap-mmc-highspeed;
+                               max-frequency = <48000000>;
+                               no-1-8-v;
+                               vmmc-supply = <&vsdcc_fixed>;
+                               dmas = <&sdcc2bam 2>, <&sdcc2bam 1>;
+                               dma-names = "tx", "rx";
+                               assigned-clocks = <&gcc SDC2_CLK>;
+                               assigned-clock-rates = <400000>;
+                       };
+               };
+
+               tcsr: syscon@1a400000 {
+                       compatible = "qcom,tcsr-mdm9615", "syscon";
+                       reg = <0x1a400000 0x100>;
+               };
+
+               rpm: rpm@108000 {
+                       compatible = "qcom,rpm-mdm9615";
+                       reg = <0x108000 0x1000>;
+
+                       qcom,ipc = <&l2cc 0x8 2>;
+
+                       interrupts = <GIC_SPI 19 IRQ_TYPE_EDGE_RISING>,
+                                    <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>,
+                                    <GIC_SPI 22 IRQ_TYPE_EDGE_RISING>;
+                       interrupt-names = "ack", "err", "wakeup";
+
+                       regulators {
+                               compatible = "qcom,rpm-pm8018-regulators";
+
+                               vin_lvs1-supply = <&pm8018_s3>;
+
+                               vdd_l7-supply = <&pm8018_s4>;
+                               vdd_l8-supply = <&pm8018_s3>;
+                               vdd_l9_l10_l11_l12-supply = <&pm8018_s5>;
+
+                               /* Buck SMPS */
+                               pm8018_s1: s1 {
+                                       regulator-min-microvolt = <500000>;
+                                       regulator-max-microvolt = <1150000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_s2: s2 {
+                                       regulator-min-microvolt = <1225000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_s3: s3 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_s4: s4 {
+                                       regulator-min-microvolt = <2100000>;
+                                       regulator-max-microvolt = <2200000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_s5: s5 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                                       bias-pull-down;
+                               };
+
+                               /* PMOS LDO */
+                               pm8018_l2: l2 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l3: l3 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l4: l4 {
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l5: l5 {
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l6: l6 {
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l7: l7 {
+                                       regulator-min-microvolt = <1850000>;
+                                       regulator-max-microvolt = <1900000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l8: l8 {
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l9: l9 {
+                                       regulator-min-microvolt = <750000>;
+                                       regulator-max-microvolt = <1150000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l10: l10 {
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l11: l11 {
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l12: l12 {
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l13: l13 {
+                                       regulator-min-microvolt = <1850000>;
+                                       regulator-max-microvolt = <2950000>;
+                                       bias-pull-down;
+                               };
+
+                               pm8018_l14: l14 {
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       bias-pull-down;
+                               };
+
+                               /* Low Voltage Switch */
+                               pm8018_lvs1: lvs1 {
+                                       bias-pull-down;
+                               };
+                       };
+               };
+       };
+};
index 8c65e0d82559dd1e7e4b3e142a60e8de808881b9..4d828f810746872da14fe49c204462c3b11c983e 100644 (file)
@@ -141,6 +141,23 @@ gsbi12_i2c: i2c@19c80000 {
                        };
                };
 
+               external-bus@1a100000 {
+                       compatible = "qcom,msm8660-ebi2";
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       ranges = <0 0x0 0x1a800000 0x00800000>,
+                                <1 0x0 0x1b000000 0x00800000>,
+                                <2 0x0 0x1b800000 0x00800000>,
+                                <3 0x0 0x1d000000 0x08000000>,
+                                <4 0x0 0x1c800000 0x00800000>,
+                                <5 0x0 0x1c000000 0x00800000>;
+                       reg = <0x1a100000 0x1000>, <0x1a110000 0x1000>;
+                       reg-names = "ebi2", "xmem";
+                       clocks = <&gcc EBI2_2X_CLK>, <&gcc EBI2_CLK>;
+                       clock-names = "ebi2x", "ebi2";
+                       status = "disabled";
+               };
+
                qcom,ssbi@500000 {
                        compatible = "qcom,ssbi";
                        reg = <0x500000 0x1000>;
index c0fb4a698c56443a9235ea01c5840396391ab1dd..382bcc3231a905a1e58228b07366ab886361fa30 100644 (file)
@@ -224,6 +224,35 @@ serial@f991d000 {
                status = "ok";
        };
 
+       pinctrl@fd510000 {
+               sdhc1_pin_a: sdhc1-pin-active {
+                       clk {
+                               pins = "sdc1_clk";
+                               drive-strength = <16>;
+                               bias-disable;
+                       };
+
+                       cmd-data {
+                               pins = "sdc1_cmd", "sdc1_data";
+                               drive-strength = <10>;
+                               bias-pull-up;
+                       };
+               };
+       };
+
+       sdhci@f9824900 {
+               status = "ok";
+
+               vmmc-supply = <&pm8941_l20>;
+               vqmmc-supply = <&pm8941_s3>;
+
+               bus-width = <8>;
+               non-removable;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdhc1_pin_a>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
                input-name = "gpio-keys";
index 8db9e9b197a2875a5846b40c283b5607dabf73b6..2f5f15524fbaec1d63193638948185405cc0ca05 100644 (file)
@@ -46,7 +46,7 @@ / {
        model = "Rockchip RK3036 Evaluation board";
        compatible = "rockchip,rk3036-evb", "rockchip,rk3036";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x40000000>;
        };
index 1df1557a46c3534832d73c9604b3e8490bca9128..3de958ec29c0e618b019917a2e45b7235d4d730c 100644 (file)
@@ -46,7 +46,7 @@ / {
        model = "Rockchip RK3036 KylinBoard";
        compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x20000000>;
        };
index a935523a1eb85a0314788f8f707c4d95a7a2d49f..3279c996a300f1b96099daeafe69d9ee8fb9a570 100644 (file)
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/clock/rk3036-cru.h>
 #include <dt-bindings/soc/rockchip,boot-mode.h>
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        compatible = "rockchip,rk3036";
 
        interrupt-parent = <&gic>;
@@ -244,7 +246,7 @@ sdmmc: dwmmc@10214000 {
                compatible = "rockchip,rk3036-dw-mshc", "rockchip,rk3288-dw-mshc";
                reg = <0x10214000 0x4000>;
                clock-frequency = <37500000>;
-               clock-freq-min-max = <400000 37500000>;
+               max-frequency = <37500000>;
                clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x100>;
@@ -255,7 +257,7 @@ sdmmc: dwmmc@10214000 {
        sdio: dwmmc@10218000 {
                compatible = "rockchip,rk3036-dw-mshc", "rockchip,rk3288-dw-mshc";
                reg = <0x10218000 0x4000>;
-               clock-freq-min-max = <400000 37500000>;
+               max-frequency = <37500000>;
                clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
                         <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
                clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
@@ -271,7 +273,7 @@ emmc: dwmmc@1021c000 {
                bus-width = <8>;
                cap-mmc-highspeed;
                clock-frequency = <37500000>;
-               clock-freq-min-max = <400000 37500000>;
+               max-frequency = <37500000>;
                clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
                         <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
index bc674ee206ec96ac2e96a92a40dcbc5ea8bba20e..c0d8b5446ba78a529931f87d47e438379c8b3271 100644 (file)
@@ -49,7 +49,7 @@ / {
        model = "bq Curie 2";
        compatible = "mundoreader,bq-curie2", "rockchip,rk3066a";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x40000000>;
        };
index a2b763e949b4648f60e3929d0afba5afc711a61b..0a54c4beff8d94d2ae1fc65c170104791f472015 100644 (file)
@@ -47,7 +47,7 @@ / {
        model = "MarsBoard RK3066";
        compatible = "haoyu,marsboard-rk3066", "rockchip,rk3066a";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x40000000>;
        };
diff --git a/arch/arm/boot/dts/rk3066a-mk808.dts b/arch/arm/boot/dts/rk3066a-mk808.dts
new file mode 100644 (file)
index 0000000..658eb7d
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2016 PaweÅ‚ Jarosz <paweljarosz3691@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "rk3066a.dtsi"
+
+/ {
+       model = "Rikomagic MK808";
+       compatible = "rikomagic,mk808", "rockchip,rk3066a";
+
+       chosen {
+               stdout-path = "serial2:115200n8";
+       };
+
+       memory@60000000 {
+               reg = <0x60000000 0x40000000>;
+               device_type = "memory";
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               blue {
+                       label = "mk808:blue:power";
+                       gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+                       linux,default-trigger = "default-on";
+               };
+       };
+
+       vcc_io: vcc-io {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_io";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       vcc_host: usb-host-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+               pinctrl-0 = <&host_drv>;
+               pinctrl-names = "default";
+               regulator-always-on;
+               regulator-name = "host-pwr";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vcc_io>;
+       };
+
+       vcc_otg: usb-otg-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
+               pinctrl-0 = <&otg_drv>;
+               pinctrl-names = "default";
+               regulator-always-on;
+               regulator-name = "vcc_otg";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vcc_io>;
+       };
+
+       vcc_sd: sdmmc-regulator {
+               compatible = "regulator-fixed";
+               gpio = <&gpio3 7 GPIO_ACTIVE_LOW>;
+               pinctrl-0 = <&sdmmc_pwr>;
+               pinctrl-names = "default";
+               regulator-name = "vcc_sd";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vcc_io>;
+       };
+
+       vcc_wifi: sdio-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio3 24 GPIO_ACTIVE_HIGH>;
+               pinctrl-0 = <&wifi_pwr>;
+               pinctrl-names = "default";
+               regulator-name = "vcc_wifi";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vcc_io>;
+       };
+};
+
+&mmc0 {
+       bus-width = <4>;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       num-slots = <1>;
+       vmmc-supply = <&vcc_sd>;
+       status = "okay";
+};
+
+&mmc1 {
+       bus-width = <4>;
+       disable-wp;
+       non-removable;
+       num-slots = <1>;
+       pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_bus4>;
+       pinctrl-names = "default";
+       vmmc-supply = <&vcc_wifi>;
+       status = "okay";
+};
+
+&pinctrl {
+       usb-host {
+               host_drv: host-drv {
+                       rockchip,pins = <RK_GPIO0 6 RK_FUNC_GPIO &pcfg_pull_default>;
+               };
+       };
+
+       usb-otg {
+               otg_drv: otg-drv {
+                       rockchip,pins = <RK_GPIO0 5 RK_FUNC_GPIO &pcfg_pull_default>;
+               };
+       };
+
+       sdmmc {
+               sdmmc_pwr: sdmmc-pwr {
+                       rockchip,pins = <RK_GPIO3 7 RK_FUNC_GPIO &pcfg_pull_default>;
+               };
+       };
+
+       sdio {
+               wifi_pwr: wifi-pwr {
+                       rockchip,pins = <RK_GPIO3 24 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&usb_host {
+       status = "okay";
+};
+
+&usb_otg {
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
+
+&wdt {
+       status = "okay";
+};
index 6e7f2187a0e3a0774235e0e7e88b96b66195efbb..82465b6444435ad7ce8f9800066e8a353d165e91 100644 (file)
@@ -48,7 +48,7 @@ / {
        model = "Rayeager PX2";
        compatible = "chipspark,rayeager-px2", "rockchip,rk3066a";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x40000000>;
        };
index 0d0dae3a16949f58c3a62c2826365118a1691cee..fc8dcc72b16f78070cc83f1e2426b84d76d68024 100644 (file)
@@ -151,6 +151,14 @@ cru: clock-controller@20000000 {
 
                #clock-cells = <1>;
                #reset-cells = <1>;
+               assigned-clocks = <&cru PLL_CPLL>, <&cru PLL_GPLL>,
+                                 <&cru ACLK_CPU>, <&cru HCLK_CPU>,
+                                 <&cru PCLK_CPU>, <&cru ACLK_PERI>,
+                                 <&cru HCLK_PERI>, <&cru PCLK_PERI>;
+               assigned-clock-rates = <400000000>, <594000000>,
+                                      <300000000>, <150000000>,
+                                      <75000000>, <300000000>,
+                                      <150000000>, <75000000>;
        };
 
        timer@2000e000 {
@@ -162,7 +170,7 @@ timer@2000e000 {
        };
 
        efuse: efuse@20010000 {
-               compatible = "rockchip,rockchip-efuse";
+               compatible = "rockchip,rk3066a-efuse";
                reg = <0x20010000 0x4000>;
                #address-cells = <1>;
                #size-cells = <1>;
@@ -628,6 +636,8 @@ &i2c4 {
 };
 
 &mmc0 {
+       clock-frequency = <50000000>;
+       max-frequency = <50000000>;
        pinctrl-names = "default";
        pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4>;
 };
diff --git a/arch/arm/boot/dts/rk3188-px3-evb.dts b/arch/arm/boot/dts/rk3188-px3-evb.dts
new file mode 100644 (file)
index 0000000..df727ba
--- /dev/null
@@ -0,0 +1,328 @@
+/*
+ * Copyright (c) 2016 Andy Yan <andy.yan@rock-chips.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include <dt-bindings/input/input.h>
+#include "rk3188.dtsi"
+
+/ {
+       model = "Rockchip PX3-EVB";
+       compatible = "rockchip,px3-evb", "rockchip,px3", "rockchip,rk3188";
+
+       chosen {
+               stdout-path = "serial2:115200n8";
+       };
+
+       memory@60000000 {
+               reg = <0x60000000 0x80000000>;
+               device_type = "memory";
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               autorepeat;
+
+               power {
+                       gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
+                       label = "GPIO Key Power";
+                       linux,input-type = <1>;
+                       wakeup-source;
+                       debounce-interval = <100>;
+               };
+       };
+
+       vcc_sys: vsys-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vsys";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
+       };
+};
+
+&cpu0 {
+       cpu0-supply = <&vdd_cpu>;
+};
+
+&emmc {
+       bus-width = <8>;
+       cap-mmc-highspeed;
+       disable-wp;
+       non-removable;
+       num-slots = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_rst>;
+       status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+
+       accelerometer@18 {
+               compatible = "bosch,bma250";
+               reg = <0x18>;
+               interrupt-parent = <&gpio0>;
+               interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <400000>;
+
+       rk808: pmic@1c {
+               compatible = "rockchip,rk818";
+               reg = <0x1c>;
+               interrupt-parent = <&gpio0>;
+               interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+               rockchip,system-power-controller;
+               wakeup-source;
+               #clock-cells = <1>;
+               clock-output-names = "xin32k", "rk808-clkout2";
+
+               vcc1-supply = <&vcc_sys>;
+               vcc2-supply = <&vcc_sys>;
+               vcc3-supply = <&vcc_sys>;
+               vcc4-supply = <&vcc_sys>;
+               vcc6-supply = <&vcc_sys>;
+               vcc7-supply = <&vcc_sys>;
+               vcc8-supply = <&vcc_io>;
+               vcc9-supply = <&vcc_io>;
+
+               regulators {
+                       vdd_cpu: DCDC_REG1 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-name = "vdd_arm";
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vdd_gpu: DCDC_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-name = "vdd_gpu";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc_ddr: DCDC_REG3 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-name = "vcc_ddr";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_io: DCDC_REG4 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc_io";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcc_cif: LDO_REG1 {
+                                regulator-min-microvolt = <3300000>;
+                                regulator-max-microvolt = <3300000>;
+                                regulator-name = "vcc_cif";
+                       };
+
+                       vcc_jetta33: LDO_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc_jetta33";
+                       };
+
+                       vdd_10: LDO_REG3 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-name = "vdd_10";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       lvds_12: LDO_REG4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "lvds_12";
+                       };
+
+                       lvds_25: LDO_REG5 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "lvds_25";
+                       };
+
+                       cif_18: LDO_REG6 {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-name = "cif_18";
+                       };
+
+                       vcc_sd: LDO_REG7 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc_sd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       wl_18: LDO_REG8 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "wl_18";
+                       };
+
+                       lcd_33: SWITCH_REG1 {
+                               regulator-name = "lcd_33";
+                       };
+               };
+       };
+
+};
+
+&i2c2 {
+       gsl1680: touchscreen@40 {
+               compatible = "silead,gsl1680";
+               reg = <0x40>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
+               power-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+               touchscreen-size-x = <800>;
+               touchscreen-size-y = <1280>;
+               silead,max-fingers = <5>;
+       };
+};
+
+&mmc0 {
+       num-slots = <1>;
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
+       vmmc-supply = <&vcc_sd>;
+
+       bus-width = <4>;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       disable-wp;
+};
+
+&pinctrl {
+       pcfg_output_low: pcfg-output-low {
+               output-low;
+       };
+
+       usb {
+               host_vbus_drv: host-vbus-drv {
+                       rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+               otg_vbus_drv: otg-vbus-drv {
+                       rockchip,pins = <2 31 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
+&pwm1 {
+       status = "okay";
+};
+
+&pwm2 {
+       status = "okay";
+};
+
+&pwm3 {
+       status = "okay";
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&uart3 {
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
+
+&usb_host {
+       status = "okay";
+};
+
+&usb_otg {
+       status = "okay";
+};
+
+&wdt {
+       status = "okay";
+};
index 1da46d138029f2bc96b5de213b8f0523ad0784ef..5e8a235ed02da9bea38d8f345a503cf336a4bdbc 100644 (file)
@@ -48,7 +48,7 @@ / {
        model = "Radxa Rock";
        compatible = "radxa,rock", "rockchip,rk3188";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x80000000>;
        };
index 31f81b265cefd45222e0c127fc1c38cdaf9d43cd..869e189331ec4624c1ba45a4c6a53ce58504dd69 100644 (file)
@@ -147,7 +147,7 @@ cru: clock-controller@20000000 {
        };
 
        efuse: efuse@20010000 {
-               compatible = "rockchip,rockchip-efuse";
+               compatible = "rockchip,rk3188-efuse";
                reg = <0x20010000 0x4000>;
                #address-cells = <1>;
                #size-cells = <1>;
index 904668e2e66683f3f02936d041126ba53eabf6bd..58834330a5bae547e3146b90d0b4884956fd69eb 100644 (file)
@@ -46,7 +46,7 @@ / {
        model = "Rockchip RK3228 Evaluation board";
        compatible = "rockchip,rk3228-evb", "rockchip,rk3228";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x40000000>;
        };
index b6a12035a6bbfa93c98a47e33dd11935bcd2d1d4..dcdd0cee619ea51e715353107f19ec617e96406c 100644 (file)
@@ -46,7 +46,7 @@ / {
        model = "Rockchip RK3229 Evaluation board";
        compatible = "rockchip,rk3229-evb", "rockchip,rk3229";
 
-       memory {
+       memory@60000000 {
                device_type = "memory";
                reg = <0x60000000 0x40000000>;
        };
index 9e6bf0e311bb69e2857121be784c3e85060072b0..9d3aee5abc1585fa7cf7b88c45842aa1147abab9 100644 (file)
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/clock/rk3228-cru.h>
 #include <dt-bindings/thermal/thermal.h>
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        interrupt-parent = <&gic>;
 
        aliases {
@@ -402,7 +404,7 @@ emmc: dwmmc@30020000 {
                reg = <0x30020000 0x4000>;
                interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
                clock-frequency = <37500000>;
-               clock-freq-min-max = <400000 37500000>;
+               max-frequency = <37500000>;
                clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
                         <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
index d59208b5eb6c6457a61f16bb5780dbf238d7d2c0..bf7ccfad3260f2615b1a9af472aaad273b074297 100644 (file)
@@ -43,7 +43,7 @@
 #include "rk3288.dtsi"
 
 / {
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x0 0x80000000>;
        };
index 2e3c34135ed8fe25342f36a71c0426b3ee7acbaf..805c0d26770b0c6ddeb0401f95d67bfb7aea6e2c 100644 (file)
@@ -46,7 +46,7 @@ / {
        model = "Rockchip RK3288 Fennec Board";
        compatible = "rockchip,rk3288-fennec", "rockchip,rk3288";
 
-       memory {
+       memory@0 {
                reg = <0x0 0x80000000>;
                device_type = "memory";
        };
index ec418c99de951476d49ea8ee937fa0155ab1b51c..d242588bae0d73c94824a5fea10ccc15751a35dc 100644 (file)
@@ -45,7 +45,7 @@
 #include "rk3288.dtsi"
 
 / {
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x80000000>;
        };
index 114c90fb65e2cd39139b90f5818fb63c100d6b09..44935af1fb0ef0067c03f6b028b89d2930d0ffd9 100644 (file)
@@ -44,7 +44,7 @@
 #include "rk3288.dtsi"
 
 / {
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x80000000>;
        };
index 24488421f0f0aa79b0ab394f0e429bf2d47431a9..441d450fd15115050b3af5c48bae983d0ee49545 100644 (file)
@@ -52,7 +52,7 @@ chosen {
                stdout-path = "serial2:115200n8";
        };
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0 0x80000000>;
        };
index 56dd377d5658ab8bbf06c4fb88578d1dce10bb84..bc6d10054f6a37f5212f725de4de23a34d9e8e26 100644 (file)
@@ -48,7 +48,7 @@ / {
        model = "PopMetal-RK3288";
        compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
 
-       memory{
+       memory@0 {
                device_type = "memory";
                reg = <0 0x80000000>;
        };
@@ -68,7 +68,7 @@ gpio-keys {
                pinctrl-0 = <&pwrbtn>;
 
                power {
-                       gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_POWER>;
                        label = "GPIO Key Power";
                        linux,input-type = <1>;
@@ -79,7 +79,7 @@ power {
 
        ir: ir-receiver {
                compatible = "gpio-ir-receiver";
-               gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+               gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
                pinctrl-names = "default";
                pinctrl-0 = <&ir_int>;
        };
@@ -94,7 +94,7 @@ vcc_flash: flash-regulator {
 
        vcc_sd: sdmmc-regulator {
                compatible = "regulator-fixed";
-               gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
+               gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
                pinctrl-names = "default";
                pinctrl-0 = <&sdmmc_pwr>;
                regulator-name = "vcc_sd";
@@ -128,7 +128,7 @@ vcc18_dvp: vcc18-dvp-regulator {
        vcc28_dvp: vcc28-dvp-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
-               gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+               gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
                pinctrl-0 = <&dvp_pwr>;
                regulator-name = "vcc28_dvp";
@@ -147,6 +147,8 @@ &emmc {
        bus-width = <8>;
        cap-mmc-highspeed;
        disable-wp;
+       mmc-ddr-1_8v;
+       mmc-hs200-1_8v;
        non-removable;
        num-slots = <1>;
        pinctrl-names = "default";
@@ -165,6 +167,10 @@ &sdmmc {
        num-slots = <1>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       sd-uhs-sdr50;
+       sd-uhs-sdr104;
        vmmc-supply = <&vcc_sd>;
        vqmmc-supply = <&vccio_sd>;
        status = "okay";
@@ -174,7 +180,7 @@ &gmac {
        phy-supply = <&vcc_lan>;
        phy-mode = "rgmii";
        clock_in_out = "input";
-       snps,reset-gpio = <&gpio4 7 0>;
+       snps,reset-gpio = <&gpio4 RK_PB0 0>;
        snps,reset-active-low;
        snps,reset-delays-us = <0 10000 1000000>;
        assigned-clocks = <&cru SCLK_MAC>;
@@ -280,7 +286,7 @@ regulator-state-mem {
                        vccio_sd: LDO_REG2 {
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-min-microvolt = <3300000>;
+                               regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-name = "vccio_sd";
                                regulator-state-mem {
@@ -443,43 +449,43 @@ &io_domains {
 &pinctrl {
        ak8963 {
                comp_int: comp-int {
-                       rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        buttons {
                pwrbtn: pwrbtn {
-                       rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        dvp {
                dvp_pwr: dvp-pwr {
-                       rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>;
+                       rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        ir {
                ir_int: ir-int {
-                       rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        mma8452 {
                gsensor_int: gsensor-int {
-                       rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        pmic {
                pmic_int: pmic-int {
-                       rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        sdmmc {
                sdmmc_pwr: sdmmc-pwr {
-                       rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
+                       rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 };
index 4b8a8adb243c3e00a2b3159f25759eb293710367..04faa72dbd95f4936cd77cdc279b5039716a1806 100644 (file)
@@ -48,7 +48,7 @@
 / {
        compatible = "netxeon,r89", "rockchip,rk3288";
 
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x0 0x80000000>;
        };
index bb1f01e037ba7e2a5ae8126ccff5d98b16f4a0a0..b25ba806d5eec46fd3f92438c9030e22053bfcad 100644 (file)
@@ -42,7 +42,7 @@
 #include "rk3288.dtsi"
 
 / {
-       memory {
+       memory@0 {
                reg = <0x0 0x80000000>;
                device_type = "memory";
        };
index 3dd2cca48c118dc8b25c7d3b69560d4f391ee2e5..2251d28e9d2a4fe949d8dcc2b8e775881e73daef 100644 (file)
@@ -47,7 +47,7 @@
 #include "rk3288.dtsi"
 
 / {
-       memory {
+       memory@0 {
                device_type = "memory";
                reg = <0x0 0x80000000>;
        };
index 17ec2e2d7a60bda135d089cfdc404446c1f05039..73590e47f4fbfeab35348af1fe9312b0dc17fd7b 100644 (file)
 #include <dt-bindings/thermal/thermal.h>
 #include <dt-bindings/power/rk3288-power.h>
 #include <dt-bindings/soc/rockchip,boot-mode.h>
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        compatible = "rockchip,rk3288";
 
        interrupt-parent = <&gic>;
@@ -227,7 +229,7 @@ display-subsystem {
 
        sdmmc: dwmmc@ff0c0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
                         <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -239,7 +241,7 @@ sdmmc: dwmmc@ff0c0000 {
 
        sdio0: dwmmc@ff0d0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_SDIO0>, <&cru SCLK_SDIO0>,
                         <&cru SCLK_SDIO0_DRV>, <&cru SCLK_SDIO0_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -251,7 +253,7 @@ sdio0: dwmmc@ff0d0000 {
 
        sdio1: dwmmc@ff0e0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_SDIO1>, <&cru SCLK_SDIO1>,
                         <&cru SCLK_SDIO1_DRV>, <&cru SCLK_SDIO1_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -263,7 +265,7 @@ sdio1: dwmmc@ff0e0000 {
 
        emmc: dwmmc@ff0f0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
                         <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -1116,7 +1118,7 @@ gic: interrupt-controller@ffc01000 {
        };
 
        efuse: efuse@ffb40000 {
-               compatible = "rockchip,rockchip-efuse";
+               compatible = "rockchip,rk3288-efuse";
                reg = <0xffb40000 0x20>;
                #address-cells = <1>;
                #size-cells = <1>;
index e15beb3c671ed58dcbc20b8a2e6df66851643179..0394312f392dfaf6e1053de3e15aa6e5835ac60c 100644 (file)
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/soc/rockchip,boot-mode.h>
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
        interrupt-parent = <&gic>;
 
        aliases {
index 7173ec9059a1ff164ee14d94501843d1629d8637..ceb9783ff7e1fc2a16e8d4052c3606091d5b802e 100644 (file)
@@ -735,6 +735,11 @@ pdmic_clk: pdmic_clk {
                                                atmel,clk-output-range = <0 83000000>;
                                        };
 
+                                       securam_clk: securam_clk {
+                                               #clock-cells = <0>;
+                                               reg = <51>;
+                                       };
+
                                        i2s0_clk: i2s0_clk {
                                                #clock-cells = <0>;
                                                reg = <54>;
@@ -1030,6 +1035,7 @@ AT91_XDMAC_DT_PERID(0))>,
                                #address-cells = <1>;
                                #size-cells = <0>;
                                clocks = <&twi0_clk>;
+                               atmel,fifo-size = <16>;
                                status = "disabled";
                        };
 
@@ -1058,6 +1064,15 @@ flx1: flexcom@f8038000 {
                                status = "disabled";
                        };
 
+                       securam: sram@f8044000 {
+                               compatible = "atmel,sama5d2-securam", "mmio-sram";
+                               reg = <0xf8044000 0x1420>;
+                               clocks = <&securam_clk>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0xf8044000 0x1420>;
+                       };
+
                        rstc@f8048000 {
                                compatible = "atmel,sama5d3-rstc";
                                reg = <0xf8048000 0x10>;
@@ -1088,30 +1103,12 @@ watchdog@f8048040 {
                                status = "disabled";
                        };
 
-                       sckc@f8048050 {
-                               compatible = "atmel,at91sam9x5-sckc";
+                       clk32k: sckc@f8048050 {
+                               compatible = "atmel,sama5d4-sckc";
                                reg = <0xf8048050 0x4>;
 
-                               slow_rc_osc: slow_rc_osc {
-                                       compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
-                                       #clock-cells = <0>;
-                                       clock-frequency = <32768>;
-                                       clock-accuracy = <250000000>;
-                                       atmel,startup-time-usec = <75>;
-                               };
-
-                               slow_osc: slow_osc {
-                                       compatible = "atmel,at91sam9x5-clk-slow-osc";
-                                       #clock-cells = <0>;
-                                       clocks = <&slow_xtal>;
-                                       atmel,startup-time-usec = <1200000>;
-                               };
-
-                               clk32k: slowck {
-                                       compatible = "atmel,at91sam9x5-clk-slow";
-                                       #clock-cells = <0>;
-                                       clocks = <&slow_rc_osc &slow_osc>;
-                               };
+                               clocks = <&slow_xtal>;
+                               #clock-cells = <0>;
                        };
 
                        rtc@f80480b0 {
@@ -1231,6 +1228,7 @@ AT91_XDMAC_DT_PERID(2))>,
                                #address-cells = <1>;
                                #size-cells = <0>;
                                clocks = <&twi1_clk>;
+                               atmel,fifo-size = <16>;
                                status = "disabled";
                        };
 
@@ -1260,6 +1258,11 @@ pioA: pinctrl@fc038000 {
                                clocks = <&pioA_clk>;
                        };
 
+                       secumod@fc040000 {
+                               compatible = "atmel,sama5d2-secumod", "syscon";
+                               reg = <0xfc040000 0x100>;
+                       };
+
                        tdes@fc044000 {
                                compatible = "atmel,at91sam9g46-tdes";
                                reg = <0xfc044000 0x100>;
index 4c84d333fc7e60247bc9325ea132872d2b3d0011..b06448ba66490d88c8ffdc9f5fb79d3b0766a534 100644 (file)
@@ -549,8 +549,8 @@ pinctrl_adc0_ad11: adc0_ad11 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB30 periph A */
-                                                        AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PB31 periph A with pullup */
+                                                       <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
index 65e725fb567986b3db1687056c4c74df2f9bd003..4f60c1b7b1370e68c2bf07a6b62668abba0fc9fd 100644 (file)
@@ -1314,30 +1314,11 @@ watchdog@fc068640 {
                                status = "disabled";
                        };
 
-                       sckc@fc068650 {
-                               compatible = "atmel,at91sam9x5-sckc";
+                       clk32k: sckc@fc068650 {
+                               compatible = "atmel,sama5d4-sckc";
                                reg = <0xfc068650 0x4>;
-
-                               slow_rc_osc: slow_rc_osc {
-                                       compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
-                                       #clock-cells = <0>;
-                                       clock-frequency = <32768>;
-                                       clock-accuracy = <250000000>;
-                                       atmel,startup-time-usec = <75>;
-                               };
-
-                               slow_osc: slow_osc {
-                                       compatible = "atmel,at91sam9x5-clk-slow-osc";
-                                       #clock-cells = <0>;
-                                       clocks = <&slow_xtal>;
-                                       atmel,startup-time-usec = <1200000>;
-                               };
-
-                               clk32k: slowck {
-                                       compatible = "atmel,at91sam9x5-clk-slow";
-                                       #clock-cells = <0>;
-                                       clocks = <&slow_rc_osc &slow_osc>;
-                               };
+                               #clock-cells = <0>;
+                               clocks = <&slow_xtal>;
                        };
 
                        rtc@fc0686b0 {
@@ -1461,8 +1442,8 @@ pinctrl_adc0_ad4: adc0_ad4 {
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>,     /* conflicts with D14 and TDI */
-                                                       <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;  /* conflicts with D15 and TDO */
+                                                       <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* conflicts with D14 and TDI */
+                                                        AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;         /* conflicts with D15 and TDO */
                                        };
                                };
 
index 9f48141270b83a4a29aa3ac2dfce79ba10c9c1b1..27c1d46127cf7e3d66e19788339e6264142d4ea0 100644 (file)
@@ -686,6 +686,7 @@ L2: l2-cache@fffef000 {
                        arm,data-latency = <2 1 1>;
                        prefetch-data = <1>;
                        prefetch-instr = <1>;
+                       arm,shared-override;
                };
 
                mmc: dwmmc0@ff704000 {
@@ -700,11 +701,38 @@ mmc: dwmmc0@ff704000 {
                        status = "disabled";
                };
 
+               nand0: nand@ff900000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x1>;
+                       compatible = "denali,denali-nand-dt";
+                       reg = <0xff900000 0x100000>,
+                             <0xffb80000 0x10000>;
+                       reg-names = "nand_data", "denali_reg";
+                       interrupts = <0x0 0x90 0x4>;
+                       dma-mask = <0xffffffff>;
+                       clocks = <&nand_clk>;
+                       status = "disabled";
+               };
+
                ocram: sram@ffff0000 {
                        compatible = "mmio-sram";
                        reg = <0xffff0000 0x10000>;
                };
 
+               qspi: spi@ff705000 {
+                       compatible = "cdns,qspi-nor";
+                        #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0xff705000 0x1000>,
+                             <0xffa00000 0x1000>;
+                       interrupts = <0 151 4>;
+                       cdns,fifo-depth = <128>;
+                       cdns,fifo-width = <4>;
+                       cdns,trigger-address = <0x00000000>;
+                       clocks = <&qspi_clk>;
+                       status = "disabled";
+               };
+
                rst: rstmgr@ffd05000 {
                        #reset-cells = <1>;
                        compatible = "altr,rst-mgr";
index f520cbff5e1c915b942b85e42b1c6449dc784d19..551c636a4f013b9bc96b88c0016acabe2dc93f46 100644 (file)
@@ -562,6 +562,21 @@ i2c4: i2c@ffc02600 {
                        status = "disabled";
                };
 
+               spi1: spi@ffda5000 {
+                       compatible = "snps,dw-apb-ssi";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0xffda5000 0x100>;
+                       interrupts = <0 102 4>;
+                       num-chipselect = <4>;
+                       bus-num = <0>;
+                       /*32bit_access;*/
+                       tx-dma-channel = <&pdma 16>;
+                       rx-dma-channel = <&pdma 17>;
+                       clocks = <&spi_m_clk>;
+                       status = "disabled";
+               };
+
                sdr: sdr@ffc25000 {
                        compatible = "syscon";
                        reg = <0xffcfb100 0x80>;
@@ -573,6 +588,9 @@ L2: l2-cache@fffff000 {
                        interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
                        cache-unified;
                        cache-level = <2>;
+                       prefetch-data = <1>;
+                       prefetch-instr = <1>;
+                       arm,shared-override;
                };
 
                mmc: dwmmc0@ff808000 {
@@ -657,6 +675,20 @@ usb0-ecc@ff8c8800 {
                        };
                };
 
+               qspi: spi@ff809000 {
+                       compatible = "cdns,qspi-nor";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0xff809000 0x100>,
+                             <0xffa00000 0x100000>;
+                       interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+                       cdns,fifo-depth = <128>;
+                       cdns,fifo-width = <4>;
+                       cdns,trigger-address = <0x00000000>;
+                       clocks = <&qspi_clk>;
+                       status = "disabled";
+               };
+
                rst: rstmgr@ffd05000 {
                        #reset-cells = <1>;
                        compatible = "altr,rst-mgr";
index 8e3a4adc389f5b105f94437ded33e238fe64708e..eb00ae37f3165a14c923f2d210dc00a52441f5c1 100644 (file)
@@ -36,6 +36,30 @@ memory {
                reg = <0x0 0x40000000>; /* 1GB */
        };
 
+       a10leds {
+               compatible = "gpio-leds";
+
+               a10sr_led0 {
+                       label = "a10sr-led0";
+                       gpios = <&a10sr_gpio 0 1>;
+               };
+
+               a10sr_led1 {
+                       label = "a10sr-led1";
+                       gpios = <&a10sr_gpio 1 1>;
+               };
+
+               a10sr_led2 {
+                       label = "a10sr-led2";
+                       gpios = <&a10sr_gpio 2 1>;
+               };
+
+               a10sr_led3 {
+                       label = "a10sr-led3";
+                       gpios = <&a10sr_gpio 3 1>;
+               };
+       };
+
        soc {
                clkmgr@ffd04000 {
                        clocks {
@@ -75,6 +99,31 @@ &gmac0 {
        status = "okay";
 };
 
+&gpio1 {
+       status = "okay";
+};
+
+&spi1 {
+       status = "okay";
+
+       resource-manager@0 {
+               compatible = "altr,a10sr";
+               reg = <0>;
+               spi-max-frequency = <100000>;
+               /* low-level active IRQ at GPIO1_5 */
+               interrupt-parent = <&portb>;
+               interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+
+               a10sr_gpio: gpio-controller {
+                       compatible = "altr,a10sr-gpio";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+       };
+};
+
 &i2c1 {
        speed-mode = <0>;
        status = "okay";
diff --git a/arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts b/arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts
new file mode 100644 (file)
index 0000000..beb2fc6
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2016 Intel. All rights reserved.
+ *
+ * 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_arria10_socdk.dtsi"
+
+&qspi {
+       status = "okay";
+
+       flash0: n25q00@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "n25q00aa";
+               reg = <0>;
+               spi-max-frequency = <100000000>;
+
+               m25p,fast-read;
+               cdns,page-size = <256>;
+               cdns,block-size = <16>;
+               cdns,read-delay = <4>;
+               cdns,tshsl-ns = <50>;
+               cdns,tsd2d-ns = <50>;
+               cdns,tchsh-ns = <4>;
+               cdns,tslch-ns = <4>;
+
+               partition@qspi-boot {
+                       label = "Boot and fpga data";
+                       reg = <0x0 0x2720000>;
+               };
+
+               partition@qspi-rootfs {
+                       label = "Root Filesystem - JFFS2";
+                       reg = <0x2720000 0x58E0000>;
+               };
+       };
+};
index 3c8867862b0dbece25f0dd5a68ac5bc0f6c2dde1..f739ead074a2b455255d45f38c4bafe82224c415 100644 (file)
@@ -82,6 +82,39 @@ &mmc0 {
        status = "okay";
 };
 
+&qspi {
+       status = "okay";
+
+       flash: flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "n25q256a";
+               reg = <0>;
+               spi-max-frequency = <100000000>;
+
+               m25p,fast-read;
+               cdns,page-size = <256>;
+               cdns,block-size = <16>;
+               cdns,read-delay = <4>;
+               cdns,tshsl-ns = <50>;
+               cdns,tsd2d-ns = <50>;
+               cdns,tchsh-ns = <4>;
+               cdns,tslch-ns = <4>;
+
+               partition@qspi-boot {
+                       /* 8MB for raw data. */
+                       label = "Flash 0 Raw Data";
+                       reg = <0x0 0x800000>;
+               };
+
+               partition@qspi-rootfs {
+                       /* 120MB for jffs2 data. */
+                       label = "Flash 0 jffs2 Filesystem";
+                       reg = <0x800000 0x7800000>;
+               };
+       };
+};
+
 &usb1 {
        status = "okay";
 };
index afea3645ada43500eb0f2903b904760b169eddde..5ecd2ef405e315e91abaa6e810c60f752619a2e7 100644 (file)
@@ -18,7 +18,7 @@
 
 / {
        model = "Terasic DE-0(Atlas)";
-       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+       compatible = "terasic,de0-atlas", "altr,socfpga-cyclone5", "altr,socfpga";
 
        chosen {
                bootargs = "earlyprintk";
index f86f9c060d7a2aca5fb4890f55c35b2aabedc1e1..6ad3b1eb9b86f933b8a23e19684dcac59f621be4 100644 (file)
@@ -18,7 +18,7 @@
 #include "socfpga_cyclone5.dtsi"
 
 / {
-       model = "DENX MCV";
+       model = "Aries/DENX MCV";
        compatible = "altr,socfpga-cyclone5", "altr,socfpga";
 
        memory {
index 7186a29b8b861189bc5a6db0c66183ad826e94ce..e5a98e5696ca23be228b3a6614b46ddea268ebbb 100644 (file)
@@ -18,8 +18,8 @@
 #include "socfpga_cyclone5_mcv.dtsi"
 
 / {
-       model = "DENX MCV EVK";
-       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+       model = "Aries/DENX MCV EVK";
+       compatible = "denx,mcvevk", "altr,socfpga-cyclone5", "altr,socfpga";
 
        aliases {
                ethernet0 = &gmac0;
index 15e43f43f24480efcbeca00930844e9a72bc2e1e..6306d008f01b756991994267cb2538b7a2c93f94 100644 (file)
@@ -19,7 +19,7 @@
 
 / {
        model = "Altera SOCFPGA Cyclone V SoC Development Kit";
-       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+       compatible = "altr,socfpga-cyclone5-socdk", "altr,socfpga-cyclone5", "altr,socfpga";
 
        chosen {
                bootargs = "earlyprintk";
@@ -87,6 +87,39 @@ &mmc0 {
        status = "okay";
 };
 
+&qspi {
+       status = "okay";
+
+       flash0: n25q00@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "n25q00";
+               reg = <0>;      /* chip select */
+               spi-max-frequency = <100000000>;
+
+               m25p,fast-read;
+               cdns,page-size = <256>;
+               cdns,block-size = <16>;
+               cdns,read-delay = <4>;
+               cdns,tshsl-ns = <50>;
+               cdns,tsd2d-ns = <50>;
+               cdns,tchsh-ns = <4>;
+               cdns,tslch-ns = <4>;
+
+               partition@qspi-boot {
+                       /* 8MB for raw data. */
+                       label = "Flash 0 Raw Data";
+                       reg = <0x0 0x800000>;
+               };
+
+               partition@qspi-rootfs {
+                       /* 120MB for jffs2 data. */
+                       label = "Flash 0 jffs2 Filesystem";
+                       reg = <0x800000 0x7800000>;
+               };
+       };
+};
+
 &usb1 {
        status = "okay";
 };
index 02e22f554ef0742a2e7fba39779b7230ed4fb037..a0c90b3bdfd13d537eff4d743137874a5d488641 100644 (file)
@@ -19,7 +19,7 @@
 
 / {
        model = "Terasic SoCkit";
-       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+       compatible = "terasic,socfpga-cyclone5-sockit", "altr,socfpga-cyclone5", "altr,socfpga";
 
        chosen {
                bootargs = "earlyprintk";
@@ -175,6 +175,27 @@ &mmc0 {
        status = "okay";
 };
 
+&qspi {
+       status = "okay";
+
+       flash: flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "n25q00";
+               reg = <0>;
+               spi-max-frequency = <100000000>;
+
+               m25p,fast-read;
+               cdns,page-size = <256>;
+               cdns,block-size = <16>;
+               cdns,read-delay = <4>;
+               cdns,tshsl-ns = <50>;
+               cdns,tsd2d-ns = <50>;
+               cdns,tchsh-ns = <4>;
+               cdns,tslch-ns = <4>;
+       };
+};
+
 &usb1 {
        status = "okay";
 };
index d7985377506107e9200699a8aebf84f614f93745..c3d52f27b21ef9f4d3bf8f378ad27ec13f0851dc 100644 (file)
@@ -80,3 +80,22 @@ led@2 {
 &mmc {
        status = "okay";
 };
+
+&qspi {
+       status = "okay";
+
+       flash: flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "n25q256a";
+               reg = <0>;
+               spi-max-frequency = <100000000>;
+               m25p,fast-read;
+               cdns,read-delay = <4>;
+               cdns,tshsl-ns = <50>;
+               cdns,tsd2d-ns = <50>;
+               cdns,tchsh-ns = <4>;
+               cdns,tslch-ns = <4>;
+               status = "okay";
+       };
+};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sodia.dts b/arch/arm/boot/dts/socfpga_cyclone5_sodia.dts
new file mode 100644 (file)
index 0000000..5b7e3c2
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ *  Copyright (C) 2016 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+ *
+ * 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"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Altera SOCFPGA Cyclone V SoC Macnica Sodia board";
+       compatible = "macnica,sodia", "altr,socfpga-cyclone5", "altr,socfpga";
+
+       chosen {
+               bootargs = "earlyprintk";
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               name = "memory";
+               device_type = "memory";
+               reg = <0x0 0x40000000>;
+       };
+
+       aliases {
+               ethernet0 = &gmac1;
+       };
+
+       regulator_3_3v: 3-3-v-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       leds: gpio-leds {
+               compatible = "gpio-leds";
+
+               hps_led0 {
+                       label = "hps:green:led0";
+                       gpios = <&portb 12 GPIO_ACTIVE_LOW>;
+               };
+
+               hps_led1 {
+                       label = "hps:green:led1";
+                       gpios = <&portb 13 GPIO_ACTIVE_LOW>;
+               };
+
+               hps_led2 {
+                       label = "hps:green:led2";
+                       gpios = <&portb 14 GPIO_ACTIVE_LOW>;
+               };
+
+               hps_led3 {
+                       label = "hps:green:led3";
+                       gpios = <&portb 15 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&gmac1 {
+       status = "okay";
+       phy-mode = "rgmii";
+       phy = <&phy0>;
+
+       mdio0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               phy0: ethernet-phy@0 {
+                       reg = <0>;
+                       rxd0-skew-ps = <0>;
+                       rxd1-skew-ps = <0>;
+                       rxd2-skew-ps = <0>;
+                       rxd3-skew-ps = <0>;
+                       rxdv-skew-ps = <0>;
+                       rxc-skew-ps = <3000>;
+                       txen-skew-ps = <0>;
+                       txc-skew-ps = <3000>;
+               };
+       };
+};
+
+&gpio1 {
+       status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+
+       eeprom@51 {
+               compatible = "atmel,24c32";
+               reg = <0x51>;
+               pagesize = <32>;
+       };
+
+       rtc@68 {
+               compatible = "dallas,ds1339";
+               reg = <0x68>;
+       };
+};
+
+&mmc0 {
+       cd-gpios = <&portb 18 0>;
+       vmmc-supply = <&regulator_3_3v>;
+       vqmmc-supply = <&regulator_3_3v>;
+       status = "okay";
+};
+
+&usb1 {
+       status = "okay";
+};
index b844473601d25085d0a200e6406c8f5bfc381f04..363ee62457fea072e0cf01b1ef78d216993e33bc 100644 (file)
@@ -51,7 +51,7 @@
 
 / {
        model = "samtec VIN|ING FPGA";
-       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+       compatible = "samtec,vining", "altr,socfpga-cyclone5", "altr,socfpga";
 
        chosen {
                bootargs = "console=ttyS0,115200";
index b3df1c60d4657e59255f39ff24cccc87a895ca6d..386eee6de2320aa60365095d74378ce11a865f0d 100644 (file)
@@ -239,14 +239,25 @@ sdi0_per1@80126000 {
                        arm,primecell-periphid = <0x10480180>;
                        max-frequency = <100000000>;
                        bus-width = <4>;
+                       cap-sd-highspeed;
                        cap-mmc-highspeed;
+                       sd-uhs-sdr12;
+                       sd-uhs-sdr25;
+                       /* All direction control is used */
+                       st,sig-dir-cmd;
+                       st,sig-dir-dat0;
+                       st,sig-dir-dat2;
+                       st,sig-dir-dat31;
+                       st,sig-pin-fbclk;
+                       full-pwr-cycle;
                        vmmc-supply = <&ab8500_ldo_aux3_reg>;
                        vqmmc-supply = <&vmmci>;
                        pinctrl-names = "default", "sleep";
                        pinctrl-0 = <&sdi0_default_mode>;
                        pinctrl-1 = <&sdi0_sleep_mode>;
 
-                       cd-gpios  = <&gpio6 26 GPIO_ACTIVE_LOW>; // 218
+                       /* GPIO218 MMC_CD */
+                       cd-gpios  = <&gpio6 26 GPIO_ACTIVE_LOW>;
 
                        status = "okay";
                };
@@ -549,7 +560,7 @@ snowball_cfg2 {
                                        /* VMMCI level-shifter enable */
                                        snowball_cfg3 {
                                                pins = "GPIO217_AH12";
-                                               ste,config = <&gpio_out_lo>;
+                                               ste,config = <&gpio_out_hi>;
                                        };
                                        /* VMMCI level-shifter voltage select */
                                        snowball_cfg4 {
index 13029c03d7c6c7903811f11da4470cb83985a369..34c119a66f14b44a2878bbbb9eb21fba7ea87fb6 100644 (file)
@@ -101,6 +101,7 @@ clk_s_a0_pll: clk-s-a0-pll {
                                clocks = <&clk_sysin>;
 
                                clock-output-names = "clk-s-a0-pll-ofd-0";
+                               clock-critical = <0>; /* clk-s-a0-pll-ofd-0 */
                        };
 
                        clk_s_a0_flexgen: clk-s-a0-flexgen {
@@ -112,6 +113,7 @@ clk_s_a0_flexgen: clk-s-a0-flexgen {
                                         <&clk_sysin>;
 
                                clock-output-names = "clk-ic-lmi0";
+                               clock-critical = <CLK_IC_LMI0>;
                        };
                };
 
@@ -126,6 +128,7 @@ clk_s_c0_quadfs: clk-s-c0-quadfs@9103000 {
                                             "clk-s-c0-fs0-ch1",
                                             "clk-s-c0-fs0-ch2",
                                             "clk-s-c0-fs0-ch3";
+                       clock-critical = <0>; /* clk-s-c0-fs0-ch0 */
                };
 
                clk_s_c0: clockgen-c@09103000 {
@@ -139,6 +142,7 @@ clk_s_c0_pll0: clk-s-c0-pll0 {
                                clocks = <&clk_sysin>;
 
                                clock-output-names = "clk-s-c0-pll0-odf-0";
+                               clock-critical = <0>; /* clk-s-c0-pll0-odf-0 */
                        };
 
                        clk_s_c0_pll1: clk-s-c0-pll1 {
@@ -194,6 +198,12 @@ clk_s_c0_flexgen: clk-s-c0-flexgen {
                                                     "clk-main-disp",
                                                     "clk-aux-disp",
                                                     "clk-compo-dvp";
+                               clock-critical = <CLK_PROC_STFE>,
+                                                <CLK_ICN_CPU>,
+                                                <CLK_TX_ICN_DMU>,
+                                                <CLK_EXT2F_A9>,
+                                                <CLK_ICN_LMI>,
+                                                <CLK_ICN_SBC>;
                        };
                };
 
index 91096a49efa95af9e63082765d97eac2f81f1210..d29960b6c47b04236b22ea79ad0223bb44199662 100644 (file)
@@ -900,7 +900,7 @@ sti_sasg_codec: sti-sasg-codec {
                };
 
                sti_uni_player0: sti-uni-player@8d80000 {
-                       compatible = "st,sti-uni-player";
+                       compatible = "st,stih407-uni-player-hdmi";
                        #sound-dai-cells = <0>;
                        st,syscfg = <&syscfg_core>;
                        clocks = <&clk_s_d0_flexgen CLK_PCM_0>;
@@ -910,17 +910,13 @@ sti_uni_player0: sti-uni-player@8d80000 {
                        reg = <0x8d80000 0x158>;
                        interrupts = <GIC_SPI 84 IRQ_TYPE_NONE>;
                        dmas = <&fdma0 2 0 1>;
-                       dai-name = "Uni Player #0 (HDMI)";
                        dma-names = "tx";
-                       st,uniperiph-id = <0>;
-                       st,version = <5>;
-                       st,mode = "HDMI";
 
                        status          = "disabled";
                };
 
                sti_uni_player1: sti-uni-player@8d81000 {
-                       compatible = "st,sti-uni-player";
+                       compatible = "st,stih407-uni-player-pcm-out";
                        #sound-dai-cells = <0>;
                        st,syscfg = <&syscfg_core>;
                        clocks = <&clk_s_d0_flexgen CLK_PCM_1>;
@@ -930,17 +926,13 @@ sti_uni_player1: sti-uni-player@8d81000 {
                        reg = <0x8d81000 0x158>;
                        interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
                        dmas = <&fdma0 3 0 1>;
-                       dai-name = "Uni Player #1 (PIO)";
                        dma-names = "tx";
-                       st,uniperiph-id = <1>;
-                       st,version = <5>;
-                       st,mode = "PCM";
 
                        status = "disabled";
                };
 
                sti_uni_player2: sti-uni-player@8d82000 {
-                       compatible = "st,sti-uni-player";
+                       compatible = "st,stih407-uni-player-dac";
                        #sound-dai-cells = <0>;
                        st,syscfg = <&syscfg_core>;
                        clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
@@ -950,17 +942,13 @@ sti_uni_player2: sti-uni-player@8d82000 {
                        reg = <0x8d82000 0x158>;
                        interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
                        dmas = <&fdma0 4 0 1>;
-                       dai-name = "Uni Player #1 (DAC)";
                        dma-names = "tx";
-                       st,uniperiph-id = <2>;
-                       st,version = <5>;
-                       st,mode = "PCM";
 
                        status = "disabled";
                };
 
                sti_uni_player3: sti-uni-player@8d85000 {
-                       compatible = "st,sti-uni-player";
+                       compatible = "st,stih407-uni-player-spdif";
                        #sound-dai-cells = <0>;
                        st,syscfg = <&syscfg_core>;
                        clocks = <&clk_s_d0_flexgen CLK_SPDIFF>;
@@ -971,38 +959,30 @@ sti_uni_player3: sti-uni-player@8d85000 {
                        interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
                        dmas = <&fdma0 7 0 1>;
                        dma-names = "tx";
-                       dai-name = "Uni Player #1 (PIO)";
-                       st,uniperiph-id = <3>;
-                       st,version = <5>;
-                       st,mode = "SPDIF";
 
                        status = "disabled";
                };
 
                sti_uni_reader0: sti-uni-reader@8d83000 {
-                       compatible = "st,sti-uni-reader";
+                       compatible = "st,stih407-uni-reader-pcm_in";
                        #sound-dai-cells = <0>;
                        st,syscfg = <&syscfg_core>;
                        reg = <0x8d83000 0x158>;
                        interrupts = <GIC_SPI 87 IRQ_TYPE_NONE>;
                        dmas = <&fdma0 5 0 1>;
                        dma-names = "rx";
-                       dai-name = "Uni Reader #0 (PCM IN)";
-                       st,version = <3>;
 
                        status = "disabled";
                };
 
                sti_uni_reader1: sti-uni-reader@8d84000 {
-                       compatible = "st,sti-uni-reader";
+                       compatible = "st,stih407-uni-reader-hdmi";
                        #sound-dai-cells = <0>;
                        st,syscfg = <&syscfg_core>;
                        reg = <0x8d84000 0x158>;
                        interrupts = <GIC_SPI 88 IRQ_TYPE_NONE>;
                        dmas = <&fdma0 6 0 1>;
                        dma-names = "rx";
-                       dai-name = "Uni Reader #1 (HDMI RX)";
-                       st,version = <3>;
 
                        status = "disabled";
                };
index c325cc059ae4bc80a83a78717b916486e725227e..daab16b5ae645cee254a61b33bf7fe7178c4cb9f 100644 (file)
@@ -1157,7 +1157,7 @@ pin-controller-flash {
                        reg = <0x0923f080 0x4>;
                        reg-names = "irqmux";
                        interrupts = <GIC_SPI 192 IRQ_TYPE_NONE>;
-                       interrupts-names = "irqmux";
+                       interrupt-names = "irqmux";
                        ranges = <0 0x09230000 0x3000>;
 
                        pio40: gpio@09230000 {
index 291ffacbd2e06344a2949ab6853dc5cb49646464..fa149837df14a0a883e2b99533942772198c806a 100644 (file)
@@ -102,7 +102,7 @@ sti-tvout@8d08000 {
                                                         <&clk_s_d2_quadfs 0>;
                        };
 
-                       sti-hdmi@8d04000 {
+                       sti_hdmi: sti-hdmi@8d04000 {
                                compatible = "st,stih407-hdmi";
                                reg = <0x8d04000 0x1000>;
                                reg-names = "hdmi-reg";
index ef2ff2f518f619a91377238f6d6e28a0baa83aab..d50242eabae827c3e05a1f9fff975c538b60c335 100644 (file)
@@ -165,6 +165,9 @@ ethernet0: dwmac@9630000 {
                        status = "okay";
                };
 
+               sti_uni_player0: sti-uni-player@8d80000 {
+                       status = "okay";
+               };
                /* SSC11 to HDMI */
                hdmiddc: i2c@9541000 {
                        /* HDMI V1.3a supports Standard mode only */
@@ -174,9 +177,22 @@ hdmiddc: i2c@9541000 {
                        status = "okay";
                };
 
-               sti-display-subsystem {
-                       sti_hdmi: sti-hdmi@8d04000 {
-                               status = "okay";
+               sound {
+                       compatible = "simple-audio-card";
+                       simple-audio-card,name = "STI-B2260";
+                       status = "okay";
+
+                       simple-audio-card,dai-link@0 {
+                               /* DAC */
+                               format = "i2s";
+                               mclk-fs = <128>;
+                               cpu {
+                                       sound-dai = <&sti_uni_player0>;
+                               };
+
+                               codec {
+                                       sound-dai = <&sti_hdmi>;
+                               };
                        };
                };
 
index 8598effd6c0164b7f91d7b6dbbedc9d046c4f9ba..07c8ef9d77f6e790a82e37cbde7ebf1dcd8ef5dc 100644 (file)
@@ -208,7 +208,8 @@ clk_s_c0_flexgen: clk-s-c0-flexgen {
                                                     "clk-clust-hades",
                                                     "clk-hwpe-hades",
                                                     "clk-fc-hades";
-                               clock-critical = <CLK_ICN_CPU>,
+                               clock-critical = <CLK_PROC_STFE>,
+                                                <CLK_ICN_CPU>,
                                                 <CLK_TX_ICN_DMU>,
                                                 <CLK_EXT2F_A9>,
                                                 <CLK_ICN_LMI>,
index a3ef7341c051c267d15b31cdae104ba43e6bd1de..281a12424cf6c1a01b88495059057b19c198a4ab 100644 (file)
@@ -193,7 +193,7 @@ sti-tvout@8d08000 {
                                                         <&clk_s_d2_quadfs 0>;
                        };
 
-                       sti-hdmi@8d04000 {
+                       sti_hdmi: sti-hdmi@8d04000 {
                                compatible = "st,stih407-hdmi";
                                reg = <0x8d04000 0x1000>;
                                reg-names = "hdmi-reg";
diff --git a/arch/arm/boot/dts/stih415-b2000.dts b/arch/arm/boot/dts/stih415-b2000.dts
deleted file mode 100644 (file)
index bdfbd37..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-/dts-v1/;
-#include "stih415.dtsi"
-#include "stih41x-b2000.dtsi"
-/ {
-       model = "STiH415 B2000 Board";
-       compatible = "st,stih415-b2000", "st,stih415";
-};
diff --git a/arch/arm/boot/dts/stih415-b2020.dts b/arch/arm/boot/dts/stih415-b2020.dts
deleted file mode 100644 (file)
index 71903a8..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-/dts-v1/;
-#include "stih415.dtsi"
-#include "stih41x-b2020.dtsi"
-/ {
-       model = "STiH415 B2020 Board";
-       compatible = "st,stih415-b2020", "st,stih415";
-};
diff --git a/arch/arm/boot/dts/stih415-clock.dtsi b/arch/arm/boot/dts/stih415-clock.dtsi
deleted file mode 100644 (file)
index 3ee3451..0000000
+++ /dev/null
@@ -1,533 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited
- *
- * 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 <dt-bindings/clock/stih415-clks.h>
-
-/ {
-       clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               /*
-                * Fixed 30MHz oscillator input to SoC
-                */
-               clk_sysin: clk-sysin {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <30000000>;
-               };
-
-               /*
-                * ClockGenAs on SASG1
-                */
-               clockgen-a@fee62000 {
-                       reg = <0xfee62000 0xb48>;
-
-                       clk_s_a0_pll: clk-s-a0-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-plls-c65";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a0-pll0-hs",
-                                                    "clk-s-a0-pll0-ls",
-                                                    "clk-s-a0-pll1";
-                       };
-
-                       clk_s_a0_osc_prediv: clk-s-a0-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c65",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a0-osc-prediv";
-                       };
-
-                       clk_s_a0_hs: clk-s-a0-hs {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-hs",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a0_osc_prediv>,
-                                        <&clk_s_a0_pll 0>, /* PLL0 HS */
-                                        <&clk_s_a0_pll 2>; /* PLL1 */
-
-                               clock-output-names = "clk-s-fdma-0",
-                                                    "clk-s-fdma-1",
-                                                    ""; /* clk-s-jit-sense */
-                                                    /* Fourth output unused */
-                       };
-
-                       clk_s_a0_ls: clk-s-a0-ls {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-ls",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a0_osc_prediv>,
-                                        <&clk_s_a0_pll 1>, /* PLL0 LS */
-                                        <&clk_s_a0_pll 2>; /* PLL1 */
-
-                               clock-output-names = "clk-s-icn-reg-0",
-                                                    "clk-s-icn-if-0",
-                                                    "clk-s-icn-reg-lp-0",
-                                                    "clk-s-emiss",
-                                                    "clk-s-eth1-phy",
-                                                    "clk-s-mii-ref-out";
-                                                /* Remaining outputs unused */
-                       };
-               };
-
-               clockgen-a@fee81000 {
-                       reg = <0xfee81000 0xb48>;
-
-                       clk_s_a1_pll: clk-s-a1-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-plls-c65";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a1-pll0-hs",
-                                                    "clk-s-a1-pll0-ls",
-                                                    "clk-s-a1-pll1";
-                       };
-
-                       clk_s_a1_osc_prediv: clk-s-a1-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c65",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a1-osc-prediv";
-                       };
-
-                       clk_s_a1_hs: clk-s-a1-hs {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-hs",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a1_osc_prediv>,
-                                        <&clk_s_a1_pll 0>, /* PLL0 HS */
-                                        <&clk_s_a1_pll 2>; /* PLL1 */
-
-                               clock-output-names = "", /* Reserved */
-                                                    "", /* Reserved */
-                                                    "clk-s-stac-phy",
-                                                    "clk-s-vtac-tx-phy";
-                       };
-
-                       clk_s_a1_ls: clk-s-a1-ls {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-ls",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a1_osc_prediv>,
-                                        <&clk_s_a1_pll 1>, /* PLL0 LS */
-                                        <&clk_s_a1_pll 2>; /* PLL1 */
-
-                               clock-output-names = "clk-s-icn-if-2",
-                                                    "clk-s-card-mmc",
-                                                    "clk-s-icn-if-1",
-                                                    "clk-s-gmac0-phy",
-                                                    "clk-s-nand-ctrl",
-                                                    "", /* Reserved */
-                                                    "clk-s-mii0-ref-out",
-                                                    ""; /* clk-s-stac-sys */
-                                                /* Remaining outputs unused */
-                       };
-               };
-
-               /*
-                * ClockGenAs on MPE41
-                */
-               clockgen-a@fde12000 {
-                       reg = <0xfde12000 0xb50>;
-
-                       clk_m_a0_pll0: clk-m-a0-pll0 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a0-pll0-phi0",
-                                                    "clk-m-a0-pll0-phi1",
-                                                    "clk-m-a0-pll0-phi2",
-                                                    "clk-m-a0-pll0-phi3";
-                       };
-
-                       clk_m_a0_pll1: clk-m-a0-pll1 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a0-pll1-phi0",
-                                                    "clk-m-a0-pll1-phi1",
-                                                    "clk-m-a0-pll1-phi2",
-                                                    "clk-m-a0-pll1-phi3";
-                       };
-
-                       clk_m_a0_osc_prediv: clk-m-a0-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c32",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a0-osc-prediv";
-                       };
-
-                       clk_m_a0_div0: clk-m-a0-div0 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf0",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 0>, /* PLL0 PHI0 */
-                                        <&clk_m_a0_pll1 0>; /* PLL1 PHI0 */
-
-                               clock-output-names = "clk-m-apb-pm", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "clk-m-pp-dmu-0",
-                                                    "clk-m-pp-dmu-1",
-                                                    "clk-m-icm-disp",
-                                                    ""; /* Unused */
-                       };
-
-                       clk_m_a0_div1: clk-m-a0-div1 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf1",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 1>, /* PLL0 PHI1 */
-                                        <&clk_m_a0_pll1 1>; /* PLL1 PHI1 */
-
-                               clock-output-names = "", /* Unused */
-                                                    "", /* Unused */
-                                                    "clk-m-a9-ext2f",
-                                                    "clk-m-st40rt",
-                                                    "clk-m-st231-dmu-0",
-                                                    "clk-m-st231-dmu-1",
-                                                    "clk-m-st231-aud",
-                                                    "clk-m-st231-gp-0";
-                       };
-
-                       clk_m_a0_div2: clk-m-a0-div2 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf2",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 2>, /* PLL0 PHI2 */
-                                        <&clk_m_a0_pll1 2>; /* PLL1 PHI2 */
-
-                               clock-output-names = "clk-m-st231-gp-1",
-                                                    "clk-m-icn-cpu",
-                                                    "clk-m-icn-stac",
-                                                    "clk-m-icn-dmu-0",
-                                                    "clk-m-icn-dmu-1",
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    ""; /* Unused */
-                       };
-
-                       clk_m_a0_div3: clk-m-a0-div3 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf3",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 3>, /* PLL0 PHI3 */
-                                        <&clk_m_a0_pll1 3>; /* PLL1 PHI3 */
-
-                               clock-output-names = "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "clk-m-icn-eram",
-                                                    "clk-m-a9-trace";
-                       };
-               };
-
-               clockgen-a@fd6db000 {
-                       reg = <0xfd6db000 0xb50>;
-
-                       clk_m_a1_pll0: clk-m-a1-pll0 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a1-pll0-phi0",
-                                                    "clk-m-a1-pll0-phi1",
-                                                    "clk-m-a1-pll0-phi2",
-                                                    "clk-m-a1-pll0-phi3";
-                       };
-
-                       clk_m_a1_pll1: clk-m-a1-pll1 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a1-pll1-phi0",
-                                                    "clk-m-a1-pll1-phi1",
-                                                    "clk-m-a1-pll1-phi2",
-                                                    "clk-m-a1-pll1-phi3";
-                       };
-
-                       clk_m_a1_osc_prediv: clk-m-a1-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c32",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a1-osc-prediv";
-                       };
-
-                       clk_m_a1_div0: clk-m-a1-div0 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf0",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 0>, /* PLL0 PHI0 */
-                                        <&clk_m_a1_pll1 0>; /* PLL1 PHI0 */
-
-                               clock-output-names = "clk-m-fdma-12",
-                                                    "clk-m-fdma-10",
-                                                    "clk-m-fdma-11",
-                                                    "clk-m-hva-lmi",
-                                                    "clk-m-proc-sc",
-                                                    "clk-m-tp",
-                                                    "clk-m-icn-gpu",
-                                                    "clk-m-icn-vdp-0";
-                       };
-
-                       clk_m_a1_div1: clk-m-a1-div1 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf1",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 1>, /* PLL0 PHI1 */
-                                        <&clk_m_a1_pll1 1>; /* PLL1 PHI1 */
-
-                               clock-output-names = "clk-m-icn-vdp-1",
-                                                    "clk-m-icn-vdp-2",
-                                                    "clk-m-icn-vdp-3",
-                                                    "clk-m-prv-t1-bus",
-                                                    "clk-m-icn-vdp-4",
-                                                    "clk-m-icn-reg-10",
-                                                    "", /* Unused */
-                                                    ""; /* clk-m-icn-st231 */
-                       };
-
-                       clk_m_a1_div2: clk-m-a1-div2 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf2",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 2>, /* PLL0 PHI2 */
-                                        <&clk_m_a1_pll1 2>; /* PLL1 PHI2 */
-
-                               clock-output-names = "clk-m-fvdp-proc-alt",
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    ""; /* Unused */
-                       };
-
-                       clk_m_a1_div3: clk-m-a1-div3 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf3",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 3>, /* PLL0 PHI3 */
-                                        <&clk_m_a1_pll1 3>; /* PLL1 PHI3 */
-
-                               clock-output-names = "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    ""; /* Unused */
-                       };
-               };
-
-               clk_m_a9_ext2f_div2: clk-m-a9-ext2f-div2 {
-                       #clock-cells = <0>;
-                       compatible = "fixed-factor-clock";
-                       clocks = <&clk_m_a0_div1 2>;
-                       clock-div = <2>;
-                       clock-mult = <1>;
-               };
-
-               clockgen-a@fd345000 {
-                       reg = <0xfd345000 0xb50>;
-
-                       clk_m_a2_pll0: clk-m-a2-pll0 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a2-pll0-phi0",
-                                                    "clk-m-a2-pll0-phi1",
-                                                    "clk-m-a2-pll0-phi2",
-                                                    "clk-m-a2-pll0-phi3";
-                       };
-
-                       clk_m_a2_pll1: clk-m-a2-pll1 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a2-pll1-phi0",
-                                                    "clk-m-a2-pll1-phi1",
-                                                    "clk-m-a2-pll1-phi2",
-                                                    "clk-m-a2-pll1-phi3";
-                       };
-
-                       clk_m_a2_osc_prediv: clk-m-a2-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c32",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a2-osc-prediv";
-                       };
-
-                       clk_m_a2_div0: clk-m-a2-div0 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf0",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 0>, /* PLL0 PHI0 */
-                                        <&clk_m_a2_pll1 0>; /* PLL1 PHI0 */
-
-                               clock-output-names = "clk-m-vtac-main-phy",
-                                                    "clk-m-vtac-aux-phy",
-                                                    "clk-m-stac-phy",
-                                                    "clk-m-stac-sys",
-                                                    "", /* clk-m-mpestac-pg */
-                                                    "", /* clk-m-mpestac-wc */
-                                                    "", /* clk-m-mpevtacaux-pg*/
-                                                    ""; /* clk-m-mpevtacmain-pg*/
-                       };
-
-                       clk_m_a2_div1: clk-m-a2-div1 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf1",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 1>, /* PLL0 PHI1 */
-                                        <&clk_m_a2_pll1 1>; /* PLL1 PHI1 */
-
-                               clock-output-names = "", /* clk-m-mpevtacrx0-wc */
-                                                    "", /* clk-m-mpevtacrx1-wc */
-                                                    "clk-m-compo-main",
-                                                    "clk-m-compo-aux",
-                                                    "clk-m-bdisp-0",
-                                                    "clk-m-bdisp-1",
-                                                    "clk-m-icn-bdisp-0",
-                                                    "clk-m-icn-bdisp-1";
-                       };
-
-                       clk_m_a2_div2: clk-m-a2-div2 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf2",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 2>, /* PLL0 PHI2 */
-                                        <&clk_m_a2_pll1 2>; /* PLL1 PHI2 */
-
-                               clock-output-names = "", /* clk-m-icn-hqvdp0 */
-                                                    "", /* clk-m-icn-hqvdp1 */
-                                                    "clk-m-icn-compo",
-                                                    "", /* clk-m-icn-vdpaux */
-                                                    "clk-m-icn-ts",
-                                                    "clk-m-icn-reg-lp-10",
-                                                    "clk-m-dcephy-impctrl",
-                                                    ""; /* Unused */
-                       };
-
-                       clk_m_a2_div3: clk-m-a2-div3 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf3",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 3>, /* PLL0 PHI3 */
-                                        <&clk_m_a2_pll1 3>; /* PLL1 PHI3 */
-
-                               clock-output-names = ""; /* Unused */
-                                               /* Remaining outputs unused */
-                       };
-               };
-
-               /*
-                * A9 PLL
-                */
-               clockgen-a9@fdde00d8 {
-                       reg = <0xfdde00d8 0x70>;
-
-                       clockgen_a9_pll: clockgen-a9-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,stih415-plls-c32-a9", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-                               clock-output-names = "clockgen-a9-pll-odf";
-                       };
-               };
-
-               /*
-                * ARM CPU related clocks
-                */
-               clk_m_a9: clk-m-a9@fdde00d8 {
-                       #clock-cells = <0>;
-                       compatible = "st,stih415-clkgen-a9-mux", "st,clkgen-mux";
-                       reg = <0xfdde00d8 0x4>;
-                       clocks = <&clockgen_a9_pll 0>,
-                                <&clockgen_a9_pll 0>,
-                                <&clk_m_a0_div1 2>,
-                                <&clk_m_a9_ext2f_div2>;
-               };
-
-               /*
-                * ARM Peripheral clock for timers
-                */
-               arm_periph_clk: clk-m-a9-periphs {
-                       #clock-cells = <0>;
-                       compatible = "fixed-factor-clock";
-                       clocks = <&clk_m_a9>;
-                       clock-div = <2>;
-                       clock-mult = <1>;
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih415-pinctrl.dtsi b/arch/arm/boot/dts/stih415-pinctrl.dtsi
deleted file mode 100644 (file)
index bd028ce..0000000
+++ /dev/null
@@ -1,545 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-#include "st-pincfg.h"
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-/ {
-
-       aliases {
-               gpio0   = &pio0;
-               gpio1   = &pio1;
-               gpio2   = &pio2;
-               gpio3   = &pio3;
-               gpio4   = &pio4;
-               gpio5   = &pio5;
-               gpio6   = &pio6;
-               gpio7   = &pio7;
-               gpio8   = &pio8;
-               gpio9   = &pio9;
-               gpio10  = &pio10;
-               gpio11  = &pio11;
-               gpio12  = &pio12;
-               gpio13  = &pio13;
-               gpio14  = &pio14;
-               gpio15  = &pio15;
-               gpio16  = &pio16;
-               gpio17  = &pio17;
-               gpio18  = &pio18;
-               gpio19  = &pio100;
-               gpio20  = &pio101;
-               gpio21  = &pio102;
-               gpio22  = &pio103;
-               gpio23  = &pio104;
-               gpio24  = &pio105;
-               gpio25  = &pio106;
-               gpio26  = &pio107;
-       };
-
-       soc {
-               pin-controller-sbc {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih415-sbc-pinctrl";
-                       st,syscfg       = <&syscfg_sbc>;
-                       reg             = <0xfe61f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfe610000 0x5000>;
-
-                       pio0: gpio@fe610000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO0";
-                       };
-                       pio1: gpio@fe611000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO1";
-                       };
-                       pio2: gpio@fe612000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO2";
-                       };
-                       pio3: gpio@fe613000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO3";
-                       };
-                       pio4: gpio@fe614000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO4";
-                       };
-
-                       sbc_serial1 {
-                               pinctrl_sbc_serial1:sbc_serial1 {
-                                       st,pins {
-                                               tx      = <&pio2 6 ALT3 OUT>;
-                                               rx      = <&pio2 7 ALT3 IN>;
-                                       };
-                               };
-                       };
-
-                       keyscan {
-                               pinctrl_keyscan: keyscan {
-                                       st,pins {
-                                               keyin0 = <&pio0 2 ALT2 IN>;
-                                               keyin1 = <&pio0 3 ALT2 IN>;
-                                               keyin2 = <&pio0 4 ALT2 IN>;
-                                               keyin3 = <&pio2 6 ALT2 IN>;
-
-                                               keyout0 = <&pio1 6 ALT2 OUT>;
-                                               keyout1 = <&pio1 7 ALT2 OUT>;
-                                               keyout2 = <&pio0 6 ALT2 OUT>;
-                                               keyout3 = <&pio2 7 ALT2 OUT>;
-                                       };
-                               };
-                       };
-
-                       sbc_i2c0 {
-                               pinctrl_sbc_i2c0_default: sbc_i2c0-default {
-                                       st,pins {
-                                               sda = <&pio4 6 ALT1 BIDIR>;
-                                               scl = <&pio4 5 ALT1 BIDIR>;
-                                       };
-                               };
-                       };
-
-                       sbc_i2c1 {
-                               pinctrl_sbc_i2c1_default: sbc_i2c1-default {
-                                       st,pins {
-                                               sda = <&pio3 2 ALT2 BIDIR>;
-                                               scl = <&pio3 1 ALT2 BIDIR>;
-                                       };
-                               };
-                       };
-
-                       rc{
-                               pinctrl_ir: ir0 {
-                                       st,pins {
-                                               ir = <&pio4 0 ALT2 IN>;
-                                       };
-                               };
-                       };
-
-                       gmac1 {
-                               pinctrl_mii1: mii1 {
-                                               st,pins {
-                                                txd0   = <&pio0 0 ALT1 OUT  SE_NICLK_IO        0       CLK_A>;
-                                                txd1   = <&pio0 1 ALT1 OUT  SE_NICLK_IO        0       CLK_A>;
-                                                txd2   = <&pio0 2 ALT1 OUT  SE_NICLK_IO        0       CLK_A>;
-                                                txd3   = <&pio0 3 ALT1 OUT  SE_NICLK_IO        0       CLK_A>;
-                                                txer   = <&pio0 4 ALT1 OUT  SE_NICLK_IO        0       CLK_A>;
-                                                txen   = <&pio0 5 ALT1 OUT  SE_NICLK_IO        0       CLK_A>;
-                                                txclk  = <&pio0 6 ALT1 IN   NICLK      0       CLK_A>;
-                                                col    = <&pio0 7 ALT1 IN   BYPASS     1000>;
-                                                mdio   = <&pio1 0 ALT1 OUT  BYPASS     0>;
-                                                mdc    = <&pio1 1 ALT1 OUT  NICLK      0       CLK_A>;
-                                                crs    = <&pio1 2 ALT1 IN   BYPASS     1000>;
-                                                mdint  = <&pio1 3 ALT1 IN   BYPASS     0>;
-                                                rxd0   = <&pio1 4 ALT1 IN   SE_NICLK_IO        0       CLK_A>;
-                                                rxd1   = <&pio1 5 ALT1 IN   SE_NICLK_IO        0       CLK_A>;
-                                                rxd2   = <&pio1 6 ALT1 IN   SE_NICLK_IO        0       CLK_A>;
-                                                rxd3   = <&pio1 7 ALT1 IN   SE_NICLK_IO        0       CLK_A>;
-                                                rxdv   = <&pio2 0 ALT1 IN   SE_NICLK_IO        0       CLK_A>;
-                                                rx_er  = <&pio2 1 ALT1 IN   SE_NICLK_IO        0       CLK_A>;
-                                                rxclk  = <&pio2 2 ALT1 IN   NICLK      0       CLK_A>;
-                                                phyclk = <&pio2 3 ALT1 IN   NICLK      1000    CLK_A>;
-                                       };
-                               };
-
-                               pinctrl_rgmii1: rgmii1-0 {
-                                       st,pins {
-                                                txd0 =  <&pio0 0 ALT1 OUT DE_IO        1000    CLK_A>;
-                                                txd1 =  <&pio0 1 ALT1 OUT DE_IO        1000    CLK_A>;
-                                                txd2 =  <&pio0 2 ALT1 OUT DE_IO        1000    CLK_A>;
-                                                txd3 =  <&pio0 3 ALT1 OUT DE_IO        1000    CLK_A>;
-                                                txen =  <&pio0 5 ALT1 OUT DE_IO        0       CLK_A>;
-                                                txclk = <&pio0 6 ALT1 IN       NICLK   0       CLK_A>;
-                                                mdio =  <&pio1 0 ALT1 OUT      BYPASS  0>;
-                                                mdc =   <&pio1 1 ALT1 OUT      NICLK   0       CLK_A>;
-                                                rxd0 =  <&pio1 4 ALT1 IN DE_IO 0       CLK_A>;
-                                                rxd1 =  <&pio1 5 ALT1 IN DE_IO 0       CLK_A>;
-                                                rxd2 =  <&pio1 6 ALT1 IN DE_IO 0       CLK_A>;
-                                                rxd3 =  <&pio1 7 ALT1 IN DE_IO 0       CLK_A>;
-
-                                                rxdv =   <&pio2 0 ALT1 IN DE_IO        500     CLK_A>;
-                                                rxclk =  <&pio2 2 ALT1 IN      NICLK   0       CLK_A>;
-                                                phyclk = <&pio2 3 ALT4 OUT     NICLK   0       CLK_B>;
-
-                                                clk125= <&pio3 7 ALT4 IN       NICLK   0       CLK_A>;
-                                       };
-                               };
-                       };
-               };
-
-               pin-controller-front {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih415-front-pinctrl";
-                       st,syscfg       = <&syscfg_front>;
-                       reg             = <0xfee0f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfee00000 0x8000>;
-
-                       pio5: gpio@fee00000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO5";
-                       };
-                       pio6: gpio@fee01000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO6";
-                       };
-                       pio7: gpio@fee02000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO7";
-                       };
-                       pio8: gpio@fee03000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO8";
-                       };
-                       pio9: gpio@fee04000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO9";
-                       };
-                       pio10: gpio@fee05000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x5000 0x100>;
-                               st,bank-name    = "PIO10";
-                       };
-                       pio11: gpio@fee06000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x6000 0x100>;
-                               st,bank-name    = "PIO11";
-                       };
-                       pio12: gpio@fee07000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x7000 0x100>;
-                               st,bank-name    = "PIO12";
-                       };
-
-                       i2c0 {
-                               pinctrl_i2c0_default: i2c0-default {
-                                       st,pins {
-                                               sda = <&pio9 3 ALT1 BIDIR>;
-                                               scl = <&pio9 2 ALT1 BIDIR>;
-                                       };
-                               };
-                       };
-
-                       i2c1 {
-                               pinctrl_i2c1_default: i2c1-default {
-                                       st,pins {
-                                               sda = <&pio12 1 ALT1 BIDIR>;
-                                               scl = <&pio12 0 ALT1 BIDIR>;
-                                       };
-                               };
-                       };
-               };
-
-               pin-controller-rear {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih415-rear-pinctrl";
-                       st,syscfg       = <&syscfg_rear>;
-                       reg             = <0xfe82f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfe820000 0x8000>;
-
-                       pio13: gpio@fe820000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO13";
-                       };
-                       pio14: gpio@fe821000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO14";
-                       };
-                       pio15: gpio@fe822000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO15";
-                       };
-                       pio16: gpio@fe823000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO16";
-                       };
-                       pio17: gpio@fe824000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO17";
-                       };
-                       pio18: gpio@fe825000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x5000 0x100>;
-                               st,bank-name    = "PIO18";
-                       };
-
-                       serial2 {
-                               pinctrl_serial2: serial2-0 {
-                                       st,pins {
-                                               tx      = <&pio17 4 ALT2 OUT>;
-                                               rx      = <&pio17 5 ALT2 IN>;
-                                       };
-                               };
-                       };
-
-                       gmac0{
-                               pinctrl_mii0: mii0 {
-                                       st,pins {
-                                        mdint =        <&pio13 6 ALT2  IN      BYPASS          0>;
-                                        txen =         <&pio13 7 ALT2  OUT     SE_NICLK_IO     0       CLK_A>;
-
-                                        txd0 =         <&pio14 0 ALT2  OUT     SE_NICLK_IO     0       CLK_A>;
-                                        txd1 =         <&pio14 1 ALT2  OUT     SE_NICLK_IO     0       CLK_A>;
-                                        txd2 =         <&pio14 2 ALT2  OUT     SE_NICLK_IO     0       CLK_B>;
-                                        txd3 =         <&pio14 3 ALT2  OUT     SE_NICLK_IO     0       CLK_B>;
-
-                                        txclk =        <&pio15 0 ALT2  IN      NICLK           0       CLK_A>;
-                                        txer =         <&pio15 1 ALT2  OUT     SE_NICLK_IO     0       CLK_A>;
-                                        crs =          <&pio15 2 ALT2  IN      BYPASS          1000>;
-                                        col =          <&pio15 3 ALT2  IN      BYPASS          1000>;
-                                        mdio  =        <&pio15 4 ALT2  OUT     BYPASS  3000>;
-                                        mdc   =        <&pio15 5 ALT2  OUT     NICLK   0       CLK_B>;
-
-                                        rxd0 =         <&pio16 0 ALT2  IN      SE_NICLK_IO     0       CLK_A>;
-                                        rxd1 =         <&pio16 1 ALT2  IN      SE_NICLK_IO     0       CLK_A>;
-                                        rxd2 =         <&pio16 2 ALT2  IN      SE_NICLK_IO     0       CLK_A>;
-                                        rxd3 =         <&pio16 3 ALT2  IN      SE_NICLK_IO     0       CLK_A>;
-                                        rxdv =         <&pio15 6 ALT2  IN      SE_NICLK_IO     0       CLK_A>;
-                                        rx_er =        <&pio15 7 ALT2  IN      SE_NICLK_IO     0       CLK_A>;
-                                        rxclk =        <&pio17 0 ALT2  IN      NICLK           0       CLK_A>;
-                                        phyclk =       <&pio13 5 ALT2  OUT     NICLK   1000    CLK_A>;
-
-                                       };
-                               };
-
-                       pinctrl_gmii0: gmii0 {
-                               st,pins {
-                                        mdint =        <&pio13 6       ALT2 IN         BYPASS  0>;
-                                        mdio  =        <&pio15 4       ALT2 OUT        BYPASS  3000>;
-                                        mdc   =        <&pio15 5       ALT2 OUT        NICLK   0       CLK_B>;
-                                        txen =         <&pio13 7       ALT2 OUT        SE_NICLK_IO     3000    CLK_A>;
-
-                                        txd0 =         <&pio14 0       ALT2 OUT        SE_NICLK_IO     3000    CLK_A>;
-                                        txd1 =         <&pio14 1       ALT2 OUT        SE_NICLK_IO     3000    CLK_A>;
-                                        txd2 =         <&pio14 2       ALT2 OUT        SE_NICLK_IO     3000    CLK_B>;
-                                        txd3 =         <&pio14 3       ALT2 OUT        SE_NICLK_IO     3000    CLK_B>;
-                                        txd4 =         <&pio14 4       ALT2 OUT        SE_NICLK_IO     3000    CLK_B>;
-                                        txd5 =         <&pio14 5       ALT2 OUT        SE_NICLK_IO     3000    CLK_B>;
-                                        txd6 =         <&pio14 6       ALT2 OUT        SE_NICLK_IO     3000    CLK_B>;
-                                        txd7 =         <&pio14 7       ALT2 OUT        SE_NICLK_IO     3000    CLK_B>;
-
-                                        txclk =        <&pio15 0       ALT2 IN         NICLK   0       CLK_A>;
-                                        txer =         <&pio15 1       ALT2 OUT        SE_NICLK_IO     3000    CLK_A>;
-                                        crs =          <&pio15 2       ALT2 IN         BYPASS  1000>;
-                                        col =          <&pio15 3       ALT2 IN         BYPASS  1000>;
-                                        rxdv =         <&pio15 6       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rx_er =        <&pio15 7       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-
-                                        rxd0 =         <&pio16 0       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rxd1 =         <&pio16 1       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rxd2 =         <&pio16 2       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rxd3 =         <&pio16 3       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rxd4 =         <&pio16 4       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rxd5 =         <&pio16 5       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rxd6 =         <&pio16 6       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-                                        rxd7 =         <&pio16 7       ALT2 IN         SE_NICLK_IO     1500    CLK_A>;
-
-                                        rxclk =        <&pio17 0       ALT2 IN NICLK   0       CLK_A>;
-                                        clk125 =       <&pio17 6       ALT1 IN NICLK   0       CLK_A>;
-                                         phyclk =       <&pio13 5       ALT4 OUT NICLK   0       CLK_B>;
-
-
-                                       };
-                               };
-                       };
-
-                       mmc0 {
-                               pinctrl_mmc0: mmc0 {
-                                       st,pins {
-                                               mmcclk = <&pio13 4 ALT4 BIDIR_PU NICLK 0 CLK_B>;
-                                               data0  = <&pio14 4 ALT4 BIDIR_PU BYPASS 0>;
-                                               data1  = <&pio14 5 ALT4 BIDIR_PU BYPASS 0>;
-                                               data2  = <&pio14 6 ALT4 BIDIR_PU BYPASS 0>;
-                                               data3  = <&pio14 7 ALT4 BIDIR_PU BYPASS 0>;
-                                               cmd    = <&pio15 1 ALT4 BIDIR_PU BYPASS 0>;
-                                               wp     = <&pio15 3 ALT4 IN>;
-                                               data4  = <&pio16 4 ALT4 BIDIR_PU BYPASS 0>;
-                                               data5  = <&pio16 5 ALT4 BIDIR_PU BYPASS 0>;
-                                               data6  = <&pio16 6 ALT4 BIDIR_PU BYPASS 0>;
-                                               data7  = <&pio16 7 ALT4 BIDIR_PU BYPASS 0>;
-                                               pwr    = <&pio17 1 ALT4 OUT>;
-                                               cd     = <&pio17 2 ALT4 IN>;
-                                               led    = <&pio17 3 ALT4 OUT>;
-                                       };
-                               };
-                       };
-               };
-
-               pin-controller-left {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih415-left-pinctrl";
-                       st,syscfg       = <&syscfg_left>;
-                       reg             = <0xfd6bf080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfd6b0000 0x3000>;
-
-                       pio100: gpio@fd6b0000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO100";
-                       };
-                       pio101: gpio@fd6b1000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO101";
-                       };
-                       pio102: gpio@fd6b2000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO102";
-                       };
-               };
-
-               pin-controller-right {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih415-right-pinctrl";
-                       st,syscfg       = <&syscfg_right>;
-                       reg             = <0xfd33f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfd330000 0x5000>;
-
-                       pio103: gpio@fd330000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO103";
-                       };
-                       pio104: gpio@fd331000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO104";
-                       };
-                       pio105: gpio@fd332000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO105";
-                       };
-                       pio106: gpio@fd333000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO106";
-                       };
-                       pio107: gpio@fd334000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO107";
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi
deleted file mode 100644 (file)
index 12427e6..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-#include "stih41x.dtsi"
-#include "stih415-clock.dtsi"
-#include "stih415-pinctrl.dtsi"
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/reset/stih415-resets.h>
-/ {
-
-       L2: cache-controller {
-               compatible = "arm,pl310-cache";
-               reg = <0xfffe2000 0x1000>;
-               arm,data-latency = <3 2 2>;
-               arm,tag-latency = <1 1 1>;
-               cache-unified;
-               cache-level = <2>;
-       };
-
-       soc {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               interrupt-parent = <&intc>;
-               ranges;
-               compatible      = "simple-bus";
-
-               powerdown: powerdown-controller {
-                       #reset-cells = <1>;
-                       compatible = "st,stih415-powerdown";
-               };
-
-               softreset: softreset-controller {
-                       #reset-cells = <1>;
-                       compatible = "st,stih415-softreset";
-               };
-
-               syscfg_sbc: sbc-syscfg@fe600000{
-                       compatible      = "st,stih415-sbc-syscfg", "syscon";
-                       reg             = <0xfe600000 0xb4>;
-               };
-
-               syscfg_front: front-syscfg@fee10000{
-                       compatible      = "st,stih415-front-syscfg", "syscon";
-                       reg             = <0xfee10000 0x194>;
-               };
-
-               syscfg_rear: rear-syscfg@fe830000{
-                       compatible      = "st,stih415-rear-syscfg", "syscon";
-                       reg             = <0xfe830000 0x190>;
-               };
-
-               /* MPE syscfgs */
-               syscfg_left: left-syscfg@fd690000{
-                       compatible      = "st,stih415-left-syscfg", "syscon";
-                       reg             = <0xfd690000 0x78>;
-               };
-
-               syscfg_right: right-syscfg@fd320000{
-                       compatible      = "st,stih415-right-syscfg", "syscon";
-                       reg             = <0xfd320000 0x180>;
-               };
-
-               syscfg_system: system-syscfg@fdde0000  {
-                       compatible      = "st,stih415-system-syscfg", "syscon";
-                       reg             = <0xfdde0000 0x15c>;
-               };
-
-               syscfg_lpm: lpm-syscfg@fe4b5100{
-                       compatible      = "st,stih415-lpm-syscfg", "syscon";
-                       reg             = <0xfe4b5100 0x08>;
-               };
-
-               serial2: serial@fed32000 {
-                       compatible      = "st,asc";
-                       status          = "disabled";
-                       reg             = <0xfed32000 0x2c>;
-                       interrupts      = <0 197 0>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_serial2>;
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-               };
-
-               /* SBC comms block ASCs in SASG1 */
-               sbc_serial1: serial@fe531000 {
-                       compatible      = "st,asc";
-                       status          = "disabled";
-                       reg             = <0xfe531000 0x2c>;
-                       interrupts      = <0 210 0>;
-                       clocks          = <&clk_sysin>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_sbc_serial1>;
-               };
-
-               i2c@fed40000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfed40000 0x110>;
-                       interrupts      = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_i2c0_default>;
-
-                       status          = "disabled";
-               };
-
-               i2c@fed41000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfed41000 0x110>;
-                       interrupts      = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_i2c1_default>;
-
-                       status          = "disabled";
-               };
-
-               i2c@fe540000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfe540000 0x110>;
-                       interrupts      = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_sysin>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_sbc_i2c0_default>;
-
-                       status          = "disabled";
-               };
-
-               i2c@fe541000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfe541000 0x110>;
-                       interrupts      = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_sysin>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_sbc_i2c1_default>;
-
-                       status          = "disabled";
-               };
-
-               ethernet0: dwmac@fe810000 {
-                       device_type     = "network";
-                       compatible      = "st,stih415-dwmac", "snps,dwmac", "snps,dwmac-3.610";
-                       status          = "disabled";
-
-                       reg             = <0xfe810000 0x8000>;
-                       reg-names       = "stmmaceth";
-
-                       interrupts      = <0 147 0>, <0 148 0>, <0 149 0>;
-                       interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
-                       resets                  = <&softreset STIH415_ETH0_SOFTRESET>;
-                       reset-names             = "stmmaceth";
-
-                       snps,pbl        = <32>;
-                       snps,mixed-burst;
-                       snps,force_sf_dma_mode;
-
-                       st,syscon       = <&syscfg_rear 0x148>;
-
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_mii0>;
-                       clock-names     = "stmmaceth", "sti-ethclk";
-                       clocks          = <&clk_s_a1_ls CLK_ICN_IF_2>, <&clk_s_a1_ls CLK_GMAC0_PHY>;
-               };
-
-               ethernet1: dwmac@fef08000 {
-                       device_type = "network";
-                       compatible      = "st,stih415-dwmac", "snps,dwmac", "snps,dwmac-3.610";
-                       status          = "disabled";
-                       reg             = <0xfef08000 0x8000>;
-                       reg-names       = "stmmaceth";
-                       interrupts      = <0 150 0>, <0 151 0>, <0 152 0>;
-                       interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
-
-                       snps,pbl        = <32>;
-                       snps,mixed-burst;
-                       snps,force_sf_dma_mode;
-
-                       st,syscon               = <&syscfg_sbc 0x74>;
-
-                       resets                  = <&softreset STIH415_ETH1_SOFTRESET>;
-                       reset-names             = "stmmaceth";
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_mii1>;
-                       clock-names     = "stmmaceth", "sti-ethclk";
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>, <&clk_s_a0_ls CLK_ETH1_PHY>;
-               };
-
-               rc: rc@fe518000 {
-                       compatible      = "st,comms-irb";
-                       reg             = <0xfe518000 0x234>;
-                       interrupts      =  <0 203 0>;
-                       clocks          = <&clk_sysin>;
-                       rx-mode         = "infrared";
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_ir>;
-                       resets          = <&softreset STIH415_IRB_SOFTRESET>;
-               };
-
-               keyscan: keyscan@fe4b0000 {
-                       compatible = "st,sti-keyscan";
-                       status = "disabled";
-                       reg = <0xfe4b0000 0x2000>;
-                       interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
-                       clocks = <&clk_sysin>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_keyscan>;
-                       resets  = <&powerdown STIH415_KEYSCAN_POWERDOWN>,
-                                 <&softreset STIH415_KEYSCAN_SOFTRESET>;
-               };
-
-               mmc0: sdhci@fe81e000 {
-                       compatible      = "st,sdhci";
-                       status          = "disabled";
-                       reg             = <0xfe81e000 0x1000>;
-                       interrupts      = <GIC_SPI 145 IRQ_TYPE_NONE>;
-                       interrupt-names = "mmcirq";
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_mmc0>;
-                       clock-names     = "mmc";
-                       clocks          = <&clk_s_a1_ls 1>;
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih416-b2000.dts b/arch/arm/boot/dts/stih416-b2000.dts
deleted file mode 100644 (file)
index 488e80a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-/dts-v1/;
-#include "stih416.dtsi"
-#include "stih41x-b2000.dtsi"
-/ {
-       model = "STiH416 B2000";
-       compatible = "st,stih416-b2000", "st,stih416";
-};
diff --git a/arch/arm/boot/dts/stih416-b2020.dts b/arch/arm/boot/dts/stih416-b2020.dts
deleted file mode 100644 (file)
index 200a818..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-/dts-v1/;
-#include "stih416.dtsi"
-#include "stih41x-b2020.dtsi"
-/ {
-       model = "STiH416 B2020";
-       compatible = "st,stih416-b2020", "st,stih416";
-
-       soc {
-               mmc1: sdhci@fe81f000 {
-                       status       = "okay";
-                       bus-width    = <8>;
-                       non-removable;
-               };
-
-               miphy365x_phy: phy@fe382000 {
-                       phy_port0: port@fe382000 {
-                               st,sata-gen = <3>;
-                       };
-
-                       phy_port1: port@fe38a000 {
-                               st,pcie-tx-pol-inv;
-                       };
-               };
-
-               sata0: sata@fe380000{
-                       status = "okay";
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih416-b2020e.dts b/arch/arm/boot/dts/stih416-b2020e.dts
deleted file mode 100644 (file)
index de320cd..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2014 STMicroelectronics (R&D) Limited.
- * Author: Lee Jones <lee.jones@linaro.org>
- *
- * 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
- * publishhed by the Free Software Foundation.
- */
-/dts-v1/;
-#include "stih416.dtsi"
-#include "stih41x-b2020.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-/ {
-       model = "STiH416 B2020 REV-E";
-       compatible = "st,stih416-b2020", "st,stih416";
-
-       soc {
-               leds {
-                       compatible = "gpio-leds";
-                       red {
-                               label                   = "Front Panel LED";
-                               gpios                   = <&pio4 1 GPIO_ACTIVE_HIGH>;
-                               linux,default-trigger   = "heartbeat";
-                       };
-                       green {
-                               gpios                   = <&pio1 3 GPIO_ACTIVE_HIGH>;
-                               default-state           = "off";
-                       };
-               };
-
-               ethernet1: dwmac@fef08000 {
-                       snps,reset-gpio = <&pio0 7>;
-               };
-
-               mmc1: sdhci@fe81f000 {
-                       status       = "okay";
-                       bus-width    = <8>;
-                       non-removable;
-               };
-
-               miphy365x_phy: phy@fe382000 {
-                       phy_port0: port@fe382000 {
-                               st,sata-gen = <3>;
-                       };
-
-                       phy_port1: port@fe38a000 {
-                               st,pcie-tx-pol-inv;
-                       };
-               };
-
-               sata0: sata@fe380000{
-                       status = "okay";
-               };
-
-               /* SAS PWM Module */
-               pwm0: pwm@fed10000 {
-                       status          = "okay";
-               };
-
-               /* SBC PWM Module */
-               pwm1: pwm@fe510000 {
-                       status          = "okay";
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih416-clock.dtsi b/arch/arm/boot/dts/stih416-clock.dtsi
deleted file mode 100644 (file)
index 5b4fb83..0000000
+++ /dev/null
@@ -1,756 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics R&D Limited
- * <stlinux-devel@stlinux.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 <dt-bindings/clock/stih416-clks.h>
-
-/ {
-       clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               /*
-                * Fixed 30MHz oscillator inputs to SoC
-                */
-               clk_sysin: clk-sysin {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <30000000>;
-               };
-
-               /*
-                * ClockGenAs on SASG2
-                */
-               clockgen-a@fee62000 {
-                       reg = <0xfee62000 0xb48>;
-
-                       clk_s_a0_pll: clk-s-a0-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-plls-c65";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a0-pll0-hs",
-                                                    "clk-s-a0-pll0-ls",
-                                                    "clk-s-a0-pll1";
-                       };
-
-                       clk_s_a0_osc_prediv: clk-s-a0-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c65",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a0-osc-prediv";
-                       };
-
-                       clk_s_a0_hs: clk-s-a0-hs {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-hs",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a0_osc_prediv>,
-                                        <&clk_s_a0_pll 0>, /* PLL0 HS */
-                                        <&clk_s_a0_pll 2>; /* PLL1 */
-
-                               clock-output-names = "clk-s-fdma-0",
-                                                    "clk-s-fdma-1",
-                                                    ""; /* clk-s-jit-sense */
-                                                    /* Fourth output unused */
-                       };
-
-                       clk_s_a0_ls: clk-s-a0-ls {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-ls",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a0_osc_prediv>,
-                                        <&clk_s_a0_pll 1>, /* PLL0 LS */
-                                        <&clk_s_a0_pll 2>; /* PLL1 */
-
-                               clock-output-names = "clk-s-icn-reg-0",
-                                                    "clk-s-icn-if-0",
-                                                    "clk-s-icn-reg-lp-0",
-                                                    "clk-s-emiss",
-                                                    "clk-s-eth1-phy",
-                                                    "clk-s-mii-ref-out";
-                                                    /* Remaining outputs unused */
-                       };
-               };
-
-               clockgen-a@fee81000 {
-                       reg = <0xfee81000 0xb48>;
-
-                       clk_s_a1_pll: clk-s-a1-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-plls-c65";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a1-pll0-hs",
-                                                    "clk-s-a1-pll0-ls",
-                                                    "clk-s-a1-pll1";
-                       };
-
-                       clk_s_a1_osc_prediv: clk-s-a1-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c65",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-s-a1-osc-prediv";
-                       };
-
-                       clk_s_a1_hs: clk-s-a1-hs {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-hs",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a1_osc_prediv>,
-                                        <&clk_s_a1_pll 0>, /* PLL0 HS */
-                                        <&clk_s_a1_pll 2>; /* PLL1 */
-
-                               clock-output-names = "", /* Reserved */
-                                                    "", /* Reserved */
-                                                    "clk-s-stac-phy",
-                                                    "clk-s-vtac-tx-phy";
-                       };
-
-                       clk_s_a1_ls: clk-s-a1-ls {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c65-ls",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_s_a1_osc_prediv>,
-                                        <&clk_s_a1_pll 1>, /* PLL0 LS */
-                                        <&clk_s_a1_pll 2>; /* PLL1 */
-
-                               clock-output-names = "clk-s-icn-if-2",
-                                                    "clk-s-card-mmc-0",
-                                                    "clk-s-icn-if-1",
-                                                    "clk-s-gmac0-phy",
-                                                    "clk-s-nand-ctrl",
-                                                    "", /* Reserved */
-                                                    "clk-s-mii0-ref-out",
-                                                    "clk-s-stac-sys",
-                                                    "clk-s-card-mmc-1";
-                                                    /* Remaining outputs unused */
-                       };
-               };
-
-               /*
-                * ClockGenAs on MPE42
-                */
-               clockgen-a@fde12000 {
-                       reg = <0xfde12000 0xb50>;
-
-                       clk_m_a0_pll0: clk-m-a0-pll0 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a0-pll0-phi0",
-                                                    "clk-m-a0-pll0-phi1",
-                                                    "clk-m-a0-pll0-phi2",
-                                                    "clk-m-a0-pll0-phi3";
-                       };
-
-                       clk_m_a0_pll1: clk-m-a0-pll1 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a0-pll1-phi0",
-                                                    "clk-m-a0-pll1-phi1",
-                                                    "clk-m-a0-pll1-phi2",
-                                                    "clk-m-a0-pll1-phi3";
-                       };
-
-                       clk_m_a0_osc_prediv: clk-m-a0-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c32",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a0-osc-prediv";
-                       };
-
-                       clk_m_a0_div0: clk-m-a0-div0 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf0",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 0>, /* PLL0 PHI0 */
-                                        <&clk_m_a0_pll1 0>; /* PLL1 PHI0 */
-
-                               clock-output-names = "", /* Unused */
-                                                    "", /* Unused */
-                                                    "clk-m-fdma-12",
-                                                    "", /* Unused */
-                                                    "clk-m-pp-dmu-0",
-                                                    "clk-m-pp-dmu-1",
-                                                    "clk-m-icm-lmi",
-                                                    "clk-m-vid-dmu-0";
-                       };
-
-                       clk_m_a0_div1: clk-m-a0-div1 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf1",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 1>, /* PLL0 PHI1 */
-                                        <&clk_m_a0_pll1 1>; /* PLL1 PHI1 */
-
-                               clock-output-names = "clk-m-vid-dmu-1",
-                                                    "", /* Unused */
-                                                    "clk-m-a9-ext2f",
-                                                    "clk-m-st40rt",
-                                                    "clk-m-st231-dmu-0",
-                                                    "clk-m-st231-dmu-1",
-                                                    "clk-m-st231-aud",
-                                                    "clk-m-st231-gp-0";
-                       };
-
-                       clk_m_a0_div2: clk-m-a0-div2 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf2",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 2>, /* PLL0 PHI2 */
-                                        <&clk_m_a0_pll1 2>; /* PLL1 PHI2 */
-
-                               clock-output-names = "clk-m-st231-gp-1",
-                                                    "clk-m-icn-cpu",
-                                                    "clk-m-icn-stac",
-                                                    "clk-m-tx-icn-dmu-0",
-                                                    "clk-m-tx-icn-dmu-1",
-                                                    "clk-m-tx-icn-ts",
-                                                    "clk-m-icn-vdp-0",
-                                                    "clk-m-icn-vdp-1";
-                       };
-
-                       clk_m_a0_div3: clk-m-a0-div3 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf3",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a0_osc_prediv>,
-                                        <&clk_m_a0_pll0 3>, /* PLL0 PHI3 */
-                                        <&clk_m_a0_pll1 3>; /* PLL1 PHI3 */
-
-                               clock-output-names = "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "clk-m-icn-vp8",
-                                                    "", /* Unused */
-                                                    "clk-m-icn-reg-11",
-                                                    "clk-m-a9-trace";
-                       };
-               };
-
-               clockgen-a@fd6db000 {
-                       reg = <0xfd6db000 0xb50>;
-
-                       clk_m_a1_pll0: clk-m-a1-pll0 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a1-pll0-phi0",
-                                                    "clk-m-a1-pll0-phi1",
-                                                    "clk-m-a1-pll0-phi2",
-                                                    "clk-m-a1-pll0-phi3";
-                       };
-
-                       clk_m_a1_pll1: clk-m-a1-pll1 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a1-pll1-phi0",
-                                                    "clk-m-a1-pll1-phi1",
-                                                    "clk-m-a1-pll1-phi2",
-                                                    "clk-m-a1-pll1-phi3";
-                       };
-
-                       clk_m_a1_osc_prediv: clk-m-a1-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c32",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a1-osc-prediv";
-                       };
-
-                       clk_m_a1_div0: clk-m-a1-div0 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf0",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 0>, /* PLL0 PHI0 */
-                                        <&clk_m_a1_pll1 0>; /* PLL1 PHI0 */
-
-                               clock-output-names = "", /* Unused */
-                                                    "clk-m-fdma-10",
-                                                    "clk-m-fdma-11",
-                                                    "clk-m-hva-alt",
-                                                    "clk-m-proc-sc",
-                                                    "clk-m-tp",
-                                                    "clk-m-rx-icn-dmu-0",
-                                                    "clk-m-rx-icn-dmu-1";
-                       };
-
-                       clk_m_a1_div1: clk-m-a1-div1 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf1",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 1>, /* PLL0 PHI1 */
-                                        <&clk_m_a1_pll1 1>; /* PLL1 PHI1 */
-
-                               clock-output-names = "clk-m-rx-icn-ts",
-                                                    "clk-m-rx-icn-vdp-0",
-                                                    "", /* Unused */
-                                                    "clk-m-prv-t1-bus",
-                                                    "clk-m-icn-reg-12",
-                                                    "clk-m-icn-reg-10",
-                                                    "", /* Unused */
-                                                    "clk-m-icn-st231";
-                       };
-
-                       clk_m_a1_div2: clk-m-a1-div2 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf2",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 2>, /* PLL0 PHI2 */
-                                        <&clk_m_a1_pll1 2>; /* PLL1 PHI2 */
-
-                               clock-output-names = "clk-m-fvdp-proc-alt",
-                                                    "clk-m-icn-reg-13",
-                                                    "clk-m-tx-icn-gpu",
-                                                    "clk-m-rx-icn-gpu",
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* clk-m-apb-pm-12 */
-                                                    ""; /* Unused */
-                       };
-
-                       clk_m_a1_div3: clk-m-a1-div3 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf3",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a1_osc_prediv>,
-                                        <&clk_m_a1_pll0 3>, /* PLL0 PHI3 */
-                                        <&clk_m_a1_pll1 3>; /* PLL1 PHI3 */
-
-                               clock-output-names = "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    "", /* Unused */
-                                                    ""; /* clk-m-gpu-alt */
-                       };
-               };
-
-               clk_m_a9_ext2f_div2: clk-m-a9-ext2f-div2 {
-                       #clock-cells = <0>;
-                       compatible = "fixed-factor-clock";
-                       clocks = <&clk_m_a0_div1 2>;
-                       clock-div = <2>;
-                       clock-mult = <1>;
-               };
-
-               clockgen-a@fd345000 {
-                       reg = <0xfd345000 0xb50>;
-
-                       clk_m_a2_pll0: clk-m-a2-pll0 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a2-pll0-phi0",
-                                                    "clk-m-a2-pll0-phi1",
-                                                    "clk-m-a2-pll0-phi2",
-                                                    "clk-m-a2-pll0-phi3";
-                       };
-
-                       clk_m_a2_pll1: clk-m-a2-pll1 {
-                               #clock-cells = <1>;
-                               compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a2-pll1-phi0",
-                                                    "clk-m-a2-pll1-phi1",
-                                                    "clk-m-a2-pll1-phi2",
-                                                    "clk-m-a2-pll1-phi3";
-                       };
-
-                       clk_m_a2_osc_prediv: clk-m-a2-osc-prediv {
-                               #clock-cells = <0>;
-                               compatible = "st,clkgena-prediv-c32",
-                                            "st,clkgena-prediv";
-
-                               clocks = <&clk_sysin>;
-
-                               clock-output-names = "clk-m-a2-osc-prediv";
-                       };
-
-                       clk_m_a2_div0: clk-m-a2-div0 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf0",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 0>, /* PLL0 PHI0 */
-                                        <&clk_m_a2_pll1 0>; /* PLL1 PHI0 */
-
-                               clock-output-names = "clk-m-vtac-main-phy",
-                                                    "clk-m-vtac-aux-phy",
-                                                    "clk-m-stac-phy",
-                                                    "clk-m-stac-sys",
-                                                    "", /* clk-m-mpestac-pg */
-                                                    "", /* clk-m-mpestac-wc */
-                                                    "", /* clk-m-mpevtacaux-pg*/
-                                                    ""; /* clk-m-mpevtacmain-pg*/
-                       };
-
-                       clk_m_a2_div1: clk-m-a2-div1 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf1",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 1>, /* PLL0 PHI1 */
-                                        <&clk_m_a2_pll1 1>; /* PLL1 PHI1 */
-
-                               clock-output-names = "", /* clk-m-mpevtacrx0-wc */
-                                                    "", /* clk-m-mpevtacrx1-wc */
-                                                    "clk-m-compo-main",
-                                                    "clk-m-compo-aux",
-                                                    "clk-m-bdisp-0",
-                                                    "clk-m-bdisp-1",
-                                                    "clk-m-icn-bdisp",
-                                                    "clk-m-icn-compo";
-                       };
-
-                       clk_m_a2_div2: clk-m-a2-div2 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf2",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 2>, /* PLL0 PHI2 */
-                                        <&clk_m_a2_pll1 2>; /* PLL1 PHI2 */
-
-                               clock-output-names = "clk-m-icn-vdp-2",
-                                                    "", /* Unused */
-                                                    "clk-m-icn-reg-14",
-                                                    "clk-m-mdtp",
-                                                    "clk-m-jpegdec",
-                                                    "", /* Unused */
-                                                    "clk-m-dcephy-impctrl",
-                                                    ""; /* Unused */
-                       };
-
-                       clk_m_a2_div3: clk-m-a2-div3 {
-                               #clock-cells = <1>;
-                               compatible = "st,clkgena-divmux-c32-odf3",
-                                            "st,clkgena-divmux";
-
-                               clocks = <&clk_m_a2_osc_prediv>,
-                                        <&clk_m_a2_pll0 3>, /* PLL0 PHI3 */
-                                        <&clk_m_a2_pll1 3>; /* PLL1 PHI3 */
-
-                               clock-output-names = "", /* Unused */
-                                                    ""; /* clk-m-apb-pm-11 */
-                                                    /* Remaining outputs unused */
-                       };
-               };
-
-               /*
-                * A9 PLL
-                */
-               clockgen-a9@fdde08b0 {
-                       reg = <0xfdde08b0 0x70>;
-
-                       clockgen_a9_pll: clockgen-a9-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,stih416-plls-c32-a9", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-                               clock-output-names = "clockgen-a9-pll-odf";
-                       };
-               };
-
-               /*
-                * ARM CPU related clocks
-                */
-               clk_m_a9: clk-m-a9@fdde08ac {
-                       #clock-cells = <0>;
-                       compatible = "st,stih416-clkgen-a9-mux", "st,clkgen-mux";
-                       reg = <0xfdde08ac 0x4>;
-                       clocks = <&clockgen_a9_pll 0>,
-                                <&clockgen_a9_pll 0>,
-                                <&clk_m_a0_div1 2>,
-                                <&clk_m_a9_ext2f_div2>;
-               };
-
-               /*
-                * ARM Peripheral clock for timers
-                */
-               arm_periph_clk: clk-m-a9-periphs {
-                       #clock-cells = <0>;
-                       compatible = "fixed-factor-clock";
-                       clocks = <&clk_m_a9>;
-                       clock-div = <2>;
-                       clock-mult = <1>;
-               };
-
-               /*
-                * Frequency synthesizers on the SASG2
-                */
-               clockgen_b0: clockgen-b0@fee108b4 {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-quadfs216", "st,quadfs";
-                       reg = <0xfee108b4 0x44>;
-
-                       clocks = <&clk_sysin>;
-                       clock-output-names = "clk-s-usb48",
-                                            "clk-s-dss",
-                                            "clk-s-stfe-frc-2",
-                                            "clk-s-thsens-scard";
-               };
-
-               clockgen_b1: clockgen-b1@fe8308c4 {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-quadfs216", "st,quadfs";
-                       reg = <0xfe8308c4 0x44>;
-
-                       clocks = <&clk_sysin>;
-                       clock-output-names = "clk-s-pcm-0",
-                                            "clk-s-pcm-1",
-                                            "clk-s-pcm-2",
-                                            "clk-s-pcm-3";
-               };
-
-               clockgen_c: clockgen-c@fe8307d0 {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-quadfs432", "st,quadfs";
-                       reg = <0xfe8307d0 0x44>;
-
-                       clocks = <&clk_sysin>;
-                       clock-output-names = "clk-s-c-fs0-ch0",
-                                            "clk-s-c-vcc-sd",
-                                            "clk-s-c-fs0-ch2";
-               };
-
-               clk_s_vcc_hd: clk-s-vcc-hd@fe8308b8 {
-                       #clock-cells = <0>;
-                       compatible = "st,stih416-clkgenc-vcc-hd", "st,clkgen-mux";
-                       reg = <0xfe8308b8 0x4>; /* SYSCFG2558 */
-
-                       clocks = <&clk_sysin>,
-                                <&clockgen_c 0>;
-               };
-
-               /*
-                * Add a dummy clock for the HDMI PHY for the VCC input mux
-                */
-               clk_s_tmds_fromphy: clk-s-tmds-fromphy {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <0>;
-               };
-
-               clockgen_c_vcc: clockgen-c-vcc@fe8308ac {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-clkgenc", "st,clkgen-vcc";
-                       reg = <0xfe8308ac 0xc>; /* SYSCFG2555,2556,2557 */
-
-                       clocks = <&clk_s_vcc_hd>,
-                                <&clockgen_c 1>,
-                                <&clk_s_tmds_fromphy>,
-                                <&clockgen_c 2>;
-
-                       clock-output-names  = "clk-s-pix-hdmi",
-                                             "clk-s-pix-dvo",
-                                             "clk-s-out-dvo",
-                                             "clk-s-pix-hd",
-                                             "clk-s-hddac",
-                                             "clk-s-denc",
-                                             "clk-s-sddac",
-                                             "clk-s-pix-main",
-                                             "clk-s-pix-aux",
-                                             "clk-s-stfe-frc-0",
-                                             "clk-s-ref-mcru",
-                                             "clk-s-slave-mcru",
-                                             "clk-s-tmds-hdmi",
-                                             "clk-s-hdmi-reject-pll",
-                                             "clk-s-thsens";
-               };
-
-               clockgen_d: clockgen-d@fee107e0 {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-quadfs216", "st,quadfs";
-                       reg = <0xfee107e0 0x44>;
-
-                       clocks = <&clk_sysin>;
-                       clock-output-names = "clk-s-ccsc",
-                                            "clk-s-stfe-frc-1",
-                                            "clk-s-tsout-1",
-                                            "clk-s-mchi";
-               };
-
-               /*
-                * Frequency synthesizers on the MPE42
-                */
-               clockgen_e: clockgen-e@fd3208bc {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-quadfs660-E", "st,quadfs";
-                       reg = <0xfd3208bc 0xb0>;
-
-                       clocks = <&clk_sysin>;
-                       clock-output-names = "clk-m-pix-mdtp-0",
-                                            "clk-m-pix-mdtp-1",
-                                            "clk-m-pix-mdtp-2",
-                                            "clk-m-mpelpc";
-               };
-
-               clockgen_f: clockgen-f@fd320878 {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-quadfs660-F", "st,quadfs";
-                       reg = <0xfd320878 0xf0>;
-
-                       clocks = <&clk_sysin>;
-                       clock-output-names = "clk-m-main-vidfs",
-                                            "clk-m-hva-fs",
-                                            "clk-m-fvdp-vcpu",
-                                            "clk-m-fvdp-proc-fs";
-               };
-
-               clk_m_fvdp_proc: clk-m-fvdp-proc@fd320910 {
-                       #clock-cells = <0>;
-                       compatible = "st,stih416-clkgenf-vcc-fvdp", "st,clkgen-mux";
-                       reg = <0xfd320910 0x4>; /* SYSCFG8580 */
-
-                       clocks = <&clk_m_a1_div2 0>,
-                                <&clockgen_f 3>;
-               };
-
-               clk_m_hva: clk-m-hva@fd690868 {
-                       #clock-cells = <0>;
-                       compatible = "st,stih416-clkgenf-vcc-hva", "st,clkgen-mux";
-                       reg = <0xfd690868 0x4>; /* SYSCFG9538 */
-
-                       clocks = <&clockgen_f 1>,
-                                <&clk_m_a1_div0 3>;
-               };
-
-               clk_m_f_vcc_hd: clk-m-f-vcc-hd@fd32086c {
-                       #clock-cells = <0>;
-                       compatible = "st,stih416-clkgenf-vcc-hd", "st,clkgen-mux";
-                       reg = <0xfd32086c 0x4>; /* SYSCFG8539 */
-
-                       clocks = <&clockgen_c_vcc 7>,
-                                <&clockgen_f 0>;
-               };
-
-               clk_m_f_vcc_sd: clk-m-f-vcc-sd@fd32086c {
-                       #clock-cells = <0>;
-                       compatible = "st,stih416-clkgenf-vcc-sd", "st,clkgen-mux";
-                       reg = <0xfd32086c 0x4>; /* SYSCFG8539 */
-
-                       clocks = <&clockgen_c_vcc 8>,
-                                <&clockgen_f 1>;
-               };
-
-               /*
-                * Add a dummy clock for the HDMIRx external signal clock
-                */
-               clk_m_pix_hdmirx_sas: clk-m-pix-hdmirx-sas {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <0>;
-               };
-
-               clockgen_f_vcc: clockgen-f-vcc@fd32086c {
-                       #clock-cells = <1>;
-                       compatible = "st,stih416-clkgenf", "st,clkgen-vcc";
-                       reg = <0xfd32086c 0xc>; /* SYSCFG8539,8540,8541 */
-
-                       clocks = <&clk_m_f_vcc_hd>,
-                                <&clk_m_f_vcc_sd>,
-                                <&clockgen_f 0>,
-                                <&clk_m_pix_hdmirx_sas>;
-
-                       clock-output-names  = "clk-m-pix-main-pipe",
-                                             "clk-m-pix-aux-pipe",
-                                             "clk-m-pix-main-cru",
-                                             "clk-m-pix-aux-cru",
-                                             "clk-m-xfer-be-compo",
-                                             "clk-m-xfer-pip-compo",
-                                             "clk-m-xfer-aux-compo",
-                                             "clk-m-vsens",
-                                             "clk-m-pix-hdmirx-0",
-                                             "clk-m-pix-hdmirx-1";
-               };
-
-               /*
-                * DDR PLL
-                */
-               clockgen-ddr@0xfdde07d8 {
-                       reg = <0xfdde07d8 0x110>;
-
-                       clockgen_ddr_pll: clockgen-ddr-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,stih416-plls-c32-ddr", "st,clkgen-plls-c32";
-
-                               clocks = <&clk_sysin>;
-                               clock-output-names = "clockgen-ddr0",
-                                                    "clockgen-ddr1";
-                       };
-               };
-
-               /*
-                * GPU PLL
-                */
-               clockgen-gpu@fd68ff00 {
-                       reg = <0xfd68ff00 0x910>;
-
-                       clockgen_gpu_pll: clockgen-gpu-pll {
-                               #clock-cells = <1>;
-                               compatible = "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32";
-
-                               clocks = <&clk_sysin>;
-                               clock-output-names = "clockgen-gpu-pll";
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih416-pinctrl.dtsi b/arch/arm/boot/dts/stih416-pinctrl.dtsi
deleted file mode 100644 (file)
index 9c97f7e..0000000
+++ /dev/null
@@ -1,692 +0,0 @@
-
-/*
- * Copyright (C) 2013 STMicroelectronics Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-#include "st-pincfg.h"
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-/ {
-
-       aliases {
-               gpio0   = &pio0;
-               gpio1   = &pio1;
-               gpio2   = &pio2;
-               gpio3   = &pio3;
-               gpio4   = &pio4;
-               gpio5   = &pio40;
-               gpio6   = &pio5;
-               gpio7   = &pio6;
-               gpio8   = &pio7;
-               gpio9   = &pio8;
-               gpio10  = &pio9;
-               gpio11  = &pio10;
-               gpio12  = &pio11;
-               gpio13  = &pio12;
-               gpio14  = &pio30;
-               gpio15  = &pio31;
-               gpio16  = &pio13;
-               gpio17  = &pio14;
-               gpio18  = &pio15;
-               gpio19  = &pio16;
-               gpio20  = &pio17;
-               gpio21  = &pio18;
-               gpio22  = &pio100;
-               gpio23  = &pio101;
-               gpio24  = &pio102;
-               gpio25  = &pio103;
-               gpio26  = &pio104;
-               gpio27  = &pio105;
-               gpio28  = &pio106;
-               gpio29  = &pio107;
-       };
-
-       soc {
-               pin-controller-sbc {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih416-sbc-pinctrl";
-                       st,syscfg       = <&syscfg_sbc>;
-                       reg             = <0xfe61f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfe610000 0x6000>;
-
-                       pio0: gpio@fe610000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO0";
-                       };
-                       pio1: gpio@fe611000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO1";
-                       };
-                       pio2: gpio@fe612000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO2";
-                       };
-                       pio3: gpio@fe613000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO3";
-                       };
-                       pio4: gpio@fe614000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO4";
-                       };
-                       pio40: gpio@fe615000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x5000 0x100>;
-                               st,bank-name    = "PIO40";
-                               st,retime-pin-mask = <0x7f>;
-                       };
-
-                       rc{
-                               pinctrl_ir: ir0 {
-                                       st,pins {
-                                               ir = <&pio4 0 ALT2 IN>;
-                                       };
-                               };
-                       };
-                       sbc_serial1 {
-                               pinctrl_sbc_serial1: sbc_serial1 {
-                                       st,pins {
-                                               tx      = <&pio2 6 ALT3 OUT>;
-                                               rx      = <&pio2 7 ALT3 IN>;
-                                       };
-                               };
-                       };
-
-                       keyscan {
-                               pinctrl_keyscan: keyscan {
-                                       st,pins {
-                                               keyin0 = <&pio0 2 ALT2 IN>;
-                                               keyin1 = <&pio0 3 ALT2 IN>;
-                                               keyin2 = <&pio0 4 ALT2 IN>;
-                                               keyin3 = <&pio2 6 ALT2 IN>;
-
-                                               keyout0 = <&pio1 6 ALT2 OUT>;
-                                               keyout1 = <&pio1 7 ALT2 OUT>;
-                                               keyout2 = <&pio0 6 ALT2 OUT>;
-                                               keyout3 = <&pio2 7 ALT2 OUT>;
-                                       };
-                               };
-                       };
-
-                       sbc_i2c0 {
-                               pinctrl_sbc_i2c0_default: sbc_i2c0-default {
-                                       st,pins {
-                                               sda = <&pio4 6 ALT1 BIDIR>;
-                                               scl = <&pio4 5 ALT1 BIDIR>;
-                                       };
-                               };
-                       };
-
-                       usb {
-                               pinctrl_usb3: usb3 {
-                                       st,pins {
-                                               oc-detect = <&pio40 0 ALT1 IN>;
-                                               pwr-enable = <&pio40 1 ALT1 OUT>;
-                                       };
-                               };
-                       };
-
-                       sbc_i2c1 {
-                               pinctrl_sbc_i2c1_default: sbc_i2c1-default {
-                                       st,pins {
-                                               sda = <&pio3 2 ALT2 BIDIR>;
-                                               scl = <&pio3 1 ALT2 BIDIR>;
-                                       };
-                               };
-                       };
-
-                       gmac1 {
-                               pinctrl_mii1: mii1 {
-                                       st,pins {
-                                               txd0 = <&pio0 0 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txd1 = <&pio0 1 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txd2 = <&pio0 2 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txd3 = <&pio0 3 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txer = <&pio0 4 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txen = <&pio0 5 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txclk = <&pio0 6 ALT1 IN NICLK 0 CLK_A>;
-                                               col =   <&pio0 7 ALT1 IN BYPASS 1000>;
-
-                                               mdio =  <&pio1 0 ALT1 OUT BYPASS 1500>;
-                                               mdc =   <&pio1 1 ALT1 OUT NICLK 0 CLK_A>;
-                                               crs =   <&pio1 2 ALT1 IN BYPASS 1000>;
-                                               mdint = <&pio1 3 ALT1 IN BYPASS 0>;
-                                               rxd0 =  <&pio1 4 ALT1 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxd1 =  <&pio1 5 ALT1 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxd2 =  <&pio1 6 ALT1 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxd3 =  <&pio1 7 ALT1 IN SE_NICLK_IO 0 CLK_A>;
-
-                                               rxdv =  <&pio2 0 ALT1 IN SE_NICLK_IO 0 CLK_A>;
-                                               rx_er = <&pio2 1 ALT1 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxclk = <&pio2 2 ALT1 IN NICLK 0 CLK_A>;
-                                               phyclk = <&pio2 3 ALT1 OUT NICLK 0 CLK_A>;
-                                       };
-                               };
-                               pinctrl_rgmii1: rgmii1-0 {
-                                       st,pins {
-                                               txd0 =  <&pio0 0 ALT1 OUT DE_IO 500 CLK_A>;
-                                               txd1 =  <&pio0 1 ALT1 OUT DE_IO 500 CLK_A>;
-                                               txd2 =  <&pio0 2 ALT1 OUT DE_IO 500 CLK_A>;
-                                               txd3 =  <&pio0 3 ALT1 OUT DE_IO 500 CLK_A>;
-                                               txen =  <&pio0 5 ALT1 OUT DE_IO 0   CLK_A>;
-                                               txclk = <&pio0 6 ALT1 IN  NICLK 0   CLK_A>;
-
-                                               mdio = <&pio1 0 ALT1 OUT BYPASS 0>;
-                                               mdc  = <&pio1 1 ALT1 OUT NICLK  0 CLK_A>;
-                                               rxd0 = <&pio1 4 ALT1 IN DE_IO 500 CLK_A>;
-                                               rxd1 = <&pio1 5 ALT1 IN DE_IO 500 CLK_A>;
-                                               rxd2 = <&pio1 6 ALT1 IN DE_IO 500 CLK_A>;
-                                               rxd3 = <&pio1 7 ALT1 IN DE_IO 500 CLK_A>;
-
-                                               rxdv   = <&pio2 0 ALT1 IN  DE_IO 500 CLK_A>;
-                                               rxclk  = <&pio2 2 ALT1 IN  NICLK 0   CLK_A>;
-                                               phyclk = <&pio2 3 ALT4 OUT NICLK 0   CLK_B>;
-
-                                               clk125= <&pio3 7 ALT4 IN NICLK 0 CLK_A>;
-                                       };
-                               };
-                       };
-
-                       pwm1 {
-                               pinctrl_pwm1_chan0_default: pwm1-0-default {
-                                       st,pins {
-                                               pwm-out    = <&pio3 0 ALT1 OUT>;
-                                               pwm-capturein = <&pio3 2 ALT1 IN>;
-
-                                       };
-                               };
-                               pinctrl_pwm1_chan1_default: pwm1-1-default {
-                                       st,pins {
-                                               pwm-out    = <&pio4 4 ALT1 OUT>;
-                                               pwm-capturein = <&pio4 3 ALT1 IN>;
-                                       };
-                               };
-                               pinctrl_pwm1_chan2_default: pwm1-2-default {
-                                       st,pins {
-                                               pwm-out    = <&pio4 6 ALT3 OUT>;
-                                       };
-                               };
-                               pinctrl_pwm1_chan3_default: pwm1-3-default {
-                                       st,pins {
-                                               pwm-out    = <&pio4 7 ALT3 OUT>;
-                                       };
-                               };
-                       };
-               };
-
-               pin-controller-front {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih416-front-pinctrl";
-                       st,syscfg       = <&syscfg_front>;
-                       reg             = <0xfee0f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfee00000 0x10000>;
-
-                       pio5: gpio@fee00000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO5";
-                       };
-                       pio6: gpio@fee01000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO6";
-                       };
-                       pio7: gpio@fee02000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO7";
-                       };
-                       pio8: gpio@fee03000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO8";
-                       };
-                       pio9: gpio@fee04000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO9";
-                       };
-                       pio10: gpio@fee05000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x5000 0x100>;
-                               st,bank-name    = "PIO10";
-                       };
-                       pio11: gpio@fee06000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x6000 0x100>;
-                               st,bank-name    = "PIO11";
-                       };
-                       pio12: gpio@fee07000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x7000 0x100>;
-                               st,bank-name    = "PIO12";
-                       };
-                       pio30: gpio@fee08000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x8000 0x100>;
-                               st,bank-name    = "PIO30";
-                       };
-                       pio31: gpio@fee09000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x9000 0x100>;
-                               st,bank-name    = "PIO31";
-                       };
-
-                       pwm0 {
-                               pinctrl_pwm0_chan0_default: pwm0-0-default {
-                                       st,pins {
-                                               pwm-out    = <&pio9 7 ALT2 OUT>;
-                                               pwm-capturein = <&pio9 6 ALT2 IN>;
-                                       };
-                               };
-                       };
-
-                       serial2-oe {
-                               pinctrl_serial2_oe: serial2-1 {
-                                       st,pins {
-                                               output-enable   = <&pio11 3 ALT2 OUT>;
-                                       };
-                               };
-                       };
-
-                       i2c0 {
-                               pinctrl_i2c0_default: i2c0-default {
-                                       st,pins {
-                                               sda = <&pio9 3 ALT1 BIDIR>;
-                                               scl = <&pio9 2 ALT1 BIDIR>;
-                                       };
-                               };
-                       };
-
-                       usb {
-                               pinctrl_usb0: usb0 {
-                                       st,pins {
-                                               oc-detect = <&pio9 4 ALT1 IN>;
-                                               pwr-enable = <&pio9 5 ALT1 OUT>;
-                                       };
-                               };
-                       };
-
-
-                       i2c1 {
-                               pinctrl_i2c1_default: i2c1-default {
-                                       st,pins {
-                                               sda = <&pio12 1 ALT1 BIDIR>;
-                                               scl = <&pio12 0 ALT1 BIDIR>;
-                                       };
-                               };
-                       };
-
-                       fsm {
-                               pinctrl_fsm: fsm {
-                                       st,pins {
-                                               spi-fsm-clk  = <&pio12 2 ALT1 OUT>;
-                                               spi-fsm-cs   = <&pio12 3 ALT1 OUT>;
-                                               spi-fsm-mosi = <&pio12 4 ALT1 OUT>;
-                                               spi-fsm-miso = <&pio12 5 ALT1 IN>;
-                                               spi-fsm-hol  = <&pio12 6 ALT1 OUT>;
-                                               spi-fsm-wp   = <&pio12 7 ALT1 OUT>;
-                                       };
-                               };
-                       };
-               };
-
-               pin-controller-rear {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih416-rear-pinctrl";
-                       st,syscfg       = <&syscfg_rear>;
-                       reg             = <0xfe82f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfe820000 0x6000>;
-
-                       pio13: gpio@fe820000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO13";
-                       };
-                       pio14: gpio@fe821000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO14";
-                       };
-                       pio15: gpio@fe822000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO15";
-                       };
-                       pio16: gpio@fe823000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO16";
-                       };
-                       pio17: gpio@fe824000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO17";
-                       };
-                       pio18: gpio@fe825000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x5000 0x100>;
-                               st,bank-name    = "PIO18";
-                               st,retime-pin-mask = <0xf>;
-                       };
-
-                       serial2 {
-                               pinctrl_serial2: serial2-0 {
-                                       st,pins {
-                                               tx      = <&pio17 4 ALT2 OUT>;
-                                               rx      = <&pio17 5 ALT2 IN>;
-                                       };
-                               };
-                       };
-
-                       gmac0 {
-                               pinctrl_mii0: mii0 {
-                                       st,pins {
-                                               mdint = <&pio13 6 ALT2 IN  BYPASS      0>;
-                                               txen =  <&pio13 7 ALT2 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txd0 =  <&pio14 0 ALT2 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txd1 =  <&pio14 1 ALT2 OUT SE_NICLK_IO 0 CLK_A>;
-                                               txd2 =  <&pio14 2 ALT2 OUT SE_NICLK_IO 0 CLK_B>;
-                                               txd3 =  <&pio14 3 ALT2 OUT SE_NICLK_IO 0 CLK_B>;
-
-                                               txclk = <&pio15 0 ALT2 IN  NICLK       0 CLK_A>;
-                                               txer =  <&pio15 1 ALT2 OUT SE_NICLK_IO 0 CLK_A>;
-                                               crs = <&pio15 2 ALT2 IN  BYPASS 1000>;
-                                               col = <&pio15 3 ALT2 IN  BYPASS 1000>;
-                                               mdio= <&pio15 4 ALT2 OUT BYPASS 1500>;
-                                               mdc = <&pio15 5 ALT2 OUT NICLK  0    CLK_B>;
-
-                                               rxd0 =  <&pio16 0 ALT2 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxd1 =  <&pio16 1 ALT2 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxd2 =  <&pio16 2 ALT2 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxd3 =  <&pio16 3 ALT2 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxdv =  <&pio15 6 ALT2 IN SE_NICLK_IO 0 CLK_A>;
-                                               rx_er = <&pio15 7 ALT2 IN SE_NICLK_IO 0 CLK_A>;
-                                               rxclk = <&pio17 0 ALT2 IN NICLK 0 CLK_A>;
-                                               phyclk = <&pio13 5 ALT2 OUT NICLK 0 CLK_B>;
-                                       };
-                               };
-
-                               pinctrl_gmii0: gmii0 {
-                                       st,pins {
-                                               };
-                               };
-                               pinctrl_rgmii0: rgmii0 {
-                                       st,pins {
-                                                phyclk = <&pio13  5 ALT4 OUT NICLK 0 CLK_B>;
-                                                txen = <&pio13 7 ALT2 OUT DE_IO 0 CLK_A>;
-                                                txd0  = <&pio14 0 ALT2 OUT DE_IO 500 CLK_A>;
-                                                txd1  = <&pio14 1 ALT2 OUT DE_IO 500 CLK_A>;
-                                                txd2  = <&pio14 2 ALT2 OUT DE_IO 500 CLK_B>;
-                                                txd3  = <&pio14 3 ALT2 OUT DE_IO 500 CLK_B>;
-                                                txclk = <&pio15 0 ALT2 IN NICLK 0 CLK_A>;
-
-                                                mdio = <&pio15 4 ALT2 OUT BYPASS 0>;
-                                                mdc = <&pio15 5 ALT2 OUT NICLK 0 CLK_B>;
-
-                                                rxdv = <&pio15 6 ALT2 IN DE_IO 500 CLK_A>;
-                                                rxd0 =<&pio16 0 ALT2 IN DE_IO  500 CLK_A>;
-                                                rxd1 =<&pio16 1 ALT2 IN DE_IO  500 CLK_A>;
-                                                rxd2 =<&pio16 2 ALT2 IN DE_IO  500 CLK_A>;
-                                                rxd3  =<&pio16 3 ALT2 IN DE_IO 500 CLK_A>;
-                                                rxclk =<&pio17 0 ALT2 IN NICLK 0 CLK_A>;
-
-                                                clk125=<&pio17 6 ALT1 IN NICLK 0 CLK_A>;
-                                       };
-                               };
-                       };
-
-                       mmc0 {
-                               pinctrl_mmc0: mmc0 {
-                                       st,pins {
-                                               mmcclk  = <&pio13 4 ALT4 BIDIR_PU NICLK 0 CLK_B>;
-                                               data0   = <&pio14 4 ALT4 BIDIR_PU BYPASS 0>;
-                                               data1   = <&pio14 5 ALT4 BIDIR_PU BYPASS 0>;
-                                               data2   = <&pio14 6 ALT4 BIDIR_PU BYPASS 0>;
-                                               data3   = <&pio14 7 ALT4 BIDIR_PU BYPASS 0>;
-                                               cmd     = <&pio15 1 ALT4 BIDIR_PU BYPASS 0>;
-                                               wp      = <&pio15 3 ALT4 IN>;
-                                               data4   = <&pio16 4 ALT4 BIDIR_PU BYPASS 0>;
-                                               data5   = <&pio16 5 ALT4 BIDIR_PU BYPASS 0>;
-                                               data6   = <&pio16 6 ALT4 BIDIR_PU BYPASS 0>;
-                                               data7   = <&pio16 7 ALT4 BIDIR_PU BYPASS 0>;
-                                               pwr     = <&pio17 1 ALT4 OUT>;
-                                               cd      = <&pio17 2 ALT4 IN>;
-                                               led     = <&pio17 3 ALT4 OUT>;
-                                       };
-                               };
-                       };
-                       mmc1 {
-                               pinctrl_mmc1: mmc1 {
-                                       st,pins {
-                                               mmcclk  = <&pio15 0 ALT3 BIDIR_PU NICLK 0 CLK_B>;
-                                               data0   = <&pio13 7 ALT3 BIDIR_PU BYPASS 0>;
-                                               data1   = <&pio14 1 ALT3 BIDIR_PU BYPASS 0>;
-                                               data2   = <&pio14 2 ALT3 BIDIR_PU BYPASS 0>;
-                                               data3   = <&pio14 3 ALT3 BIDIR_PU BYPASS 0>;
-                                               cmd     = <&pio15 4 ALT3 BIDIR_PU BYPASS 0>;
-                                               data4   = <&pio15 6 ALT3 BIDIR_PU BYPASS 0>;
-                                               data5   = <&pio15 7 ALT3 BIDIR_PU BYPASS 0>;
-                                               data6   = <&pio16 0 ALT3 BIDIR_PU BYPASS 0>;
-                                               data7   = <&pio16 1 ALT3 BIDIR_PU BYPASS 0>;
-                                               pwr     = <&pio16 2 ALT3 OUT>;
-                                               nreset  = <&pio13 6 ALT3 OUT>;
-                                       };
-                               };
-                       };
-
-                       usb {
-                               pinctrl_usb1: usb1 {
-                                       st,pins {
-                                               oc-detect = <&pio18 0 ALT1 IN>;
-                                               pwr-enable = <&pio18 1 ALT1 OUT>;
-                                       };
-                               };
-                               pinctrl_usb2: usb2 {
-                                       st,pins {
-                                               oc-detect = <&pio18 2 ALT1 IN>;
-                                               pwr-enable = <&pio18 3 ALT1 OUT>;
-                                       };
-                               };
-                       };
-
-                       pwm0 {
-                               pinctrl_pwm0_chan1_default: pwm0-1-default {
-                                       st,pins {
-                                               pwm-out    = <&pio13 2 ALT2 OUT>;
-                                               pwm-capturein = <&pio13 1 ALT2 IN>;
-                                       };
-                               };
-                               pinctrl_pwm0_chan2_default: pwm0-2-default {
-                                       st,pins {
-                                               pwm-out    = <&pio15 2 ALT4 OUT>;
-                                       };
-                               };
-                               pinctrl_pwm0_chan3_default: pwm0-3-default {
-                                       st,pins {
-                                               pwm-out    = <&pio17 4 ALT1 OUT>;
-                                       };
-                               };
-                       };
-
-               };
-
-               pin-controller-fvdp-fe {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih416-fvdp-fe-pinctrl";
-                       st,syscfg       = <&syscfg_fvdp_fe>;
-                       reg             = <0xfd6bf080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges          = <0 0xfd6b0000 0x3000>;
-
-                       pio100: gpio@fd6b0000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO100";
-                       };
-                       pio101: gpio@fd6b1000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO101";
-                       };
-                       pio102: gpio@fd6b2000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO102";
-                       };
-               };
-
-               pin-controller-fvdp-lite {
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       compatible      = "st,stih416-fvdp-lite-pinctrl";
-                       st,syscfg               = <&syscfg_fvdp_lite>;
-                       reg             = <0xfd33f080 0x4>;
-                       reg-names       = "irqmux";
-                       interrupts      = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "irqmux";
-                       ranges                  = <0 0xfd330000 0x5000>;
-
-                       pio103: gpio@fd330000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0 0x100>;
-                               st,bank-name    = "PIO103";
-                       };
-                       pio104: gpio@fd331000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x1000 0x100>;
-                               st,bank-name    = "PIO104";
-                       };
-                       pio105: gpio@fd332000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x2000 0x100>;
-                               st,bank-name    = "PIO105";
-                       };
-                       pio106: gpio@fd333000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x3000 0x100>;
-                               st,bank-name    = "PIO106";
-                       };
-
-                       pio107: gpio@fd334000 {
-                               gpio-controller;
-                               #gpio-cells     = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg             = <0x4000 0x100>;
-                               st,bank-name    = "PIO107";
-                               st,retime-pin-mask = <0xf>;
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi
deleted file mode 100644 (file)
index fe1f9cf..0000000
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Copyright (C) 2012 STMicroelectronics Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-#include "stih41x.dtsi"
-#include "stih416-clock.dtsi"
-#include "stih416-pinctrl.dtsi"
-
-#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/reset/stih416-resets.h>
-#include <dt-bindings/interrupt-controller/irq-st.h>
-/ {
-       L2: cache-controller {
-               compatible = "arm,pl310-cache";
-               reg = <0xfffe2000 0x1000>;
-               arm,data-latency = <3 3 3>;
-               arm,tag-latency = <2 2 2>;
-               cache-unified;
-               cache-level = <2>;
-       };
-
-       arm-pmu {
-               compatible = "arm,cortex-a9-pmu";
-               interrupt-parent = <&intc>;
-               interrupts = <GIC_PPI 15 IRQ_TYPE_LEVEL_HIGH>;
-       };
-
-       soc {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               interrupt-parent = <&intc>;
-               ranges;
-               compatible      = "simple-bus";
-
-               restart {
-                       compatible = "st,stih416-restart";
-                       st,syscfg = <&syscfg_sbc>;
-                       status = "okay";
-               };
-
-               powerdown: powerdown-controller {
-                       #reset-cells = <1>;
-                       compatible = "st,stih416-powerdown";
-               };
-
-               softreset: softreset-controller {
-                       #reset-cells = <1>;
-                       compatible = "st,stih416-softreset";
-               };
-
-               syscfg_sbc:sbc-syscfg@fe600000{
-                       compatible      = "st,stih416-sbc-syscfg", "syscon";
-                       reg             = <0xfe600000 0x1000>;
-               };
-
-               syscfg_front:front-syscfg@fee10000{
-                       compatible      = "st,stih416-front-syscfg", "syscon";
-                       reg             = <0xfee10000 0x1000>;
-               };
-
-               syscfg_rear:rear-syscfg@fe830000{
-                       compatible      = "st,stih416-rear-syscfg", "syscon";
-                       reg             = <0xfe830000 0x1000>;
-               };
-
-               /* MPE */
-               syscfg_fvdp_fe:fvdp-fe-syscfg@fddf0000{
-                       compatible      = "st,stih416-fvdp-fe-syscfg", "syscon";
-                       reg             = <0xfddf0000 0x1000>;
-               };
-
-               syscfg_fvdp_lite:fvdp-lite-syscfg@fd6a0000{
-                       compatible      = "st,stih416-fvdp-lite-syscfg", "syscon";
-                       reg             = <0xfd6a0000 0x1000>;
-               };
-
-               syscfg_cpu:cpu-syscfg@fdde0000{
-                       compatible      = "st,stih416-cpu-syscfg", "syscon";
-                       reg             = <0xfdde0000 0x1000>;
-               };
-
-               syscfg_compo:compo-syscfg@fd320000{
-                       compatible      = "st,stih416-compo-syscfg", "syscon";
-                       reg             = <0xfd320000 0x1000>;
-               };
-
-               syscfg_transport:transport-syscfg@fd690000{
-                       compatible      = "st,stih416-transport-syscfg", "syscon";
-                       reg             = <0xfd690000 0x1000>;
-               };
-
-               syscfg_lpm:lpm-syscfg@fe4b5100{
-                       compatible      = "st,stih416-lpm-syscfg", "syscon";
-                       reg             = <0xfe4b5100 0x8>;
-               };
-
-               irq-syscfg {
-                       compatible    = "st,stih416-irq-syscfg";
-                       st,syscfg     = <&syscfg_cpu>;
-                       st,irq-device = <ST_IRQ_SYSCFG_PMU_0>,
-                                       <ST_IRQ_SYSCFG_PMU_1>;
-                       st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>,
-                                       <ST_IRQ_SYSCFG_DISABLED>;
-               };
-
-               serial2: serial@fed32000{
-                       compatible      = "st,asc";
-                       status          = "disabled";
-                       reg             = <0xfed32000 0x2c>;
-                       interrupts      = <0 197 0>;
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_serial2 &pinctrl_serial2_oe>;
-               };
-
-               /* SBC_UART1 */
-               sbc_serial1: serial@fe531000 {
-                       compatible      = "st,asc";
-                       status          = "disabled";
-                       reg             = <0xfe531000 0x2c>;
-                       interrupts      = <0 210 0>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_sbc_serial1>;
-                       clocks          = <&clk_sysin>;
-               };
-
-               i2c@fed40000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfed40000 0x110>;
-                       interrupts      = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_i2c0_default>;
-
-                       status          = "disabled";
-               };
-
-               i2c@fed41000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfed41000 0x110>;
-                       interrupts      = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_i2c1_default>;
-
-                       status          = "disabled";
-               };
-
-               i2c@fe540000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfe540000 0x110>;
-                       interrupts      = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_sysin>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_sbc_i2c0_default>;
-
-                       status          = "disabled";
-               };
-
-               i2c@fe541000 {
-                       compatible      = "st,comms-ssc4-i2c";
-                       reg             = <0xfe541000 0x110>;
-                       interrupts      = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks          = <&clk_sysin>;
-                       clock-names     = "ssc";
-                       clock-frequency = <400000>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_sbc_i2c1_default>;
-
-                       status          = "disabled";
-               };
-
-               ethernet0: dwmac@fe810000 {
-                       device_type     = "network";
-                       compatible      = "st,stih416-dwmac", "snps,dwmac", "snps,dwmac-3.710";
-                       status          = "disabled";
-                       reg             = <0xfe810000 0x8000>;
-                       reg-names       = "stmmaceth";
-
-                       interrupts = <0 133 0>, <0 134 0>, <0 135 0>;
-                       interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
-
-                       snps,pbl        = <32>;
-                       snps,mixed-burst;
-
-                       st,syscon               = <&syscfg_rear 0x8bc>;
-                       resets                  = <&softreset STIH416_ETH0_SOFTRESET>;
-                       reset-names             = "stmmaceth";
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_mii0>;
-                       clock-names     = "stmmaceth", "sti-ethclk";
-                       clocks          = <&clk_s_a1_ls CLK_ICN_IF_2>, <&clk_s_a1_ls CLK_GMAC0_PHY>;
-               };
-
-               ethernet1: dwmac@fef08000 {
-                       device_type = "network";
-                       compatible              = "st,stih416-dwmac", "snps,dwmac", "snps,dwmac-3.710";
-                       status          = "disabled";
-                       reg             = <0xfef08000 0x8000>;
-                       reg-names       = "stmmaceth";
-                       interrupts = <0 136 0>, <0 137 0>, <0 138 0>;
-                       interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
-
-                       snps,pbl        = <32>;
-                       snps,mixed-burst;
-
-                       st,syscon       = <&syscfg_sbc 0x7f0>;
-
-                       resets          = <&softreset STIH416_ETH1_SOFTRESET>;
-                       reset-names     = "stmmaceth";
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_mii1>;
-                       clock-names     = "stmmaceth", "sti-ethclk";
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>, <&clk_s_a0_ls CLK_ETH1_PHY>;
-               };
-
-               rc: rc@fe518000 {
-                       compatible      = "st,comms-irb";
-                       reg             = <0xfe518000 0x234>;
-                       interrupts      =  <0 203 0>;
-                       rx-mode         = "infrared";
-                       clocks          = <&clk_sysin>;
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_ir>;
-                       resets          = <&softreset STIH416_IRB_SOFTRESET>;
-               };
-
-               /* FSM */
-               spifsm: spifsm@fe902000 {
-                       compatible         = "st,spi-fsm";
-                       reg                = <0xfe902000 0x1000>;
-                       pinctrl-0          = <&pinctrl_fsm>;
-
-                       st,syscfg          = <&syscfg_rear>;
-                       st,boot-device-reg = <0x958>;
-                       st,boot-device-spi = <0x1a>;
-
-                       status = "disabled";
-               };
-
-               keyscan: keyscan@fe4b0000 {
-                       compatible = "st,sti-keyscan";
-                       status = "disabled";
-                       reg = <0xfe4b0000 0x2000>;
-                       interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
-                       clocks = <&clk_sysin>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_keyscan>;
-                       resets  = <&powerdown STIH416_KEYSCAN_POWERDOWN>,
-                                 <&softreset STIH416_KEYSCAN_SOFTRESET>;
-               };
-
-               temp0 {
-                       compatible = "st,stih416-sas-thermal";
-                       clock-names = "thermal";
-                       clocks = <&clockgen_c_vcc 14>;
-
-                       status = "okay";
-               };
-
-               temp1@fdfe8000 {
-                       compatible = "st,stih416-mpe-thermal";
-                       reg = <0xfdfe8000 0x10>;
-                       clocks = <&clockgen_e 3>;
-                       clock-names = "thermal";
-                       interrupts = <GIC_SPI 23 IRQ_TYPE_EDGE_RISING>;
-
-                       status = "okay";
-               };
-
-               mmc0: sdhci@fe81e000 {
-                       compatible      = "st,sdhci";
-                       status          = "disabled";
-                       reg             = <0xfe81e000 0x1000>;
-                       interrupts      = <GIC_SPI 127 IRQ_TYPE_NONE>;
-                       interrupt-names = "mmcirq";
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_mmc0>;
-                       clock-names     = "mmc";
-                       clocks          = <&clk_s_a1_ls 1>;
-               };
-
-               mmc1: sdhci@fe81f000 {
-                       compatible      = "st,sdhci";
-                       status          = "disabled";
-                       reg             = <0xfe81f000 0x1000>;
-                       interrupts      = <GIC_SPI 128 IRQ_TYPE_NONE>;
-                       interrupt-names = "mmcirq";
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_mmc1>;
-                       clock-names     = "mmc";
-                       clocks          = <&clk_s_a1_ls 8>;
-               };
-
-               miphy365x_phy: phy@fe382000 {
-                       compatible      = "st,miphy365x-phy";
-                       st,syscfg       = <&syscfg_rear 0x824 0x828>;
-                       #address-cells  = <1>;
-                       #size-cells     = <1>;
-                       ranges;
-
-                       phy_port0: port@fe382000 {
-                               #phy-cells = <1>;
-                               reg = <0xfe382000 0x100>, <0xfe394000 0x100>;
-                               reg-names = "sata", "pcie";
-                       };
-
-                       phy_port1: port@fe38a000 {
-                               #phy-cells = <1>;
-                               reg = <0xfe38a000 0x100>, <0xfe804000 0x100>;
-                               reg-names = "sata", "pcie";
-                       };
-               };
-
-               sata0: sata@fe380000 {
-                       compatible      = "st,sti-ahci";
-                       reg             = <0xfe380000 0x1000>;
-                       interrupts      = <GIC_SPI 157 IRQ_TYPE_NONE>;
-                       interrupt-names = "hostc";
-                       phys            = <&phy_port0 PHY_TYPE_SATA>;
-                       phy-names       = "sata-phy";
-                       resets          = <&powerdown STIH416_SATA0_POWERDOWN>,
-                                         <&softreset STIH416_SATA0_SOFTRESET>;
-                       reset-names     = "pwr-dwn", "sw-rst";
-                       clock-names     = "ahci_clk";
-                       clocks          = <&clk_s_a0_ls CLK_ICN_REG>;
-
-                       status          = "disabled";
-               };
-
-               usb2_phy: phy@0 {
-                       compatible = "st,stih416-usb-phy";
-                       #phy-cells = <0>;
-                       st,syscfg = <&syscfg_rear>;
-                       clocks = <&clk_sysin>;
-                       clock-names = "osc_phy";
-               };
-
-               ehci0: usb@fe1ffe00 {
-                       compatible = "st,st-ehci-300x";
-                       reg = <0xfe1ffe00 0x100>;
-                       interrupts = <GIC_SPI 148 IRQ_TYPE_NONE>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       resets = <&powerdown STIH416_USB0_POWERDOWN>,
-                                <&softreset STIH416_USB0_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               ohci0: usb@fe1ffc00 {
-                       compatible = "st,st-ohci-300x";
-                       reg = <0xfe1ffc00 0x100>;
-                       interrupts = <GIC_SPI 149 IRQ_TYPE_NONE>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       status = "okay";
-                       resets = <&powerdown STIH416_USB0_POWERDOWN>,
-                                <&softreset STIH416_USB0_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               ehci1: usb@fe203e00 {
-                       compatible = "st,st-ehci-300x";
-                       reg = <0xfe203e00 0x100>;
-                       interrupts = <GIC_SPI 150 IRQ_TYPE_NONE>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       resets = <&powerdown STIH416_USB1_POWERDOWN>,
-                                <&softreset STIH416_USB1_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               ohci1: usb@fe203c00 {
-                       compatible = "st,st-ohci-300x";
-                       reg = <0xfe203c00 0x100>;
-                       interrupts = <GIC_SPI 151 IRQ_TYPE_NONE>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       resets = <&powerdown STIH416_USB1_POWERDOWN>,
-                                <&softreset STIH416_USB1_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               ehci2: usb@fe303e00 {
-                       compatible = "st,st-ehci-300x";
-                       reg = <0xfe303e00 0x100>;
-                       interrupts = <GIC_SPI 152 IRQ_TYPE_NONE>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb2>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       resets = <&powerdown STIH416_USB2_POWERDOWN>,
-                                <&softreset STIH416_USB2_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               ohci2: usb@fe303c00 {
-                       compatible = "st,st-ohci-300x";
-                       reg = <0xfe303c00 0x100>;
-                       interrupts = <GIC_SPI 153 IRQ_TYPE_NONE>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       resets = <&powerdown STIH416_USB2_POWERDOWN>,
-                                <&softreset STIH416_USB2_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               ehci3: usb@fe343e00 {
-                       compatible = "st,st-ehci-300x";
-                       reg = <0xfe343e00 0x100>;
-                       interrupts = <GIC_SPI 154 IRQ_TYPE_NONE>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb3>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       resets = <&powerdown STIH416_USB3_POWERDOWN>,
-                                <&softreset STIH416_USB3_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               ohci3: usb@fe343c00 {
-                       compatible = "st,st-ohci-300x";
-                       reg = <0xfe343c00 0x100>;
-                       interrupts = <GIC_SPI 155 IRQ_TYPE_NONE>;
-                       clocks = <&clk_s_a1_ls 0>,
-                                <&clockgen_b0 0>;
-                       clock-names = "ic", "clk48";
-                       phys = <&usb2_phy>;
-                       phy-names = "usb";
-                       resets = <&powerdown STIH416_USB3_POWERDOWN>,
-                                <&softreset STIH416_USB3_SOFTRESET>;
-                       reset-names = "power", "softreset";
-               };
-
-               /* SAS PWM Module */
-               pwm0: pwm@fed10000 {
-                       compatible      = "st,sti-pwm";
-                       status          = "disabled";
-                       #pwm-cells      = <2>;
-                       reg             = <0xfed10000 0x68>;
-                       interrupts      = <GIC_SPI 200 IRQ_TYPE_NONE>;
-
-                       pinctrl-names   = "default";
-                       pinctrl-0 =     <&pinctrl_pwm0_chan0_default
-                                       &pinctrl_pwm0_chan1_default
-                                       &pinctrl_pwm0_chan2_default
-                                       &pinctrl_pwm0_chan3_default>;
-
-                       clock-names     = "pwm", "capture";
-                       clocks          = <&clk_sysin>, <&clk_s_a0_ls CLK_ICN_REG>;
-
-                       st,pwm-num-chan = <4>;
-                       st,capture-num-chan = <2>;
-               };
-
-               /* SBC PWM Module */
-               pwm1: pwm@fe510000 {
-                       compatible      = "st,sti-pwm";
-                       status          = "disabled";
-                       #pwm-cells      = <2>;
-                       reg             = <0xfe510000 0x68>;
-                       interrupts      = <GIC_SPI 202 IRQ_TYPE_NONE>;
-
-                       pinctrl-names   = "default";
-                       pinctrl-0       = <&pinctrl_pwm1_chan0_default
-                                       /*
-                                        * Shared with SBC_OBS_NOTRST.  Don't
-                                        * enable unless you really know what
-                                        * you're doing.
-                                        *
-                                        * &pinctrl_pwm1_chan1_default
-                                        */
-                                       &pinctrl_pwm1_chan2_default
-                                       &pinctrl_pwm1_chan3_default>;
-
-                       clock-names     = "pwm";
-                       clocks          = <&clk_sysin>;
-                       st,pwm-num-chan = <3>;
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih41x-b2000.dtsi b/arch/arm/boot/dts/stih41x-b2000.dtsi
deleted file mode 100644 (file)
index 9bfa067..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
-
-/ {
-
-       memory{
-               device_type = "memory";
-               reg = <0x60000000 0x40000000>;
-       };
-
-       chosen {
-               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
-               linux,stdout-path = &serial2;
-       };
-
-       aliases {
-               ttyAS0 = &serial2;
-               ethernet0 = &ethernet0;
-               ethernet1 = &ethernet1;
-       };
-
-       soc {
-               serial2: serial@fed32000 {
-                       status = "okay";
-               };
-
-               leds {
-                       compatible      = "gpio-leds";
-                       fp_led {
-                               label   = "Front Panel LED";
-                               gpios   = <&pio105 7 GPIO_ACTIVE_HIGH>;
-                               linux,default-trigger   = "heartbeat";
-                       };
-               };
-
-               /* HDMI Tx I2C */
-               i2c@fed41000 {
-                       /* HDMI V1.3a supports Standard mode only */
-                       clock-frequency = <100000>;
-                       i2c-min-scl-pulse-width-us = <0>;
-                       i2c-min-sda-pulse-width-us = <5>;
-
-                       status = "okay";
-               };
-
-               ethernet0: dwmac@fe810000 {
-                       status                  = "okay";
-                       phy-mode                = "mii";
-                       pinctrl-0               = <&pinctrl_mii0>;
-
-                       snps,reset-gpio         = <&pio106 2>;
-                       snps,reset-active-low;
-                       snps,reset-delays-us    = <0 10000 10000>;
-               };
-
-               ethernet1: dwmac@fef08000 {
-                       status                  = "disabled";
-                       phy-mode                = "mii";
-                       st,tx-retime-src        = "txclk";
-
-                       snps,reset-gpio         = <&pio4 7>;
-                       snps,reset-active-low;
-                       snps,reset-delays-us    = <0 10000 10000>;
-               };
-
-               keyscan: keyscan@fe4b0000 {
-                       keypad,num-rows = <4>;
-                       keypad,num-columns = <4>;
-                       st,debounce-us = <5000>;
-                       linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
-                                        MATRIX_KEY(0x00, 0x01, KEY_F9)
-                                        MATRIX_KEY(0x00, 0x02, KEY_F5)
-                                        MATRIX_KEY(0x00, 0x03, KEY_F1)
-                                        MATRIX_KEY(0x01, 0x00, KEY_F14)
-                                        MATRIX_KEY(0x01, 0x01, KEY_F10)
-                                        MATRIX_KEY(0x01, 0x02, KEY_F6)
-                                        MATRIX_KEY(0x01, 0x03, KEY_F2)
-                                        MATRIX_KEY(0x02, 0x00, KEY_F15)
-                                        MATRIX_KEY(0x02, 0x01, KEY_F11)
-                                        MATRIX_KEY(0x02, 0x02, KEY_F7)
-                                        MATRIX_KEY(0x02, 0x03, KEY_F3)
-                                        MATRIX_KEY(0x03, 0x00, KEY_F16)
-                                        MATRIX_KEY(0x03, 0x01, KEY_F12)
-                                        MATRIX_KEY(0x03, 0x02, KEY_F8)
-                                        MATRIX_KEY(0x03, 0x03, KEY_F4) >;
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih41x-b2020.dtsi b/arch/arm/boot/dts/stih41x-b2020.dtsi
deleted file mode 100644 (file)
index 322e0e9..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Srinivas Kandagatla <srinivas.kandagatla@st.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
- * publishhed by the Free Software Foundation.
- */
-#include "stih41x-b2020x.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-/ {
-       memory{
-               device_type = "memory";
-               reg = <0x40000000 0x80000000>;
-       };
-
-       chosen {
-               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
-               linux,stdout-path = &sbc_serial1;
-       };
-
-       aliases {
-               ttyAS0 = &sbc_serial1;
-               ethernet1 = &ethernet1;
-       };
-       soc {
-               sbc_serial1: serial@fe531000 {
-                       status = "okay";
-               };
-
-               leds {
-                       compatible      = "gpio-leds";
-                       red {
-                               label   = "Front Panel LED";
-                               gpios   = <&pio4 1 GPIO_ACTIVE_HIGH>;
-                               linux,default-trigger   = "heartbeat";
-                       };
-                       green {
-                               gpios   = <&pio4 7 GPIO_ACTIVE_HIGH>;
-                               default-state = "off";
-                       };
-               };
-
-               i2c@fed40000 {
-                       status = "okay";
-               };
-
-               /* HDMI Tx I2C */
-               i2c@fed41000 {
-                       /* HDMI V1.3a supports Standard mode only */
-                       clock-frequency = <100000>;
-                       i2c-min-scl-pulse-width-us = <0>;
-                       i2c-min-sda-pulse-width-us = <5>;
-
-                       status = "okay";
-               };
-
-               i2c@fe540000 {
-                       status = "okay";
-               };
-
-               i2c@fe541000 {
-                       status = "okay";
-               };
-
-               ethernet1: dwmac@fef08000 {
-                       status                  = "okay";
-                       phy-mode                = "rgmii-id";
-                       max-speed               = <1000>;
-                       st,tx-retime-src        = "clk_125";
-                       snps,reset-gpio         = <&pio3 0>;
-                       snps,reset-active-low;
-                       snps,reset-delays-us    = <0 10000 10000>;
-
-                       pinctrl-0       = <&pinctrl_rgmii1>;
-               };
-
-               mmc0: sdhci@fe81e000 {
-                       bus-width = <8>;
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih41x-b2020x.dtsi b/arch/arm/boot/dts/stih41x-b2020x.dtsi
deleted file mode 100644 (file)
index f797a06..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
- * Author: Lee Jones <lee.jones@linaro.org>
- *
- * 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
- * publishhed by the Free Software Foundation.
- */
-/ {
-       soc {
-               mmc0: sdhci@fe81e000 {
-                       status = "okay";
-               };
-
-               spifsm: spifsm@fe902000 {
-                       #address-cells = <1>;
-                       #size-cells    = <1>;
-
-                       status = "okay";
-
-                       partition@0 {
-                               label = "SerialFlash1";
-                               reg   = <0x00000000 0x00500000>;
-                       };
-
-                       partition@500000 {
-                               label = "SerialFlash2";
-                               reg   = <0x00500000 0x00b00000>;
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stih41x.dtsi b/arch/arm/boot/dts/stih41x.dtsi
deleted file mode 100644 (file)
index 5cb0e63..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2014 STMicroelectronics Limited.
- *
- * 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
- * publishhed by the Free Software Foundation.
- */
-/ {
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       cpus {
-               #address-cells = <1>;
-               #size-cells = <0>;
-               cpu@0 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a9";
-                       reg = <0>;
-               };
-               cpu@1 {
-                       device_type = "cpu";
-                       compatible = "arm,cortex-a9";
-                       reg = <1>;
-               };
-       };
-
-       intc: interrupt-controller@fffe1000 {
-               compatible = "arm,cortex-a9-gic";
-               #interrupt-cells = <3>;
-               interrupt-controller;
-               reg = <0xfffe1000 0x1000>,
-                     <0xfffe0100 0x100>;
-       };
-
-       scu@fffe0000 {
-               compatible = "arm,cortex-a9-scu";
-               reg = <0xfffe0000 0x1000>;
-       };
-
-       timer@fffe0200 {
-               interrupt-parent = <&intc>;
-               compatible = "arm,cortex-a9-global-timer";
-               reg = <0xfffe0200 0x100>;
-               interrupts = <1 11 0x04>;
-               clocks = <&arm_periph_clk>;
-       };
-};
index ed2b7a99ecffc4739cd81100494f34c2e387288c..4b8f62f89664034420275e729e0a2f5471ea510f 100644 (file)
@@ -135,6 +135,10 @@ tsin0: port@0 {
                        };
                };
 
+               sti_uni_player0: sti-uni-player@8d80000 {
+                       status = "okay";
+               };
+
                sti_uni_player2: sti-uni-player@8d82000 {
                        status = "okay";
                };
@@ -151,13 +155,26 @@ sti_sasg_codec: sti-sasg-codec {
 
                sound {
                        compatible = "simple-audio-card";
-                       simple-audio-card,name = "sti audio card";
+                       simple-audio-card,name = "STI-B2120";
                        status = "okay";
 
                        simple-audio-card,dai-link@0 {
+                               /* HDMI */
+                               format = "i2s";
+                               mclk-fs = <128>;
+                               cpu {
+                                       sound-dai = <&sti_uni_player0>;
+                               };
+
+                               codec {
+                                       sound-dai = <&sti_hdmi>;
+                               };
+                       };
+                       simple-audio-card,dai-link@1 {
                                /* DAC */
                                format = "i2s";
                                mclk-fs = <256>;
+                               frame-inversion = <1>;
                                cpu {
                                        sound-dai = <&sti_uni_player2>;
                                };
@@ -166,7 +183,7 @@ codec {
                                        sound-dai = <&sti_sasg_codec 1>;
                                };
                        };
-                       simple-audio-card,dai-link@1 {
+                       simple-audio-card,dai-link@2 {
                                /* SPDIF */
                                format = "left_j";
                                mclk-fs = <128>;
index 6bfc5959dac3616a513f2b4017e8e3d0be75c195..5436e880e28f14bc6298d36a648c7e8189816cca 100644 (file)
@@ -47,6 +47,7 @@
 
 /dts-v1/;
 #include "stm32f429.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
        model = "STMicroelectronics STM32429i-EVAL board";
@@ -65,6 +66,10 @@ aliases {
                serial0 = &usart1;
        };
 
+       soc {
+               dma-ranges = <0xc0000000 0x0 0x10000000>;
+       };
+
        leds {
                compatible = "gpio-leds";
                green {
@@ -82,6 +87,23 @@ blue {
                };
        };
 
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               autorepeat;
+               button@0 {
+                       label = "Wake up";
+                       linux,code = <KEY_WAKEUP>;
+                       gpios = <&gpioa 0 0>;
+               };
+               button@1 {
+                       label = "Tamper";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpioc 13 0>;
+               };
+       };
+
        usbotg_hs_phy: usbphy {
                #phy-cells = <0>;
                compatible = "usb-nop-xceiv";
@@ -94,11 +116,12 @@ &clk_hse {
        clock-frequency = <25000000>;
 };
 
-&ethernet0 {
+&mac {
        status = "okay";
-       pinctrl-0       = <&ethernet0_mii>;
+       pinctrl-0       = <&ethernet_mii>;
        pinctrl-names   = "default";
-       phy-mode        = "mii-id";
+       phy-mode        = "mii";
+       phy-handle      = <&phy1>;
        mdio0 {
                #address-cells = <1>;
                #size-cells = <0>;
diff --git a/arch/arm/boot/dts/stm32746g-eval.dts b/arch/arm/boot/dts/stm32746g-eval.dts
new file mode 100644 (file)
index 0000000..aa03fac
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "stm32f746.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "STMicroelectronics STM32746g-EVAL board";
+       compatible = "st,stm32746g-eval", "st,stm32f746";
+
+       chosen {
+               bootargs = "root=/dev/ram";
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0xc0000000 0x2000000>;
+       };
+
+       aliases {
+               serial0 = &usart1;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               green {
+                       gpios = <&gpiof 10 1>;
+                       linux,default-trigger = "heartbeat";
+               };
+               red {
+                       gpios = <&gpiob 7 1>;
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               autorepeat;
+               button@0 {
+                       label = "Wake up";
+                       linux,code = <KEY_WAKEUP>;
+                       gpios = <&gpioc 13 0>;
+               };
+       };
+};
+
+&clk_hse {
+       clock-frequency = <25000000>;
+};
+
+&usart1 {
+       pinctrl-0 = <&usart1_pins_a>;
+       pinctrl-names = "default";
+       status = "okay";
+};
index 01408073dd530671620cd75a23de7755dc3e6d0f..7d0415e80668946f8df0f89813788a011a340bbf 100644 (file)
@@ -47,6 +47,7 @@
 
 /dts-v1/;
 #include "stm32f429.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
        model = "STMicroelectronics STM32F429i-DISCO board";
@@ -75,6 +76,18 @@ green {
                        linux,default-trigger = "heartbeat";
                };
        };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               autorepeat;
+               button@0 {
+                       label = "User";
+                       linux,code = <KEY_HOME>;
+                       gpios = <&gpioa 0 0>;
+               };
+       };
 };
 
 &clk_hse {
index 336ee4fb587dd873ffb5cb8fc72523879fca6181..e4dae0eda3cdf95ebf65e3ea29cc07f8ed375335 100644 (file)
@@ -56,11 +56,21 @@ clk_hse: clk-hse {
                        compatible = "fixed-clock";
                        clock-frequency = <0>;
                };
+
+               clk-lse {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <32768>;
+               };
+
+               clk-lsi {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <32000>;
+               };
        };
 
        soc {
-               dma-ranges = <0xc0000000 0x0 0x10000000>;
-
                timer2: timer@40000000 {
                        compatible = "st,stm32-timer";
                        reg = <0x40000000 0x400>;
@@ -122,6 +132,9 @@ usart3: serial@40004800 {
                        interrupts = <39>;
                        clocks = <&rcc 0 146>;
                        status = "disabled";
+                       dmas = <&dma1 1 4 0x400 0x0>,
+                              <&dma1 3 4 0x400 0x0>;
+                       dma-names = "rx", "tx";
                };
 
                usart4: serial@40004c00 {
@@ -162,6 +175,9 @@ usart1: serial@40011000 {
                        interrupts = <37>;
                        clocks = <&rcc 0 164>;
                        status = "disabled";
+                       dmas = <&dma2 2 4 0x400 0x0>,
+                              <&dma2 7 4 0x400 0x0>;
+                       dma-names = "rx", "tx";
                };
 
                usart6: serial@40011400 {
@@ -185,11 +201,18 @@ exti: interrupt-controller@40013c00 {
                        interrupts = <1>, <2>, <3>, <6>, <7>, <8>, <9>, <10>, <23>, <40>, <41>, <42>, <62>, <76>;
                };
 
+               pwrcfg: power-config@40007000 {
+                       compatible = "syscon";
+                       reg = <0x40007000 0x400>;
+               };
+
                pin-controller {
                        #address-cells = <1>;
                        #size-cells = <1>;
                        compatible = "st,stm32f429-pinctrl";
                        ranges = <0 0x40020000 0x3000>;
+                       interrupt-parent = <&exti>;
+                       st,syscfg = <&syscfg 0x8>;
                        pins-are-numbered;
 
                        gpioa: gpio@40020000 {
@@ -313,7 +336,7 @@ pins {
                                };
                        };
 
-                       ethernet0_mii: mii@0 {
+                       ethernet_mii: mii@0 {
                                pins {
                                        pinmux = <STM32F429_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>,
                                                 <STM32F429_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>,
@@ -340,6 +363,7 @@ rcc: rcc@40023810 {
                        compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
                        reg = <0x40023800 0x400>;
                        clocks = <&clk_hse>;
+                       st,syscfg = <&pwrcfg>;
                };
 
                dma1: dma-controller@40026000 {
@@ -373,24 +397,22 @@ dma2: dma-controller@40026400 {
                        st,mem2mem;
                };
 
-               ethernet0: dwmac@40028000 {
+               mac: ethernet@40028000 {
                        compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
                        reg = <0x40028000 0x8000>;
                        reg-names = "stmmaceth";
-                       interrupts = <61>, <62>;
-                       interrupt-names = "macirq", "eth_wake_irq";
-                       clock-names = "stmmaceth", "tx-clk", "rx-clk";
+                       interrupts = <61>;
+                       interrupt-names = "macirq";
+                       clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
                        clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
                        st,syscon = <&syscfg 0x4>;
                        snps,pbl = <8>;
                        snps,mixed-burst;
-                       dma-ranges;
                        status = "disabled";
                };
 
                usbotg_hs: usb@40040000 {
                        compatible = "snps,dwc2";
-                       dma-ranges;
                        reg = <0x40040000 0x40000>;
                        interrupts = <77>;
                        clocks = <&rcc 0 29>;
index e911af8364714c58956426c11f3624672761b1cc..8877c00ce8e8bf8f12f3ff58d6566a07d09a6fb3 100644 (file)
@@ -64,6 +64,14 @@ memory {
        aliases {
                serial0 = &usart3;
        };
+
+       soc {
+               dma-ranges = <0xc0000000 0x0 0x10000000>;
+       };
+};
+
+&rcc {
+       compatible = "st,stm32f469-rcc", "st,stm32f42xx-rcc", "st,stm32-rcc";
 };
 
 &clk_hse {
diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm32f746.dtsi
new file mode 100644 (file)
index 0000000..f321ffe
--- /dev/null
@@ -0,0 +1,304 @@
+/*
+ * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "skeleton.dtsi"
+#include "armv7-m.dtsi"
+#include <dt-bindings/pinctrl/stm32f746-pinfunc.h>
+
+/ {
+       clocks {
+               clk_hse: clk-hse {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <0>;
+               };
+       };
+
+       soc {
+               timer2: timer@40000000 {
+                       compatible = "st,stm32-timer";
+                       reg = <0x40000000 0x400>;
+                       interrupts = <28>;
+                       clocks = <&rcc 0 128>;
+                       status = "disabled";
+               };
+
+               timer3: timer@40000400 {
+                       compatible = "st,stm32-timer";
+                       reg = <0x40000400 0x400>;
+                       interrupts = <29>;
+                       clocks = <&rcc 0 129>;
+                       status = "disabled";
+               };
+
+               timer4: timer@40000800 {
+                       compatible = "st,stm32-timer";
+                       reg = <0x40000800 0x400>;
+                       interrupts = <30>;
+                       clocks = <&rcc 0 130>;
+                       status = "disabled";
+               };
+
+               timer5: timer@40000c00 {
+                       compatible = "st,stm32-timer";
+                       reg = <0x40000c00 0x400>;
+                       interrupts = <50>;
+                       clocks = <&rcc 0 131>;
+               };
+
+               timer6: timer@40001000 {
+                       compatible = "st,stm32-timer";
+                       reg = <0x40001000 0x400>;
+                       interrupts = <54>;
+                       clocks = <&rcc 0 132>;
+                       status = "disabled";
+               };
+
+               timer7: timer@40001400 {
+                       compatible = "st,stm32-timer";
+                       reg = <0x40001400 0x400>;
+                       interrupts = <55>;
+                       clocks = <&rcc 0 133>;
+                       status = "disabled";
+               };
+
+               usart2: serial@40004400 {
+                       compatible = "st,stm32f7-usart", "st,stm32f7-uart";
+                       reg = <0x40004400 0x400>;
+                       interrupts = <38>;
+                       clocks =  <&rcc 0 145>;
+                       status = "disabled";
+               };
+
+               usart3: serial@40004800 {
+                       compatible = "st,stm32f7-usart", "st,stm32f7-uart";
+                       reg = <0x40004800 0x400>;
+                       interrupts = <39>;
+                       clocks = <&rcc 0 146>;
+                       status = "disabled";
+               };
+
+               usart4: serial@40004c00 {
+                       compatible = "st,stm32f7-uart";
+                       reg = <0x40004c00 0x400>;
+                       interrupts = <52>;
+                       clocks = <&rcc 0 147>;
+                       status = "disabled";
+               };
+
+               usart5: serial@40005000 {
+                       compatible = "st,stm32f7-uart";
+                       reg = <0x40005000 0x400>;
+                       interrupts = <53>;
+                       clocks = <&rcc 0 148>;
+                       status = "disabled";
+               };
+
+               usart7: serial@40007800 {
+                       compatible = "st,stm32f7-usart", "st,stm32f7-uart";
+                       reg = <0x40007800 0x400>;
+                       interrupts = <82>;
+                       clocks = <&rcc 0 158>;
+                       status = "disabled";
+               };
+
+               usart8: serial@40007c00 {
+                       compatible = "st,stm32f7-usart", "st,stm32f7-uart";
+                       reg = <0x40007c00 0x400>;
+                       interrupts = <83>;
+                       clocks = <&rcc 0 159>;
+                       status = "disabled";
+               };
+
+               usart1: serial@40011000 {
+                       compatible = "st,stm32f7-usart", "st,stm32f7-uart";
+                       reg = <0x40011000 0x400>;
+                       interrupts = <37>;
+                       clocks = <&rcc 0 164>;
+                       status = "disabled";
+               };
+
+               usart6: serial@40011400 {
+                       compatible = "st,stm32f7-usart", "st,stm32f7-uart";
+                       reg = <0x40011400 0x400>;
+                       interrupts = <71>;
+                       clocks = <&rcc 0 165>;
+                       status = "disabled";
+               };
+
+               syscfg: system-config@40013800 {
+                       compatible = "syscon";
+                       reg = <0x40013800 0x400>;
+               };
+
+               exti: interrupt-controller@40013c00 {
+                       compatible = "st,stm32-exti";
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       reg = <0x40013C00 0x400>;
+                       interrupts = <1>, <2>, <3>, <6>, <7>, <8>, <9>, <10>, <23>, <40>, <41>, <42>, <62>, <76>;
+               };
+
+               pin-controller {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "st,stm32f746-pinctrl";
+                       ranges = <0 0x40020000 0x3000>;
+                       interrupt-parent = <&exti>;
+                       st,syscfg = <&syscfg 0x8>;
+                       pins-are-numbered;
+
+                       gpioa: gpio@40020000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x0 0x400>;
+                               clocks = <&rcc 0 256>;
+                               st,bank-name = "GPIOA";
+                       };
+
+                       gpiob: gpio@40020400 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x400 0x400>;
+                               clocks = <&rcc 0 257>;
+                               st,bank-name = "GPIOB";
+                       };
+
+                       gpioc: gpio@40020800 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x800 0x400>;
+                               clocks = <&rcc 0 258>;
+                               st,bank-name = "GPIOC";
+                       };
+
+                       gpiod: gpio@40020c00 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0xc00 0x400>;
+                               clocks = <&rcc 0 259>;
+                               st,bank-name = "GPIOD";
+                       };
+
+                       gpioe: gpio@40021000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x1000 0x400>;
+                               clocks = <&rcc 0 260>;
+                               st,bank-name = "GPIOE";
+                       };
+
+                       gpiof: gpio@40021400 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x1400 0x400>;
+                               clocks = <&rcc 0 261>;
+                               st,bank-name = "GPIOF";
+                       };
+
+                       gpiog: gpio@40021800 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x1800 0x400>;
+                               clocks = <&rcc 0 262>;
+                               st,bank-name = "GPIOG";
+                       };
+
+                       gpioh: gpio@40021c00 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x1c00 0x400>;
+                               clocks = <&rcc 0 263>;
+                               st,bank-name = "GPIOH";
+                       };
+
+                       gpioi: gpio@40022000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x2000 0x400>;
+                               clocks = <&rcc 0 264>;
+                               st,bank-name = "GPIOI";
+                       };
+
+                       gpioj: gpio@40022400 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x2400 0x400>;
+                               clocks = <&rcc 0 265>;
+                               st,bank-name = "GPIOJ";
+                       };
+
+                       gpiok: gpio@40022800 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               reg = <0x2800 0x400>;
+                               clocks = <&rcc 0 266>;
+                               st,bank-name = "GPIOK";
+                       };
+
+                       usart1_pins_a: usart1@0 {
+                               pins1 {
+                                       pinmux = <STM32F746_PA9_FUNC_USART1_TX>;
+                                       bias-disable;
+                                       drive-push-pull;
+                                       slew-rate = <0>;
+                               };
+                               pins2 {
+                                       pinmux = <STM32F746_PA10_FUNC_USART1_RX>;
+                                       bias-disable;
+                               };
+                       };
+               };
+
+               rcc: rcc@40023800 {
+                       #clock-cells = <2>;
+                       compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
+                       reg = <0x40023800 0x400>;
+                       clocks = <&clk_hse>;
+               };
+       };
+};
+
+&systick {
+       clocks = <&rcc 1 0>;
+       status = "okay";
+};
index 7e7dfc2b43db0e722c5d3a6777fb5278b71ec0d3..b14a4281058d86f715f717e44f1d7b35e0ed931a 100644 (file)
@@ -967,7 +967,8 @@ pio: pinctrl@01c20800 {
                        compatible = "allwinner,sun4i-a10-pinctrl";
                        reg = <0x01c20800 0x400>;
                        interrupts = <28>;
-                       clocks = <&apb0_gates 5>;
+                       clocks = <&apb0_gates 5>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        gpio-controller;
                        interrupt-controller;
                        #interrupt-cells = <3>;
index aef91476f9aec0dcc880079a3c8f9112fa3f134c..0684d7930d65960a89e17ce52e2f123dbc6c9ddc 100644 (file)
@@ -250,8 +250,8 @@ &reg_usb1_vbus {
 
 &spi2 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi2_pins_a>,
-                   <&spi2_cs0_pins_a>;
+       pinctrl-0 = <&spi2_pins_b>,
+                   <&spi2_cs0_pins_b>;
        status = "okay";
 };
 
index c41a2ba34dde902c8a352bd3715dfa6c827b5887..7aa8c7aa0153e29bfa1bd6691275c23d87fa8d68 100644 (file)
@@ -243,14 +243,14 @@ mmc1_pins_a: mmc1@0 {
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
-       spi2_pins_a: spi2@0 {
+       spi2_pins_b: spi2@1 {
                allwinner,pins = "PB12", "PB13", "PB14";
                allwinner,function = "spi2";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
-       spi2_cs0_pins_a: spi2_cs0@0 {
+       spi2_cs0_pins_b: spi2_cs0@1 {
                allwinner,pins = "PB11";
                allwinner,function = "spi2";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
index b3c234c65ea19bb1f69984f350db0dad7ceea440..bb7210e0e4a9bb10ce3e36f4b0a8bf5bd16d9f9b 100644 (file)
@@ -72,6 +72,47 @@ power {
                        default-state = "on";
                };
        };
+
+       bridge {
+               compatible = "dumb-vga-dac";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+
+                               vga_bridge_in: endpoint {
+                                       remote-endpoint = <&tcon0_out_vga>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+
+                               vga_bridge_out: endpoint {
+                                       remote-endpoint = <&vga_con_in>;
+                               };
+                       };
+               };
+       };
+
+       vga {
+               compatible = "vga-connector";
+
+               port {
+                       vga_con_in: endpoint {
+                               remote-endpoint = <&vga_bridge_out>;
+                       };
+               };
+       };
+};
+
+&be0 {
+       status = "okay";
 };
 
 &ehci0 {
@@ -211,6 +252,19 @@ &reg_usb1_vbus {
        status = "okay";
 };
 
+&tcon0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&lcd_rgb666_pins>;
+       status = "okay";
+};
+
+&tcon0_out {
+       tcon0_out_vga: endpoint@0 {
+               reg = <0>;
+               remote-endpoint = <&vga_bridge_in>;
+       };
+};
+
 &uart1 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart1_pins_b>;
index a8b0bcc0451486f28689656884fc3431bba4f0ea..3d7ff10a48e9bdd26133c8c1605c24bd5f3246c8 100644 (file)
@@ -83,22 +83,6 @@ &codec_pa_pin {
        allwinner,pins = "PG3";
 };
 
-&i2c1 {
-       icn8318: touchscreen@40 {
-               compatible = "chipone,icn8318";
-               reg = <0x40>;
-               interrupt-parent = <&pio>;
-               interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
-               pinctrl-names = "default";
-               pinctrl-0 = <&ts_wake_pin_p66>;
-               wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
-               touchscreen-size-x = <800>;
-               touchscreen-size-y = <480>;
-               touchscreen-inverted-x;
-               touchscreen-swapped-x-y;
-       };
-};
-
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_pins_a>;
@@ -121,20 +105,26 @@ i2c_lcd_pins: i2c_lcd_pin@0 {
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
        };
-
-       ts_wake_pin_p66: ts_wake_pin@0 {
-               allwinner,pins = "PB3";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-       };
-
 };
 
 &reg_usb0_vbus {
        gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
 };
 
+&touchscreen {
+       compatible = "chipone,icn8318";
+       reg = <0x40>;
+       /* The P66 uses a different EINT then the reference design */
+       interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
+       /* The icn8318 binding expects wake-gpios instead of power-gpios */
+       wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+       touchscreen-size-x = <800>;
+       touchscreen-size-y = <480>;
+       touchscreen-inverted-x;
+       touchscreen-swapped-x-y;
+       status = "okay";
+};
+
 &uart1 {
        /* The P66 uses the uart pins as gpios */
        status = "disabled";
diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
new file mode 100644 (file)
index 0000000..92a2dc6
--- /dev/null
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2016 Free Electrons
+ * Copyright 2016 NextThing Co
+ *
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun5i-gr8.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       model = "NextThing C.H.I.P. Pro";
+       compatible = "nextthing,chip-pro", "nextthing,gr8";
+
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               serial0 = &uart1;
+               serial1 = &uart2;
+               serial2 = &uart3;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               status {
+                       label = "chip-pro:white:status";
+                       gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       mmc0_pwrseq: mmc0_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_reg_on_pin_chip_pro>;
+               reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */
+       };
+};
+
+&codec {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+
+               /*
+               * The interrupt is routed through the "External Fast
+               * Interrupt Request" pin (ball G13 of the module)
+               * directly to the main interrupt controller, without
+               * any other controller interfering.
+               */
+               interrupts = <0>;
+       };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "disabled";
+};
+
+&i2s0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2s0_mclk_pins_a>, <&i2s0_data_pins_a>;
+       status = "disabled";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>;
+       vmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&mmc0_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&nfc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>;
+       status = "okay";
+
+       nand@0 {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               reg = <0>;
+               allwinner,rb = <0>;
+               nand-ecc-mode = "hw";
+       };
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       usb0_id_pin_chip_pro: usb0-id-pin@0 {
+               allwinner,pins = "PG2";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       wifi_reg_on_pin_chip_pro: wifi-reg-on-pin@0 {
+               allwinner,pins = "PB10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins>;
+       status = "disabled";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+       regulator-always-on;
+};
+
+&reg_dcdc3 {
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1300000>;
+       regulator-name = "vdd-sys";
+       regulator-always-on;
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+       regulator-always-on;
+};
+
+/*
+ * Both LDO3 and LDO4 are used in parallel to power up the
+ * WiFi/BT chip.
+ */
+&reg_ldo3 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi-1";
+       regulator-always-on;
+};
+
+&reg_ldo4 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi-2";
+       regulator-always-on;
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins_a>, <&uart1_cts_rts_pins_a>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins_a>, <&uart2_cts_rts_pins_a>;
+       status = "disabled";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins_a>, <&uart3_cts_rts_pins_a>;
+       status = "okay";
+};
+
+&usb_otg {
+       /*
+        * The CHIP Pro doesn't have a controllable VBUS, nor does it
+        * have any 5v rail on the board itself.
+        *
+        * If one wants to use it as a true OTG port, it should be
+        * done in the baseboard, and its DT / overlay will add it.
+        */
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_pin_chip_pro>;
+       usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb1_vbus-supply = <&reg_vcc5v0>;
+       status = "okay";
+};
similarity index 92%
rename from arch/arm/boot/dts/ntc-gr8-evb.dts
rename to arch/arm/boot/dts/sun5i-gr8-evb.dts
index 4b622f3b522047f26c02e4102427c0a50dd0631b..030605aa80656bb3fdb1ee1c4d767f92c6ecc736 100644 (file)
@@ -44,7 +44,7 @@
  */
 
 /dts-v1/;
-#include "ntc-gr8.dtsi"
+#include "sun5i-gr8.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
@@ -75,6 +75,39 @@ backlight: backlight {
                brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
                default-brightness-level = <8>;
        };
+
+       sound-analog {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "gr8-evb-wm8978";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,mclk-fs = <512>;
+
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s0>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&wm8978>;
+               };
+       };
+
+       sound-spdif {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "On-board SPDIF";
+
+               simple-audio-card,cpu {
+                       sound-dai = <&spdif>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&spdif_out>;
+               };
+       };
+
+       spdif_out: spdif-out {
+               #sound-dai-cells = <0>;
+               compatible = "linux,spdif-dit";
+       };
 };
 
 &be0 {
similarity index 95%
rename from arch/arm/boot/dts/ntc-gr8.dtsi
rename to arch/arm/boot/dts/sun5i-gr8.dtsi
index ca54e03ef366bd72de452334cc9e32be8d6d1976..ea86d4d58db62df70e7966e511cd6280c31579fc 100644 (file)
@@ -792,7 +792,7 @@ i2s0_data_pins_a: i2s0-data@0 {
                        };
 
                        i2s0_mclk_pins_a: i2s0-mclk@0 {
-                               allwinner,pins = "PB6", "PB7", "PB8", "PB9";
+                               allwinner,pins = "PB5";
                                allwinner,function = "i2s0";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
@@ -854,6 +854,13 @@ pwm0_pins_a: pwm0@0 {
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       pwm1_pins: pwm1 {
+                               allwinner,pins = "PG13";
+                               allwinner,function = "pwm1";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        spdif_tx_pins_a: spdif@0 {
                                allwinner,pins = "PB10";
                                allwinner,function = "spdif";
@@ -874,6 +881,34 @@ uart1_cts_rts_pins_a: uart1-cts-rts@0 {
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
+
+                       uart2_pins_a: uart2@1 {
+                               allwinner,pins = "PD2", "PD3";
+                               allwinner,function = "uart2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       uart2_cts_rts_pins_a: uart2-cts-rts@0 {
+                               allwinner,pins = "PD4", "PD5";
+                               allwinner,function = "uart2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       uart3_pins_a: uart3@1 {
+                               allwinner,pins = "PG9", "PG10";
+                               allwinner,function = "uart3";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       uart3_cts_rts_pins_a: uart3-cts-rts@0 {
+                               allwinner,pins = "PG11", "PG12";
+                               allwinner,function = "uart3";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
                };
 
                pwm: pwm@01c20e00 {
@@ -978,6 +1013,16 @@ uart2: serial@01c28800 {
                        status = "disabled";
                };
 
+               uart3: serial@01c28c00 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28c00 0x400>;
+                       interrupts = <4>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&apb1_gates 19>;
+                       status = "disabled";
+               };
+
                i2c0: i2c@01c2ac00 {
                        compatible = "allwinner,sun4i-a10-i2c";
                        reg = <0x01c2ac00 0x400>;
index b68a12374b35f24e02e12b6e026f04adb1a461bd..c6da5ad3715281c7a1f56bc5c2c5b2e2e86667e5 100644 (file)
@@ -56,9 +56,11 @@ / {
 
        aliases {
                i2c0 = &i2c0;
+               i2c1 = &i2c1;
                i2c2 = &i2c2;
                serial0 = &uart1;
                serial1 = &uart3;
+               spi0 = &spi2;
        };
 
        chosen {
@@ -74,6 +76,20 @@ status {
                        default-state = "on";
                };
        };
+
+       mmc0_pwrseq: mmc0_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&chip_wifi_reg_on_pin>;
+               reset-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
+       };
+
+       onewire {
+               compatible = "w1-gpio";
+               gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
+               pinctrl-names = "default";
+               pinctrl-0 = <&chip_w1_pin>;
+       };
 };
 
 &be0 {
@@ -112,6 +128,12 @@ axp209: pmic@34 {
 
 #include "axp209.dtsi"
 
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "disabled";
+};
+
 &i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
@@ -131,10 +153,15 @@ xio: gpio@38 {
        };
 };
 
+&mmc0_pins_a {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
        vmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&mmc0_pwrseq>;
        bus-width = <4>;
        non-removable;
        status = "okay";
@@ -156,12 +183,26 @@ chip_vbus_pin: chip_vbus_pin@0 {
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
+       chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 {
+               allwinner,pins = "PC19";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        chip_id_det_pin: chip_id_det_pin@0 {
                allwinner,pins = "PG2";
                allwinner,function = "gpio_in";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       chip_w1_pin: chip_w1_pin@0 {
+               allwinner,pins = "PD2";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
 &reg_dcdc2 {
@@ -189,6 +230,28 @@ &reg_ldo2 {
        regulator-always-on;
 };
 
+/*
+ * Both LDO3 and LDO4 are used in parallel to power up the WiFi/BT
+ * Chip.
+ *
+ * If those are not enabled, the SDIO part will not enumerate, and
+ * since there's no way currently to pass DT infos to an SDIO device,
+ * we cannot really do better than this ugly hack for now.
+ */
+&reg_ldo3 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi-1";
+       regulator-always-on;
+};
+
+&reg_ldo4 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi-2";
+       regulator-always-on;
+};
+
 &reg_ldo5 {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
@@ -202,6 +265,12 @@ &reg_usb0_vbus {
        status = "okay";
 };
 
+&spi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi2_pins_a>;
+       status = "disabled";
+};
+
 &tcon0 {
        status = "okay";
 };
index 20cc940f5f9151b009014669cdd4ab7b99e90d7c..82f87cdcd1649ea56cf8327769b5e3398f827fd3 100644 (file)
@@ -41,6 +41,7 @@
  */
 #include "sunxi-reference-design-tablet.dtsi"
 
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pwm/pwm.h>
 
 / {
@@ -84,6 +85,23 @@ axp209: pmic@34 {
 };
 
 &i2c1 {
+       /*
+        * The gsl1680 is rated at 400KHz and it will not work reliable at
+        * 100KHz, this has been confirmed on multiple different q8 tablets.
+        * All other devices on this bus are also rated for 400KHz.
+        */
+       clock-frequency = <400000>;
+
+       touchscreen: touchscreen {
+               interrupt-parent = <&pio>;
+               interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; /* EINT11 (PG11) */
+               pinctrl-names = "default";
+               pinctrl-0 = <&ts_power_pin>;
+               power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+               /* Tablet dts must provide reg and compatible */
+               status = "disabled";
+       };
+
        pcf8563: rtc@51 {
                compatible = "nxp,pcf8563";
                reg = <0x51>;
@@ -125,6 +143,13 @@ mmc0_cd_pin: mmc0_cd_pin@0 {
                allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
        };
 
+       ts_power_pin: ts_power_pin {
+               pins = "PB3";
+               function = "gpio_out";
+               drive-strength = <10>;
+               bias-disable;
+       };
+
        usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
                allwinner,pins = "PG1";
                allwinner,function = "gpio_in";
index e374f4fc8073f6fde9ee0d5d0d5d4758218a264d..b0fca4ef4dae88550c5a45af41b977e86a8e1247 100644 (file)
@@ -547,7 +547,8 @@ intc: interrupt-controller@01c20400 {
                pio: pinctrl@01c20800 {
                        reg = <0x01c20800 0x400>;
                        interrupts = <28>;
-                       clocks = <&apb0_gates 5>;
+                       clocks = <&apb0_gates 5>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        gpio-controller;
                        interrupt-controller;
                        #interrupt-cells = <3>;
@@ -574,6 +575,16 @@ i2c2_pins_a: i2c2@0 {
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       lcd_rgb565_pins: lcd_rgb565@0 {
+                               allwinner,pins = "PD3", "PD4", "PD5", "PD6", "PD7",
+                                                "PD10", "PD11", "PD12", "PD13", "PD14", "PD15",
+                                                "PD19", "PD20", "PD21", "PD22", "PD23",
+                                                "PD24", "PD25", "PD26", "PD27";
+                               allwinner,function = "lcd0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        mmc0_pins_a: mmc0@0 {
                                allwinner,pins = "PF0", "PF1", "PF2", "PF3",
                                                 "PF4", "PF5";
@@ -591,6 +602,20 @@ mmc2_pins_a: mmc2@0 {
                                allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
                        };
 
+                       spi2_pins_a: spi2@0 {
+                               allwinner,pins = "PE1", "PE2", "PE3";
+                               allwinner,function = "spi2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi2_cs0_pins_a: spi2-cs0@0 {
+                               allwinner,pins = "PE0";
+                               allwinner,function = "spi2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        uart3_pins_a: uart3@0 {
                                allwinner,pins = "PG9", "PG10";
                                allwinner,function = "uart3";
index 9a74637f677f3481c0ec615a2266b37ec08186d4..735914f6ae446a4766f484ab888826efc99eefb1 100644 (file)
@@ -63,12 +63,79 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
+       vga-connector {
+               compatible = "vga-connector";
+
+               port {
+                       vga_con_in: endpoint {
+                               remote-endpoint = <&vga_dac_out>;
+                       };
+               };
+       };
+
+       vga-dac {
+               compatible = "dumb-vga-dac";
+               vdd-supply = <&reg_vga_3v3>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0>;
+
+                               vga_dac_in: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&tcon0_out_vga>;
+                               };
+                       };
+
+                       port@1 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <1>;
+
+                               vga_dac_out: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vga_con_in>;
+                               };
+                       };
+               };
+       };
+
+       reg_vga_3v3: vga_3v3_regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vga-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               enable-active-high;
+               gpio = <&pio 7 25 GPIO_ACTIVE_HIGH>; /* PH25 */
+       };
+
        wifi_pwrseq: wifi_pwrseq {
                compatible = "mmc-pwrseq-simple";
                reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
        };
 };
 
+&codec {
+       allwinner,audio-routing =
+               "Headphone", "HP",
+               "Speaker", "LINEOUT",
+               "LINEIN", "Line In",
+               "MIC1", "Mic",
+               "MIC2", "Headset Mic",
+               "Mic",  "MBIAS",
+               "Headset Mic", "HBIAS";
+       allwinner,pa-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc3>;
 };
@@ -245,6 +312,19 @@ &reg_usb1_vbus {
        status = "okay";
 };
 
+&tcon0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&lcd0_rgb888_pins>;
+       status = "okay";
+};
+
+&tcon0_out {
+       tcon0_out_vga: endpoint@0 {
+               reg = <0>;
+               remote-endpoint = <&vga_dac_in>;
+       };
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
index ce1960453a0bb96bda88162a50e4826a0fdfb172..2b26175d55d1b7e3cc27611eb5883f4bc913d575 100644 (file)
@@ -231,6 +231,11 @@ gmac_tx_clk: clk@01c200d0 {
                };
        };
 
+       de: display-engine {
+               compatible = "allwinner,sun6i-a31-display-engine";
+               allwinner,pipelines = <&fe0>;
+       };
+
        soc@01c00000 {
                compatible = "simple-bus";
                #address-cells = <1>;
@@ -246,6 +251,44 @@ dma: dma-controller@01c02000 {
                        #dma-cells = <1>;
                };
 
+               tcon0: lcd-controller@01c0c000 {
+                       compatible = "allwinner,sun6i-a31-tcon";
+                       reg = <0x01c0c000 0x1000>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       resets = <&ccu RST_AHB1_LCD0>;
+                       reset-names = "lcd";
+                       clocks = <&ccu CLK_AHB1_LCD0>,
+                                <&ccu CLK_LCD0_CH0>,
+                                <&ccu CLK_LCD0_CH1>;
+                       clock-names = "ahb",
+                                     "tcon-ch0",
+                                     "tcon-ch1";
+                       clock-output-names = "tcon0-pixel-clock";
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               tcon0_in: port@0 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <0>;
+
+                                       tcon0_in_drc0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&drc0_out_tcon0>;
+                                       };
+                               };
+
+                               tcon0_out: port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <1>;
+                               };
+                       };
+               };
+
                mmc0: mmc@01c0f000 {
                        compatible = "allwinner,sun7i-a20-mmc";
                        reg = <0x01c0f000 0x1000>;
@@ -428,19 +471,55 @@ pio: pinctrl@01c20800 {
                                     <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&ccu CLK_APB1_PIO>;
+                       clocks = <&ccu CLK_APB1_PIO>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        gpio-controller;
                        interrupt-controller;
                        #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
-                       uart0_pins_a: uart0@0 {
-                               allwinner,pins = "PH20", "PH21";
-                               allwinner,function = "uart0";
+                       gmac_pins_gmii_a: gmac_gmii@0 {
+                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
+                                               "PA4", "PA5", "PA6", "PA7",
+                                               "PA8", "PA9", "PA10", "PA11",
+                                               "PA12", "PA13", "PA14", "PA15",
+                                               "PA16", "PA17", "PA18", "PA19",
+                                               "PA20", "PA21", "PA22", "PA23",
+                                               "PA24", "PA25", "PA26", "PA27";
+                               allwinner,function = "gmac";
+                               /*
+                                * data lines in GMII mode run at 125MHz and
+                                * might need a higher signal drive strength
+                                */
+                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       gmac_pins_mii_a: gmac_mii@0 {
+                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
+                                               "PA8", "PA9", "PA11",
+                                               "PA12", "PA13", "PA14", "PA19",
+                                               "PA20", "PA21", "PA22", "PA23",
+                                               "PA24", "PA26", "PA27";
+                               allwinner,function = "gmac";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       gmac_pins_rgmii_a: gmac_rgmii@0 {
+                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
+                                               "PA9", "PA10", "PA11",
+                                               "PA12", "PA13", "PA14", "PA19",
+                                               "PA20", "PA25", "PA26", "PA27";
+                               allwinner,function = "gmac";
+                               /*
+                                * data lines in RGMII mode use DDR mode
+                                * and need a higher signal drive strength
+                                */
+                               allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        i2c0_pins_a: i2c0@0 {
                                allwinner,pins = "PH14", "PH15";
                                allwinner,function = "i2c0";
@@ -462,6 +541,19 @@ i2c2_pins_a: i2c2@0 {
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       lcd0_rgb888_pins: lcd0_rgb888 {
+                               allwinner,pins = "PD0", "PD1", "PD2", "PD3",
+                                                "PD4", "PD5", "PD6", "PD7",
+                                                "PD8", "PD9", "PD10", "PD11",
+                                                "PD12", "PD13", "PD14", "PD15",
+                                                "PD16", "PD17", "PD18", "PD19",
+                                                "PD20", "PD21", "PD22", "PD23",
+                                                "PD24", "PD25", "PD26", "PD27";
+                               allwinner,function = "lcd0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        mmc0_pins_a: mmc0@0 {
                                allwinner,pins = "PF0", "PF1", "PF2",
                                                 "PF3", "PF4", "PF5";
@@ -506,47 +598,12 @@ mmc3_8bit_emmc_pins: mmc3@1 {
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
-                       gmac_pins_mii_a: gmac_mii@0 {
-                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
-                                               "PA8", "PA9", "PA11",
-                                               "PA12", "PA13", "PA14", "PA19",
-                                               "PA20", "PA21", "PA22", "PA23",
-                                               "PA24", "PA26", "PA27";
-                               allwinner,function = "gmac";
+                       uart0_pins_a: uart0@0 {
+                               allwinner,pins = "PH20", "PH21";
+                               allwinner,function = "uart0";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
-
-                       gmac_pins_gmii_a: gmac_gmii@0 {
-                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
-                                               "PA4", "PA5", "PA6", "PA7",
-                                               "PA8", "PA9", "PA10", "PA11",
-                                               "PA12", "PA13", "PA14", "PA15",
-                                               "PA16", "PA17", "PA18", "PA19",
-                                               "PA20", "PA21", "PA22", "PA23",
-                                               "PA24", "PA25", "PA26", "PA27";
-                               allwinner,function = "gmac";
-                               /*
-                                * data lines in GMII mode run at 125MHz and
-                                * might need a higher signal drive strength
-                                */
-                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       gmac_pins_rgmii_a: gmac_rgmii@0 {
-                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
-                                               "PA9", "PA10", "PA11",
-                                               "PA12", "PA13", "PA14", "PA19",
-                                               "PA20", "PA25", "PA26", "PA27";
-                               allwinner,function = "gmac";
-                               /*
-                                * data lines in RGMII mode use DDR mode
-                                * and need a higher signal drive strength
-                                */
-                               allwinner,drive = <SUN4I_PINCTRL_40_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
                };
 
                timer@01c20c00 {
@@ -728,6 +785,19 @@ crypto: crypto-engine@01c15000 {
                        reset-names = "ahb";
                };
 
+               codec: codec@01c22c00 {
+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun6i-a31-codec";
+                       reg = <0x01c22c00 0x400>;
+                       interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_APB1_CODEC>, <&ccu CLK_CODEC>;
+                       clock-names = "apb", "codec";
+                       resets = <&ccu RST_APB1_CODEC>;
+                       dmas = <&dma 15>, <&dma 15>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
                timer@01c60000 {
                        compatible = "allwinner,sun6i-a31-hstimer",
                                     "allwinner,sun7i-a20-hstimer";
@@ -799,6 +869,115 @@ gic: interrupt-controller@01c81000 {
                        interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
                };
 
+               fe0: display-frontend@01e00000 {
+                       compatible = "allwinner,sun6i-a31-display-frontend";
+                       reg = <0x01e00000 0x20000>;
+                       interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_AHB1_FE0>, <&ccu CLK_FE0>,
+                                <&ccu CLK_DRAM_FE0>;
+                       clock-names = "ahb", "mod",
+                                     "ram";
+                       resets = <&ccu RST_AHB1_FE0>;
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               fe0_out: port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <1>;
+
+                                       fe0_out_be0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&be0_in_fe0>;
+                                       };
+                               };
+                       };
+               };
+
+               be0: display-backend@01e60000 {
+                       compatible = "allwinner,sun6i-a31-display-backend";
+                       reg = <0x01e60000 0x10000>;
+                       interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_AHB1_BE0>, <&ccu CLK_BE0>,
+                                <&ccu CLK_DRAM_BE0>;
+                       clock-names = "ahb", "mod",
+                                     "ram";
+                       resets = <&ccu RST_AHB1_BE0>;
+
+                       assigned-clocks = <&ccu CLK_BE0>;
+                       assigned-clock-rates = <300000000>;
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               be0_in: port@0 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <0>;
+
+                                       be0_in_fe0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&fe0_out_be0>;
+                                       };
+                               };
+
+                               be0_out: port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <1>;
+
+                                       be0_out_drc0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&drc0_in_be0>;
+                                       };
+                               };
+                       };
+               };
+
+               drc0: drc@01e70000 {
+                       compatible = "allwinner,sun6i-a31-drc";
+                       reg = <0x01e70000 0x10000>;
+                       interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_AHB1_DRC0>, <&ccu CLK_IEP_DRC0>,
+                                <&ccu CLK_DRAM_DRC0>;
+                       clock-names = "ahb", "mod",
+                                     "ram";
+                       resets = <&ccu RST_AHB1_DRC0>;
+
+                       assigned-clocks = <&ccu CLK_IEP_DRC0>;
+                       assigned-clock-rates = <300000000>;
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               drc0_in: port@0 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <0>;
+
+                                       drc0_in_be0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&be0_out_drc0>;
+                                       };
+                               };
+
+                               drc0_out: port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       reg = <1>;
+
+                                       drc0_out_tcon0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&tcon0_in_drc0>;
+                                       };
+                               };
+                       };
+               };
+
                rtc: rtc@01f00000 {
                        compatible = "allwinner,sun6i-a31-rtc";
                        reg = <0x01f00000 0x54>;
@@ -886,7 +1065,8 @@ r_pio: pinctrl@01f02c00 {
                        reg = <0x01f02c00 0x400>;
                        interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&apb0_gates 0>;
+                       clocks = <&apb0_gates 0>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        resets = <&apb0_rst 0>;
                        gpio-controller;
                        interrupt-controller;
index 6ead2f5c847a5d6be332d405bd36d0220a93646e..c35ec112f5a094e63468b675703fb6ee8c4c77b6 100644 (file)
@@ -65,6 +65,14 @@ status {
        };
 };
 
+&codec {
+       allwinner,audio-routing =
+               "Line Out", "LINEOUT",
+               "MIC1", "Mic",
+               "Mic",  "MBIAS";
+       status = "okay";
+};
+
 &ehci0 {
        /* USB 2.0 4 port hub IC */
        status = "okay";
index c17a32771b98c881f408d56b388bbb3209e25905..97e2c51d0aea4611dc98799b12c8c62b9f6f537c 100644 (file)
 
 #include "sun6i-a31.dtsi"
 
+&de {
+       compatible = "allwinner,sun6i-a31s-display-engine";
+};
+
 &pio {
        compatible = "allwinner,sun6i-a31s-pinctrl";
 };
+
+&tcon0 {
+       compatible = "allwinner,sun6i-a31s-tcon";
+};
index ba5bca0fe997b755f113c14597588668f04e477d..532f1a1605600d678b3850b401aa9f81a4ad24ab 100644 (file)
@@ -105,6 +105,10 @@ &codec {
        status = "okay";
 };
 
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
        status = "okay";
 };
@@ -132,16 +136,14 @@ &i2c0 {
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupt-parent = <&nmi_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
+#include "axp209.dtsi"
+
 &ir0 {
        pinctrl-names = "default";
        pinctrl-0 = <&ir0_rx_pins_a>;
@@ -167,7 +169,7 @@ &mmc3 {
        mmc-pwrseq = <&mmc3_pwrseq>;
        bus-width = <4>;
        non-removable;
-       enable-sdio-wakeup;
+       wakeup-source;
        status = "okay";
 
        brcmf: bcrmf@1 {
@@ -192,6 +194,10 @@ &ohci1 {
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        gmac_power_pin_bpi_m1p: gmac_power_pin@0 {
                allwinner,pins = "PH23";
@@ -222,8 +228,54 @@ mmc3_pwrseq_pin_bpi_m1p: mmc3_pwrseq_pin@0 {
        };
 };
 
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
 };
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
+&usbphy {
+       usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       /* VBUS on usb host ports are tied to DC5V and therefore always on */
+       status = "okay";
+};
index 23aacce4d6c7ab8e408d6591d1ab5cc58e7ae5dc..134e0c1b129de35f1fa3626d2997fa70a5ad7316 100644 (file)
@@ -88,6 +88,10 @@ &ehci1 {
        status = "okay";
 };
 
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
 &codec {
        status = "okay";
 };
index 94cf5a1c7172371b3c5691e831a238dd563d83c7..f7db067b0de0fb03206890323cd0d6223eb2b771 100644 (file)
@@ -1085,7 +1085,8 @@ pio: pinctrl@01c20800 {
                        compatible = "allwinner,sun7i-a20-pinctrl";
                        reg = <0x01c20800 0x400>;
                        interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&apb0_gates 5>;
+                       clocks = <&apb0_gates 5>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        gpio-controller;
                        interrupt-controller;
                        #interrupt-cells = <3>;
index 48fc24f36fcb268b7c0ba30348e0f0cc17826a9c..e4991a78ad73526383664c7f732a2d5d8f16482d 100644 (file)
@@ -266,7 +266,8 @@ pio: pinctrl@01c20800 {
                        /* compatible gets set in SoC specific dtsi file */
                        reg = <0x01c20800 0x400>;
                        /* interrupts get set in SoC specific dtsi file */
-                       clocks = <&ccu CLK_BUS_PIO>;
+                       clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        gpio-controller;
                        interrupt-controller;
                        #interrupt-cells = <3>;
@@ -282,11 +283,15 @@ uart0_pins_a: uart0@0 {
                        uart1_pins_a: uart1@0 {
                                allwinner,pins = "PG6", "PG7";
                                allwinner,function = "uart1";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        uart1_pins_cts_rts_a: uart1-cts-rts@0 {
                                allwinner,pins = "PG8", "PG9";
                                allwinner,function = "uart1";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        mmc0_pins_a: mmc0@0 {
@@ -571,7 +576,8 @@ r_pio: pinctrl@01f02c00 {
                        compatible = "allwinner,sun8i-a23-r-pinctrl";
                        reg = <0x01f02c00 0x400>;
                        interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&apb0_gates 0>;
+                       clocks = <&apb0_gates 0>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        resets = <&apb0_rst 0>;
                        gpio-controller;
                        interrupt-controller;
index a86cbedda34cd9e373f798a91890d9e8a069abf1..21bb291b9568e35752b7f9c806faa0e138e2a3c7 100644 (file)
@@ -98,13 +98,6 @@ wifi_pwrseq_pin_mid2407: wifi_pwrseq_pin@0 {
        };
 };
 
-&reg_ldo_io1 {
-       regulator-min-microvolt = <3300000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-name = "vcc-touchscreen";
-       status = "okay";
-};
-
 &touchscreen {
        reg = <0x40>;
        compatible = "silead,gsl1680";
index fef6abc0a7038001180f8f5bfa3d5afcfdbd3c10..71bb9418c5f9734c502db2408ac3d8d95fad8381 100644 (file)
@@ -213,6 +213,11 @@ &uart0 {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
 &usbphy {
        status = "okay";
        usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
new file mode 100644 (file)
index 0000000..ec63d10
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2016 Milo Kim <woogyom.kim@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sun8i-h3-nanopi.dtsi"
+
+/ {
+       model = "FriendlyArm NanoPi M1";
+       compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
index 3d64cafc1e90973d53fcf004981068ff347ec39a..8d2cc6e9a03faff3cc71965493e5c54c1359e9f3 100644 (file)
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/dts-v1/;
-#include "sun8i-h3.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sun8i-h3-nanopi.dtsi"
 
 / {
        model = "FriendlyARM NanoPi NEO";
        compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
-
-       aliases {
-               serial0 = &uart0;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-       leds {
-               compatible = "gpio-leds";
-               pinctrl-names = "default";
-               pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
-
-               pwr {
-                       label = "nanopi:green:pwr";
-                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
-                       default-state = "on";
-               };
-
-               status {
-                       label = "nanopi:blue:status";
-                       gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
-               };
-       };
-};
-
-&ehci3 {
-       status = "okay";
-};
-
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <4>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
-       cd-inverted;
-       status = "okay";
-};
-
-&ohci3 {
-       status = "okay";
-};
-
-&pio {
-       leds_opc: led-pins {
-               allwinner,pins = "PA10";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-       };
-};
-
-&r_pio {
-       leds_r_opc: led-pins {
-               allwinner,pins = "PL10";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-       };
-};
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
-       status = "okay";
-};
-
-&usbphy {
-       /* USB VBUS is always on */
-       status = "okay";
 };
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
new file mode 100644 (file)
index 0000000..8038aa2
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2016 James Pettigrew <james@innovum.com.au>
+ * Copyright (C) 2016 Milo Kim <woogyom.kim@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file 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 file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_npi>, <&leds_r_npi>;
+
+               status {
+                       label = "nanopi:blue:status";
+                       gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               pwr {
+                       label = "nanopi:green:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       r_gpio_keys {
+               compatible = "gpio-keys";
+               input-name = "k1";
+               pinctrl-names = "default";
+               pinctrl-0 = <&sw_r_npi>;
+
+               k1@0 {
+                       label = "k1";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&ehci3 {
+       status = "okay";
+};
+
+&mmc0 {
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+       status = "okay";
+       vmmc-supply = <&reg_vcc3v3>;
+};
+
+&ohci3 {
+       status = "okay";
+};
+
+&pio {
+       leds_npi: led_pins@0 {
+               allwinner,pins = "PA10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_pio {
+       leds_r_npi: led_pins@0 {
+               allwinner,pins = "PL10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       sw_r_npi: key_pins@0 {
+               allwinner,pins = "PL3";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 75a865406d3ef54c1579b4f558560aaf90567d1c..3c6596f06ebc3840b0c5c17e212ed69658f59061 100644 (file)
@@ -321,7 +321,8 @@ pio: pinctrl@01c20800 {
                        reg = <0x01c20800 0x400>;
                        interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&ccu CLK_BUS_PIO>;
+                       clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        gpio-controller;
                        #gpio-cells = <3>;
                        interrupt-controller;
@@ -381,6 +382,20 @@ mmc2_8bit_pins: mmc2_8bit {
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       spi0_pins: spi0 {
+                               allwinner,pins = "PC0", "PC1", "PC2", "PC3";
+                               allwinner,function = "spi0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi1_pins: spi1 {
+                               allwinner,pins = "PA15", "PA16", "PA14", "PA13";
+                               allwinner,function = "spi1";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        uart0_pins_a: uart0@0 {
                                allwinner,pins = "PA4", "PA5";
                                allwinner,function = "uart0";
@@ -425,6 +440,38 @@ timer@01c20c00 {
                        clocks = <&osc24M>;
                };
 
+               spi0: spi@01c68000 {
+                       compatible = "allwinner,sun8i-h3-spi";
+                       reg = <0x01c68000 0x1000>;
+                       interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
+                       clock-names = "ahb", "mod";
+                       dmas = <&dma 23>, <&dma 23>;
+                       dma-names = "rx", "tx";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&spi0_pins>;
+                       resets = <&ccu RST_BUS_SPI0>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               spi1: spi@01c69000 {
+                       compatible = "allwinner,sun8i-h3-spi";
+                       reg = <0x01c69000 0x1000>;
+                       interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
+                       clock-names = "ahb", "mod";
+                       dmas = <&dma 24>, <&dma 24>;
+                       dma-names = "rx", "tx";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&spi1_pins>;
+                       resets = <&ccu RST_BUS_SPI1>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                wdt0: watchdog@01c20ca0 {
                        compatible = "allwinner,sun6i-a31-wdt";
                        reg = <0x01c20ca0 0x20>;
@@ -568,7 +615,8 @@ r_pio: pinctrl@01f02c00 {
                        compatible = "allwinner,sun8i-h3-r-pinctrl";
                        reg = <0x01f02c00 0x400>;
                        interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&apb0_gates 0>;
+                       clocks = <&apb0_gates 0>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        resets = <&apb0_reset 0>;
                        gpio-controller;
                        #gpio-cells = <3>;
index 08cd00143635b4380b9f5c0a14495523279c6550..69bc0cd26ca7529f57ca4075f1d2ed2f68d9ef8e 100644 (file)
@@ -209,6 +209,13 @@ &reg_drivevbus {
        status = "okay";
 };
 
+&reg_ldo_io1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-touchscreen";
+       status = "okay";
+};
+
 &reg_rtc_ldo {
        regulator-name = "vcc-rtc";
 };
index 439847acd41e10f9e41843d66f265b99f145e14e..67b02fe7f11ce737849a0c2e2586efec73b2b4df 100644 (file)
@@ -76,6 +76,14 @@ red {
                        gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
                };
        };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&ac100_rtc 1>;
+               clock-names = "ext_clock";
+               /* enables internal regulator and de-asserts reset */
+               reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
+       };
 };
 
 &mmc0 {
@@ -88,6 +96,21 @@ &mmc0 {
        status = "okay";
 };
 
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>, <&wifi_en_pin_cubieboard4>;
+       vmmc-supply = <&reg_dldo1>;
+       vqmmc-supply = <&reg_cldo3>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&mmc1_pins {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_8bit_pins>;
@@ -128,6 +151,15 @@ &r_ir {
        status = "okay";
 };
 
+&r_pio {
+       wifi_en_pin_cubieboard4: wifi_en_pin@0 {
+               allwinner,pins = "PL2";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
 &r_rsb {
        status = "okay";
 
index ceb6ef15d669b8a5f47d6a9da26e7a9a939a7f04..7e036b2be76218680bf9efe15714f19b214749ef 100644 (file)
@@ -105,6 +105,14 @@ reg_usb3_vbus: usb3-vbus {
                enable-active-high;
                gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
        };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&ac100_rtc 1>;
+               clock-names = "ext_clock";
+               /* enables internal regulator and de-asserts reset */
+               reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
+       };
 };
 
 &ehci0 {
@@ -130,6 +138,21 @@ &mmc0 {
        status = "okay";
 };
 
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>, <&wifi_en_pin_optimus>;
+       vmmc-supply = <&reg_dldo1>;
+       vqmmc-supply = <&reg_cldo3>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&mmc1_pins {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_8bit_pins>;
@@ -199,6 +222,13 @@ led_r_pins_optimus: led-pins@1 {
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       wifi_en_pin_optimus: wifi_en_pin@0 {
+               allwinner,pins = "PL2";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
 };
 
 &r_rsb {
index 3c5214cbe4e6949c5a4c491cb68b4909c169340a..979ad1aacfb1fc9c830710a29eca32ce29ce3405 100644 (file)
@@ -678,7 +678,8 @@ pio: pinctrl@06000800 {
                                     <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&apb0_gates 5>;
+                       clocks = <&apb0_gates 5>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        gpio-controller;
                        interrupt-controller;
                        #interrupt-cells = <3>;
@@ -700,6 +701,14 @@ mmc0_pins: mmc0 {
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       mmc1_pins: mmc1 {
+                               allwinner,pins = "PG0", "PG1" ,"PG2", "PG3",
+                                                "PG4", "PG5";
+                               allwinner,function = "mmc1";
+                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        mmc2_8bit_pins: mmc2_8bit {
                                allwinner,pins = "PC6", "PC7", "PC8", "PC9",
                                                 "PC10", "PC11", "PC12",
@@ -894,7 +903,8 @@ r_pio: pinctrl@08002c00 {
                        reg = <0x08002c00 0x400>;
                        interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&apbs_gates 0>;
+                       clocks = <&apbs_gates 0>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
                        resets = <&apbs_rst 0>;
                        gpio-controller;
                        interrupt-controller;
index e7a73db176136a739321a4b86d3b07a29acdc649..0819721dda590486964bb8cca9d7ef05e03440c2 100644 (file)
@@ -1595,7 +1595,7 @@ i2c@7000d000 {
                clock-frequency = <400000>;
 
                /* SGTL5000 audio codec */
-               sgtl5000: codec@0a {
+               sgtl5000: codec@a {
                        compatible = "fsl,sgtl5000";
                        reg = <0x0a>;
                        VDDA-supply = <&reg_3v3>;
index 271505e0715fd3e9cbfcce6f2832b8dfb3c91487..eabfa655a3cda894fa5758014c7beea13b4c3ae1 100644 (file)
@@ -42,6 +42,12 @@ dpaux@545c0000 {
                };
        };
 
+       gpu@0,57000000 {
+               status = "okay";
+
+               vdd-supply = <&vdd_gpu>;
+       };
+
        serial@70006000 {
                /* Debug connector on the bottom of the board near SD card. */
                status = "okay";
@@ -214,7 +220,7 @@ vddio_1v8: sd5 {
                                        regulator-always-on;
                                };
 
-                               sd6 {
+                               vdd_gpu: sd6 {
                                        regulator-name = "+VDD_GPU_AP";
                                        regulator-min-microvolt = <650000>;
                                        regulator-max-microvolt = <1200000>;
index 2207c08e3fa33b9015b0ef8c8275b99d26f834b5..e8807503f87c4d5ab6bf4d4c7750c0e8f08df5ce 100644 (file)
@@ -376,6 +376,19 @@ uarte: serial@70006400 {
                status = "disabled";
        };
 
+       gmi@70009000 {
+               compatible = "nvidia,tegra20-gmi";
+               reg = <0x70009000 0x1000>;
+               #address-cells = <2>;
+               #size-cells = <1>;
+               ranges = <0 0 0xd0000000 0xfffffff>;
+               clocks = <&tegra_car TEGRA20_CLK_NOR>;
+               clock-names = "gmi";
+               resets = <&tegra_car 42>;
+               reset-names = "gmi";
+               status = "disabled";
+       };
+
        pwm: pwm@7000a000 {
                compatible = "nvidia,tegra20-pwm";
                reg = <0x7000a000 0x100>;
index 192b95177aac38017b06b8287f4af087a1e2d643..f6c7c3e958ac39edf2ef91d10b1ccfdaf2d2d8c0 100644 (file)
@@ -48,6 +48,24 @@ pinmux@70000868 {
                pinctrl-0 = <&state_default>;
 
                state_default: pinmux {
+                       /* Analogue Audio (On-module) */
+                       clk1_out_pw4 {
+                               nvidia,pins = "clk1_out_pw4";
+                               nvidia,function = "extperiph1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap3_fs_pp0 {
+                               nvidia,pins =   "dap3_fs_pp0",
+                                               "dap3_sclk_pp3",
+                                               "dap3_din_pp1",
+                                               "dap3_dout_pp2";
+                               nvidia,function = "i2s2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
                        /* Apalis BKL1_ON */
                        pv2 {
                                nvidia,pins = "pv2";
@@ -429,6 +447,15 @@ i2c@7000d000 {
                status = "okay";
                clock-frequency = <100000>;
 
+               /* SGTL5000 audio codec */
+               sgtl5000: codec@a {
+                       compatible = "fsl,sgtl5000";
+                       reg = <0x0a>;
+                       VDDA-supply = <&sys_3v3_reg>;
+                       VDDIO-supply = <&sys_3v3_reg>;
+                       clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
+               };
+
                pmic: tps65911@2d {
                        compatible = "ti,tps65911";
                        reg = <0x2d>;
@@ -660,6 +687,12 @@ pmc@7000e400 {
                nvidia,sys-clock-req-active-high;
        };
 
+       ahub@70080000 {
+               i2s@70080500 {
+                       status = "okay";
+               };
+       };
+
        /* eMMC */
        sdhci@78000600 {
                status = "okay";
@@ -733,4 +766,20 @@ charge_pump_5v0_reg: regulator@103 {
                        regulator-always-on;
                };
        };
+
+       sound {
+               compatible = "toradex,tegra-audio-sgtl5000-apalis_t30",
+                            "nvidia,tegra-audio-sgtl5000";
+               nvidia,model = "Toradex Apalis T30";
+               nvidia,audio-routing =
+                       "Headphone Jack", "HP_OUT",
+                       "LINE_IN", "Line In Jack",
+                       "MIC_IN", "Mic Jack";
+               nvidia,i2s-controller = <&tegra_i2s2>;
+               nvidia,audio-codec = <&sgtl5000>;
+               clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
+                        <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA30_CLK_EXTERN1>;
+               clock-names = "pll_a", "pll_a_out0", "mclk";
+       };
 };
index a265534cd314ebab0a3661f2f9b4f2db5b5472b6..5360d638eedcb48d9c6c64d3f83294008aa52167 100644 (file)
@@ -29,6 +29,24 @@ pinmux@70000868 {
                pinctrl-0 = <&state_default>;
 
                state_default: pinmux {
+                       /* Analogue Audio (On-module) */
+                       clk1_out_pw4 {
+                               nvidia,pins = "clk1_out_pw4";
+                               nvidia,function = "extperiph1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap3_fs_pp0 {
+                               nvidia,pins =   "dap3_fs_pp0",
+                                               "dap3_sclk_pp3",
+                                               "dap3_din_pp1",
+                                               "dap3_dout_pp2";
+                               nvidia,function = "i2s2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
                        /* Colibri BL_ON */
                        pv2 {
                                nvidia,pins = "pv2";
@@ -207,6 +225,15 @@ i2c@7000d000 {
                status = "okay";
                clock-frequency = <100000>;
 
+               /* SGTL5000 audio codec */
+               sgtl5000: codec@a {
+                       compatible = "fsl,sgtl5000";
+                       reg = <0x0a>;
+                       VDDA-supply = <&sys_3v3_reg>;
+                       VDDIO-supply = <&sys_3v3_reg>;
+                       clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
+               };
+
                pmic: tps65911@2d {
                        compatible = "ti,tps65911";
                        reg = <0x2d>;
@@ -396,6 +423,12 @@ pmc@7000e400 {
                nvidia,sys-clock-req-active-high;
        };
 
+       ahub@70080000 {
+               i2s@70080500 {
+                       status = "okay";
+               };
+       };
+
        /* eMMC */
        sdhci@78000600 {
                status = "okay";
@@ -471,4 +504,20 @@ charge_pump_5v0_reg: regulator@103 {
                        regulator-always-on;
                };
        };
+
+       sound {
+               compatible = "toradex,tegra-audio-sgtl5000-colibri_t30",
+                            "nvidia,tegra-audio-sgtl5000";
+               nvidia,model = "Toradex Colibri T30";
+               nvidia,audio-routing =
+                       "Headphone Jack", "HP_OUT",
+                       "LINE_IN", "Line In Jack",
+                       "MIC_IN", "Mic Jack";
+               nvidia,i2s-controller = <&tegra_i2s2>;
+               nvidia,audio-codec = <&sgtl5000>;
+               clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
+                        <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA30_CLK_EXTERN1>;
+               clock-names = "pll_a", "pll_a_out0", "mclk";
+       };
 };
index 5030065cbdfe38df667fb8cc9e89e4154d5a7798..bbb1c002e7f1740e920e4e4f2a7ce9799b7a7daa 100644 (file)
@@ -439,6 +439,19 @@ uarte: serial@70006400 {
                status = "disabled";
        };
 
+       gmi@70009000 {
+               compatible = "nvidia,tegra30-gmi";
+               reg = <0x70009000 0x1000>;
+               #address-cells = <2>;
+               #size-cells = <1>;
+               ranges = <0 0 0x48000000 0x7ffffff>;
+               clocks = <&tegra_car TEGRA30_CLK_NOR>;
+               clock-names = "gmi";
+               resets = <&tegra_car 42>;
+               reset-names = "gmi";
+               status = "disabled";
+       };
+
        pwm: pwm@7000a000 {
                compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm";
                reg = <0x7000a000 0x100>;
index a63272422d769363d3cdc2c5d7b76d870b091d12..02de56b55823e78fd82fa6d4ad39d103a8e28fa1 100644 (file)
 
 &tps {
        compatible = "ti,tps65217";
+       interrupt-controller;
+       #interrupt-cells = <1>;
+
+       charger {
+               compatible = "ti,tps65217-charger";
+               status = "disabled";
+       };
+
+       pwrbutton {
+               compatible = "ti,tps65217-pwrbutton";
+               status = "disabled";
+       };
 
        regulators {
                #address-cells = <1>;
diff --git a/arch/arm/boot/dts/uniphier-common32.dtsi b/arch/arm/boot/dts/uniphier-common32.dtsi
deleted file mode 100644 (file)
index 8c8a851..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Device Tree Source commonly used by UniPhier ARM SoCs
- *
- * Copyright (C) 2015-2016 Socionext Inc.
- *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file 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 file 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.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/include/ "skeleton.dtsi"
-
-/ {
-       psci {
-               compatible = "arm,psci-0.2";
-               method = "smc";
-       };
-
-       clocks {
-               refclk: ref {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-               };
-       };
-
-       soc: soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       interrupts = <0 33 4>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       clocks = <&peri_clk 0>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       interrupts = <0 35 4>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       clocks = <&peri_clk 1>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       interrupts = <0 37 4>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       clocks = <&peri_clk 2>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       interrupts = <0 177 4>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       clocks = <&peri_clk 3>;
-               };
-
-               system_bus: system-bus@58c00000 {
-                       compatible = "socionext,uniphier-system-bus";
-                       status = "disabled";
-                       reg = <0x58c00000 0x400>;
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_system_bus>;
-               };
-
-               smpctrl@59800000 {
-                       compatible = "socionext,uniphier-smpctrl";
-                       reg = <0x59801000 0x400>;
-               };
-
-               mioctrl@59810000 {
-                       compatible = "socionext,uniphier-mioctrl",
-                                    "simple-mfd", "syscon";
-                       reg = <0x59810000 0x800>;
-
-                       mio_clk: clock {
-                               #clock-cells = <1>;
-                       };
-
-                       mio_rst: reset {
-                               #reset-cells = <1>;
-                       };
-               };
-
-               perictrl@59820000 {
-                       compatible = "socionext,uniphier-perictrl",
-                                    "simple-mfd", "syscon";
-                       reg = <0x59820000 0x200>;
-
-                       peri_clk: clock {
-                               #clock-cells = <1>;
-                       };
-
-                       peri_rst: reset {
-                               #reset-cells = <1>;
-                       };
-               };
-
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
-
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
-
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-               };
-
-               soc-glue@5f800000 {
-                       compatible = "socionext,uniphier-soc-glue",
-                                    "simple-mfd", "syscon";
-                       reg = <0x5f800000 0x2000>;
-
-                       pinctrl: pinctrl {
-                               /* specify compatible in each SoC DTSI */
-                       };
-               };
-
-               sysctrl@61840000 {
-                       compatible = "socionext,uniphier-sysctrl",
-                                    "simple-mfd", "syscon";
-                       reg = <0x61840000 0x4000>;
-
-                       sys_clk: clock {
-                               #clock-cells = <1>;
-                       };
-
-                       sys_rst: reset {
-                               #reset-cells = <1>;
-                       };
-               };
-       };
-};
-
-/include/ "uniphier-pinctrl.dtsi"
index 95f342c9d9c160e61516024e766320c5b8e2bd25..a7c494d7c43a92d66d32fdd950c25ed3d1a12210 100644 (file)
@@ -43,7 +43,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "uniphier-common32.dtsi"
+/include/ "skeleton.dtsi"
 
 / {
        compatible = "socionext,uniphier-ld4";
@@ -61,147 +61,267 @@ cpu@0 {
                };
        };
 
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
        clocks {
+               refclk: ref {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <24576000>;
+               };
+
                arm_timer_clk: arm_timer_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <50000000>;
                };
        };
-};
-
-&soc {
-       l2: l2-cache@500c0000 {
-               compatible = "socionext,uniphier-system-cache";
-               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
-               interrupts = <0 174 4>, <0 175 4>;
-               cache-unified;
-               cache-size = <(512 * 1024)>;
-               cache-sets = <256>;
-               cache-line-size = <128>;
-               cache-level = <2>;
-       };
 
-       i2c0: i2c@58400000 {
-               compatible = "socionext,uniphier-i2c";
-               status = "disabled";
-               reg = <0x58400000 0x40>;
+       soc {
+               compatible = "simple-bus";
                #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 41 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c0>;
-               clocks = <&peri_clk 4>;
-               clock-frequency = <100000>;
-       };
+               #size-cells = <1>;
+               ranges;
+               interrupt-parent = <&intc>;
 
-       i2c1: i2c@58480000 {
-               compatible = "socionext,uniphier-i2c";
-               status = "disabled";
-               reg = <0x58480000 0x40>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 42 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c1>;
-               clocks = <&peri_clk 5>;
-               clock-frequency = <100000>;
-       };
+               l2: l2-cache@500c0000 {
+                       compatible = "socionext,uniphier-system-cache";
+                       reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
+                             <0x506c0000 0x400>;
+                       interrupts = <0 174 4>, <0 175 4>;
+                       cache-unified;
+                       cache-size = <(512 * 1024)>;
+                       cache-sets = <256>;
+                       cache-line-size = <128>;
+                       cache-level = <2>;
+               };
 
-       /* chip-internal connection for DMD */
-       i2c2: i2c@58500000 {
-               compatible = "socionext,uniphier-i2c";
-               reg = <0x58500000 0x40>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 43 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c2>;
-               clocks = <&peri_clk 6>;
-               clock-frequency = <400000>;
-       };
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&peri_clk 0>;
+               };
 
-       i2c3: i2c@58580000 {
-               compatible = "socionext,uniphier-i2c";
-               status = "disabled";
-               reg = <0x58580000 0x40>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 44 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c3>;
-               clocks = <&peri_clk 7>;
-               clock-frequency = <100000>;
-       };
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&peri_clk 1>;
+               };
 
-       usb0: usb@5a800100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a800100 0x100>;
-               interrupts = <0 80 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb0>;
-               clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
-               resets = <&mio_rst 7>, <&mio_rst 8>, <&mio_rst 12>, <&sys_rst 8>;
-       };
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&peri_clk 2>;
+               };
 
-       usb1: usb@5a810100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a810100 0x100>;
-               interrupts = <0 81 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb1>;
-               clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
-               resets = <&mio_rst 7>, <&mio_rst 9>, <&mio_rst 13>, <&sys_rst 8>;
-       };
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 29 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&peri_clk 3>;
+               };
 
-       usb2: usb@5a820100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a820100 0x100>;
-               interrupts = <0 82 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb2>;
-               clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
-               resets = <&mio_rst 7>, <&mio_rst 10>, <&mio_rst 14>, <&sys_rst 8>;
-       };
+               i2c0: i2c@58400000 {
+                       compatible = "socionext,uniphier-i2c";
+                       status = "disabled";
+                       reg = <0x58400000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 41 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c0>;
+                       clocks = <&peri_clk 4>;
+                       clock-frequency = <100000>;
+               };
 
-};
+               i2c1: i2c@58480000 {
+                       compatible = "socionext,uniphier-i2c";
+                       status = "disabled";
+                       reg = <0x58480000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 42 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c1>;
+                       clocks = <&peri_clk 5>;
+                       clock-frequency = <100000>;
+               };
 
-&refclk {
-       clock-frequency = <24576000>;
-};
+               /* chip-internal connection for DMD */
+               i2c2: i2c@58500000 {
+                       compatible = "socionext,uniphier-i2c";
+                       reg = <0x58500000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 43 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c2>;
+                       clocks = <&peri_clk 6>;
+                       clock-frequency = <400000>;
+               };
 
-&serial3 {
-       interrupts = <0 29 4>;
-};
+               i2c3: i2c@58580000 {
+                       compatible = "socionext,uniphier-i2c";
+                       status = "disabled";
+                       reg = <0x58580000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 44 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c3>;
+                       clocks = <&peri_clk 7>;
+                       clock-frequency = <100000>;
+               };
 
-&mio_clk {
-       compatible = "socionext,uniphier-ld4-mio-clock";
-};
+               system_bus: system-bus@58c00000 {
+                       compatible = "socionext,uniphier-system-bus";
+                       status = "disabled";
+                       reg = <0x58c00000 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_system_bus>;
+               };
 
-&mio_rst {
-       compatible = "socionext,uniphier-ld4-mio-reset";
-       resets = <&sys_rst 7>;
-};
+               smpctrl@59800000 {
+                       compatible = "socionext,uniphier-smpctrl";
+                       reg = <0x59801000 0x400>;
+               };
 
-&peri_clk {
-       compatible = "socionext,uniphier-ld4-peri-clock";
-};
+               mioctrl@59810000 {
+                       compatible = "socionext,uniphier-ld4-mioctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59810000 0x800>;
 
-&peri_rst {
-       compatible = "socionext,uniphier-ld4-peri-reset";
-};
+                       mio_clk: clock {
+                               compatible = "socionext,uniphier-ld4-mio-clock";
+                               #clock-cells = <1>;
+                       };
 
-&pinctrl {
-       compatible = "socionext,uniphier-ld4-pinctrl";
-};
+                       mio_rst: reset {
+                               compatible = "socionext,uniphier-ld4-mio-reset";
+                               #reset-cells = <1>;
+                       };
+               };
 
-&sys_clk {
-       compatible = "socionext,uniphier-ld4-clock";
-};
+               perictrl@59820000 {
+                       compatible = "socionext,uniphier-ld4-perictrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59820000 0x200>;
+
+                       peri_clk: clock {
+                               compatible = "socionext,uniphier-ld4-peri-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       peri_rst: reset {
+                               compatible = "socionext,uniphier-ld4-peri-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               usb0: usb@5a800100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a800100 0x100>;
+                       interrupts = <0 80 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb0>;
+                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
+                                <&mio_rst 12>;
+               };
+
+               usb1: usb@5a810100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a810100 0x100>;
+                       interrupts = <0 81 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb1>;
+                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
+                                <&mio_rst 13>;
+               };
 
-&sys_rst {
-       compatible = "socionext,uniphier-ld4-reset";
+               usb2: usb@5a820100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a820100 0x100>;
+                       interrupts = <0 82 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb2>;
+                       clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 10>,
+                                <&mio_rst 14>;
+               };
+
+               soc-glue@5f800000 {
+                       compatible = "socionext,uniphier-ld4-soc-glue",
+                                    "simple-mfd", "syscon";
+                       reg = <0x5f800000 0x2000>;
+
+                       pinctrl: pinctrl {
+                               compatible = "socionext,uniphier-ld4-pinctrl";
+                       };
+               };
+
+               timer@60000200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x60000200 0x20>;
+                       interrupts = <1 11 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               timer@60000600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x60000600 0x20>;
+                       interrupts = <1 13 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               intc: interrupt-controller@60001000 {
+                       compatible = "arm,cortex-a9-gic";
+                       reg = <0x60001000 0x1000>,
+                             <0x60000100 0x100>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+               };
+
+               sysctrl@61840000 {
+                       compatible = "socionext,uniphier-ld4-sysctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x61840000 0x10000>;
+
+                       sys_clk: clock {
+                               compatible = "socionext,uniphier-ld4-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       sys_rst: reset {
+                               compatible = "socionext,uniphier-ld4-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+       };
 };
+
+/include/ "uniphier-pinctrl.dtsi"
index ba700267ad6631eba8bda4e5e0c4986d4e752e67..e960b09ff01cd91a60df32aebafb81387bbc7286 100644 (file)
@@ -43,7 +43,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "uniphier-common32.dtsi"
+/include/ "skeleton.dtsi"
 
 / {
        compatible = "socionext,uniphier-pro4";
@@ -69,155 +69,279 @@ cpu@1 {
                };
        };
 
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
        clocks {
+               refclk: ref {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <25000000>;
+               };
+
                arm_timer_clk: arm_timer_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <50000000>;
                };
        };
-};
 
-&soc {
-       l2: l2-cache@500c0000 {
-               compatible = "socionext,uniphier-system-cache";
-               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
-               interrupts = <0 174 4>, <0 175 4>;
-               cache-unified;
-               cache-size = <(768 * 1024)>;
-               cache-sets = <256>;
-               cache-line-size = <128>;
-               cache-level = <2>;
-       };
-
-       i2c0: i2c@58780000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58780000 0x80>;
+       soc {
+               compatible = "simple-bus";
                #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 41 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c0>;
-               clocks = <&peri_clk 4>;
-               clock-frequency = <100000>;
-       };
+               #size-cells = <1>;
+               ranges;
+               interrupt-parent = <&intc>;
 
-       i2c1: i2c@58781000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58781000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 42 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c1>;
-               clocks = <&peri_clk 5>;
-               clock-frequency = <100000>;
-       };
+               l2: l2-cache@500c0000 {
+                       compatible = "socionext,uniphier-system-cache";
+                       reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
+                             <0x506c0000 0x400>;
+                       interrupts = <0 174 4>, <0 175 4>;
+                       cache-unified;
+                       cache-size = <(768 * 1024)>;
+                       cache-sets = <256>;
+                       cache-line-size = <128>;
+                       cache-level = <2>;
+               };
 
-       i2c2: i2c@58782000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58782000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 43 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c2>;
-               clocks = <&peri_clk 6>;
-               clock-frequency = <100000>;
-       };
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&peri_clk 0>;
+               };
 
-       i2c3: i2c@58783000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58783000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 44 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c3>;
-               clocks = <&peri_clk 7>;
-               clock-frequency = <100000>;
-       };
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&peri_clk 1>;
+               };
 
-       /* i2c4 does not exist */
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&peri_clk 2>;
+               };
 
-       /* chip-internal connection for DMD */
-       i2c5: i2c@58785000 {
-               compatible = "socionext,uniphier-fi2c";
-               reg = <0x58785000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 25 4>;
-               clocks = <&peri_clk 9>;
-               clock-frequency = <400000>;
-       };
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 177 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&peri_clk 3>;
+               };
 
-       /* chip-internal connection for HDMI */
-       i2c6: i2c@58786000 {
-               compatible = "socionext,uniphier-fi2c";
-               reg = <0x58786000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 26 4>;
-               clocks = <&peri_clk 10>;
-               clock-frequency = <400000>;
-       };
+               i2c0: i2c@58780000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58780000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 41 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c0>;
+                       clocks = <&peri_clk 4>;
+                       clock-frequency = <100000>;
+               };
 
-       usb2: usb@5a800100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a800100 0x100>;
-               interrupts = <0 80 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb2>;
-               clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
-               resets = <&mio_rst 7>, <&mio_rst 8>, <&mio_rst 12>, <&sys_rst 8>;
-       };
+               i2c1: i2c@58781000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58781000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 42 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c1>;
+                       clocks = <&peri_clk 5>;
+                       clock-frequency = <100000>;
+               };
 
-       usb3: usb@5a810100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a810100 0x100>;
-               interrupts = <0 81 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb3>;
-               clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
-               resets = <&mio_rst 7>, <&mio_rst 9>, <&mio_rst 13>, <&sys_rst 8>;
-       };
-};
+               i2c2: i2c@58782000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58782000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 43 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c2>;
+                       clocks = <&peri_clk 6>;
+                       clock-frequency = <100000>;
+               };
 
-&refclk {
-       clock-frequency = <25000000>;
-};
+               i2c3: i2c@58783000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58783000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 44 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c3>;
+                       clocks = <&peri_clk 7>;
+                       clock-frequency = <100000>;
+               };
 
-&mio_clk {
-       compatible = "socionext,uniphier-pro4-mio-clock";
-};
+               /* i2c4 does not exist */
 
-&mio_rst {
-       compatible = "socionext,uniphier-pro4-mio-reset";
-       resets = <&sys_rst 7>;
-};
+               /* chip-internal connection for DMD */
+               i2c5: i2c@58785000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58785000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 25 4>;
+                       clocks = <&peri_clk 9>;
+                       clock-frequency = <400000>;
+               };
 
-&peri_clk {
-       compatible = "socionext,uniphier-pro4-peri-clock";
-};
+               /* chip-internal connection for HDMI */
+               i2c6: i2c@58786000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58786000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 26 4>;
+                       clocks = <&peri_clk 10>;
+                       clock-frequency = <400000>;
+               };
 
-&peri_rst {
-       compatible = "socionext,uniphier-pro4-peri-reset";
-};
+               system_bus: system-bus@58c00000 {
+                       compatible = "socionext,uniphier-system-bus";
+                       status = "disabled";
+                       reg = <0x58c00000 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_system_bus>;
+               };
 
-&pinctrl {
-       compatible = "socionext,uniphier-pro4-pinctrl";
-};
+               smpctrl@59800000 {
+                       compatible = "socionext,uniphier-smpctrl";
+                       reg = <0x59801000 0x400>;
+               };
 
-&sys_clk {
-       compatible = "socionext,uniphier-pro4-clock";
-};
+               mioctrl@59810000 {
+                       compatible = "socionext,uniphier-pro4-mioctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59810000 0x800>;
+
+                       mio_clk: clock {
+                               compatible = "socionext,uniphier-pro4-mio-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       mio_rst: reset {
+                               compatible = "socionext,uniphier-pro4-mio-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               perictrl@59820000 {
+                       compatible = "socionext,uniphier-pro4-perictrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59820000 0x200>;
+
+                       peri_clk: clock {
+                               compatible = "socionext,uniphier-pro4-peri-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       peri_rst: reset {
+                               compatible = "socionext,uniphier-pro4-peri-reset";
+                               #reset-cells = <1>;
+                       };
+               };
 
-&sys_rst {
-       compatible = "socionext,uniphier-pro4-reset";
+               usb2: usb@5a800100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a800100 0x100>;
+                       interrupts = <0 80 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb2>;
+                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
+                                <&mio_rst 12>;
+               };
+
+               usb3: usb@5a810100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a810100 0x100>;
+                       interrupts = <0 81 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb3>;
+                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
+                                <&mio_rst 13>;
+               };
+
+               soc-glue@5f800000 {
+                       compatible = "socionext,uniphier-pro4-soc-glue",
+                                    "simple-mfd", "syscon";
+                       reg = <0x5f800000 0x2000>;
+
+                       pinctrl: pinctrl {
+                               compatible = "socionext,uniphier-pro4-pinctrl";
+                       };
+               };
+
+               timer@60000200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x60000200 0x20>;
+                       interrupts = <1 11 0x304>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               timer@60000600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x60000600 0x20>;
+                       interrupts = <1 13 0x304>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               intc: interrupt-controller@60001000 {
+                       compatible = "arm,cortex-a9-gic";
+                       reg = <0x60001000 0x1000>,
+                             <0x60000100 0x100>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+               };
+
+               sysctrl@61840000 {
+                       compatible = "socionext,uniphier-pro4-sysctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x61840000 0x10000>;
+
+                       sys_clk: clock {
+                               compatible = "socionext,uniphier-pro4-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       sys_rst: reset {
+                               compatible = "socionext,uniphier-pro4-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+       };
 };
+
+/include/ "uniphier-pinctrl.dtsi"
index 2c49c3614bda53ddbea05c8157009a932623253e..dbc5e53331630f302b1ef47d818d848f7f33b614 100644 (file)
@@ -43,7 +43,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "uniphier-common32.dtsi"
+/include/ "skeleton.dtsi"
 
 / {
        compatible = "socionext,uniphier-pro5";
@@ -56,157 +56,355 @@ cpu@0 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
+                       clocks = <&sys_clk 32>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       operating-points-v2 = <&cpu_opp>;
                };
 
                cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <1>;
+                       clocks = <&sys_clk 32>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       operating-points-v2 = <&cpu_opp>;
                };
        };
 
+       cpu_opp: opp_table {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp@100000000 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@116667000 {
+                       opp-hz = /bits/ 64 <116667000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@150000000 {
+                       opp-hz = /bits/ 64 <150000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@175000000 {
+                       opp-hz = /bits/ 64 <175000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@200000000 {
+                       opp-hz = /bits/ 64 <200000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@233334000 {
+                       opp-hz = /bits/ 64 <233334000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@300000000 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@350000000 {
+                       opp-hz = /bits/ 64 <350000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@400000000 {
+                       opp-hz = /bits/ 64 <400000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@466667000 {
+                       opp-hz = /bits/ 64 <466667000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@700000000 {
+                       opp-hz = /bits/ 64 <700000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@800000000 {
+                       opp-hz = /bits/ 64 <800000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@933334000 {
+                       opp-hz = /bits/ 64 <933334000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@1200000000 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@1400000000 {
+                       opp-hz = /bits/ 64 <1400000000>;
+                       clock-latency-ns = <300>;
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
        clocks {
+               refclk: ref {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <20000000>;
+               };
+
                arm_timer_clk: arm_timer_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <50000000>;
                };
        };
-};
 
-&soc {
-       l2: l2-cache@500c0000 {
-               compatible = "socionext,uniphier-system-cache";
-               reg = <0x500c0000 0x2000>, <0x503c0100 0x8>, <0x506c0000 0x400>;
-               interrupts = <0 190 4>, <0 191 4>;
-               cache-unified;
-               cache-size = <(2 * 1024 * 1024)>;
-               cache-sets = <512>;
-               cache-line-size = <128>;
-               cache-level = <2>;
-               next-level-cache = <&l3>;
-       };
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               interrupt-parent = <&intc>;
 
-       l3: l3-cache@500c8000 {
-               compatible = "socionext,uniphier-system-cache";
-               reg = <0x500c8000 0x2000>, <0x503c8100 0x8>, <0x506c8000 0x400>;
-               interrupts = <0 174 4>, <0 175 4>;
-               cache-unified;
-               cache-size = <(2 * 1024 * 1024)>;
-               cache-sets = <512>;
-               cache-line-size = <256>;
-               cache-level = <3>;
-       };
+               l2: l2-cache@500c0000 {
+                       compatible = "socionext,uniphier-system-cache";
+                       reg = <0x500c0000 0x2000>, <0x503c0100 0x8>,
+                             <0x506c0000 0x400>;
+                       interrupts = <0 190 4>, <0 191 4>;
+                       cache-unified;
+                       cache-size = <(2 * 1024 * 1024)>;
+                       cache-sets = <512>;
+                       cache-line-size = <128>;
+                       cache-level = <2>;
+                       next-level-cache = <&l3>;
+               };
 
-       i2c0: i2c@58780000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58780000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 41 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c0>;
-               clocks = <&peri_clk 4>;
-               clock-frequency = <100000>;
-       };
+               l3: l3-cache@500c8000 {
+                       compatible = "socionext,uniphier-system-cache";
+                       reg = <0x500c8000 0x2000>, <0x503c8100 0x8>,
+                             <0x506c8000 0x400>;
+                       interrupts = <0 174 4>, <0 175 4>;
+                       cache-unified;
+                       cache-size = <(2 * 1024 * 1024)>;
+                       cache-sets = <512>;
+                       cache-line-size = <256>;
+                       cache-level = <3>;
+               };
 
-       i2c1: i2c@58781000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58781000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 42 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c1>;
-               clocks = <&peri_clk 5>;
-               clock-frequency = <100000>;
-       };
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&peri_clk 0>;
+               };
 
-       i2c2: i2c@58782000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58782000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 43 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c2>;
-               clocks = <&peri_clk 6>;
-               clock-frequency = <100000>;
-       };
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&peri_clk 1>;
+               };
 
-       i2c3: i2c@58783000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58783000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 44 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c3>;
-               clocks = <&peri_clk 7>;
-               clock-frequency = <100000>;
-       };
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&peri_clk 2>;
+               };
 
-       /* i2c4 does not exist */
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 177 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&peri_clk 3>;
+               };
 
-       /* chip-internal connection for DMD */
-       i2c5: i2c@58785000 {
-               compatible = "socionext,uniphier-fi2c";
-               reg = <0x58785000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 25 4>;
-               clocks = <&peri_clk 9>;
-               clock-frequency = <400000>;
-       };
+               i2c0: i2c@58780000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58780000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 41 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c0>;
+                       clocks = <&peri_clk 4>;
+                       clock-frequency = <100000>;
+               };
 
-       /* chip-internal connection for HDMI */
-       i2c6: i2c@58786000 {
-               compatible = "socionext,uniphier-fi2c";
-               reg = <0x58786000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 26 4>;
-               clocks = <&peri_clk 10>;
-               clock-frequency = <400000>;
-       };
-};
+               i2c1: i2c@58781000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58781000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 42 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c1>;
+                       clocks = <&peri_clk 5>;
+                       clock-frequency = <100000>;
+               };
 
-&refclk {
-       clock-frequency = <20000000>;
-};
+               i2c2: i2c@58782000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58782000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 43 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c2>;
+                       clocks = <&peri_clk 6>;
+                       clock-frequency = <100000>;
+               };
 
-&mio_clk {
-       compatible = "socionext,uniphier-pro5-mio-clock";
-};
+               i2c3: i2c@58783000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58783000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 44 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c3>;
+                       clocks = <&peri_clk 7>;
+                       clock-frequency = <100000>;
+               };
 
-&mio_rst {
-       compatible = "socionext,uniphier-pro5-mio-reset";
-};
+               /* i2c4 does not exist */
 
-&peri_clk {
-       compatible = "socionext,uniphier-pro5-peri-clock";
-};
+               /* chip-internal connection for DMD */
+               i2c5: i2c@58785000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58785000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 25 4>;
+                       clocks = <&peri_clk 9>;
+                       clock-frequency = <400000>;
+               };
 
-&peri_rst {
-       compatible = "socionext,uniphier-pro5-peri-reset";
-};
+               /* chip-internal connection for HDMI */
+               i2c6: i2c@58786000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58786000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 26 4>;
+                       clocks = <&peri_clk 10>;
+                       clock-frequency = <400000>;
+               };
 
-&pinctrl {
-       compatible = "socionext,uniphier-pro5-pinctrl";
-};
+               system_bus: system-bus@58c00000 {
+                       compatible = "socionext,uniphier-system-bus";
+                       status = "disabled";
+                       reg = <0x58c00000 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_system_bus>;
+               };
 
-&sys_clk {
-       compatible = "socionext,uniphier-pro5-clock";
-};
+               smpctrl@59800000 {
+                       compatible = "socionext,uniphier-smpctrl";
+                       reg = <0x59801000 0x400>;
+               };
 
-&sys_rst {
-       compatible = "socionext,uniphier-pro5-reset";
+               sdctrl@59810000 {
+                       compatible = "socionext,uniphier-pro5-sdctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59810000 0x800>;
+
+                       sd_clk: clock {
+                               compatible = "socionext,uniphier-pro5-sd-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       sd_rst: reset {
+                               compatible = "socionext,uniphier-pro5-sd-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               perictrl@59820000 {
+                       compatible = "socionext,uniphier-pro5-perictrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59820000 0x200>;
+
+                       peri_clk: clock {
+                               compatible = "socionext,uniphier-pro5-peri-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       peri_rst: reset {
+                               compatible = "socionext,uniphier-pro5-peri-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               soc-glue@5f800000 {
+                       compatible = "socionext,uniphier-pro5-soc-glue",
+                                    "simple-mfd", "syscon";
+                       reg = <0x5f800000 0x2000>;
+
+                       pinctrl: pinctrl {
+                               compatible = "socionext,uniphier-pro5-pinctrl";
+                       };
+               };
+
+               timer@60000200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x60000200 0x20>;
+                       interrupts = <1 11 0x304>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               timer@60000600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x60000600 0x20>;
+                       interrupts = <1 13 0x304>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               intc: interrupt-controller@60001000 {
+                       compatible = "arm,cortex-a9-gic";
+                       reg = <0x60001000 0x1000>,
+                             <0x60000100 0x100>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+               };
+
+               sysctrl@61840000 {
+                       compatible = "socionext,uniphier-pro5-sysctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x61840000 0x10000>;
+
+                       sys_clk: clock {
+                               compatible = "socionext,uniphier-pro5-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       sys_rst: reset {
+                               compatible = "socionext,uniphier-pro5-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+       };
 };
+
+/include/ "uniphier-pinctrl.dtsi"
index 8789cd518933dbaf1564e0e333867fdc4f73d6e4..e9e031d63c1ab694bfe5d81ce72ebe4505f18149 100644 (file)
@@ -43,7 +43,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "uniphier-common32.dtsi"
+/include/ "skeleton.dtsi"
 
 / {
        compatible = "socionext,uniphier-pxs2";
@@ -56,170 +56,339 @@ cpu@0 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
+                       clocks = <&sys_clk 32>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       operating-points-v2 = <&cpu_opp>;
                };
 
                cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <1>;
+                       clocks = <&sys_clk 32>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       operating-points-v2 = <&cpu_opp>;
                };
 
                cpu@2 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <2>;
+                       clocks = <&sys_clk 32>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       operating-points-v2 = <&cpu_opp>;
                };
 
                cpu@3 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <3>;
+                       clocks = <&sys_clk 32>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       operating-points-v2 = <&cpu_opp>;
                };
        };
 
+       cpu_opp: opp_table {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp@100000000 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@150000000 {
+                       opp-hz = /bits/ 64 <150000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@200000000 {
+                       opp-hz = /bits/ 64 <200000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@300000000 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@400000000 {
+                       opp-hz = /bits/ 64 <400000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@800000000 {
+                       opp-hz = /bits/ 64 <800000000>;
+                       clock-latency-ns = <300>;
+               };
+               opp@1200000000 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       clock-latency-ns = <300>;
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
        clocks {
+               refclk: ref {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <25000000>;
+               };
+
                arm_timer_clk: arm_timer_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <50000000>;
                };
        };
-};
-
-&soc {
-       l2: l2-cache@500c0000 {
-               compatible = "socionext,uniphier-system-cache";
-               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
-               interrupts = <0 174 4>, <0 175 4>, <0 190 4>, <0 191 4>;
-               cache-unified;
-               cache-size = <(1280 * 1024)>;
-               cache-sets = <512>;
-               cache-line-size = <128>;
-               cache-level = <2>;
-       };
 
-       i2c0: i2c@58780000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58780000 0x80>;
+       soc {
+               compatible = "simple-bus";
                #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 41 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c0>;
-               clocks = <&peri_clk 4>;
-               clock-frequency = <100000>;
-       };
+               #size-cells = <1>;
+               ranges;
+               interrupt-parent = <&intc>;
 
-       i2c1: i2c@58781000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58781000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 42 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c1>;
-               clocks = <&peri_clk 5>;
-               clock-frequency = <100000>;
-       };
+               l2: l2-cache@500c0000 {
+                       compatible = "socionext,uniphier-system-cache";
+                       reg = <0x500c0000 0x2000>, <0x503c0100 0x8>,
+                             <0x506c0000 0x400>;
+                       interrupts = <0 174 4>, <0 175 4>, <0 190 4>, <0 191 4>;
+                       cache-unified;
+                       cache-size = <(1280 * 1024)>;
+                       cache-sets = <512>;
+                       cache-line-size = <128>;
+                       cache-level = <2>;
+               };
 
-       i2c2: i2c@58782000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58782000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c2>;
-               interrupts = <0 43 4>;
-               clocks = <&peri_clk 6>;
-               clock-frequency = <100000>;
-       };
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&peri_clk 0>;
+               };
 
-       i2c3: i2c@58783000 {
-               compatible = "socionext,uniphier-fi2c";
-               status = "disabled";
-               reg = <0x58783000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 44 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c3>;
-               clocks = <&peri_clk 7>;
-               clock-frequency = <100000>;
-       };
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&peri_clk 1>;
+               };
 
-       /* chip-internal connection for DMD */
-       i2c4: i2c@58784000 {
-               compatible = "socionext,uniphier-fi2c";
-               reg = <0x58784000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 45 4>;
-               clocks = <&peri_clk 8>;
-               clock-frequency = <400000>;
-       };
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&peri_clk 2>;
+               };
 
-       /* chip-internal connection for STM */
-       i2c5: i2c@58785000 {
-               compatible = "socionext,uniphier-fi2c";
-               reg = <0x58785000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 25 4>;
-               clocks = <&peri_clk 9>;
-               clock-frequency = <400000>;
-       };
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 177 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&peri_clk 3>;
+               };
 
-       /* chip-internal connection for HDMI */
-       i2c6: i2c@58786000 {
-               compatible = "socionext,uniphier-fi2c";
-               reg = <0x58786000 0x80>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 26 4>;
-               clocks = <&peri_clk 10>;
-               clock-frequency = <400000>;
-       };
-};
+               i2c0: i2c@58780000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58780000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 41 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c0>;
+                       clocks = <&peri_clk 4>;
+                       clock-frequency = <100000>;
+               };
 
-&refclk {
-       clock-frequency = <25000000>;
-};
+               i2c1: i2c@58781000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58781000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 42 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c1>;
+                       clocks = <&peri_clk 5>;
+                       clock-frequency = <100000>;
+               };
 
-&mio_clk {
-       compatible = "socionext,uniphier-pxs2-mio-clock";
-};
+               i2c2: i2c@58782000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58782000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 43 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c2>;
+                       clocks = <&peri_clk 6>;
+                       clock-frequency = <100000>;
+               };
 
-&mio_rst {
-       compatible = "socionext,uniphier-pxs2-mio-reset";
-};
+               i2c3: i2c@58783000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58783000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 44 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c3>;
+                       clocks = <&peri_clk 7>;
+                       clock-frequency = <100000>;
+               };
 
-&peri_clk {
-       compatible = "socionext,uniphier-pxs2-peri-clock";
-};
+               /* chip-internal connection for DMD */
+               i2c4: i2c@58784000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58784000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 45 4>;
+                       clocks = <&peri_clk 8>;
+                       clock-frequency = <400000>;
+               };
 
-&peri_rst {
-       compatible = "socionext,uniphier-pxs2-peri-reset";
-};
+               /* chip-internal connection for STM */
+               i2c5: i2c@58785000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58785000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 25 4>;
+                       clocks = <&peri_clk 9>;
+                       clock-frequency = <400000>;
+               };
 
-&pinctrl {
-       compatible = "socionext,uniphier-pxs2-pinctrl";
-};
+               /* chip-internal connection for HDMI */
+               i2c6: i2c@58786000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58786000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 26 4>;
+                       clocks = <&peri_clk 10>;
+                       clock-frequency = <400000>;
+               };
 
-&sys_clk {
-       compatible = "socionext,uniphier-pxs2-clock";
-};
+               system_bus: system-bus@58c00000 {
+                       compatible = "socionext,uniphier-system-bus";
+                       status = "disabled";
+                       reg = <0x58c00000 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_system_bus>;
+               };
+
+               smpctrl@59800000 {
+                       compatible = "socionext,uniphier-smpctrl";
+                       reg = <0x59801000 0x400>;
+               };
+
+               sdctrl@59810000 {
+                       compatible = "socionext,uniphier-pxs2-sdctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59810000 0x800>;
 
-&sys_rst {
-       compatible = "socionext,uniphier-pxs2-reset";
+                       sd_clk: clock {
+                               compatible = "socionext,uniphier-pxs2-sd-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       sd_rst: reset {
+                               compatible = "socionext,uniphier-pxs2-sd-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               perictrl@59820000 {
+                       compatible = "socionext,uniphier-pxs2-perictrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59820000 0x200>;
+
+                       peri_clk: clock {
+                               compatible = "socionext,uniphier-pxs2-peri-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       peri_rst: reset {
+                               compatible = "socionext,uniphier-pxs2-peri-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               soc-glue@5f800000 {
+                       compatible = "socionext,uniphier-pxs2-soc-glue",
+                                    "simple-mfd", "syscon";
+                       reg = <0x5f800000 0x2000>;
+
+                       pinctrl: pinctrl {
+                               compatible = "socionext,uniphier-pxs2-pinctrl";
+                       };
+               };
+
+               timer@60000200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x60000200 0x20>;
+                       interrupts = <1 11 0xf04>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               timer@60000600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x60000600 0x20>;
+                       interrupts = <1 13 0xf04>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               intc: interrupt-controller@60001000 {
+                       compatible = "arm,cortex-a9-gic";
+                       reg = <0x60001000 0x1000>,
+                             <0x60000100 0x100>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+               };
+
+               sysctrl@61840000 {
+                       compatible = "socionext,uniphier-pxs2-sysctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x61840000 0x10000>;
+
+                       sys_clk: clock {
+                               compatible = "socionext,uniphier-pxs2-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       sys_rst: reset {
+                               compatible = "socionext,uniphier-pxs2-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+       };
 };
+
+/include/ "uniphier-pinctrl.dtsi"
index 5fa96c939b5c253dd76cb1c730ad9f532b358486..9fad6bd2db8aa72d3f8c186cfc035326418dbbb8 100644 (file)
@@ -135,7 +135,6 @@ serial0: serial@54006800 {
                        reg = <0x54006800 0x40>;
                        interrupts = <0 33 4>;
                        clocks = <&sys_clk 0>;
-                       fifo-size = <64>;
                };
 
                serial1: serial@54006900 {
@@ -144,7 +143,6 @@ serial1: serial@54006900 {
                        reg = <0x54006900 0x40>;
                        interrupts = <0 35 4>;
                        clocks = <&sys_clk 0>;
-                       fifo-size = <64>;
                };
 
                serial2: serial@54006a00 {
@@ -153,7 +151,6 @@ serial2: serial@54006a00 {
                        reg = <0x54006a00 0x40>;
                        interrupts = <0 37 4>;
                        clocks = <&sys_clk 0>;
-                       fifo-size = <64>;
                };
 
                i2c0: i2c@58400000 {
@@ -225,7 +222,7 @@ smpctrl@59800000 {
                };
 
                mioctrl@59810000 {
-                       compatible = "socionext,uniphier-mioctrl",
+                       compatible = "socionext,uniphier-sld3-mioctrl",
                                     "simple-mfd", "syscon";
                        reg = <0x59810000 0x800>;
 
@@ -245,6 +242,9 @@ usb0: usb@5a800100 {
                        status = "disabled";
                        reg = <0x5a800100 0x100>;
                        interrupts = <0 80 4>;
+                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
+                                <&mio_rst 12>;
                };
 
                usb1: usb@5a810100 {
@@ -252,6 +252,9 @@ usb1: usb@5a810100 {
                        status = "disabled";
                        reg = <0x5a810100 0x100>;
                        interrupts = <0 81 4>;
+                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
+                                <&mio_rst 13>;
                };
 
                usb2: usb@5a820100 {
@@ -259,6 +262,9 @@ usb2: usb@5a820100 {
                        status = "disabled";
                        reg = <0x5a820100 0x100>;
                        interrupts = <0 82 4>;
+                       clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 10>,
+                                <&mio_rst 14>;
                };
 
                usb3: usb@5a830100 {
@@ -266,12 +272,15 @@ usb3: usb@5a830100 {
                        status = "disabled";
                        reg = <0x5a830100 0x100>;
                        interrupts = <0 83 4>;
+                       clocks = <&mio_clk 7>, <&mio_clk 11>, <&mio_clk 15>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 11>,
+                                <&mio_rst 15>;
                };
 
                sysctrl@f1840000 {
-                       compatible = "socionext,uniphier-sysctrl",
+                       compatible = "socionext,uniphier-sld3-sysctrl",
                                     "simple-mfd", "syscon";
-                       reg = <0xf1840000 0x4000>;
+                       reg = <0xf1840000 0x10000>;
 
                        sys_clk: clock {
                                compatible = "socionext,uniphier-sld3-clock";
index d8cf0e7e11ea186ef135780d642808e6e47bf84e..b2c980ead7f082e60bd951b7c8c355a3c94e4020 100644 (file)
@@ -43,7 +43,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "uniphier-common32.dtsi"
+/include/ "skeleton.dtsi"
 
 / {
        compatible = "socionext,uniphier-sld8";
@@ -61,146 +61,267 @@ cpu@0 {
                };
        };
 
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
        clocks {
+               refclk: ref {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <25000000>;
+               };
+
                arm_timer_clk: arm_timer_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <50000000>;
                };
        };
-};
-
-&soc {
-       l2: l2-cache@500c0000 {
-               compatible = "socionext,uniphier-system-cache";
-               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
-               interrupts = <0 174 4>, <0 175 4>;
-               cache-unified;
-               cache-size = <(256 * 1024)>;
-               cache-sets = <256>;
-               cache-line-size = <128>;
-               cache-level = <2>;
-       };
 
-       i2c0: i2c@58400000 {
-               compatible = "socionext,uniphier-i2c";
-               status = "disabled";
-               reg = <0x58400000 0x40>;
+       soc {
+               compatible = "simple-bus";
                #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 41 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c0>;
-               clocks = <&peri_clk 4>;
-               clock-frequency = <100000>;
-       };
+               #size-cells = <1>;
+               ranges;
+               interrupt-parent = <&intc>;
 
-       i2c1: i2c@58480000 {
-               compatible = "socionext,uniphier-i2c";
-               status = "disabled";
-               reg = <0x58480000 0x40>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 42 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c1>;
-               clocks = <&peri_clk 5>;
-               clock-frequency = <100000>;
-       };
+               l2: l2-cache@500c0000 {
+                       compatible = "socionext,uniphier-system-cache";
+                       reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
+                             <0x506c0000 0x400>;
+                       interrupts = <0 174 4>, <0 175 4>;
+                       cache-unified;
+                       cache-size = <(256 * 1024)>;
+                       cache-sets = <256>;
+                       cache-line-size = <128>;
+                       cache-level = <2>;
+               };
 
-       /* chip-internal connection for DMD */
-       i2c2: i2c@58500000 {
-               compatible = "socionext,uniphier-i2c";
-               reg = <0x58500000 0x40>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 43 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c2>;
-               clocks = <&peri_clk 6>;
-               clock-frequency = <400000>;
-       };
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&peri_clk 0>;
+               };
 
-       i2c3: i2c@58580000 {
-               compatible = "socionext,uniphier-i2c";
-               status = "disabled";
-               reg = <0x58580000 0x40>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-               interrupts = <0 44 1>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_i2c3>;
-               clocks = <&peri_clk 7>;
-               clock-frequency = <100000>;
-       };
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&peri_clk 1>;
+               };
 
-       usb0: usb@5a800100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a800100 0x100>;
-               interrupts = <0 80 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb0>;
-               clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
-               resets = <&mio_rst 7>, <&mio_rst 8>, <&mio_rst 12>, <&sys_rst 8>;
-       };
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&peri_clk 2>;
+               };
 
-       usb1: usb@5a810100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a810100 0x100>;
-               interrupts = <0 81 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb1>;
-               clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
-               resets = <&mio_rst 7>, <&mio_rst 9>, <&mio_rst 13>, <&sys_rst 8>;
-       };
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 29 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&peri_clk 3>;
+               };
 
-       usb2: usb@5a820100 {
-               compatible = "socionext,uniphier-ehci", "generic-ehci";
-               status = "disabled";
-               reg = <0x5a820100 0x100>;
-               interrupts = <0 82 4>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_usb2>;
-               clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
-               resets = <&mio_rst 7>, <&mio_rst 10>, <&mio_rst 14>, <&sys_rst 8>;
-       };
-};
+               i2c0: i2c@58400000 {
+                       compatible = "socionext,uniphier-i2c";
+                       status = "disabled";
+                       reg = <0x58400000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 41 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c0>;
+                       clocks = <&peri_clk 4>;
+                       clock-frequency = <100000>;
+               };
 
-&refclk {
-       clock-frequency = <25000000>;
-};
+               i2c1: i2c@58480000 {
+                       compatible = "socionext,uniphier-i2c";
+                       status = "disabled";
+                       reg = <0x58480000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 42 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c1>;
+                       clocks = <&peri_clk 5>;
+                       clock-frequency = <100000>;
+               };
 
-&serial3 {
-       interrupts = <0 29 4>;
-};
+               /* chip-internal connection for DMD */
+               i2c2: i2c@58500000 {
+                       compatible = "socionext,uniphier-i2c";
+                       reg = <0x58500000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 43 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c2>;
+                       clocks = <&peri_clk 6>;
+                       clock-frequency = <400000>;
+               };
 
-&mio_clk {
-       compatible = "socionext,uniphier-sld8-mio-clock";
-};
+               i2c3: i2c@58580000 {
+                       compatible = "socionext,uniphier-i2c";
+                       status = "disabled";
+                       reg = <0x58580000 0x40>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 44 1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c3>;
+                       clocks = <&peri_clk 7>;
+                       clock-frequency = <100000>;
+               };
 
-&mio_rst {
-       compatible = "socionext,uniphier-sld8-mio-reset";
-       resets = <&sys_rst 7>;
-};
+               system_bus: system-bus@58c00000 {
+                       compatible = "socionext,uniphier-system-bus";
+                       status = "disabled";
+                       reg = <0x58c00000 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_system_bus>;
+               };
 
-&peri_clk {
-       compatible = "socionext,uniphier-sld8-peri-clock";
-};
+               smpctrl@59800000 {
+                       compatible = "socionext,uniphier-smpctrl";
+                       reg = <0x59801000 0x400>;
+               };
 
-&peri_rst {
-       compatible = "socionext,uniphier-sld8-peri-reset";
-};
+               mioctrl@59810000 {
+                       compatible = "socionext,uniphier-sld8-mioctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59810000 0x800>;
 
-&pinctrl {
-       compatible = "socionext,uniphier-sld8-pinctrl";
-};
+                       mio_clk: clock {
+                               compatible = "socionext,uniphier-sld8-mio-clock";
+                               #clock-cells = <1>;
+                       };
 
-&sys_clk {
-       compatible = "socionext,uniphier-sld8-clock";
-};
+                       mio_rst: reset {
+                               compatible = "socionext,uniphier-sld8-mio-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               perictrl@59820000 {
+                       compatible = "socionext,uniphier-sld8-perictrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x59820000 0x200>;
+
+                       peri_clk: clock {
+                               compatible = "socionext,uniphier-sld8-peri-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       peri_rst: reset {
+                               compatible = "socionext,uniphier-sld8-peri-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               usb0: usb@5a800100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a800100 0x100>;
+                       interrupts = <0 80 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb0>;
+                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
+                                <&mio_rst 12>;
+               };
+
+               usb1: usb@5a810100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a810100 0x100>;
+                       interrupts = <0 81 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb1>;
+                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
+                                <&mio_rst 13>;
+               };
+
+               usb2: usb@5a820100 {
+                       compatible = "socionext,uniphier-ehci", "generic-ehci";
+                       status = "disabled";
+                       reg = <0x5a820100 0x100>;
+                       interrupts = <0 82 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb2>;
+                       clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
+                       resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 10>,
+                                <&mio_rst 14>;
+               };
 
-&sys_rst {
-       compatible = "socionext,uniphier-sld8-reset";
+               soc-glue@5f800000 {
+                       compatible = "socionext,uniphier-sld8-soc-glue",
+                                    "simple-mfd", "syscon";
+                       reg = <0x5f800000 0x2000>;
+
+                       pinctrl: pinctrl {
+                               compatible = "socionext,uniphier-sld8-pinctrl";
+                       };
+               };
+
+               timer@60000200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x60000200 0x20>;
+                       interrupts = <1 11 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               timer@60000600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x60000600 0x20>;
+                       interrupts = <1 13 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               intc: interrupt-controller@60001000 {
+                       compatible = "arm,cortex-a9-gic";
+                       reg = <0x60001000 0x1000>,
+                             <0x60000100 0x100>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+               };
+
+               sysctrl@61840000 {
+                       compatible = "socionext,uniphier-sld8-sysctrl",
+                                    "simple-mfd", "syscon";
+                       reg = <0x61840000 0x10000>;
+
+                       sys_clk: clock {
+                               compatible = "socionext,uniphier-sld8-clock";
+                               #clock-cells = <1>;
+                       };
+
+                       sys_rst: reset {
+                               compatible = "socionext,uniphier-sld8-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+       };
 };
+
+/include/ "uniphier-pinctrl.dtsi"
index 0205c97efdefac2e9c45a0a24d9eeae282261a12..45d08cc37b0134c71b11bb580fb574386b46c47b 100644 (file)
@@ -39,6 +39,7 @@ cpu0: cpu@0 {
                        reg = <0>;
                        cci-control-port = <&cci_control1>;
                        cpu-idle-states = <&CLUSTER_SLEEP_BIG>;
+                       capacity-dmips-mhz = <1024>;
                };
 
                cpu1: cpu@1 {
@@ -47,6 +48,7 @@ cpu1: cpu@1 {
                        reg = <1>;
                        cci-control-port = <&cci_control1>;
                        cpu-idle-states = <&CLUSTER_SLEEP_BIG>;
+                       capacity-dmips-mhz = <1024>;
                };
 
                cpu2: cpu@2 {
@@ -55,6 +57,7 @@ cpu2: cpu@2 {
                        reg = <0x100>;
                        cci-control-port = <&cci_control2>;
                        cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>;
+                       capacity-dmips-mhz = <516>;
                };
 
                cpu3: cpu@3 {
@@ -63,6 +66,7 @@ cpu3: cpu@3 {
                        reg = <0x101>;
                        cci-control-port = <&cci_control2>;
                        cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>;
+                       capacity-dmips-mhz = <516>;
                };
 
                cpu4: cpu@4 {
@@ -71,6 +75,7 @@ cpu4: cpu@4 {
                        reg = <0x102>;
                        cci-control-port = <&cci_control2>;
                        cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>;
+                       capacity-dmips-mhz = <516>;
                };
 
                idle-states {
index b7417094dc11c32578856090b2bfc22f4df6ddb8..21bfef957b68bf2f6643c79be43d18ba2b352ac3 100644 (file)
@@ -108,6 +108,10 @@ &edma0 {
        status = "okay";
 };
 
+&edma1 {
+       status = "okay";
+};
+
 &esdhc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_esdhc1>;
index a3824e61bd72c7cb57ed643519661efe02e0c1fe..d7fdb2a7d97b696458a0ccc892d727fcc2d0f236 100644 (file)
@@ -70,7 +70,7 @@ intc: interrupt-controller@40002000 {
                        global_timer: timer@40002200 {
                                compatible = "arm,cortex-a9-global-timer";
                                reg = <0x40002200 0x20>;
-                               interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
                                interrupt-parent = <&intc>;
                                clocks = <&clks VF610_CLK_PLATFORM_BUS>;
                        };
index 5c1fcab4a6f78d9f340f67b1805427933cea5ad6..fa19cfdc33fb7c4f330c10abcff2a7cb9f43de86 100644 (file)
@@ -499,13 +499,6 @@ i2c@4 {
        };
 };
 
-&i2c3 {
-       clock-frequency = <100000>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_i2c3>;
-       status = "okay";
-};
-
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart0>;
@@ -663,13 +656,6 @@ VF610_PAD_PTA23__I2C2_SDA  0x37ff
                >;
        };
 
-       pinctrl_i2c3: i2c3grp {
-               fsl,pins = <
-                       VF610_PAD_PTA30__I2C3_SCL       0x37ff
-                       VF610_PAD_PTA31__I2C3_SDA       0x37ff
-               >;
-       };
-
        pinctrl_leds_debug: pinctrl-leds-debug {
                fsl,pins = <
                         VF610_PAD_PTD20__GPIO_74       0x31c2
index 2c13ec696ac541f96d781c5a94c251bad36e481a..e9d28474c26a0d5227ba46312ab73399fc8f3a7d 100644 (file)
@@ -194,6 +194,9 @@ dspi0: dspi0@4002c000 {
                                clocks = <&clks VF610_CLK_DSPI0>;
                                clock-names = "dspi";
                                spi-num-chipselects = <6>;
+                               dmas = <&edma1 1 12>,
+                                       <&edma1 1 13>;
+                               dma-names = "rx", "tx";
                                status = "disabled";
                        };
 
@@ -206,6 +209,9 @@ dspi1: dspi1@4002d000 {
                                clocks = <&clks VF610_CLK_DSPI1>;
                                clock-names = "dspi";
                                spi-num-chipselects = <4>;
+                               dmas = <&edma1 1 14>,
+                                       <&edma1 1 15>;
+                               dma-names = "rx", "tx";
                                status = "disabled";
                        };
 
@@ -520,6 +526,12 @@ edma1: dma-controller@40098000 {
                                status = "disabled";
                        };
 
+                       ocotp: ocotp@400a5000 {
+                               compatible = "fsl,vf610-ocotp";
+                               reg = <0x400a5000 0x1000>;
+                               clocks = <&clks VF610_CLK_OCOTP>;
+                       };
+
                        snvs0: snvs@400a7000 {
                            compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
                                reg = <0x400a7000 0x2000>;
@@ -561,6 +573,9 @@ dspi2: dspi2@400ac000 {
                                clocks = <&clks VF610_CLK_DSPI2>;
                                clock-names = "dspi";
                                spi-num-chipselects = <2>;
+                               dmas = <&edma1 0 10>,
+                                       <&edma1 0 11>;
+                               dma-names = "rx", "tx";
                                status = "disabled";
                        };
 
@@ -573,6 +588,9 @@ dspi3: dspi3@400ad000 {
                                clocks = <&clks VF610_CLK_DSPI3>;
                                clock-names = "dspi";
                                spi-num-chipselects = <2>;
+                               dmas = <&edma1 0 12>,
+                                       <&edma1 0 13>;
+                               dma-names = "rx", "tx";
                                status = "disabled";
                        };
 
index 437d0740dec604a24dbbcccf8bdbbbb4cc411f85..11f37ed1dbfffbdcc9475bc59ce1743a30b2615a 100644 (file)
@@ -850,6 +850,7 @@ CONFIG_PWM_SUN4I=y
 CONFIG_PWM_TEGRA=y
 CONFIG_PWM_VT8500=y
 CONFIG_PHY_HIX5HD2_SATA=y
+CONFIG_E1000E=y
 CONFIG_PWM_STI=y
 CONFIG_PWM_BCM2835=y
 CONFIG_PWM_BRCMSTB=m
index 03e9273f18765b039179dd87c0931d4d30b567c4..08bb84f2ad58e6be8caf539f6d8189c1b450cfa1 100644 (file)
@@ -1312,6 +1312,13 @@ static int init_hyp_mode(void)
                goto out_err;
        }
 
+       err = create_hyp_mappings(kvm_ksym_ref(__bss_start),
+                                 kvm_ksym_ref(__bss_stop), PAGE_HYP_RO);
+       if (err) {
+               kvm_err("Cannot map bss section\n");
+               goto out_err;
+       }
+
        /*
         * Map the Hyp stack pages
         */
index 0df062d8b2c942f84a31a923e0a4f221c6c9366d..b54db47f6f322d358f7742ecc7e17b23e0c2b667 100644 (file)
@@ -408,7 +408,7 @@ static struct genpd_onecell_data imx_gpc_onecell_data = {
 static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg)
 {
        struct clk *clk;
-       int i;
+       int i, ret;
 
        imx6q_pu_domain.reg = pu_reg;
 
@@ -430,13 +430,22 @@ static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg)
        if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS))
                return 0;
 
-       pm_genpd_init(&imx6q_pu_domain.base, NULL, false);
-       return of_genpd_add_provider_onecell(dev->of_node,
+       for (i = 0; i < ARRAY_SIZE(imx_gpc_domains); i++)
+               pm_genpd_init(imx_gpc_domains[i], NULL, false);
+
+       ret =  of_genpd_add_provider_onecell(dev->of_node,
                                             &imx_gpc_onecell_data);
+       if (ret)
+               goto power_off;
+
+       return 0;
 
+power_off:
+       imx6q_pm_pu_power_off(&imx6q_pu_domain.base);
 clk_err:
        while (i--)
                clk_put(imx6q_pu_domain.clk[i]);
+       imx6q_pu_domain.reg = NULL;
        return -EINVAL;
 }
 
index 97fd25105e2c0d1e0e1bb5a0a14471e4be0842f6..45801b27ee5ced633fae6a7c6ca238cf203f0056 100644 (file)
@@ -173,7 +173,7 @@ static void __init imx6q_enet_phy_init(void)
                                ksz9021rn_phy_fixup);
                phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
                                ksz9031rn_phy_fixup);
-               phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffff,
+               phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffef,
                                ar8031_phy_fixup);
                phy_register_fixup_for_uid(PHY_ID_AR8035, 0xffffffef,
                                ar8035_phy_fixup);
index f9b6bd306cfea8fc29d48485e47b60c701b21df3..541647f5719255cfd755a22b0435f97426e92612 100644 (file)
@@ -23,6 +23,7 @@ config MACH_MVEBU_V7
        select CACHE_L2X0
        select ARM_CPU_SUSPEND
        select MACH_MVEBU_ANY
+       select MVEBU_CLK_COREDIV
 
 config MACH_ARMADA_370
        bool "Marvell Armada 370 boards"
@@ -32,7 +33,6 @@ config MACH_ARMADA_370
        select CPU_PJ4B
        select MACH_MVEBU_V7
        select PINCTRL_ARMADA_370
-       select MVEBU_CLK_COREDIV
        help
          Say 'Y' here if you want your kernel to support boards based
          on the Marvell Armada 370 SoC with device tree.
@@ -50,7 +50,6 @@ config MACH_ARMADA_375
        select HAVE_SMP
        select MACH_MVEBU_V7
        select PINCTRL_ARMADA_375
-       select MVEBU_CLK_COREDIV
        help
          Say 'Y' here if you want your kernel to support boards based
          on the Marvell Armada 375 SoC with device tree.
@@ -68,7 +67,6 @@ config MACH_ARMADA_38X
        select HAVE_SMP
        select MACH_MVEBU_V7
        select PINCTRL_ARMADA_38X
-       select MVEBU_CLK_COREDIV
        help
          Say 'Y' here if you want your kernel to support boards based
          on the Marvell Armada 380/385 SoC with device tree.
index 82dddee3a469be64a585b0d3c69003aec87ff543..3930fbba30b4b3ccedd2039c552c5956cdd8d84a 100644 (file)
@@ -1,6 +1,7 @@
 config ARCH_UNIPHIER
        bool "Socionext UniPhier SoCs"
        depends on ARCH_MULTI_V7
+       select ARCH_HAS_RESET_CONTROLLER
        select ARM_AMBA
        select ARM_GLOBAL_TIMER
        select ARM_GIC
index 30398dbc940a2218a2e9d792cb10b463a2d194c0..969ef880d234e3b340713948eb2e9aec8ba0b3a3 100644 (file)
@@ -915,7 +915,7 @@ config RANDOMIZE_BASE
 
 config RANDOMIZE_MODULE_REGION_FULL
        bool "Randomize the module region independently from the core kernel"
-       depends on RANDOMIZE_BASE
+       depends on RANDOMIZE_BASE && !DYNAMIC_FTRACE
        default y
        help
          Randomizes the location of the module region without considering the
index cfbdf02ef5667683e603f3669308a81c7212c6b2..101794f5ce1008b7ff007fbfc7fa23d9e63bae67 100644 (file)
@@ -190,6 +190,7 @@ config ARCH_THUNDER
 
 config ARCH_UNIPHIER
        bool "Socionext UniPhier SoC Family"
+       select ARCH_HAS_RESET_CONTROLLER
        select PINCTRL
        help
          This enables support for Socionext UniPhier SoC family.
index ab51aed6b6c18eb362f8dc65621f932bed0dc7b8..3635b8662724569d3338ebb620d603c644fe38b7 100644 (file)
@@ -15,7 +15,7 @@ CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
 GZFLAGS                :=-9
 
 ifneq ($(CONFIG_RELOCATABLE),)
-LDFLAGS_vmlinux                += -pie -Bsymbolic
+LDFLAGS_vmlinux                += -pie -shared -Bsymbolic
 endif
 
 ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
index 2d7872a36b91232c1007358dfdea212052dac0b1..b09f3bc5c6c16fad4a3491dd094119002845bbef 100644 (file)
@@ -164,6 +164,8 @@ nandcs@0 {
                nand-ecc-mode = "hw";
                nand-ecc-strength = <8>;
                nand-ecc-step-size = <512>;
+               nand-bus-width = <16>;
+               brcm,nand-oob-sector-size = <16>;
                #address-cells = <1>;
                #size-cells = <1>;
        };
index 220ac7057d1284fa97d5ccf1787e09a2aafd60a4..97d331ec250013ba7c1d0d7b1b9de36881fe5ee4 100644 (file)
@@ -123,6 +123,7 @@ timer {
                             <1 14 0xf08>, /* Physical Non-Secure PPI */
                             <1 11 0xf08>, /* Virtual PPI */
                             <1 10 0xf08>; /* Hypervisor PPI */
+               fsl,erratum-a008585;
        };
 
        pmu {
index 337da90bd7dade6df0d74d49a9794b6b20cc8510..7f0dc13b4087f5a346fcb60e7ab40080d74c5500 100644 (file)
@@ -195,6 +195,7 @@ timer {
                             <1 14 4>, /* Physical Non-Secure PPI, active-low */
                             <1 11 4>, /* Virtual PPI, active-low */
                             <1 10 4>; /* Hypervisor PPI, active-low */
+               fsl,erratum-a008585;
        };
 
        pmu {
index 17839db585d5c8ec16f88fc6b8b383741bdd6eb3..8b5d42a90e89e811d1c4d1a8a6a5faba48758068 100644 (file)
@@ -364,6 +364,7 @@ pmx0: pinmux@f7010000 {
                        reg = <0x0 0xf7010000  0x0 0x27c>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       #pinctrl-cells = <1>;
                        #gpio-range-cells = <3>;
                        pinctrl-single,register-width = <32>;
                        pinctrl-single,function-mask = <7>;
@@ -402,6 +403,7 @@ pmx1: pinmux@f7010800 {
                        reg = <0x0 0xf7010800 0x0 0x28c>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       #pinctrl-cells = <1>;
                        pinctrl-single,register-width = <32>;
                };
 
@@ -410,6 +412,7 @@ pmx2: pinmux@f8001800 {
                        reg = <0x0 0xf8001800 0x0 0x78>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       #pinctrl-cells = <1>;
                        pinctrl-single,register-width = <32>;
                };
 
index e5e3ed678b6f1d37ecb71ff27d4135fb483dbd8f..602e2c2e9a4dd13a4d892dffa3dcd141b71d89bc 100644 (file)
@@ -131,7 +131,7 @@ cpm_spi0: spi@700600 {
                                #address-cells = <0x1>;
                                #size-cells = <0x0>;
                                cell-index = <1>;
-                               clocks = <&cpm_syscon0 0 3>;
+                               clocks = <&cpm_syscon0 1 21>;
                                status = "disabled";
                        };
 
index 1c71e256601dc44b9a2d30ce7cb54db8b4811ee7..6c03c1702bb32ff1766d478c872034d725e85e1b 100644 (file)
@@ -450,6 +450,9 @@ gic: interrupt-controller@10220000 {
                auxadc: auxadc@11001000 {
                        compatible = "mediatek,mt8173-auxadc";
                        reg = <0 0x11001000 0 0x1000>;
+                       clocks = <&pericfg CLK_PERI_AUXADC>;
+                       clock-names = "main";
+                       #io-channel-cells = <1>;
                };
 
                uart0: serial@11002000 {
index 46cdddfcea6c43ad30518d359babe7e094b943ac..e5eeca2c24565a76b10c64183e5d143ccbed810a 100644 (file)
@@ -116,7 +116,6 @@ &emmc {
        cap-mmc-highspeed;
        clock-frequency = <150000000>;
        disable-wp;
-       keep-power-in-suspend;
        non-removable;
        num-slots = <1>;
        vmmc-supply = <&vcc_io>;
@@ -258,8 +257,6 @@ vcc18_lcd: LDO_REG8 {
                        };
 
                        vcc_sd: SWITCH_REG1 {
-                               regulator-always-on;
-                               regulator-boot-on;
                                regulator-name = "vcc_sd";
                        };
 
index 5797933ef80e68454fca1eb5c8ed03dec566f434..ea0a8eceefd467968ce9f30c9e875481e4126345 100644 (file)
@@ -152,8 +152,6 @@ vcc_sd: vcc-sd-regulator {
                gpio = <&gpio3 11 GPIO_ACTIVE_LOW>;
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <3300000>;
-               regulator-always-on;
-               regulator-boot-on;
                vin-supply = <&vcc_io>;
        };
 
@@ -201,7 +199,6 @@ &emmc {
        bus-width = <8>;
        cap-mmc-highspeed;
        disable-wp;
-       keep-power-in-suspend;
        mmc-pwrseq = <&emmc_pwrseq>;
        mmc-hs200-1_2v;
        mmc-hs200-1_8v;
@@ -350,7 +347,6 @@ &sdmmc {
        clock-freq-min-max = <400000 50000000>;
        cap-sd-highspeed;
        card-detect-delay = <200>;
-       keep-power-in-suspend;
        num-slots = <1>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
index 08fd7cf7769cfd075b324c212c7aacddd67f48a1..56a1b2e92cf32e804c9a71abbf8308e8c8168526 100644 (file)
@@ -257,18 +257,18 @@ smpctrl@59800000 {
                        reg = <0x59801000 0x400>;
                };
 
-               mioctrl@59810000 {
-                       compatible = "socionext,uniphier-mioctrl",
+               sdctrl@59810000 {
+                       compatible = "socionext,uniphier-ld20-sdctrl",
                                     "simple-mfd", "syscon";
                        reg = <0x59810000 0x800>;
 
-                       mio_clk: clock {
-                               compatible = "socionext,uniphier-ld20-mio-clock";
+                       sd_clk: clock {
+                               compatible = "socionext,uniphier-ld20-sd-clock";
                                #clock-cells = <1>;
                        };
 
-                       mio_rst: reset {
-                               compatible = "socionext,uniphier-ld20-mio-reset";
+                       sd_rst: reset {
+                               compatible = "socionext,uniphier-ld20-sd-reset";
                                #reset-cells = <1>;
                        };
                };
index 758d74fedfad9bafe86835a56272deebf705e591..a27c3245ba218d7849f97a084265a9cf1168a01b 100644 (file)
@@ -94,7 +94,7 @@ struct arm64_cpu_capabilities {
        u16 capability;
        int def_scope;                  /* default scope */
        bool (*matches)(const struct arm64_cpu_capabilities *caps, int scope);
-       void (*enable)(void *);         /* Called on all active CPUs */
+       int (*enable)(void *);          /* Called on all active CPUs */
        union {
                struct {        /* To be used for erratum handling only */
                        u32 midr_model;
index db0563c23482d52175bf6c22f733410797122e36..f7865dd9d86854760e69ea71d30452625d6713ec 100644 (file)
@@ -18,6 +18,9 @@
 #ifndef __ASM_EXEC_H
 #define __ASM_EXEC_H
 
+#include <linux/sched.h>
+
 extern unsigned long arch_align_stack(unsigned long sp);
+void uao_thread_switch(struct task_struct *next);
 
 #endif /* __ASM_EXEC_H */
index fd9d5fd788f5f1df75febd7849bc89bc15eaf144..f5ea0ba70f077479ea9b2f4b1cb2fd077e9e20e3 100644 (file)
@@ -178,11 +178,6 @@ static inline bool kvm_vcpu_dabt_isvalid(const struct kvm_vcpu *vcpu)
        return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_ISV);
 }
 
-static inline bool kvm_vcpu_dabt_iswrite(const struct kvm_vcpu *vcpu)
-{
-       return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_WNR);
-}
-
 static inline bool kvm_vcpu_dabt_issext(const struct kvm_vcpu *vcpu)
 {
        return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_SSE);
@@ -203,6 +198,12 @@ static inline bool kvm_vcpu_dabt_iss1tw(const struct kvm_vcpu *vcpu)
        return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_S1PTW);
 }
 
+static inline bool kvm_vcpu_dabt_iswrite(const struct kvm_vcpu *vcpu)
+{
+       return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_WNR) ||
+               kvm_vcpu_dabt_iss1tw(vcpu); /* AF/DBM update */
+}
+
 static inline bool kvm_vcpu_dabt_is_cm(const struct kvm_vcpu *vcpu)
 {
        return !!(kvm_vcpu_get_hsr(vcpu) & ESR_ELx_CM);
index ba62df8c6e3540f8db0dcd86c26e4a9dbafb2a05..b71086d251954f7b72837899346525322dc5d724 100644 (file)
@@ -217,7 +217,7 @@ static inline void *phys_to_virt(phys_addr_t x)
 #define _virt_addr_valid(kaddr)        pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 #else
 #define __virt_to_pgoff(kaddr) (((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page))
-#define __page_to_voff(kaddr)  (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
+#define __page_to_voff(page)   (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
 
 #define page_to_virt(page)     ((void *)((__page_to_voff(page)) | PAGE_OFFSET))
 #define virt_to_page(vaddr)    ((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))
index e12af6754634b3d2aa031ae23ce25228dc766cfb..06ff7fd9e81feab27bb67f1a4af971ddc0ebf4cc 100644 (file)
@@ -17,6 +17,7 @@
 #define __ASM_MODULE_H
 
 #include <asm-generic/module.h>
+#include <asm/memory.h>
 
 #define MODULE_ARCH_VERMAGIC   "aarch64"
 
@@ -32,6 +33,10 @@ u64 module_emit_plt_entry(struct module *mod, const Elf64_Rela *rela,
                          Elf64_Sym *sym);
 
 #ifdef CONFIG_RANDOMIZE_BASE
+#ifdef CONFIG_MODVERSIONS
+#define ARCH_RELOCATES_KCRCTAB
+#define reloc_start            (kimage_vaddr - KIMAGE_VADDR)
+#endif
 extern u64 module_alloc_base;
 #else
 #define module_alloc_base      ((u64)_etext - MODULES_VSIZE)
index 2fee2f59288c94d70814771ed06fced11ede369d..5394c8405e6604bf612fd0c639c1f15a30d0f7d9 100644 (file)
@@ -44,48 +44,44 @@ static inline unsigned long __percpu_##op(void *ptr,                        \
                                                                        \
        switch (size) {                                                 \
        case 1:                                                         \
-               do {                                                    \
-                       asm ("//__per_cpu_" #op "_1\n"                  \
-                       "ldxrb    %w[ret], %[ptr]\n"                    \
+               asm ("//__per_cpu_" #op "_1\n"                          \
+               "1:     ldxrb     %w[ret], %[ptr]\n"                    \
                        #asm_op " %w[ret], %w[ret], %w[val]\n"          \
-                       "stxrb    %w[loop], %w[ret], %[ptr]\n"          \
-                       : [loop] "=&r" (loop), [ret] "=&r" (ret),       \
-                         [ptr] "+Q"(*(u8 *)ptr)                        \
-                       : [val] "Ir" (val));                            \
-               } while (loop);                                         \
+               "       stxrb     %w[loop], %w[ret], %[ptr]\n"          \
+               "       cbnz      %w[loop], 1b"                         \
+               : [loop] "=&r" (loop), [ret] "=&r" (ret),               \
+                 [ptr] "+Q"(*(u8 *)ptr)                                \
+               : [val] "Ir" (val));                                    \
                break;                                                  \
        case 2:                                                         \
-               do {                                                    \
-                       asm ("//__per_cpu_" #op "_2\n"                  \
-                       "ldxrh    %w[ret], %[ptr]\n"                    \
+               asm ("//__per_cpu_" #op "_2\n"                          \
+               "1:     ldxrh     %w[ret], %[ptr]\n"                    \
                        #asm_op " %w[ret], %w[ret], %w[val]\n"          \
-                       "stxrh    %w[loop], %w[ret], %[ptr]\n"          \
-                       : [loop] "=&r" (loop), [ret] "=&r" (ret),       \
-                         [ptr]  "+Q"(*(u16 *)ptr)                      \
-                       : [val] "Ir" (val));                            \
-               } while (loop);                                         \
+               "       stxrh     %w[loop], %w[ret], %[ptr]\n"          \
+               "       cbnz      %w[loop], 1b"                         \
+               : [loop] "=&r" (loop), [ret] "=&r" (ret),               \
+                 [ptr]  "+Q"(*(u16 *)ptr)                              \
+               : [val] "Ir" (val));                                    \
                break;                                                  \
        case 4:                                                         \
-               do {                                                    \
-                       asm ("//__per_cpu_" #op "_4\n"                  \
-                       "ldxr     %w[ret], %[ptr]\n"                    \
+               asm ("//__per_cpu_" #op "_4\n"                          \
+               "1:     ldxr      %w[ret], %[ptr]\n"                    \
                        #asm_op " %w[ret], %w[ret], %w[val]\n"          \
-                       "stxr     %w[loop], %w[ret], %[ptr]\n"          \
-                       : [loop] "=&r" (loop), [ret] "=&r" (ret),       \
-                         [ptr] "+Q"(*(u32 *)ptr)                       \
-                       : [val] "Ir" (val));                            \
-               } while (loop);                                         \
+               "       stxr      %w[loop], %w[ret], %[ptr]\n"          \
+               "       cbnz      %w[loop], 1b"                         \
+               : [loop] "=&r" (loop), [ret] "=&r" (ret),               \
+                 [ptr] "+Q"(*(u32 *)ptr)                               \
+               : [val] "Ir" (val));                                    \
                break;                                                  \
        case 8:                                                         \
-               do {                                                    \
-                       asm ("//__per_cpu_" #op "_8\n"                  \
-                       "ldxr     %[ret], %[ptr]\n"                     \
+               asm ("//__per_cpu_" #op "_8\n"                          \
+               "1:     ldxr      %[ret], %[ptr]\n"                     \
                        #asm_op " %[ret], %[ret], %[val]\n"             \
-                       "stxr     %w[loop], %[ret], %[ptr]\n"           \
-                       : [loop] "=&r" (loop), [ret] "=&r" (ret),       \
-                         [ptr] "+Q"(*(u64 *)ptr)                       \
-                       : [val] "Ir" (val));                            \
-               } while (loop);                                         \
+               "       stxr      %w[loop], %[ret], %[ptr]\n"           \
+               "       cbnz      %w[loop], 1b"                         \
+               : [loop] "=&r" (loop), [ret] "=&r" (ret),               \
+                 [ptr] "+Q"(*(u64 *)ptr)                               \
+               : [val] "Ir" (val));                                    \
                break;                                                  \
        default:                                                        \
                BUILD_BUG();                                            \
@@ -150,44 +146,40 @@ static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
 
        switch (size) {
        case 1:
-               do {
-                       asm ("//__percpu_xchg_1\n"
-                       "ldxrb %w[ret], %[ptr]\n"
-                       "stxrb %w[loop], %w[val], %[ptr]\n"
-                       : [loop] "=&r"(loop), [ret] "=&r"(ret),
-                         [ptr] "+Q"(*(u8 *)ptr)
-                       : [val] "r" (val));
-               } while (loop);
+               asm ("//__percpu_xchg_1\n"
+               "1:     ldxrb   %w[ret], %[ptr]\n"
+               "       stxrb   %w[loop], %w[val], %[ptr]\n"
+               "       cbnz    %w[loop], 1b"
+               : [loop] "=&r"(loop), [ret] "=&r"(ret),
+                 [ptr] "+Q"(*(u8 *)ptr)
+               : [val] "r" (val));
                break;
        case 2:
-               do {
-                       asm ("//__percpu_xchg_2\n"
-                       "ldxrh %w[ret], %[ptr]\n"
-                       "stxrh %w[loop], %w[val], %[ptr]\n"
-                       : [loop] "=&r"(loop), [ret] "=&r"(ret),
-                         [ptr] "+Q"(*(u16 *)ptr)
-                       : [val] "r" (val));
-               } while (loop);
+               asm ("//__percpu_xchg_2\n"
+               "1:     ldxrh   %w[ret], %[ptr]\n"
+               "       stxrh   %w[loop], %w[val], %[ptr]\n"
+               "       cbnz    %w[loop], 1b"
+               : [loop] "=&r"(loop), [ret] "=&r"(ret),
+                 [ptr] "+Q"(*(u16 *)ptr)
+               : [val] "r" (val));
                break;
        case 4:
-               do {
-                       asm ("//__percpu_xchg_4\n"
-                       "ldxr %w[ret], %[ptr]\n"
-                       "stxr %w[loop], %w[val], %[ptr]\n"
-                       : [loop] "=&r"(loop), [ret] "=&r"(ret),
-                         [ptr] "+Q"(*(u32 *)ptr)
-                       : [val] "r" (val));
-               } while (loop);
+               asm ("//__percpu_xchg_4\n"
+               "1:     ldxr    %w[ret], %[ptr]\n"
+               "       stxr    %w[loop], %w[val], %[ptr]\n"
+               "       cbnz    %w[loop], 1b"
+               : [loop] "=&r"(loop), [ret] "=&r"(ret),
+                 [ptr] "+Q"(*(u32 *)ptr)
+               : [val] "r" (val));
                break;
        case 8:
-               do {
-                       asm ("//__percpu_xchg_8\n"
-                       "ldxr %[ret], %[ptr]\n"
-                       "stxr %w[loop], %[val], %[ptr]\n"
-                       : [loop] "=&r"(loop), [ret] "=&r"(ret),
-                         [ptr] "+Q"(*(u64 *)ptr)
-                       : [val] "r" (val));
-               } while (loop);
+               asm ("//__percpu_xchg_8\n"
+               "1:     ldxr    %[ret], %[ptr]\n"
+               "       stxr    %w[loop], %[val], %[ptr]\n"
+               "       cbnz    %w[loop], 1b"
+               : [loop] "=&r"(loop), [ret] "=&r"(ret),
+                 [ptr] "+Q"(*(u64 *)ptr)
+               : [val] "r" (val));
                break;
        default:
                BUILD_BUG();
index df2e53d3a96959430568e8c23509f28cbf8c9142..60e34824e18c96b06c02930961c8ce51b82a90e2 100644 (file)
@@ -188,8 +188,8 @@ static inline void spin_lock_prefetch(const void *ptr)
 
 #endif
 
-void cpu_enable_pan(void *__unused);
-void cpu_enable_uao(void *__unused);
-void cpu_enable_cache_maint_trap(void *__unused);
+int cpu_enable_pan(void *__unused);
+int cpu_enable_uao(void *__unused);
+int cpu_enable_cache_maint_trap(void *__unused);
 
 #endif /* __ASM_PROCESSOR_H */
index e8d46e8e60791a8e3a3b785563e8949b8c0007ec..6c80b3699cb8a18c076634f710e031a5b3505647 100644 (file)
@@ -286,7 +286,7 @@ asm(
 
 #define write_sysreg_s(v, r) do {                                      \
        u64 __val = (u64)v;                                             \
-       asm volatile("msr_s " __stringify(r) ", %0" : : "rZ" (__val));  \
+       asm volatile("msr_s " __stringify(r) ", %x0" : : "rZ" (__val)); \
 } while (0)
 
 static inline void config_sctlr_el1(u32 clear, u32 set)
index bcaf6fba1b65bd559359c35e43a43339051c5cfe..55d0adbf65098a78241d45038d1a57f642a7992e 100644 (file)
@@ -21,6 +21,7 @@
 /*
  * User space memory access functions
  */
+#include <linux/bitops.h>
 #include <linux/kasan-checks.h>
 #include <linux/string.h>
 #include <linux/thread_info.h>
@@ -102,6 +103,13 @@ static inline void set_fs(mm_segment_t fs)
        flag;                                                           \
 })
 
+/*
+ * When dealing with data aborts or instruction traps we may end up with
+ * a tagged userland pointer. Clear the tag to get a sane pointer to pass
+ * on to access_ok(), for instance.
+ */
+#define untagged_addr(addr)            sign_extend64(addr, 55)
+
 #define access_ok(type, addr, size)    __range_ok(addr, size)
 #define user_addr_max                  get_fs
 
index 42ffdb54e162d64164ab9f515d1ce21a379fb3d7..b0988bb1bf648e0e322d1112880fedab706c6f32 100644 (file)
@@ -280,35 +280,43 @@ static void __init register_insn_emulation_sysctl(struct ctl_table *table)
 /*
  * Error-checking SWP macros implemented using ldxr{b}/stxr{b}
  */
-#define __user_swpX_asm(data, addr, res, temp, B)              \
+
+/* Arbitrary constant to ensure forward-progress of the LL/SC loop */
+#define __SWP_LL_SC_LOOPS      4
+
+#define __user_swpX_asm(data, addr, res, temp, temp2, B)       \
        __asm__ __volatile__(                                   \
+       "       mov             %w3, %w7\n"                     \
        ALTERNATIVE("nop", SET_PSTATE_PAN(0), ARM64_HAS_PAN,    \
                    CONFIG_ARM64_PAN)                           \
-       "0:     ldxr"B"         %w2, [%3]\n"                    \
-       "1:     stxr"B"         %w0, %w1, [%3]\n"               \
+       "0:     ldxr"B"         %w2, [%4]\n"                    \
+       "1:     stxr"B"         %w0, %w1, [%4]\n"               \
        "       cbz             %w0, 2f\n"                      \
-       "       mov             %w0, %w4\n"                     \
+       "       sub             %w3, %w3, #1\n"                 \
+       "       cbnz            %w3, 0b\n"                      \
+       "       mov             %w0, %w5\n"                     \
        "       b               3f\n"                           \
        "2:\n"                                                  \
        "       mov             %w1, %w2\n"                     \
        "3:\n"                                                  \
        "       .pushsection     .fixup,\"ax\"\n"               \
        "       .align          2\n"                            \
-       "4:     mov             %w0, %w5\n"                     \
+       "4:     mov             %w0, %w6\n"                     \
        "       b               3b\n"                           \
        "       .popsection"                                    \
        _ASM_EXTABLE(0b, 4b)                                    \
        _ASM_EXTABLE(1b, 4b)                                    \
        ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN,    \
                CONFIG_ARM64_PAN)                               \
-       : "=&r" (res), "+r" (data), "=&r" (temp)                \
-       : "r" (addr), "i" (-EAGAIN), "i" (-EFAULT)              \
+       : "=&r" (res), "+r" (data), "=&r" (temp), "=&r" (temp2) \
+       : "r" (addr), "i" (-EAGAIN), "i" (-EFAULT),             \
+         "i" (__SWP_LL_SC_LOOPS)                               \
        : "memory")
 
-#define __user_swp_asm(data, addr, res, temp) \
-       __user_swpX_asm(data, addr, res, temp, "")
-#define __user_swpb_asm(data, addr, res, temp) \
-       __user_swpX_asm(data, addr, res, temp, "b")
+#define __user_swp_asm(data, addr, res, temp, temp2) \
+       __user_swpX_asm(data, addr, res, temp, temp2, "")
+#define __user_swpb_asm(data, addr, res, temp, temp2) \
+       __user_swpX_asm(data, addr, res, temp, temp2, "b")
 
 /*
  * Bit 22 of the instruction encoding distinguishes between
@@ -328,12 +336,12 @@ static int emulate_swpX(unsigned int address, unsigned int *data,
        }
 
        while (1) {
-               unsigned long temp;
+               unsigned long temp, temp2;
 
                if (type == TYPE_SWPB)
-                       __user_swpb_asm(*data, address, res, temp);
+                       __user_swpb_asm(*data, address, res, temp, temp2);
                else
-                       __user_swp_asm(*data, address, res, temp);
+                       __user_swp_asm(*data, address, res, temp, temp2);
 
                if (likely(res != -EAGAIN) || signal_pending(current))
                        break;
index 0150394f4cabf2f34b27c88ee6575b0a9b7b4489..b75e917aac464290b523e1b3cc8cd7822364eeb7 100644 (file)
@@ -39,10 +39,11 @@ has_mismatched_cache_line_size(const struct arm64_cpu_capabilities *entry,
                (arm64_ftr_reg_ctrel0.sys_val & arm64_ftr_reg_ctrel0.strict_mask);
 }
 
-static void cpu_enable_trap_ctr_access(void *__unused)
+static int cpu_enable_trap_ctr_access(void *__unused)
 {
        /* Clear SCTLR_EL1.UCT */
        config_sctlr_el1(SCTLR_EL1_UCT, 0);
+       return 0;
 }
 
 #define MIDR_RANGE(model, min, max) \
index d577f263cc4aa46057e3b1ac210e23038e7d0e01..c02504ea304b701e1cc077388380079ac60f37d2 100644 (file)
@@ -19,7 +19,9 @@
 #define pr_fmt(fmt) "CPU features: " fmt
 
 #include <linux/bsearch.h>
+#include <linux/cpumask.h>
 #include <linux/sort.h>
+#include <linux/stop_machine.h>
 #include <linux/types.h>
 #include <asm/cpu.h>
 #include <asm/cpufeature.h>
@@ -941,7 +943,13 @@ void __init enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps)
 {
        for (; caps->matches; caps++)
                if (caps->enable && cpus_have_cap(caps->capability))
-                       on_each_cpu(caps->enable, NULL, true);
+                       /*
+                        * Use stop_machine() as it schedules the work allowing
+                        * us to modify PSTATE, instead of on_each_cpu() which
+                        * uses an IPI, giving us a PSTATE that disappears when
+                        * we return.
+                        */
+                       stop_machine(caps->enable, NULL, cpu_online_mask);
 }
 
 /*
index 427f6d3f084c30aeb35908155aae3af9aacadf2e..332e33193ccf1575727dfc8883644a5cfabd0e08 100644 (file)
@@ -586,8 +586,9 @@ CPU_LE(     movk    x0, #0x30d0, lsl #16    )       // Clear EE and E0E on LE systems
        b.lt    4f                              // Skip if no PMU present
        mrs     x0, pmcr_el0                    // Disable debug access traps
        ubfx    x0, x0, #11, #5                 // to EL2 and allow access to
-       msr     mdcr_el2, x0                    // all PMU counters from EL1
 4:
+       csel    x0, xzr, x0, lt                 // all PMU counters from EL1
+       msr     mdcr_el2, x0                    // (if they exist)
 
        /* Stage-2 translation */
        msr     vttbr_el2, xzr
index 27b2f1387df40b61b4aa059be5650d329964da6b..01753cd7d3f01d3551568d64612bd5a14843ac18 100644 (file)
@@ -49,6 +49,7 @@
 #include <asm/alternative.h>
 #include <asm/compat.h>
 #include <asm/cacheflush.h>
+#include <asm/exec.h>
 #include <asm/fpsimd.h>
 #include <asm/mmu_context.h>
 #include <asm/processor.h>
@@ -186,10 +187,19 @@ void __show_regs(struct pt_regs *regs)
        printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
               regs->pc, lr, regs->pstate);
        printk("sp : %016llx\n", sp);
-       for (i = top_reg; i >= 0; i--) {
+
+       i = top_reg;
+
+       while (i >= 0) {
                printk("x%-2d: %016llx ", i, regs->regs[i]);
-               if (i % 2 == 0)
-                       printk("\n");
+               i--;
+
+               if (i % 2 == 0) {
+                       pr_cont("x%-2d: %016llx ", i, regs->regs[i]);
+                       i--;
+               }
+
+               pr_cont("\n");
        }
        printk("\n");
 }
@@ -301,7 +311,7 @@ static void tls_thread_switch(struct task_struct *next)
 }
 
 /* Restore the UAO state depending on next's addr_limit */
-static void uao_thread_switch(struct task_struct *next)
+void uao_thread_switch(struct task_struct *next)
 {
        if (IS_ENABLED(CONFIG_ARM64_UAO)) {
                if (task_thread_info(next)->addr_limit == KERNEL_DS)
index b8799e7c79de51dac71c5f7485709177b7cd3b5d..1bec41b5fda3917b2ed7583663a239f25c6126bf 100644 (file)
@@ -135,7 +135,7 @@ ENTRY(_cpu_resume)
 
 #ifdef CONFIG_KASAN
        mov     x0, sp
-       bl      kasan_unpoison_remaining_stack
+       bl      kasan_unpoison_task_stack_below
 #endif
 
        ldp     x19, x20, [x29, #16]
index d3f151cfd4a1f800a58511ca0a8d10d37001b601..8507703dabe4a4cb521527456f14ba26855d5b43 100644 (file)
@@ -544,6 +544,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
                        return;
                }
                bootcpu_valid = true;
+               early_map_cpu_to_node(0, acpi_numa_get_nid(0, hwid));
                return;
        }
 
index ad734142070dcd143f3a7559ff50a044e93e95ac..bb0cd787a9d31dc4762d3a98257b3e11d8afe6f0 100644 (file)
@@ -1,8 +1,11 @@
 #include <linux/ftrace.h>
 #include <linux/percpu.h>
 #include <linux/slab.h>
+#include <asm/alternative.h>
 #include <asm/cacheflush.h>
+#include <asm/cpufeature.h>
 #include <asm/debug-monitors.h>
+#include <asm/exec.h>
 #include <asm/pgtable.h>
 #include <asm/memory.h>
 #include <asm/mmu_context.h>
@@ -49,6 +52,14 @@ void notrace __cpu_suspend_exit(void)
         */
        set_my_cpu_offset(per_cpu_offset(cpu));
 
+       /*
+        * PSTATE was not saved over suspend/resume, re-enable any detected
+        * features that might not have been set correctly.
+        */
+       asm(ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN,
+                       CONFIG_ARM64_PAN));
+       uao_thread_switch(current);
+
        /*
         * Restore HW breakpoint registers to sane values
         * before debug exceptions are possibly reenabled
index 5ff020f8fb7f65cdec1d88213f0f185ef157ef33..c9986b3e0a96f9ddd0d79ad52e0d5de7841172ec 100644 (file)
@@ -428,24 +428,28 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
        force_signal_inject(SIGILL, ILL_ILLOPC, regs, 0);
 }
 
-void cpu_enable_cache_maint_trap(void *__unused)
+int cpu_enable_cache_maint_trap(void *__unused)
 {
        config_sctlr_el1(SCTLR_EL1_UCI, 0);
+       return 0;
 }
 
 #define __user_cache_maint(insn, address, res)                 \
-       asm volatile (                                          \
-               "1:     " insn ", %1\n"                         \
-               "       mov     %w0, #0\n"                      \
-               "2:\n"                                          \
-               "       .pushsection .fixup,\"ax\"\n"           \
-               "       .align  2\n"                            \
-               "3:     mov     %w0, %w2\n"                     \
-               "       b       2b\n"                           \
-               "       .popsection\n"                          \
-               _ASM_EXTABLE(1b, 3b)                            \
-               : "=r" (res)                                    \
-               : "r" (address), "i" (-EFAULT) )
+       if (untagged_addr(address) >= user_addr_max())          \
+               res = -EFAULT;                                  \
+       else                                                    \
+               asm volatile (                                  \
+                       "1:     " insn ", %1\n"                 \
+                       "       mov     %w0, #0\n"              \
+                       "2:\n"                                  \
+                       "       .pushsection .fixup,\"ax\"\n"   \
+                       "       .align  2\n"                    \
+                       "3:     mov     %w0, %w2\n"             \
+                       "       b       2b\n"                   \
+                       "       .popsection\n"                  \
+                       _ASM_EXTABLE(1b, 3b)                    \
+                       : "=r" (res)                            \
+                       : "r" (address), "i" (-EFAULT) )
 
 static void user_cache_maint_handler(unsigned int esr, struct pt_regs *regs)
 {
index 53d9159662fe4c2cc12c810539782b5416f58bfb..0f87883748153bb3ab7cfedf090faf20e614393c 100644 (file)
@@ -29,7 +29,9 @@
 #include <linux/sched.h>
 #include <linux/highmem.h>
 #include <linux/perf_event.h>
+#include <linux/preempt.h>
 
+#include <asm/bug.h>
 #include <asm/cpufeature.h>
 #include <asm/exception.h>
 #include <asm/debug-monitors.h>
@@ -670,9 +672,17 @@ asmlinkage int __exception do_debug_exception(unsigned long addr,
 NOKPROBE_SYMBOL(do_debug_exception);
 
 #ifdef CONFIG_ARM64_PAN
-void cpu_enable_pan(void *__unused)
+int cpu_enable_pan(void *__unused)
 {
+       /*
+        * We modify PSTATE. This won't work from irq context as the PSTATE
+        * is discarded once we return from the exception.
+        */
+       WARN_ON_ONCE(in_interrupt());
+
        config_sctlr_el1(SCTLR_EL1_SPAN, 0);
+       asm(SET_PSTATE_PAN(1));
+       return 0;
 }
 #endif /* CONFIG_ARM64_PAN */
 
@@ -683,8 +693,9 @@ void cpu_enable_pan(void *__unused)
  * We need to enable the feature at runtime (instead of adding it to
  * PSR_MODE_EL1h) as the feature may not be implemented by the cpu.
  */
-void cpu_enable_uao(void *__unused)
+int cpu_enable_uao(void *__unused)
 {
        asm(SET_PSTATE_UAO(1));
+       return 0;
 }
 #endif /* CONFIG_ARM64_UAO */
index 21c489bdeb4ee03d0a126070452c92b1aca6a1b6..212c4d1e2f26df7f291270fb461abac912ce7161 100644 (file)
@@ -421,35 +421,35 @@ void __init mem_init(void)
 
        pr_notice("Virtual kernel memory layout:\n");
 #ifdef CONFIG_KASAN
-       pr_cont("    kasan   : 0x%16lx - 0x%16lx   (%6ld GB)\n",
+       pr_notice("    kasan   : 0x%16lx - 0x%16lx   (%6ld GB)\n",
                MLG(KASAN_SHADOW_START, KASAN_SHADOW_END));
 #endif
-       pr_cont("    modules : 0x%16lx - 0x%16lx   (%6ld MB)\n",
+       pr_notice("    modules : 0x%16lx - 0x%16lx   (%6ld MB)\n",
                MLM(MODULES_VADDR, MODULES_END));
-       pr_cont("    vmalloc : 0x%16lx - 0x%16lx   (%6ld GB)\n",
+       pr_notice("    vmalloc : 0x%16lx - 0x%16lx   (%6ld GB)\n",
                MLG(VMALLOC_START, VMALLOC_END));
-       pr_cont("      .text : 0x%p" " - 0x%p" "   (%6ld KB)\n",
+       pr_notice("      .text : 0x%p" " - 0x%p" "   (%6ld KB)\n",
                MLK_ROUNDUP(_text, _etext));
-       pr_cont("    .rodata : 0x%p" " - 0x%p" "   (%6ld KB)\n",
+       pr_notice("    .rodata : 0x%p" " - 0x%p" "   (%6ld KB)\n",
                MLK_ROUNDUP(__start_rodata, __init_begin));
-       pr_cont("      .init : 0x%p" " - 0x%p" "   (%6ld KB)\n",
+       pr_notice("      .init : 0x%p" " - 0x%p" "   (%6ld KB)\n",
                MLK_ROUNDUP(__init_begin, __init_end));
-       pr_cont("      .data : 0x%p" " - 0x%p" "   (%6ld KB)\n",
+       pr_notice("      .data : 0x%p" " - 0x%p" "   (%6ld KB)\n",
                MLK_ROUNDUP(_sdata, _edata));
-       pr_cont("       .bss : 0x%p" " - 0x%p" "   (%6ld KB)\n",
+       pr_notice("       .bss : 0x%p" " - 0x%p" "   (%6ld KB)\n",
                MLK_ROUNDUP(__bss_start, __bss_stop));
-       pr_cont("    fixed   : 0x%16lx - 0x%16lx   (%6ld KB)\n",
+       pr_notice("    fixed   : 0x%16lx - 0x%16lx   (%6ld KB)\n",
                MLK(FIXADDR_START, FIXADDR_TOP));
-       pr_cont("    PCI I/O : 0x%16lx - 0x%16lx   (%6ld MB)\n",
+       pr_notice("    PCI I/O : 0x%16lx - 0x%16lx   (%6ld MB)\n",
                MLM(PCI_IO_START, PCI_IO_END));
 #ifdef CONFIG_SPARSEMEM_VMEMMAP
-       pr_cont("    vmemmap : 0x%16lx - 0x%16lx   (%6ld GB maximum)\n",
+       pr_notice("    vmemmap : 0x%16lx - 0x%16lx   (%6ld GB maximum)\n",
                MLG(VMEMMAP_START, VMEMMAP_START + VMEMMAP_SIZE));
-       pr_cont("              0x%16lx - 0x%16lx   (%6ld MB actual)\n",
+       pr_notice("              0x%16lx - 0x%16lx   (%6ld MB actual)\n",
                MLM((unsigned long)phys_to_page(memblock_start_of_DRAM()),
                    (unsigned long)virt_to_page(high_memory)));
 #endif
-       pr_cont("    memory  : 0x%16lx - 0x%16lx   (%6ld MB)\n",
+       pr_notice("    memory  : 0x%16lx - 0x%16lx   (%6ld MB)\n",
                MLM(__phys_to_virt(memblock_start_of_DRAM()),
                    (unsigned long)high_memory));
 
index 778a985c8a70761d8bf3337c073b76a09e50d889..4b32168cf91a0e3b99e1d899960d47fddf38ba06 100644 (file)
@@ -147,7 +147,7 @@ static int __init early_cpu_to_node(int cpu)
 
 static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)
 {
-       return node_distance(from, to);
+       return node_distance(early_cpu_to_node(from), early_cpu_to_node(to));
 }
 
 static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size,
@@ -223,8 +223,11 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
        void *nd;
        int tnid;
 
-       pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n",
-               nid, start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1);
+       if (start_pfn < end_pfn)
+               pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n", nid,
+                       start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1);
+       else
+               pr_info("Initmem setup node %d [<memory-less node>]\n", nid);
 
        nd_pa = memblock_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid);
        nd = __va(nd_pa);
index 8b8fe671b1a6dbf347dd4d31a7f272ef87154bcb..8d79286ee4e878044b02c963f5fb3c6deaaafb19 100644 (file)
@@ -271,7 +271,7 @@ long arch_ptrace(struct task_struct *child, long request,
                        case BFIN_MEM_ACCESS_CORE:
                        case BFIN_MEM_ACCESS_CORE_ONLY:
                                copied = access_process_vm(child, addr, &tmp,
-                                                          to_copy, 0);
+                                                          to_copy, FOLL_FORCE);
                                if (copied)
                                        break;
 
@@ -324,7 +324,8 @@ long arch_ptrace(struct task_struct *child, long request,
                        case BFIN_MEM_ACCESS_CORE:
                        case BFIN_MEM_ACCESS_CORE_ONLY:
                                copied = access_process_vm(child, addr, &data,
-                                                          to_copy, 1);
+                                                          to_copy,
+                                                          FOLL_FORCE | FOLL_WRITE);
                                break;
                        case BFIN_MEM_ACCESS_DMA:
                                if (safe_dma_memcpy(paddr, &data, to_copy))
index b5698c876fccd91c3960439753d24510ce008984..0068fd411a8473707efb4a1718e33edee0fdbb50 100644 (file)
@@ -2722,7 +2722,6 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
        err = get_user_pages((unsigned long int)(oper.indata + prev_ix),
                             noinpages,
                             0,  /* read access only for in data */
-                            0, /* no force */
                             inpages,
                             NULL);
 
@@ -2736,8 +2735,7 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
        if (oper.do_cipher){
                err = get_user_pages((unsigned long int)oper.cipher_outdata,
                                     nooutpages,
-                                    1, /* write access for out data */
-                                    0, /* no force */
+                                    FOLL_WRITE, /* write access for out data */
                                     outpages,
                                     NULL);
                up_read(&current->mm->mmap_sem);
@@ -3151,7 +3149,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
        printk("print_dma_descriptors start\n");
 
        printk("iop:\n");
-       printk("\tsid: 0x%lld\n", iop->sid);
+       printk("\tsid: 0x%llx\n", iop->sid);
 
        printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
        printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);
index f085229cf870bc306b95df2dee4eadd9ebdd4b8b..f0df654ac6fc5ca53ffd6d6951817e92f492e0be 100644 (file)
@@ -147,7 +147,7 @@ long arch_ptrace(struct task_struct *child, long request,
                                /* The trampoline page is globally mapped, no page table to traverse.*/
                                tmp = *(unsigned long*)addr;
                        } else {
-                               copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
+                               copied = access_process_vm(child, addr, &tmp, sizeof(tmp), FOLL_FORCE);
 
                                if (copied != sizeof(tmp))
                                        break;
@@ -279,7 +279,7 @@ static int insn_size(struct task_struct *child, unsigned long pc)
   int opsize = 0;
 
   /* Read the opcode at pc (do what PTRACE_PEEKTEXT would do). */
-  copied = access_process_vm(child, pc, &opcode, sizeof(opcode), 0);
+  copied = access_process_vm(child, pc, &opcode, sizeof(opcode), FOLL_FORCE);
   if (copied != sizeof(opcode))
     return 0;
 
index b408fe660cf8ceab685de783220a2db991b4dfc3..3cef06875f5ca32930c06b07db027e86f362ce94 100644 (file)
@@ -31,7 +31,6 @@ struct thread_info {
        int                cpu;                 /* cpu we're on */
        int                preempt_count;       /* 0 => preemptable, <0 => BUG */
        mm_segment_t            addr_limit;
-       struct restart_block restart_block;
 };
 
 /*
@@ -44,9 +43,6 @@ struct thread_info {
        .cpu =          0,                      \
        .preempt_count = INIT_PREEMPT_COUNT,    \
        .addr_limit     = KERNEL_DS,            \
-       .restart_block  = {                     \
-               .fn = do_no_restart_syscall,    \
-       },                                      \
 }
 
 #define init_thread_info       (init_thread_union.thread_info)
index ad1f81f574e5785ee42e26219173595c1d8a66b6..7138303cbbf25dfd7fb03c6fe177199e441617ab 100644 (file)
@@ -79,7 +79,7 @@ restore_sigcontext(struct sigcontext *usc, int *pd0)
        unsigned int er0;
 
        /* Always make any pending restarted system calls return -EINTR */
-       current_thread_info()->restart_block.fn = do_no_restart_syscall;
+       current->restart_block.fn = do_no_restart_syscall;
 
        /* restore passed registers */
 #define COPY(r)  do { err |= get_user(regs->r, &usc->sc_##r); } while (0)
index 09f845793d12c1147bc767885673545a3bef88f3..5ed0ea92c5bfac3935b3b799607dca9b3b6086a9 100644 (file)
@@ -142,7 +142,7 @@ store_virtual_to_phys(struct device *dev, struct device_attribute *attr,
        u64 virt_addr=simple_strtoull(buf, NULL, 16);
        int ret;
 
-       ret = get_user_pages(virt_addr, 1, VM_READ, 0, NULL, NULL);
+       ret = get_user_pages(virt_addr, 1, FOLL_WRITE, NULL, NULL);
        if (ret<=0) {
 #ifdef ERR_INJ_DEBUG
                printk("Virtual address %lx is not existing.\n",virt_addr);
index 6f54d511cc509a03ac079871b6979f03e6b53bc8..31aa8c0f68e14a284e0f2b088afe4c29de7daee5 100644 (file)
@@ -453,7 +453,7 @@ ia64_peek (struct task_struct *child, struct switch_stack *child_stack,
                        return 0;
                }
        }
-       copied = access_process_vm(child, addr, &ret, sizeof(ret), 0);
+       copied = access_process_vm(child, addr, &ret, sizeof(ret), FOLL_FORCE);
        if (copied != sizeof(ret))
                return -EIO;
        *val = ret;
@@ -489,7 +489,8 @@ ia64_poke (struct task_struct *child, struct switch_stack *child_stack,
                                *ia64_rse_skip_regs(krbs, regnum) = val;
                        }
                }
-       } else if (access_process_vm(child, addr, &val, sizeof(val), 1)
+       } else if (access_process_vm(child, addr, &val, sizeof(val),
+                               FOLL_FORCE | FOLL_WRITE)
                   != sizeof(val))
                return -EIO;
        return 0;
@@ -543,7 +544,8 @@ ia64_sync_user_rbs (struct task_struct *child, struct switch_stack *sw,
                ret = ia64_peek(child, sw, user_rbs_end, addr, &val);
                if (ret < 0)
                        return ret;
-               if (access_process_vm(child, addr, &val, sizeof(val), 1)
+               if (access_process_vm(child, addr, &val, sizeof(val),
+                               FOLL_FORCE | FOLL_WRITE)
                    != sizeof(val))
                        return -EIO;
        }
@@ -559,7 +561,8 @@ ia64_sync_kernel_rbs (struct task_struct *child, struct switch_stack *sw,
 
        /* now copy word for word from user rbs to kernel rbs: */
        for (addr = user_rbs_start; addr < user_rbs_end; addr += 8) {
-               if (access_process_vm(child, addr, &val, sizeof(val), 0)
+               if (access_process_vm(child, addr, &val, sizeof(val),
+                               FOLL_FORCE)
                                != sizeof(val))
                        return -EIO;
 
@@ -1156,7 +1159,8 @@ arch_ptrace (struct task_struct *child, long request,
        case PTRACE_PEEKTEXT:
        case PTRACE_PEEKDATA:
                /* read word at location addr */
-               if (access_process_vm(child, addr, &data, sizeof(data), 0)
+               if (access_process_vm(child, addr, &data, sizeof(data),
+                               FOLL_FORCE)
                    != sizeof(data))
                        return -EIO;
                /* ensure return value is not mistaken for error code */
index 51f5e9aa49016fdce8112eb72083c0b167f21df8..c145605a981ff4fbc441ffe4512a6167147f6bec 100644 (file)
@@ -493,7 +493,8 @@ unregister_all_debug_traps(struct task_struct *child)
        int i;
 
        for (i = 0; i < p->nr_trap; i++)
-               access_process_vm(child, p->addr[i], &p->insn[i], sizeof(p->insn[i]), 1);
+               access_process_vm(child, p->addr[i], &p->insn[i], sizeof(p->insn[i]),
+                               FOLL_FORCE | FOLL_WRITE);
        p->nr_trap = 0;
 }
 
@@ -537,7 +538,8 @@ embed_debug_trap(struct task_struct *child, unsigned long next_pc)
        unsigned long next_insn, code;
        unsigned long addr = next_pc & ~3;
 
-       if (access_process_vm(child, addr, &next_insn, sizeof(next_insn), 0)
+       if (access_process_vm(child, addr, &next_insn, sizeof(next_insn),
+                       FOLL_FORCE)
            != sizeof(next_insn)) {
                return -1; /* error */
        }
@@ -546,7 +548,8 @@ embed_debug_trap(struct task_struct *child, unsigned long next_pc)
        if (register_debug_trap(child, next_pc, next_insn, &code)) {
                return -1; /* error */
        }
-       if (access_process_vm(child, addr, &code, sizeof(code), 1)
+       if (access_process_vm(child, addr, &code, sizeof(code),
+                       FOLL_FORCE | FOLL_WRITE)
            != sizeof(code)) {
                return -1; /* error */
        }
@@ -562,7 +565,8 @@ withdraw_debug_trap(struct pt_regs *regs)
        addr = (regs->bpc - 2) & ~3;
        regs->bpc -= 2;
        if (unregister_debug_trap(current, addr, &code)) {
-           access_process_vm(current, addr, &code, sizeof(code), 1);
+           access_process_vm(current, addr, &code, sizeof(code),
+                   FOLL_FORCE | FOLL_WRITE);
            invalidate_cache();
        }
 }
@@ -589,7 +593,8 @@ void user_enable_single_step(struct task_struct *child)
        /* Compute next pc.  */
        pc = get_stack_long(child, PT_BPC);
 
-       if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0)
+       if (access_process_vm(child, pc&~3, &insn, sizeof(insn),
+                       FOLL_FORCE)
            != sizeof(insn))
                return;
 
index 283b5a1967d1461298bf065b2073d62c6296dc1d..7e71a4e0281ba9cc3c2190dd9a06d958754155fb 100644 (file)
@@ -70,7 +70,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        break;
 
                copied = access_process_vm(child, (u64)addrOthers, &tmp,
-                               sizeof(tmp), 0);
+                               sizeof(tmp), FOLL_FORCE);
                if (copied != sizeof(tmp))
                        break;
                ret = put_user(tmp, (u32 __user *) (unsigned long) data);
@@ -179,7 +179,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        break;
                ret = 0;
                if (access_process_vm(child, (u64)addrOthers, &data,
-                                       sizeof(data), 1) == sizeof(data))
+                                       sizeof(data),
+                                       FOLL_FORCE | FOLL_WRITE) == sizeof(data))
                        break;
                ret = -EIO;
                break;
index ce961495b5e123f374a4d129387daffa20974373..622037d851a35a4abe9c51c7cae956f84dca452d 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/err.h>
 #include <linux/kdebug.h>
 #include <linux/module.h>
+#include <linux/uaccess.h>
 #include <linux/vmalloc.h>
 #include <linux/fs.h>
 #include <linux/bootmem.h>
index 42d124fb6474477c896e4618713e5b6d65d6e8f3..d8c3c159289a2953b8ae495a1da34d27d095b161 100644 (file)
@@ -287,7 +287,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
        pages += nr;
 
        ret = get_user_pages_unlocked(start, (end - start) >> PAGE_SHIFT,
-                                     write, 0, pages);
+                                     pages, write ? FOLL_WRITE : 0);
 
        /* Have to be a bit careful with return values */
        if (nr > 0) {
index f7a184b6c35b4ad00414720316cfbbf1d50fc704..57d42d129033567c5bcf9efda3515925a9bd21bf 100644 (file)
@@ -32,9 +32,16 @@ static struct addr_range prep_kernel(void)
        void *addr = 0;
        struct elf_info ei;
        long len;
+       int uncompressed_image = 0;
 
-       partial_decompress(vmlinuz_addr, vmlinuz_size,
+       len = partial_decompress(vmlinuz_addr, vmlinuz_size,
                elfheader, sizeof(elfheader), 0);
+       /* assume uncompressed data if -1 is returned */
+       if (len == -1) {
+               uncompressed_image = 1;
+               memcpy(elfheader, vmlinuz_addr, sizeof(elfheader));
+               printf("No valid compressed data found, assume uncompressed data\n\r");
+       }
 
        if (!parse_elf64(elfheader, &ei) && !parse_elf32(elfheader, &ei))
                fatal("Error: not a valid PPC32 or PPC64 ELF file!\n\r");
@@ -67,6 +74,13 @@ static struct addr_range prep_kernel(void)
                                        "device tree\n\r");
        }
 
+       if (uncompressed_image) {
+               memcpy(addr, vmlinuz_addr + ei.elfoffset, ei.loadsize);
+               printf("0x%lx bytes of uncompressed data copied\n\r",
+                      ei.loadsize);
+               goto out;
+       }
+
        /* Finally, decompress the kernel */
        printf("Decompressing (0x%p <- 0x%p:0x%p)...\n\r", addr,
               vmlinuz_addr, vmlinuz_addr+vmlinuz_size);
@@ -82,7 +96,7 @@ static struct addr_range prep_kernel(void)
                         len, ei.loadsize);
 
        printf("Done! Decompressed 0x%lx bytes\n\r", len);
-
+out:
        flush_cache(addr, ei.loadsize);
 
        return (struct addr_range){addr, ei.memsize};
index 01b8a13f022467be64ccd46f248344bdf96e9a41..3919332965af04bf98f2b77b7f4ec722d5acf8da 100644 (file)
@@ -26,7 +26,7 @@ extern u64 pnv_first_deep_stop_state;
        std     r0,0(r1);                                       \
        ptesync;                                                \
        ld      r0,0(r1);                                       \
-1:     cmp     cr0,r0,r0;                                      \
+1:     cmpd    cr0,r0,r0;                                      \
        bne     1b;                                             \
        IDLE_INST;                                              \
        b       .
index 2e4e7d878c8eeda322d701cb3f407d67ecff0a58..84d49b197c3298be4308f1db00af86439635702f 100644 (file)
        ld      reg,PACAKBASE(r13);     /* get high part of &label */   \
        ori     reg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;
 
+#define __LOAD_HANDLER(reg, label)                                     \
+       ld      reg,PACAKBASE(r13);                                     \
+       ori     reg,reg,(ABS_ADDR(label))@l;
+
 /* Exception register prefixes */
 #define EXC_HV H
 #define EXC_STD
@@ -208,6 +212,18 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 #define kvmppc_interrupt kvmppc_interrupt_pr
 #endif
 
+#ifdef CONFIG_RELOCATABLE
+#define BRANCH_TO_COMMON(reg, label)                                   \
+       __LOAD_HANDLER(reg, label);                                     \
+       mtctr   reg;                                                    \
+       bctr
+
+#else
+#define BRANCH_TO_COMMON(reg, label)                                   \
+       b       label
+
+#endif
+
 #define __KVM_HANDLER_PROLOG(area, n)                                  \
        BEGIN_FTR_SECTION_NESTED(947)                                   \
        ld      r10,area+EX_CFAR(r13);                                  \
index f6f68f73e8581147772bad3100f74ed5950987bd..99e1397b71dac78dae0cc2b98eefd40cf90947ec 100644 (file)
@@ -52,11 +52,23 @@ static inline int mm_is_core_local(struct mm_struct *mm)
        return cpumask_subset(mm_cpumask(mm),
                              topology_sibling_cpumask(smp_processor_id()));
 }
+
+static inline int mm_is_thread_local(struct mm_struct *mm)
+{
+       return cpumask_equal(mm_cpumask(mm),
+                             cpumask_of(smp_processor_id()));
+}
+
 #else
 static inline int mm_is_core_local(struct mm_struct *mm)
 {
        return 1;
 }
+
+static inline int mm_is_thread_local(struct mm_struct *mm)
+{
+       return 1;
+}
 #endif
 
 #endif /* __KERNEL__ */
index cf12c580f6b286b957b0280d8174cc3d8c203d2f..e8cdfec8d5125c531c45b7ffd250955ad68021af 100644 (file)
 
 #define __NR__exit __NR_exit
 
+#define __IGNORE_pkey_mprotect
+#define __IGNORE_pkey_alloc
+#define __IGNORE_pkey_free
+
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
index f129408c602290d7ccf5870e2b12b46b0380bea5..08ba447a4b3dae99676c8b42b8c6deea1866b042 100644 (file)
@@ -95,19 +95,35 @@ __start_interrupts:
 /* No virt vectors corresponding with 0x0..0x100 */
 EXC_VIRT_NONE(0x4000, 0x4100)
 
-EXC_REAL_BEGIN(system_reset, 0x100, 0x200)
-       SET_SCRATCH0(r13)
+
 #ifdef CONFIG_PPC_P7_NAP
-BEGIN_FTR_SECTION
-       /* Running native on arch 2.06 or later, check if we are
-        * waking up from nap/sleep/winkle.
+       /*
+        * If running native on arch 2.06 or later, check if we are waking up
+        * from nap/sleep/winkle, and branch to idle handler.
         */
-       mfspr   r13,SPRN_SRR1
-       rlwinm. r13,r13,47-31,30,31
-       beq     9f
+#define IDLETEST(n)                                                    \
+       BEGIN_FTR_SECTION ;                                             \
+       mfspr   r10,SPRN_SRR1 ;                                         \
+       rlwinm. r10,r10,47-31,30,31 ;                                   \
+       beq-    1f ;                                                    \
+       cmpwi   cr3,r10,2 ;                                             \
+       BRANCH_TO_COMMON(r10, system_reset_idle_common) ;               \
+1:                                                                     \
+       END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
+#else
+#define IDLETEST NOTEST
+#endif
 
-       cmpwi   cr3,r13,2
-       GET_PACA(r13)
+EXC_REAL_BEGIN(system_reset, 0x100, 0x200)
+       SET_SCRATCH0(r13)
+       EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
+                                IDLETEST, 0x100)
+
+EXC_REAL_END(system_reset, 0x100, 0x200)
+EXC_VIRT_NONE(0x4100, 0x4200)
+
+#ifdef CONFIG_PPC_P7_NAP
+EXC_COMMON_BEGIN(system_reset_idle_common)
        bl      pnv_restore_hyp_resource
 
        li      r0,PNV_THREAD_RUNNING
@@ -130,14 +146,8 @@ BEGIN_FTR_SECTION
        blt     cr3,2f
        b       pnv_wakeup_loss
 2:     b       pnv_wakeup_noloss
+#endif
 
-9:
-END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
-#endif /* CONFIG_PPC_P7_NAP */
-       EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
-                                NOTEST, 0x100)
-EXC_REAL_END(system_reset, 0x100, 0x200)
-EXC_VIRT_NONE(0x4100, 0x4200)
 EXC_COMMON(system_reset_common, 0x100, system_reset_exception)
 
 #ifdef CONFIG_PPC_PSERIES
@@ -817,10 +827,8 @@ EXC_VIRT(trap_0b, 0x4b00, 0x4c00, 0xb00)
 TRAMP_KVM(PACA_EXGEN, 0xb00)
 EXC_COMMON(trap_0b_common, 0xb00, unknown_exception)
 
-
-#define LOAD_SYSCALL_HANDLER(reg)                              \
-       ld      reg,PACAKBASE(r13);                             \
-       ori     reg,reg,(ABS_ADDR(system_call_common))@l;
+#define LOAD_SYSCALL_HANDLER(reg)                                      \
+       __LOAD_HANDLER(reg, system_call_common)
 
 /* Syscall routine is used twice, in reloc-off and reloc-on paths */
 #define SYSCALL_PSERIES_1                                      \
index 9781c69eae5767adc9fdde54232e4df1329e7b92..03d089b3ed726faeb69d3121e27191ed834899bf 100644 (file)
@@ -275,7 +275,7 @@ int hw_breakpoint_handler(struct die_args *args)
        if (!stepped) {
                WARN(1, "Unable to handle hardware breakpoint. Breakpoint at "
                        "0x%lx will be disabled.", info->address);
-               perf_event_disable(bp);
+               perf_event_disable_inatomic(bp);
                goto out;
        }
        /*
index bd739fed26e3203aae73807399c43a939c248d38..72dac0b58061f023db4a4c8a4b6badd66bcd0b70 100644 (file)
@@ -90,6 +90,7 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_300)
  * Threads will spin in HMT_LOW until the lock bit is cleared.
  * r14 - pointer to core_idle_state
  * r15 - used to load contents of core_idle_state
+ * r9  - used as a temporary variable
  */
 
 core_idle_lock_held:
@@ -99,6 +100,8 @@ core_idle_lock_held:
        bne     3b
        HMT_MEDIUM
        lwarx   r15,0,r14
+       andi.   r9,r15,PNV_CORE_IDLE_LOCK_BIT
+       bne     core_idle_lock_held
        blr
 
 /*
@@ -163,12 +166,6 @@ _GLOBAL(pnv_powersave_common)
        std     r9,_MSR(r1)
        std     r1,PACAR1(r13)
 
-#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
-       /* Tell KVM we're entering idle */
-       li      r4,KVM_HWTHREAD_IN_IDLE
-       stb     r4,HSTATE_HWTHREAD_STATE(r13)
-#endif
-
        /*
         * Go to real mode to do the nap, as required by the architecture.
         * Also, we need to be in real mode before setting hwthread_state,
@@ -185,6 +182,26 @@ _GLOBAL(pnv_powersave_common)
 
        .globl pnv_enter_arch207_idle_mode
 pnv_enter_arch207_idle_mode:
+#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
+       /* Tell KVM we're entering idle */
+       li      r4,KVM_HWTHREAD_IN_IDLE
+       /******************************************************/
+       /*  N O T E   W E L L    ! ! !    N O T E   W E L L   */
+       /* The following store to HSTATE_HWTHREAD_STATE(r13)  */
+       /* MUST occur in real mode, i.e. with the MMU off,    */
+       /* and the MMU must stay off until we clear this flag */
+       /* and test HSTATE_HWTHREAD_REQ(r13) in the system    */
+       /* reset interrupt vector in exceptions-64s.S.        */
+       /* The reason is that another thread can switch the   */
+       /* MMU to a guest context whenever this flag is set   */
+       /* to KVM_HWTHREAD_IN_IDLE, and if the MMU was on,    */
+       /* that would potentially cause this thread to start  */
+       /* executing instructions from guest memory in        */
+       /* hypervisor mode, leading to a host crash or data   */
+       /* corruption, or worse.                              */
+       /******************************************************/
+       stb     r4,HSTATE_HWTHREAD_STATE(r13)
+#endif
        stb     r3,PACA_THREAD_IDLE_STATE(r13)
        cmpwi   cr3,r3,PNV_THREAD_SLEEP
        bge     cr3,2f
@@ -250,6 +267,12 @@ enter_winkle:
  * r3 - requested stop state
  */
 power_enter_stop:
+#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
+       /* Tell KVM we're entering idle */
+       li      r4,KVM_HWTHREAD_IN_IDLE
+       /* DO THIS IN REAL MODE!  See comment above. */
+       stb     r4,HSTATE_HWTHREAD_STATE(r13)
+#endif
 /*
  * Check if the requested state is a deep idle state.
  */
index 9e7c10fe205f7f5dc3415f54d5abf7bf2a2105b3..ce6dc61b15b2183048c03026b25da196aa38f126 100644 (file)
@@ -1012,7 +1012,7 @@ void restore_tm_state(struct pt_regs *regs)
        /* Ensure that restore_math() will restore */
        if (msr_diff & MSR_FP)
                current->thread.load_fp = 1;
-#ifdef CONFIG_ALIVEC
+#ifdef CONFIG_ALTIVEC
        if (cpu_has_feature(CPU_FTR_ALTIVEC) && msr_diff & MSR_VEC)
                current->thread.load_vec = 1;
 #endif
index f52b7db327c80a3b603fb2a7179a2f97d6a054be..010b7b310237e4be38ef1d7bcc15a76050fc4469 100644 (file)
@@ -74,7 +74,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        break;
 
                copied = access_process_vm(child, (u64)addrOthers, &tmp,
-                               sizeof(tmp), 0);
+                               sizeof(tmp), FOLL_FORCE);
                if (copied != sizeof(tmp))
                        break;
                ret = put_user(tmp, (u32 __user *)data);
@@ -179,7 +179,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        break;
                ret = 0;
                if (access_process_vm(child, (u64)addrOthers, &tmp,
-                                       sizeof(tmp), 1) == sizeof(tmp))
+                                       sizeof(tmp),
+                                       FOLL_FORCE | FOLL_WRITE) == sizeof(tmp))
                        break;
                ret = -EIO;
                break;
index 82ff5de8b1e7a5564df01dd323c0662ab6457b3b..a0ea63ac2b521b6f8a861aa4b211c0c08dd1062f 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/ppc-opcode.h>
 #include <asm/pnv-pci.h>
 #include <asm/opal.h>
+#include <asm/smp.h>
 
 #include "book3s_xics.h"
 
index bb0354222b1158c57133a09ef50b98cf20de6f29..362954f98029b46d4d3d312b239bb7a2fa8fe63a 100644 (file)
@@ -106,6 +106,8 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb)
        switch (REGION_ID(ea)) {
        case USER_REGION_ID:
                pr_devel("%s: 0x%llx -- USER_REGION_ID\n", __func__, ea);
+               if (mm == NULL)
+                       return 1;
                psize = get_slice_psize(mm, ea);
                ssize = user_segment_size(ea);
                vsid = get_vsid(mm->context.id, ea, ssize);
index 75b9cd6150cc80c98aa4dfec8ab633f126638f01..a51c188b81f31bf1c3c5ecbe5f0b8dd572a65ccb 100644 (file)
@@ -845,7 +845,7 @@ void __init dump_numa_cpu_topology(void)
                return;
 
        for_each_online_node(node) {
-               printk(KERN_DEBUG "Node %d CPUs:", node);
+               pr_info("Node %d CPUs:", node);
 
                count = 0;
                /*
@@ -856,52 +856,18 @@ void __init dump_numa_cpu_topology(void)
                        if (cpumask_test_cpu(cpu,
                                        node_to_cpumask_map[node])) {
                                if (count == 0)
-                                       printk(" %u", cpu);
+                                       pr_cont(" %u", cpu);
                                ++count;
                        } else {
                                if (count > 1)
-                                       printk("-%u", cpu - 1);
+                                       pr_cont("-%u", cpu - 1);
                                count = 0;
                        }
                }
 
                if (count > 1)
-                       printk("-%u", nr_cpu_ids - 1);
-               printk("\n");
-       }
-}
-
-static void __init dump_numa_memory_topology(void)
-{
-       unsigned int node;
-       unsigned int count;
-
-       if (min_common_depth == -1 || !numa_enabled)
-               return;
-
-       for_each_online_node(node) {
-               unsigned long i;
-
-               printk(KERN_DEBUG "Node %d Memory:", node);
-
-               count = 0;
-
-               for (i = 0; i < memblock_end_of_DRAM();
-                    i += (1 << SECTION_SIZE_BITS)) {
-                       if (early_pfn_to_nid(i >> PAGE_SHIFT) == node) {
-                               if (count == 0)
-                                       printk(" 0x%lx", i);
-                               ++count;
-                       } else {
-                               if (count > 0)
-                                       printk("-0x%lx", i);
-                               count = 0;
-                       }
-               }
-
-               if (count > 0)
-                       printk("-0x%lx", i);
-               printk("\n");
+                       pr_cont("-%u", nr_cpu_ids - 1);
+               pr_cont("\n");
        }
 }
 
@@ -947,8 +913,6 @@ void __init initmem_init(void)
 
        if (parse_numa_properties())
                setup_nonnuma();
-       else
-               dump_numa_memory_topology();
 
        memblock_dump_all();
 
index 0e49ec541ab57c91fbf568947cf02ac4f9bbe1ac..bda8c43be78a4df85d067bc4a7759c63c388d29b 100644 (file)
@@ -175,7 +175,7 @@ void radix__flush_tlb_mm(struct mm_struct *mm)
        if (unlikely(pid == MMU_NO_CONTEXT))
                goto no_context;
 
-       if (!mm_is_core_local(mm)) {
+       if (!mm_is_thread_local(mm)) {
                int lock_tlbie = !mmu_has_feature(MMU_FTR_LOCKLESS_TLBIE);
 
                if (lock_tlbie)
@@ -201,7 +201,7 @@ void radix__flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr)
        if (unlikely(pid == MMU_NO_CONTEXT))
                goto no_context;
 
-       if (!mm_is_core_local(mm)) {
+       if (!mm_is_thread_local(mm)) {
                int lock_tlbie = !mmu_has_feature(MMU_FTR_LOCKLESS_TLBIE);
 
                if (lock_tlbie)
@@ -226,7 +226,7 @@ void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmaddr,
        pid = mm ? mm->context.id : 0;
        if (unlikely(pid == MMU_NO_CONTEXT))
                goto bail;
-       if (!mm_is_core_local(mm)) {
+       if (!mm_is_thread_local(mm)) {
                int lock_tlbie = !mmu_has_feature(MMU_FTR_LOCKLESS_TLBIE);
 
                if (lock_tlbie)
@@ -321,7 +321,7 @@ void radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start,
 {
        unsigned long pid;
        unsigned long addr;
-       int local = mm_is_core_local(mm);
+       int local = mm_is_thread_local(mm);
        unsigned long ap = mmu_get_ap(psize);
        int lock_tlbie = !mmu_has_feature(MMU_FTR_LOCKLESS_TLBIE);
        unsigned long page_size = 1UL << mmu_psize_defs[psize].shift;
index 64053d9ac3f23b7cb1bf23aa42aa435b9f2ae0f8..836c56290499b84c0dad7785e9aa5979d68ed0bf 100644 (file)
@@ -12,9 +12,7 @@
 
 #ifndef __ASSEMBLY__
 
-unsigned long return_address(int depth);
-
-#define ftrace_return_address(n) return_address(n)
+#define ftrace_return_address(n) __builtin_return_address(n)
 
 void _mcount(void);
 void ftrace_caller(void);
index 03323175de308fbb3f98ecd5595f66f2d92e9580..602af692efdc1b5273e466b474dbf1a6c7e25922 100644 (file)
@@ -192,7 +192,7 @@ struct task_struct;
 struct mm_struct;
 struct seq_file;
 
-typedef int (*dump_trace_func_t)(void *data, unsigned long address);
+typedef int (*dump_trace_func_t)(void *data, unsigned long address, int reliable);
 void dump_trace(dump_trace_func_t func, void *data,
                struct task_struct *task, unsigned long sp);
 
index 02613bad8bbba4cc4a6e2de3dcc07846946536bf..3066031a73feeeecde2a3ae6f9c5913bf9f8c7d6 100644 (file)
@@ -9,6 +9,9 @@
 #include <uapi/asm/unistd.h>
 
 #define __IGNORE_time
+#define __IGNORE_pkey_mprotect
+#define __IGNORE_pkey_alloc
+#define __IGNORE_pkey_free
 
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_SYS_ALARM
index 43446fa2a4e55cdc49b7f89d639483f1ed738164..c74c59236f4418c3f37933ff67b4812c101e8536 100644 (file)
@@ -2014,12 +2014,12 @@ void show_code(struct pt_regs *regs)
                        *ptr++ = '\t';
                ptr += print_insn(ptr, code + start, addr);
                start += opsize;
-               printk("%s", buffer);
+               pr_cont("%s", buffer);
                ptr = buffer;
                ptr += sprintf(ptr, "\n          ");
                hops++;
        }
-       printk("\n");
+       pr_cont("\n");
 }
 
 void print_fn_code(unsigned char *code, unsigned long len)
index 6693383bc01bc7b78b4a98895a06052ccd8d77ec..55d4fe174fd9728a880016dcf14c7e281ffcdc4f 100644 (file)
@@ -38,10 +38,10 @@ __dump_trace(dump_trace_func_t func, void *data, unsigned long sp,
                if (sp < low || sp > high - sizeof(*sf))
                        return sp;
                sf = (struct stack_frame *) sp;
+               if (func(data, sf->gprs[8], 0))
+                       return sp;
                /* Follow the backchain. */
                while (1) {
-                       if (func(data, sf->gprs[8]))
-                               return sp;
                        low = sp;
                        sp = sf->back_chain;
                        if (!sp)
@@ -49,6 +49,8 @@ __dump_trace(dump_trace_func_t func, void *data, unsigned long sp,
                        if (sp <= low || sp > high - sizeof(*sf))
                                return sp;
                        sf = (struct stack_frame *) sp;
+                       if (func(data, sf->gprs[8], 1))
+                               return sp;
                }
                /* Zero backchain detected, check for interrupt frame. */
                sp = (unsigned long) (sf + 1);
@@ -56,7 +58,7 @@ __dump_trace(dump_trace_func_t func, void *data, unsigned long sp,
                        return sp;
                regs = (struct pt_regs *) sp;
                if (!user_mode(regs)) {
-                       if (func(data, regs->psw.addr))
+                       if (func(data, regs->psw.addr, 1))
                                return sp;
                }
                low = sp;
@@ -85,33 +87,12 @@ void dump_trace(dump_trace_func_t func, void *data, struct task_struct *task,
 }
 EXPORT_SYMBOL_GPL(dump_trace);
 
-struct return_address_data {
-       unsigned long address;
-       int depth;
-};
-
-static int __return_address(void *data, unsigned long address)
-{
-       struct return_address_data *rd = data;
-
-       if (rd->depth--)
-               return 0;
-       rd->address = address;
-       return 1;
-}
-
-unsigned long return_address(int depth)
-{
-       struct return_address_data rd = { .depth = depth + 2 };
-
-       dump_trace(__return_address, &rd, NULL, current_stack_pointer());
-       return rd.address;
-}
-EXPORT_SYMBOL_GPL(return_address);
-
-static int show_address(void *data, unsigned long address)
+static int show_address(void *data, unsigned long address, int reliable)
 {
-       printk("([<%016lx>] %pSR)\n", address, (void *)address);
+       if (reliable)
+               printk(" [<%016lx>] %pSR \n", address, (void *)address);
+       else
+               printk("([<%016lx>] %pSR)\n", address, (void *)address);
        return 0;
 }
 
@@ -138,14 +119,14 @@ void show_stack(struct task_struct *task, unsigned long *sp)
                else
                        stack = (unsigned long *)task->thread.ksp;
        }
+       printk(KERN_DEFAULT "Stack:\n");
        for (i = 0; i < 20; i++) {
                if (((addr_t) stack & (THREAD_SIZE-1)) == 0)
                        break;
-               if ((i * sizeof(long) % 32) == 0)
-                       printk("%s       ", i == 0 ? "" : "\n");
-               printk("%016lx ", *stack++);
+               if (i % 4 == 0)
+                       printk(KERN_DEFAULT "       ");
+               pr_cont("%016lx%c", *stack++, i % 4 == 3 ? '\n' : ' ');
        }
-       printk("\n");
        show_trace(task, (unsigned long)sp);
 }
 
@@ -163,13 +144,13 @@ void show_registers(struct pt_regs *regs)
        mode = user_mode(regs) ? "User" : "Krnl";
        printk("%s PSW : %p %p", mode, (void *)regs->psw.mask, (void *)regs->psw.addr);
        if (!user_mode(regs))
-               printk(" (%pSR)", (void *)regs->psw.addr);
-       printk("\n");
+               pr_cont(" (%pSR)", (void *)regs->psw.addr);
+       pr_cont("\n");
        printk("           R:%x T:%x IO:%x EX:%x Key:%x M:%x W:%x "
               "P:%x AS:%x CC:%x PM:%x", psw->r, psw->t, psw->i, psw->e,
               psw->key, psw->m, psw->w, psw->p, psw->as, psw->cc, psw->pm);
-       printk(" RI:%x EA:%x", psw->ri, psw->eaba);
-       printk("\n%s GPRS: %016lx %016lx %016lx %016lx\n", mode,
+       pr_cont(" RI:%x EA:%x\n", psw->ri, psw->eaba);
+       printk("%s GPRS: %016lx %016lx %016lx %016lx\n", mode,
               regs->gprs[0], regs->gprs[1], regs->gprs[2], regs->gprs[3]);
        printk("           %016lx %016lx %016lx %016lx\n",
               regs->gprs[4], regs->gprs[5], regs->gprs[6], regs->gprs[7]);
@@ -205,14 +186,14 @@ void die(struct pt_regs *regs, const char *str)
        printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff,
               regs->int_code >> 17, ++die_counter);
 #ifdef CONFIG_PREEMPT
-       printk("PREEMPT ");
+       pr_cont("PREEMPT ");
 #endif
 #ifdef CONFIG_SMP
-       printk("SMP ");
+       pr_cont("SMP ");
 #endif
        if (debug_pagealloc_enabled())
-               printk("DEBUG_PAGEALLOC");
-       printk("\n");
+               pr_cont("DEBUG_PAGEALLOC");
+       pr_cont("\n");
        notify_die(DIE_OOPS, str, regs, 0, regs->int_code & 0xffff, SIGSEGV);
        print_modules();
        show_regs(regs);
index 17431f63de00279bbef1b1619ce3966f395c7e74..955a7b6fa0a453bacf588de42e80a95e07ade61a 100644 (file)
@@ -222,7 +222,7 @@ static int __init service_level_perf_register(void)
 }
 arch_initcall(service_level_perf_register);
 
-static int __perf_callchain_kernel(void *data, unsigned long address)
+static int __perf_callchain_kernel(void *data, unsigned long address, int reliable)
 {
        struct perf_callchain_entry_ctx *entry = data;
 
index 44f84b23d4e5996f1ddc594ae3985d762e80aa36..355db9db82104d11bac97f7c23c59fa363859757 100644 (file)
@@ -27,12 +27,12 @@ static int __save_address(void *data, unsigned long address, int nosched)
        return 1;
 }
 
-static int save_address(void *data, unsigned long address)
+static int save_address(void *data, unsigned long address, int reliable)
 {
        return __save_address(data, address, 0);
 }
 
-static int save_address_nosched(void *data, unsigned long address)
+static int save_address_nosched(void *data, unsigned long address, int reliable)
 {
        return __save_address(data, address, 1);
 }
index 1cab8a177d0e7b7c80e1556e659c4751b0657187..7a27eebab28ad023069d21ae92033a06f4ab482d 100644 (file)
@@ -119,8 +119,13 @@ static int handle_validity(struct kvm_vcpu *vcpu)
 
        vcpu->stat.exit_validity++;
        trace_kvm_s390_intercept_validity(vcpu, viwhy);
-       WARN_ONCE(true, "kvm: unhandled validity intercept 0x%x\n", viwhy);
-       return -EOPNOTSUPP;
+       KVM_EVENT(3, "validity intercept 0x%x for pid %u (kvm 0x%pK)", viwhy,
+                 current->pid, vcpu->kvm);
+
+       /* do not warn on invalid runtime instrumentation mode */
+       WARN_ONCE(viwhy != 0x44, "kvm: unhandled validity intercept 0x%x\n",
+                 viwhy);
+       return -EINVAL;
 }
 
 static int handle_instruction(struct kvm_vcpu *vcpu)
index adb0c34bf431e121d66caff904c30fb7e63e933d..18d4107e10eefb5e2ea5935412a95e7a03f2ae41 100644 (file)
@@ -266,7 +266,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
        /* Try to get the remaining pages with get_user_pages */
        start += nr << PAGE_SHIFT;
        pages += nr;
-       ret = get_user_pages_unlocked(start, nr_pages - nr, write, 0, pages);
+       ret = get_user_pages_unlocked(start, nr_pages - nr, pages,
+                                     write ? FOLL_WRITE : 0);
        /* Have to be a bit careful with return values */
        if (nr > 0)
                ret = (ret < 0) ? nr : ret + nr;
index cd404aa3931c101c963f9940e80669173453022c..4a0c5bce3552b00ba4863622fcc63de7b711614c 100644 (file)
@@ -217,6 +217,7 @@ static __init int setup_hugepagesz(char *opt)
        } else if (MACHINE_HAS_EDAT2 && size == PUD_SIZE) {
                hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT);
        } else {
+               hugetlb_bad_size();
                pr_err("hugepagesz= specifies an unsupported page size %s\n",
                        string);
                return 0;
index f56a39bd8ba688afbc29832b63305fa32b3e725d..b3e9d18f2ec62b603737ef5d0080cd86b8df94a8 100644 (file)
@@ -151,36 +151,40 @@ void __init free_initrd_mem(unsigned long start, unsigned long end)
 #ifdef CONFIG_MEMORY_HOTPLUG
 int arch_add_memory(int nid, u64 start, u64 size, bool for_device)
 {
-       unsigned long normal_end_pfn = PFN_DOWN(memblock_end_of_DRAM());
-       unsigned long dma_end_pfn = PFN_DOWN(MAX_DMA_ADDRESS);
+       unsigned long zone_start_pfn, zone_end_pfn, nr_pages;
        unsigned long start_pfn = PFN_DOWN(start);
        unsigned long size_pages = PFN_DOWN(size);
-       unsigned long nr_pages;
-       int rc, zone_enum;
+       pg_data_t *pgdat = NODE_DATA(nid);
+       struct zone *zone;
+       int rc, i;
 
        rc = vmem_add_mapping(start, size);
        if (rc)
                return rc;
 
-       while (size_pages > 0) {
-               if (start_pfn < dma_end_pfn) {
-                       nr_pages = (start_pfn + size_pages > dma_end_pfn) ?
-                                  dma_end_pfn - start_pfn : size_pages;
-                       zone_enum = ZONE_DMA;
-               } else if (start_pfn < normal_end_pfn) {
-                       nr_pages = (start_pfn + size_pages > normal_end_pfn) ?
-                                  normal_end_pfn - start_pfn : size_pages;
-                       zone_enum = ZONE_NORMAL;
+       for (i = 0; i < MAX_NR_ZONES; i++) {
+               zone = pgdat->node_zones + i;
+               if (zone_idx(zone) != ZONE_MOVABLE) {
+                       /* Add range within existing zone limits, if possible */
+                       zone_start_pfn = zone->zone_start_pfn;
+                       zone_end_pfn = zone->zone_start_pfn +
+                                      zone->spanned_pages;
                } else {
-                       nr_pages = size_pages;
-                       zone_enum = ZONE_MOVABLE;
+                       /* Add remaining range to ZONE_MOVABLE */
+                       zone_start_pfn = start_pfn;
+                       zone_end_pfn = start_pfn + size_pages;
                }
-               rc = __add_pages(nid, NODE_DATA(nid)->node_zones + zone_enum,
-                                start_pfn, size_pages);
+               if (start_pfn < zone_start_pfn || start_pfn >= zone_end_pfn)
+                       continue;
+               nr_pages = (start_pfn + size_pages > zone_end_pfn) ?
+                          zone_end_pfn - start_pfn : size_pages;
+               rc = __add_pages(nid, zone, start_pfn, nr_pages);
                if (rc)
                        break;
                start_pfn += nr_pages;
                size_pages -= nr_pages;
+               if (!size_pages)
+                       break;
        }
        if (rc)
                vmem_remove_mapping(start, size);
index 16f4c3960b874b2dc2129926c45c8343a3f7403c..9a4de4599c7b99a82f4a38989a309c896f4e73f3 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/init.h>
 #include <asm/processor.h>
 
-static int __s390_backtrace(void *data, unsigned long address)
+static int __s390_backtrace(void *data, unsigned long address, int reliable)
 {
        unsigned int *depth = data;
 
index 55836188b217c170c3141558d843e1d4259bf165..4f7314d5f3347d40a6282976d538ccfb0e4d447d 100644 (file)
@@ -131,7 +131,7 @@ read_tsk_long(struct task_struct *child,
 {
        int copied;
 
-       copied = access_process_vm(child, addr, res, sizeof(*res), 0);
+       copied = access_process_vm(child, addr, res, sizeof(*res), FOLL_FORCE);
 
        return copied != sizeof(*res) ? -EIO : 0;
 }
@@ -142,7 +142,7 @@ read_tsk_short(struct task_struct *child,
 {
        int copied;
 
-       copied = access_process_vm(child, addr, res, sizeof(*res), 0);
+       copied = access_process_vm(child, addr, res, sizeof(*res), FOLL_FORCE);
 
        return copied != sizeof(*res) ? -EIO : 0;
 }
@@ -153,7 +153,8 @@ write_tsk_short(struct task_struct *child,
 {
        int copied;
 
-       copied = access_process_vm(child, addr, &val, sizeof(val), 1);
+       copied = access_process_vm(child, addr, &val, sizeof(val),
+                       FOLL_FORCE | FOLL_WRITE);
 
        return copied != sizeof(val) ? -EIO : 0;
 }
@@ -164,7 +165,8 @@ write_tsk_long(struct task_struct *child,
 {
        int copied;
 
-       copied = access_process_vm(child, addr, &val, sizeof(val), 1);
+       copied = access_process_vm(child, addr, &val, sizeof(val),
+                       FOLL_FORCE | FOLL_WRITE);
 
        return copied != sizeof(val) ? -EIO : 0;
 }
index 00476662ac2c07ba1e0a3bb427e114ae2f5a7650..336f33a419d99561d57b329a3ee6a513164ca43f 100644 (file)
@@ -31,7 +31,7 @@ isa-y                                 := $(isa-y)-up
 endif
 
 cflags-$(CONFIG_CPU_SH2)               := $(call cc-option,-m2,)
-cflags-$(CONFIG_CPU_J2)                        := $(call cc-option,-mj2,)
+cflags-$(CONFIG_CPU_J2)                        += $(call cc-option,-mj2,)
 cflags-$(CONFIG_CPU_SH2A)              += $(call cc-option,-m2a,) \
                                           $(call cc-option,-m2a-nofpu,) \
                                           $(call cc-option,-m4-nofpu,)
index e9c2c42031fee497379af3e3fff29d519275eaee..4e21949593cf59f20c4290285d7c4c28db7acc30 100644 (file)
@@ -22,6 +22,16 @@ config SH_DEVICE_TREE
          have sufficient driver coverage to use this option; do not
          select it if you are using original SuperH hardware.
 
+config SH_JCORE_SOC
+       bool "J-Core SoC"
+       depends on SH_DEVICE_TREE && (CPU_SH2 || CPU_J2)
+       select CLKSRC_JCORE_PIT
+       select JCORE_AIC
+       default y if CPU_J2
+       help
+         Select this option to include drivers core components of the
+         J-Core SoC, including interrupt controllers and timers.
+
 config SH_SOLUTION_ENGINE
        bool "SolutionEngine"
        select SOLUTION_ENGINE
index 94d1eca52f723e82df0792c96d87783c6a422245..2eb81ebe3888bf8a4bdd2af4b575c0e254f52f02 100644 (file)
@@ -8,6 +8,7 @@ CONFIG_MEMORY_START=0x10000000
 CONFIG_MEMORY_SIZE=0x04000000
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_SH_DEVICE_TREE=y
+CONFIG_SH_JCORE_SOC=y
 CONFIG_HZ_100=y
 CONFIG_CMDLINE_OVERWRITE=y
 CONFIG_CMDLINE="console=ttyUL0 earlycon"
@@ -20,6 +21,7 @@ CONFIG_INET=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_NETDEVICES=y
+CONFIG_SERIAL_EARLYCON=y
 CONFIG_SERIAL_UARTLITE=y
 CONFIG_SERIAL_UARTLITE_CONSOLE=y
 CONFIG_I2C=y
index 40fa6c8adc43a361c60ffee8929aa39d2449e926..063c298ba56cc900479eb9b50a8c9587678f6893 100644 (file)
@@ -258,7 +258,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
                pages += nr;
 
                ret = get_user_pages_unlocked(start,
-                       (end - start) >> PAGE_SHIFT, write, 0, pages);
+                       (end - start) >> PAGE_SHIFT, pages,
+                       write ? FOLL_WRITE : 0);
 
                /* Have to be a bit careful with return values */
                if (nr > 0) {
index 9ddc4928a089b599568331792097c2bc35ea0be8..ac082dd8c67d5a4f1fbf527145b82bd251fbdc8d 100644 (file)
@@ -127,7 +127,8 @@ static int get_from_target(struct task_struct *target, unsigned long uaddr,
                if (copy_from_user(kbuf, (void __user *) uaddr, len))
                        return -EFAULT;
        } else {
-               int len2 = access_process_vm(target, uaddr, kbuf, len, 0);
+               int len2 = access_process_vm(target, uaddr, kbuf, len,
+                               FOLL_FORCE);
                if (len2 != len)
                        return -EFAULT;
        }
@@ -141,7 +142,8 @@ static int set_to_target(struct task_struct *target, unsigned long uaddr,
                if (copy_to_user((void __user *) uaddr, kbuf, len))
                        return -EFAULT;
        } else {
-               int len2 = access_process_vm(target, uaddr, kbuf, len, 1);
+               int len2 = access_process_vm(target, uaddr, kbuf, len,
+                               FOLL_FORCE | FOLL_WRITE);
                if (len2 != len)
                        return -EFAULT;
        }
@@ -505,7 +507,8 @@ static int genregs32_get(struct task_struct *target,
                                if (access_process_vm(target,
                                                      (unsigned long)
                                                      &reg_window[pos],
-                                                     k, sizeof(*k), 0)
+                                                     k, sizeof(*k),
+                                                     FOLL_FORCE)
                                    != sizeof(*k))
                                        return -EFAULT;
                                k++;
@@ -531,12 +534,14 @@ static int genregs32_get(struct task_struct *target,
                                if (access_process_vm(target,
                                                      (unsigned long)
                                                      &reg_window[pos],
-                                                     &reg, sizeof(reg), 0)
+                                                     &reg, sizeof(reg),
+                                                     FOLL_FORCE)
                                    != sizeof(reg))
                                        return -EFAULT;
                                if (access_process_vm(target,
                                                      (unsigned long) u,
-                                                     &reg, sizeof(reg), 1)
+                                                     &reg, sizeof(reg),
+                                                     FOLL_FORCE | FOLL_WRITE)
                                    != sizeof(reg))
                                        return -EFAULT;
                                pos++;
@@ -615,7 +620,8 @@ static int genregs32_set(struct task_struct *target,
                                                      (unsigned long)
                                                      &reg_window[pos],
                                                      (void *) k,
-                                                     sizeof(*k), 1)
+                                                     sizeof(*k),
+                                                     FOLL_FORCE | FOLL_WRITE)
                                    != sizeof(*k))
                                        return -EFAULT;
                                k++;
@@ -642,13 +648,15 @@ static int genregs32_set(struct task_struct *target,
                                if (access_process_vm(target,
                                                      (unsigned long)
                                                      u,
-                                                     &reg, sizeof(reg), 0)
+                                                     &reg, sizeof(reg),
+                                                     FOLL_FORCE)
                                    != sizeof(reg))
                                        return -EFAULT;
                                if (access_process_vm(target,
                                                      (unsigned long)
                                                      &reg_window[pos],
-                                                     &reg, sizeof(reg), 1)
+                                                     &reg, sizeof(reg),
+                                                     FOLL_FORCE | FOLL_WRITE)
                                    != sizeof(reg))
                                        return -EFAULT;
                                pos++;
index 4e06750a5d295649660ff4ca0998eb03b00da9e9..cd0e32bbcb1de0f6b16bce4ccd3f8b89acaa18b9 100644 (file)
@@ -238,7 +238,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
                pages += nr;
 
                ret = get_user_pages_unlocked(start,
-                       (end - start) >> PAGE_SHIFT, write, 0, pages);
+                       (end - start) >> PAGE_SHIFT, pages,
+                       write ? FOLL_WRITE : 0);
 
                /* Have to be a bit careful with return values */
                if (nr > 0) {
index 77f28ce9c6464e71a942f767082391502c8fa80d..9976fcecd17edfca5d5dbfe94c2dad0a635edf2d 100644 (file)
@@ -5,8 +5,8 @@
 OBJECT_FILES_NON_STANDARD_entry_$(BITS).o   := y
 OBJECT_FILES_NON_STANDARD_entry_64_compat.o := y
 
-CFLAGS_syscall_64.o            += -Wno-override-init
-CFLAGS_syscall_32.o            += -Wno-override-init
+CFLAGS_syscall_64.o            += $(call cc-option,-Wno-override-init,)
+CFLAGS_syscall_32.o            += $(call cc-option,-Wno-override-init,)
 obj-y                          := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o
 obj-y                          += common.o
 
index ff6ef7b3082237e5d223de9a9986202761566d17..2b361854254414662c17b531e2cacb8d5bb696b9 100644 (file)
 380    i386    pkey_mprotect           sys_pkey_mprotect
 381    i386    pkey_alloc              sys_pkey_alloc
 382    i386    pkey_free               sys_pkey_free
-#383   i386    pkey_get                sys_pkey_get
-#384   i386    pkey_set                sys_pkey_set
index 2f024d02511da47e12cacfbeea9826c440de8f9e..e93ef0b38db8e16a38f83e2e3f08dfb8d5fff4a0 100644 (file)
 329    common  pkey_mprotect           sys_pkey_mprotect
 330    common  pkey_alloc              sys_pkey_alloc
 331    common  pkey_free               sys_pkey_free
-#332   common  pkey_get                sys_pkey_get
-#333   common  pkey_set                sys_pkey_set
 
 #
 # x32-specific system call numbers start at 512 to avoid cache impact
index a3a9eb84b5cf16ffebd5bf46c69037db4d1e3794..a74a2dbc01801a1ccc3c041a6037214c369957bb 100644 (file)
@@ -3607,10 +3607,14 @@ __init int intel_pmu_init(void)
 
        /*
         * Quirk: v2 perfmon does not report fixed-purpose events, so
-        * assume at least 3 events:
+        * assume at least 3 events, when not running in a hypervisor:
         */
-       if (version > 1)
-               x86_pmu.num_counters_fixed = max((int)edx.split.num_counters_fixed, 3);
+       if (version > 1) {
+               int assume = 3 * !boot_cpu_has(X86_FEATURE_HYPERVISOR);
+
+               x86_pmu.num_counters_fixed =
+                       max((int)edx.split.num_counters_fixed, assume);
+       }
 
        if (boot_cpu_has(X86_FEATURE_PDCM)) {
                u64 capabilities;
@@ -3898,6 +3902,7 @@ __init int intel_pmu_init(void)
                break;
 
        case INTEL_FAM6_XEON_PHI_KNL:
+       case INTEL_FAM6_XEON_PHI_KNM:
                memcpy(hw_cache_event_ids,
                       slm_hw_cache_event_ids, sizeof(hw_cache_event_ids));
                memcpy(hw_cache_extra_regs,
@@ -3912,7 +3917,7 @@ __init int intel_pmu_init(void)
                x86_pmu.flags |= PMU_FL_HAS_RSP_1;
                x86_pmu.flags |= PMU_FL_NO_HT_SHARING;
 
-               pr_cont("Knights Landing events, ");
+               pr_cont("Knights Landing/Mill events, ");
                break;
 
        case INTEL_FAM6_SKYLAKE_MOBILE:
index 3ca87b5a8677608c86ac8d748b59ead0d160f580..4f5ac726335f899a4faefd01a41aac241b9160be 100644 (file)
@@ -48,7 +48,8 @@
  *                            Scope: Core
  *     MSR_CORE_C6_RESIDENCY: CORE C6 Residency Counter
  *                            perf code: 0x02
- *                            Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,SKL
+ *                            Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW
+ *                                             SKL,KNL
  *                            Scope: Core
  *     MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter
  *                            perf code: 0x03
  *                            Scope: Core
  *     MSR_PKG_C2_RESIDENCY:  Package C2 Residency Counter.
  *                            perf code: 0x00
- *                            Available model: SNB,IVB,HSW,BDW,SKL
+ *                            Available model: SNB,IVB,HSW,BDW,SKL,KNL
  *                            Scope: Package (physical package)
  *     MSR_PKG_C3_RESIDENCY:  Package C3 Residency Counter.
  *                            perf code: 0x01
- *                            Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL
+ *                            Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,KNL
  *                            Scope: Package (physical package)
  *     MSR_PKG_C6_RESIDENCY:  Package C6 Residency Counter.
  *                            perf code: 0x02
- *                            Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,SKL
+ *                            Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW
+ *                                             SKL,KNL
  *                            Scope: Package (physical package)
  *     MSR_PKG_C7_RESIDENCY:  Package C7 Residency Counter.
  *                            perf code: 0x03
@@ -118,6 +120,7 @@ struct cstate_model {
 
 /* Quirk flags */
 #define SLM_PKG_C6_USE_C7_MSR  (1UL << 0)
+#define KNL_CORE_C6_MSR                (1UL << 1)
 
 struct perf_cstate_msr {
        u64     msr;
@@ -488,6 +491,18 @@ static const struct cstate_model slm_cstates __initconst = {
        .quirks                 = SLM_PKG_C6_USE_C7_MSR,
 };
 
+
+static const struct cstate_model knl_cstates __initconst = {
+       .core_events            = BIT(PERF_CSTATE_CORE_C6_RES),
+
+       .pkg_events             = BIT(PERF_CSTATE_PKG_C2_RES) |
+                                 BIT(PERF_CSTATE_PKG_C3_RES) |
+                                 BIT(PERF_CSTATE_PKG_C6_RES),
+       .quirks                 = KNL_CORE_C6_MSR,
+};
+
+
+
 #define X86_CSTATES_MODEL(model, states)                               \
        { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long) &(states) }
 
@@ -523,6 +538,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
 
        X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_MOBILE,  snb_cstates),
        X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_DESKTOP, snb_cstates),
+
+       X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNL, knl_cstates),
        { },
 };
 MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match);
@@ -558,6 +575,11 @@ static int __init cstate_probe(const struct cstate_model *cm)
        if (cm->quirks & SLM_PKG_C6_USE_C7_MSR)
                pkg_msr[PERF_CSTATE_PKG_C6_RES].msr = MSR_PKG_C7_RESIDENCY;
 
+       /* KNL has different MSR for CORE C6 */
+       if (cm->quirks & KNL_CORE_C6_MSR)
+               pkg_msr[PERF_CSTATE_CORE_C6_RES].msr = MSR_KNL_CORE_C6_RESIDENCY;
+
+
        has_cstate_core = cstate_probe_msr(cm->core_events,
                                           PERF_CSTATE_CORE_EVENT_MAX,
                                           core_msr, core_events_attrs);
index fc6cf21c535e19f4c07deccf4a6444199e5ae39c..81b321ace8e0194d3ce18b29fcb42c20b834a918 100644 (file)
@@ -458,8 +458,8 @@ void intel_pmu_lbr_del(struct perf_event *event)
        if (!x86_pmu.lbr_nr)
                return;
 
-       if (branch_user_callstack(cpuc->br_sel) && event->ctx &&
-                                       event->ctx->task_ctx_data) {
+       if (branch_user_callstack(cpuc->br_sel) &&
+           event->ctx->task_ctx_data) {
                task_ctx = event->ctx->task_ctx_data;
                task_ctx->lbr_callstack_users--;
        }
index b0f0e835a770f7ee959681513bd7e41af39827a0..0a535cea8ff31adf6e06fc32ff763d423a73ab74 100644 (file)
@@ -763,6 +763,7 @@ static const struct x86_cpu_id rapl_cpu_match[] __initconst = {
        X86_RAPL_MODEL_MATCH(INTEL_FAM6_BROADWELL_XEON_D, hsw_rapl_init),
 
        X86_RAPL_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNL, knl_rapl_init),
+       X86_RAPL_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNM, knl_rapl_init),
 
        X86_RAPL_MODEL_MATCH(INTEL_FAM6_SKYLAKE_MOBILE,  skl_rapl_init),
        X86_RAPL_MODEL_MATCH(INTEL_FAM6_SKYLAKE_DESKTOP, skl_rapl_init),
index d9844cc74486e602c7b768e225856323a37025b8..efca2685d8767582e624d1c38779e5c96eef33b9 100644 (file)
@@ -1349,6 +1349,7 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {
        X86_UNCORE_MODEL_MATCH(INTEL_FAM6_BROADWELL_X,    bdx_uncore_init),
        X86_UNCORE_MODEL_MATCH(INTEL_FAM6_BROADWELL_XEON_D, bdx_uncore_init),
        X86_UNCORE_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNL,   knl_uncore_init),
+       X86_UNCORE_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNM,   knl_uncore_init),
        X86_UNCORE_MODEL_MATCH(INTEL_FAM6_SKYLAKE_DESKTOP,skl_uncore_init),
        X86_UNCORE_MODEL_MATCH(INTEL_FAM6_SKYLAKE_MOBILE, skl_uncore_init),
        X86_UNCORE_MODEL_MATCH(INTEL_FAM6_SKYLAKE_X,      skx_uncore_init),
index 1188bc849ee3b3253fd8229fca21bf2d6c87856e..a39629206864e5bb74aaddea15ca1ab762877042 100644 (file)
 #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
 
 #define X86_FEATURE_INTEL_PT   ( 7*32+15) /* Intel Processor Trace */
+#define X86_FEATURE_AVX512_4VNNIW (7*32+16) /* AVX-512 Neural Network Instructions */
+#define X86_FEATURE_AVX512_4FMAPS (7*32+17) /* AVX-512 Multiply Accumulation Single precision */
 
 /* Virtualization flags: Linux defined, word 8 */
 #define X86_FEATURE_TPR_SHADOW  ( 8*32+ 0) /* Intel TPR Shadow */
index 9ae5ab80a497c35a9fa3048c532bdb9239c395e1..34a46dc076d3610212e6f5c9f0abfb2ab9bc3629 100644 (file)
@@ -64,5 +64,6 @@
 /* Xeon Phi */
 
 #define INTEL_FAM6_XEON_PHI_KNL                0x57 /* Knights Landing */
+#define INTEL_FAM6_XEON_PHI_KNM                0x85 /* Knights Mill */
 
 #endif /* _ASM_X86_INTEL_FAMILY_H */
index de25aad0785389c399dd12c843ca2d4d2ff0d112..d34bd370074b46662e5a96014ed4cd5b521f6045 100644 (file)
@@ -351,4 +351,10 @@ extern void arch_phys_wc_del(int handle);
 #define arch_phys_wc_add arch_phys_wc_add
 #endif
 
+#ifdef CONFIG_X86_PAT
+extern int arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size);
+extern void arch_io_free_memtype_wc(resource_size_t start, resource_size_t size);
+#define arch_io_reserve_memtype_wc arch_io_reserve_memtype_wc
+#endif
+
 #endif /* _ASM_X86_IO_H */
index 56f4c6676b29034830d4fdb9c7cdcedd0c14e2a1..78f3760ca1f2985cfcbb278d59fbe71f92f69ea7 100644 (file)
@@ -88,7 +88,6 @@
 
 #define MSR_IA32_RTIT_CTL              0x00000570
 #define MSR_IA32_RTIT_STATUS           0x00000571
-#define MSR_IA32_RTIT_STATUS           0x00000571
 #define MSR_IA32_RTIT_ADDR0_A          0x00000580
 #define MSR_IA32_RTIT_ADDR0_B          0x00000581
 #define MSR_IA32_RTIT_ADDR1_A          0x00000582
index 3d33a719f5c1d8652be749c43ba4b7dc5560c4d5..a34e0d4b957d639afb5978863e57fefb74a173f2 100644 (file)
@@ -103,8 +103,10 @@ static inline bool __down_read_trylock(struct rw_semaphore *sem)
 ({                                                     \
        long tmp;                                       \
        struct rw_semaphore* ret;                       \
+       register void *__sp asm(_ASM_SP);               \
+                                                       \
        asm volatile("# beginning down_write\n\t"       \
-                    LOCK_PREFIX "  xadd      %1,(%3)\n\t"      \
+                    LOCK_PREFIX "  xadd      %1,(%4)\n\t"      \
                     /* adds 0xffff0001, returns the old value */ \
                     "  test " __ASM_SEL(%w1,%k1) "," __ASM_SEL(%w1,%k1) "\n\t" \
                     /* was the active mask 0 before? */\
@@ -112,7 +114,7 @@ static inline bool __down_read_trylock(struct rw_semaphore *sem)
                     "  call " slow_path "\n"           \
                     "1:\n"                             \
                     "# ending down_write"              \
-                    : "+m" (sem->count), "=d" (tmp), "=a" (ret)        \
+                    : "+m" (sem->count), "=d" (tmp), "=a" (ret), "+r" (__sp) \
                     : "a" (sem), "1" (RWSEM_ACTIVE_WRITE_BIAS) \
                     : "memory", "cc");                 \
        ret;                                            \
index 2aaca53c097416bbb305c0014acac1ba6d72dbb0..ad6f5eb07a95bd221fe4e13c8cdb3af0cd27aa37 100644 (file)
@@ -52,6 +52,15 @@ struct task_struct;
 #include <asm/cpufeature.h>
 #include <linux/atomic.h>
 
+struct thread_info {
+       unsigned long           flags;          /* low level flags */
+};
+
+#define INIT_THREAD_INFO(tsk)                  \
+{                                              \
+       .flags          = 0,                    \
+}
+
 #define init_stack             (init_thread_union.stack)
 
 #else /* !__ASSEMBLY__ */
index 8a5abaa7d4533e1592bc6977569c737762089516..931ced8ca345114397536ae1998a438a84889193 100644 (file)
@@ -454,6 +454,7 @@ static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 polarity, u16 trigger,
                polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK;
 
        mp_override_legacy_irq(bus_irq, polarity, trigger, gsi);
+       acpi_penalize_sci_irq(bus_irq, trigger, polarity);
 
        /*
         * stash over-ride to indicate we've been here
index 620ab06bcf4571c8841b70e35a57657dda2e9985..017bda12caaed9c46f60fccc90f05d861e58e1ba 100644 (file)
@@ -429,7 +429,7 @@ int __init save_microcode_in_initrd_amd(void)
         * We need the physical address of the container for both bitness since
         * boot_params.hdr.ramdisk_image is a physical address.
         */
-       cont    = __pa(container);
+       cont    = __pa_nodebug(container);
        cont_va = container;
 #endif
 
index 8cb57df9398d91a74eec678134844d8ac1052463..1db8dc490b665e751f43f3411cc21079eea75ae2 100644 (file)
@@ -32,6 +32,8 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c)
 
        static const struct cpuid_bit cpuid_bits[] = {
                { X86_FEATURE_INTEL_PT,         CR_EBX,25, 0x00000007, 0 },
+               { X86_FEATURE_AVX512_4VNNIW,    CR_EDX, 2, 0x00000007, 0 },
+               { X86_FEATURE_AVX512_4FMAPS,    CR_EDX, 3, 0x00000007, 0 },
                { X86_FEATURE_APERFMPERF,       CR_ECX, 0, 0x00000006, 0 },
                { X86_FEATURE_EPB,              CR_ECX, 3, 0x00000006, 0 },
                { X86_FEATURE_HW_PSTATE,        CR_EDX, 7, 0x80000007, 0 },
index 81160578b91ac9a053bf5a5f172ea2fb6da1c241..5130985b758b98ea74380ec8991ca1f72d709521 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/div64.h>
 #include <asm/x86_init.h>
 #include <asm/hypervisor.h>
+#include <asm/timer.h>
 #include <asm/apic.h>
 
 #define CPUID_VMWARE_INFO_LEAF 0x40000000
@@ -94,6 +95,10 @@ static void __init vmware_platform_setup(void)
        } else {
                pr_warn("Failed to get TSC freq from the hypervisor\n");
        }
+
+#ifdef CONFIG_X86_IO_APIC
+       no_timer_check = 1;
+#endif
 }
 
 /*
index b85fe5f91c3fe4901cf766aa1f6996710f844b0d..90e8dde3ec26b1d97d10309d2d796489078b5cdf 100644 (file)
@@ -350,7 +350,7 @@ int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
                 * continue building up new bios map based on this
                 * information
                 */
-               if (current_type != last_type) {
+               if (current_type != last_type || current_type == E820_PRAM) {
                        if (last_type != 0)      {
                                new_bios[new_bios_entry].size =
                                        change_point[chgidx]->addr - last_addr;
index 124aa5c593f8da7aba6643bc609a332744d10ba6..095ef7ddd6ae4d1c6d5476d6e63561963786e793 100644 (file)
@@ -74,6 +74,8 @@ void fpu__xstate_clear_all_cpu_caps(void)
        setup_clear_cpu_cap(X86_FEATURE_MPX);
        setup_clear_cpu_cap(X86_FEATURE_XGETBV1);
        setup_clear_cpu_cap(X86_FEATURE_PKU);
+       setup_clear_cpu_cap(X86_FEATURE_AVX512_4VNNIW);
+       setup_clear_cpu_cap(X86_FEATURE_AVX512_4FMAPS);
 }
 
 /*
index 28cee019209ce7f7fd9ec160e4409fecf000819f..d9d8d16b69db89df63b5ff33a4e597fcf4e5eba6 100644 (file)
@@ -50,6 +50,7 @@
 #include <linux/kallsyms.h>
 #include <linux/ftrace.h>
 #include <linux/frame.h>
+#include <linux/kasan.h>
 
 #include <asm/text-patching.h>
 #include <asm/cacheflush.h>
@@ -1057,9 +1058,10 @@ int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
         * tailcall optimization. So, to be absolutely safe
         * we also save and restore enough stack bytes to cover
         * the argument area.
+        * Use __memcpy() to avoid KASAN stack out-of-bounds reports as we copy
+        * raw stack chunk with redzones:
         */
-       memcpy(kcb->jprobes_stack, (kprobe_opcode_t *)addr,
-              MIN_STACK_SIZE(addr));
+       __memcpy(kcb->jprobes_stack, (kprobe_opcode_t *)addr, MIN_STACK_SIZE(addr));
        regs->flags &= ~X86_EFLAGS_IF;
        trace_hardirqs_off();
        regs->ip = (unsigned long)(jp->entry);
@@ -1080,6 +1082,9 @@ void jprobe_return(void)
 {
        struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
 
+       /* Unpoison stack redzones in the frames we are going to jump over. */
+       kasan_unpoison_stack_above_sp_to(kcb->jprobe_saved_sp);
+
        asm volatile (
 #ifdef CONFIG_X86_64
                        "       xchg   %%rbx,%%rsp      \n"
@@ -1118,7 +1123,7 @@ int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
                /* It's OK to start function graph tracing again */
                unpause_graph_tracing();
                *regs = kcb->jprobe_saved_regs;
-               memcpy(saved_sp, kcb->jprobes_stack, MIN_STACK_SIZE(saved_sp));
+               __memcpy(saved_sp, kcb->jprobes_stack, MIN_STACK_SIZE(saved_sp));
                preempt_enable_no_resched();
                return 1;
        }
index efe73aacf966eb6f54e6c252f4e672a425ba7350..7b0d3da52fb42f288a947f1befe8886319b37ec5 100644 (file)
 
 #ifdef CC_USING_FENTRY
 # define function_hook __fentry__
+EXPORT_SYMBOL(__fentry__)
 #else
 # define function_hook mcount
+EXPORT_SYMBOL(mcount)
 #endif
 
 /* All cases save the original rbp (8 bytes) */
@@ -295,7 +297,6 @@ trace:
        jmp fgraph_trace
 END(function_hook)
 #endif /* CONFIG_DYNAMIC_FTRACE */
-EXPORT_SYMBOL(function_hook)
 #endif /* CONFIG_FUNCTION_TRACER */
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
index 51402a7e4ca6ed040bd727477a0cee9c23426887..0bee04d41bed04406de00732cb1d73e5f6f32c33 100644 (file)
@@ -625,8 +625,6 @@ static void amd_disable_seq_and_redirect_scrub(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3,
                        amd_disable_seq_and_redirect_scrub);
 
-#endif
-
 #if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE)
 #include <linux/jump_label.h>
 #include <asm/string_64.h>
@@ -657,3 +655,4 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, quirk_intel_brickland_xeon_
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, quirk_intel_brickland_xeon_ras_cap);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2083, quirk_intel_purley_xeon_ras_cap);
 #endif
+#endif
index bbfbca5fea0cda10cf7f56e92d2a19d95a37ecb7..9c337b0e8ba7c4ac5b82a3e4ad979c7d4011b4bf 100644 (file)
@@ -1221,11 +1221,16 @@ void __init setup_arch(char **cmdline_p)
         */
        get_smp_config();
 
+       /*
+        * Systems w/o ACPI and mptables might not have it mapped the local
+        * APIC yet, but prefill_possible_map() might need to access it.
+        */
+       init_apic_mappings();
+
        prefill_possible_map();
 
        init_cpu_to_node();
 
-       init_apic_mappings();
        io_apic_init_mappings();
 
        kvm_guest_init();
index 40df33753bae8d71390b7f4bd81113211a7b67da..ec1f756f9dc9ace1badccd544b6032d64e520360 100644 (file)
@@ -105,9 +105,6 @@ void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact)
        /* Don't let flags to be set from userspace */
        act->sa.sa_flags &= ~(SA_IA32_ABI | SA_X32_ABI);
 
-       if (user_64bit_mode(current_pt_regs()))
-               return;
-
        if (in_ia32_syscall())
                act->sa.sa_flags |= SA_IA32_ABI;
        if (in_x32_syscall())
index 68f8cc222f255aa1cf5266e2d84d7ceeb2417977..c00cb64bc0a12e5f6f36c37215b05a3afd178db9 100644 (file)
@@ -261,8 +261,10 @@ static inline void __smp_reschedule_interrupt(void)
 
 __visible void smp_reschedule_interrupt(struct pt_regs *regs)
 {
+       irq_enter();
        ack_APIC_irq();
        __smp_reschedule_interrupt();
+       irq_exit();
        /*
         * KVM uses this interrupt to force a cpu out of guest mode
         */
index 951f093a96fe90709827a7f75430ad042c318774..42f5eb7b4f6c85251f4ab65d6de44268b6de06ea 100644 (file)
@@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void)
 
        /* No boot processor was found in mptable or ACPI MADT */
        if (!num_processors) {
-               int apicid = boot_cpu_physical_apicid;
-               int cpu = hard_smp_processor_id();
+               if (boot_cpu_has(X86_FEATURE_APIC)) {
+                       int apicid = boot_cpu_physical_apicid;
+                       int cpu = hard_smp_processor_id();
 
-               pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
+                       pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
 
-               /* Make sure boot cpu is enumerated */
-               if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
-                   apic->apic_id_valid(apicid))
-                       generic_processor_info(apicid, boot_cpu_apic_version);
+                       /* Make sure boot cpu is enumerated */
+                       if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
+                           apic->apic_id_valid(apicid))
+                               generic_processor_info(apicid, boot_cpu_apic_version);
+               }
 
                if (!num_processors)
                        num_processors = 1;
index c9a073866ca7b1f4c6efa5b9db110c591083b3af..a23ce84a3f6ccfefe36a0d3070880aa45d2bc0f5 100644 (file)
@@ -57,7 +57,8 @@ static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs)
        unsigned char opcode[15];
        unsigned long addr = convert_ip_to_linear(child, regs);
 
-       copied = access_process_vm(child, addr, opcode, sizeof(opcode), 0);
+       copied = access_process_vm(child, addr, opcode, sizeof(opcode),
+                       FOLL_FORCE);
        for (i = 0; i < copied; i++) {
                switch (opcode[i]) {
                /* popf and iret */
index 9298993dc8b715adb79e78f2f71be74402e68b7d..2d721e533cf48f1114b2d6cc8cacab07b2b31ebb 100644 (file)
@@ -47,7 +47,14 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
        get_stack_info(first_frame, state->task, &state->stack_info,
                       &state->stack_mask);
 
-       if (!__kernel_text_address(*first_frame))
+       /*
+        * The caller can provide the address of the first frame directly
+        * (first_frame) or indirectly (regs->sp) to indicate which stack frame
+        * to start unwinding at.  Skip ahead until we reach it.
+        */
+       if (!unwind_done(state) &&
+           (!on_stack(&state->stack_info, first_frame, sizeof(long)) ||
+           !__kernel_text_address(*first_frame)))
                unwind_next_frame(state);
 }
 EXPORT_SYMBOL_GPL(__unwind_start);
index c7220ba94aa776dceb3db4413ea9dec4ebace324..1a22de70f7f7d4e6267d262dbe153d0670895315 100644 (file)
@@ -594,7 +594,7 @@ static void kvm_ioapic_reset(struct kvm_ioapic *ioapic)
        ioapic->irr = 0;
        ioapic->irr_delivered = 0;
        ioapic->id = 0;
-       memset(ioapic->irq_eoi, 0x00, IOAPIC_NUM_PINS);
+       memset(ioapic->irq_eoi, 0x00, sizeof(ioapic->irq_eoi));
        rtc_irq_eoi_tracking_reset(ioapic);
 }
 
index 6c633de84dd7339637e24604952fb4d2c5180562..e375235d81c9b3a141a341223b617b8eac06c0a0 100644 (file)
@@ -5733,13 +5733,13 @@ static int kvmclock_cpu_online(unsigned int cpu)
 
 static void kvm_timer_init(void)
 {
-       int cpu;
-
        max_tsc_khz = tsc_khz;
 
        if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
 #ifdef CONFIG_CPU_FREQ
                struct cpufreq_policy policy;
+               int cpu;
+
                memset(&policy, 0, sizeof(policy));
                cpu = get_cpu();
                cpufreq_get_policy(&policy, cpu);
index b8b6a60b32cf47837070518bd44d4c4742910697..0d4fb3ebbbac9872aaaf26514211ae543a253299 100644 (file)
@@ -435,7 +435,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
 
                ret = get_user_pages_unlocked(start,
                                              (end - start) >> PAGE_SHIFT,
-                                             write, 0, pages);
+                                             pages, write ? FOLL_WRITE : 0);
 
                /* Have to be a bit careful with return values */
                if (nr > 0) {
index ddd2661c4502922a63fbcd169615d34dddd6fcae..887e57182716828b7f4f4946fe7145d106ec5bea 100644 (file)
@@ -104,10 +104,10 @@ void __init kernel_randomize_memory(void)
         * consistent with the vaddr_start/vaddr_end variables.
         */
        BUILD_BUG_ON(vaddr_start >= vaddr_end);
-       BUILD_BUG_ON(config_enabled(CONFIG_X86_ESPFIX64) &&
+       BUILD_BUG_ON(IS_ENABLED(CONFIG_X86_ESPFIX64) &&
                     vaddr_end >= EFI_VA_START);
-       BUILD_BUG_ON((config_enabled(CONFIG_X86_ESPFIX64) ||
-                     config_enabled(CONFIG_EFI)) &&
+       BUILD_BUG_ON((IS_ENABLED(CONFIG_X86_ESPFIX64) ||
+                     IS_ENABLED(CONFIG_EFI)) &&
                     vaddr_end >= __START_KERNEL_map);
        BUILD_BUG_ON(vaddr_end > __START_KERNEL_map);
 
index 80476878eb4ca5c8ad56340bb52b2423995a7867..e4f800999b32dc94d5ba1a1283591649a818fbb7 100644 (file)
@@ -544,10 +544,9 @@ static int mpx_resolve_fault(long __user *addr, int write)
 {
        long gup_ret;
        int nr_pages = 1;
-       int force = 0;
 
-       gup_ret = get_user_pages((unsigned long)addr, nr_pages, write,
-                       force, NULL, NULL);
+       gup_ret = get_user_pages((unsigned long)addr, nr_pages,
+                       write ? FOLL_WRITE : 0, NULL, NULL);
        /*
         * get_user_pages() returns number of pages gotten.
         * 0 means we failed to fault in and get anything,
index 170cc4ff057b398382bef3dd635d6a9115460d88..83e701f160a9128dc72316376d8b6a66233e223c 100644 (file)
@@ -730,6 +730,20 @@ void io_free_memtype(resource_size_t start, resource_size_t end)
        free_memtype(start, end);
 }
 
+int arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size)
+{
+       enum page_cache_mode type = _PAGE_CACHE_MODE_WC;
+
+       return io_reserve_memtype(start, start + size, &type);
+}
+EXPORT_SYMBOL(arch_io_reserve_memtype_wc);
+
+void arch_io_free_memtype_wc(resource_size_t start, resource_size_t size)
+{
+       io_free_memtype(start, start + size);
+}
+EXPORT_SYMBOL(arch_io_free_memtype_wc);
+
 pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
                                unsigned long size, pgprot_t vma_prot)
 {
index b4d5e95fe4dfea57c3d9bdcdfa2d35d46a48bc5d..4a6a5a26c58295e4245b09be21a658c3ddae86a2 100644 (file)
@@ -40,7 +40,15 @@ s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5)
                 */
                return BIOS_STATUS_UNIMPLEMENTED;
 
-       ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);
+       /*
+        * If EFI_OLD_MEMMAP is set, we need to fall back to using our old EFI
+        * callback method, which uses efi_call() directly, with the kernel page tables:
+        */
+       if (unlikely(test_bit(EFI_OLD_MEMMAP, &efi.flags)))
+               ret = efi_call((void *)__va(tab->function), (u64)which, a1, a2, a3, a4, a5);
+       else
+               ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);
+
        return ret;
 }
 EXPORT_SYMBOL_GPL(uv_bios_call);
index 5766ead6fdb9679907c63aa78f8becccc8d9ecff..60a5a5a85505dd25305aea03d0850613e51ee791 100644 (file)
@@ -36,7 +36,8 @@ int is_syscall(unsigned long addr)
                 * slow, but that doesn't matter, since it will be called only
                 * in case of singlestepping, if copy_from_user failed.
                 */
-               n = access_process_vm(current, addr, &instr, sizeof(instr), 0);
+               n = access_process_vm(current, addr, &instr, sizeof(instr),
+                               FOLL_FORCE);
                if (n != sizeof(instr)) {
                        printk(KERN_ERR "is_syscall : failed to read "
                               "instruction from 0x%lx\n", addr);
index 0b5c184dd5b3b80894c3db60ead6432ad20dca57..e30202b1716efb4243372d02e61f5f8269203419 100644 (file)
@@ -212,7 +212,8 @@ int is_syscall(unsigned long addr)
                 * slow, but that doesn't matter, since it will be called only
                 * in case of singlestepping, if copy_from_user failed.
                 */
-               n = access_process_vm(current, addr, &instr, sizeof(instr), 0);
+               n = access_process_vm(current, addr, &instr, sizeof(instr),
+                               FOLL_FORCE);
                if (n != sizeof(instr)) {
                        printk("is_syscall : failed to read instruction from "
                               "0x%lx\n", addr);
index c0fdd57da7aad477534b5e4d019ebe4e06e2df07..bdd85568540382ebe3b5683534fb2ab7144e39a3 100644 (file)
@@ -1837,6 +1837,7 @@ static void __init init_hvm_pv_info(void)
 
        xen_domain_type = XEN_HVM_DOMAIN;
 }
+#endif
 
 static int xen_cpu_up_prepare(unsigned int cpu)
 {
@@ -1887,6 +1888,7 @@ static int xen_cpu_up_online(unsigned int cpu)
        return 0;
 }
 
+#ifdef CONFIG_XEN_PVHVM
 #ifdef CONFIG_KEXEC_CORE
 static void xen_hvm_shutdown(void)
 {
index 7be53cb1cc3cebf3e9f5c30e004f6f74b50bfdbf..6ebcef28231486ae2b9dcefadfe61412b2112f11 100644 (file)
@@ -133,6 +133,26 @@ int badblocks_check(struct badblocks *bb, sector_t s, int sectors,
 }
 EXPORT_SYMBOL_GPL(badblocks_check);
 
+static void badblocks_update_acked(struct badblocks *bb)
+{
+       u64 *p = bb->page;
+       int i;
+       bool unacked = false;
+
+       if (!bb->unacked_exist)
+               return;
+
+       for (i = 0; i < bb->count ; i++) {
+               if (!BB_ACK(p[i])) {
+                       unacked = true;
+                       break;
+               }
+       }
+
+       if (!unacked)
+               bb->unacked_exist = 0;
+}
+
 /**
  * badblocks_set() - Add a range of bad blocks to the table.
  * @bb:                the badblocks structure that holds all badblock information
@@ -294,6 +314,8 @@ int badblocks_set(struct badblocks *bb, sector_t s, int sectors,
        bb->changed = 1;
        if (!acknowledged)
                bb->unacked_exist = 1;
+       else
+               badblocks_update_acked(bb);
        write_sequnlock_irqrestore(&bb->lock, flags);
 
        return rv;
@@ -354,7 +376,8 @@ int badblocks_clear(struct badblocks *bb, sector_t s, int sectors)
                 * current range.  Earlier ranges could also overlap,
                 * but only this one can overlap the end of the range.
                 */
-               if (BB_OFFSET(p[lo]) + BB_LEN(p[lo]) > target) {
+               if ((BB_OFFSET(p[lo]) + BB_LEN(p[lo]) > target) &&
+                   (BB_OFFSET(p[lo]) < target)) {
                        /* Partial overlap, leave the tail of this range */
                        int ack = BB_ACK(p[lo]);
                        sector_t a = BB_OFFSET(p[lo]);
@@ -377,7 +400,8 @@ int badblocks_clear(struct badblocks *bb, sector_t s, int sectors)
                        lo--;
                }
                while (lo >= 0 &&
-                      BB_OFFSET(p[lo]) + BB_LEN(p[lo]) > s) {
+                      (BB_OFFSET(p[lo]) + BB_LEN(p[lo]) > s) &&
+                      (BB_OFFSET(p[lo]) < target)) {
                        /* This range does overlap */
                        if (BB_OFFSET(p[lo]) < s) {
                                /* Keep the early parts of this range. */
@@ -399,6 +423,7 @@ int badblocks_clear(struct badblocks *bb, sector_t s, int sectors)
                }
        }
 
+       badblocks_update_acked(bb);
        bb->changed = 1;
 out:
        write_sequnlock_irq(&bb->lock);
index 6a14b68b91358bdd28d90fb5ab23100a77af31dd..3c882cbc75417d60bfa92c20f5da27aaaa86c4bf 100644 (file)
@@ -342,6 +342,34 @@ static void flush_data_end_io(struct request *rq, int error)
        struct request_queue *q = rq->q;
        struct blk_flush_queue *fq = blk_get_flush_queue(q, NULL);
 
+       /*
+        * Updating q->in_flight[] here for making this tag usable
+        * early. Because in blk_queue_start_tag(),
+        * q->in_flight[BLK_RW_ASYNC] is used to limit async I/O and
+        * reserve tags for sync I/O.
+        *
+        * More importantly this way can avoid the following I/O
+        * deadlock:
+        *
+        * - suppose there are 40 fua requests comming to flush queue
+        *   and queue depth is 31
+        * - 30 rqs are scheduled then blk_queue_start_tag() can't alloc
+        *   tag for async I/O any more
+        * - all the 30 rqs are completed before FLUSH_PENDING_TIMEOUT
+        *   and flush_data_end_io() is called
+        * - the other rqs still can't go ahead if not updating
+        *   q->in_flight[BLK_RW_ASYNC] here, meantime these rqs
+        *   are held in flush data queue and make no progress of
+        *   handling post flush rq
+        * - only after the post flush rq is handled, all these rqs
+        *   can be completed
+        */
+
+       elv_completed_request(q, rq);
+
+       /* for avoiding double accounting */
+       rq->cmd_flags &= ~REQ_STARTED;
+
        /*
         * After populating an empty queue, kick it to avoid stall.  Read
         * the comment in flush_end_io().
index ddc2eed6477146320073b061a61e15ebe4d587eb..f3d27a6dee09dfa48dd7b78bc024f4a9809e8f88 100644 (file)
@@ -1217,9 +1217,9 @@ static struct request *blk_mq_map_request(struct request_queue *q,
        blk_mq_set_alloc_data(&alloc_data, q, 0, ctx, hctx);
        rq = __blk_mq_alloc_request(&alloc_data, op, op_flags);
 
-       hctx->queued++;
-       data->hctx = hctx;
-       data->ctx = ctx;
+       data->hctx = alloc_data.hctx;
+       data->ctx = alloc_data.ctx;
+       data->hctx->queued++;
        return rq;
 }
 
index f0afdfb3c7df5c79a2d7cc21ef0bf10e0b30cbb2..194d20bee7dce40070964fa2343bc19ea946d627 100644 (file)
@@ -21,7 +21,7 @@ obj-y                         += video/
 obj-y                          += idle/
 
 # IPMI must come before ACPI in order to provide IPMI opregion support
-obj-$(CONFIG_IPMI_HANDLER)     += char/ipmi/
+obj-y                          += char/ipmi/
 
 obj-$(CONFIG_ACPI)             += acpi/
 obj-$(CONFIG_SFI)              += sfi/
index f1e6dcc7a8271c6527e954299774841e5f4eaf78..54d48b90de2cd025710a71c03bcc88ea1ca75f32 100644 (file)
@@ -46,6 +46,7 @@
 #include "acdispat.h"
 #include "acnamesp.h"
 #include "actables.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_DISPATCHER
 ACPI_MODULE_NAME("dsinit")
@@ -214,23 +215,17 @@ acpi_ds_initialize_objects(u32 table_index,
 
        /* Walk entire namespace from the supplied root */
 
-       status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
-
        /*
         * We don't use acpi_walk_namespace since we do not want to acquire
         * the namespace reader lock.
         */
        status =
            acpi_ns_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX,
-                                  ACPI_NS_WALK_UNLOCK, acpi_ds_init_one_object,
-                                  NULL, &info, NULL);
+                                  0, acpi_ds_init_one_object, NULL, &info,
+                                  NULL);
        if (ACPI_FAILURE(status)) {
                ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace"));
        }
-       (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
 
        status = acpi_get_table_by_index(table_index, &table);
        if (ACPI_FAILURE(status)) {
index 32e9ddc0cf2bbbf4a73afc640956fcc92715bbcd..2b3210f42a46966f608c7729f02aef6b3aadffde 100644 (file)
@@ -99,14 +99,11 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
                          "Method auto-serialization parse [%4.4s] %p\n",
                          acpi_ut_get_node_name(node), node));
 
-       acpi_ex_enter_interpreter();
-
        /* Create/Init a root op for the method parse tree */
 
        op = acpi_ps_alloc_op(AML_METHOD_OP, obj_desc->method.aml_start);
        if (!op) {
-               status = AE_NO_MEMORY;
-               goto unlock;
+               return_ACPI_STATUS(AE_NO_MEMORY);
        }
 
        acpi_ps_set_name(op, node->name.integer);
@@ -118,8 +115,7 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
            acpi_ds_create_walk_state(node->owner_id, NULL, NULL, NULL);
        if (!walk_state) {
                acpi_ps_free_op(op);
-               status = AE_NO_MEMORY;
-               goto unlock;
+               return_ACPI_STATUS(AE_NO_MEMORY);
        }
 
        status = acpi_ds_init_aml_walk(walk_state, op, node,
@@ -138,8 +134,6 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
        status = acpi_ps_parse_aml(walk_state);
 
        acpi_ps_delete_parse_tree(op);
-unlock:
-       acpi_ex_exit_interpreter();
        return_ACPI_STATUS(status);
 }
 
@@ -730,26 +724,6 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
 
                acpi_ds_method_data_delete_all(walk_state);
 
-               /*
-                * If method is serialized, release the mutex and restore the
-                * current sync level for this thread
-                */
-               if (method_desc->method.mutex) {
-
-                       /* Acquisition Depth handles recursive calls */
-
-                       method_desc->method.mutex->mutex.acquisition_depth--;
-                       if (!method_desc->method.mutex->mutex.acquisition_depth) {
-                               walk_state->thread->current_sync_level =
-                                   method_desc->method.mutex->mutex.
-                                   original_sync_level;
-
-                               acpi_os_release_mutex(method_desc->method.
-                                                     mutex->mutex.os_mutex);
-                               method_desc->method.mutex->mutex.thread_id = 0;
-                       }
-               }
-
                /*
                 * Delete any namespace objects created anywhere within the
                 * namespace by the execution of this method. Unless:
@@ -786,6 +760,26 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
                                    ~ACPI_METHOD_MODIFIED_NAMESPACE;
                        }
                }
+
+               /*
+                * If method is serialized, release the mutex and restore the
+                * current sync level for this thread
+                */
+               if (method_desc->method.mutex) {
+
+                       /* Acquisition Depth handles recursive calls */
+
+                       method_desc->method.mutex->mutex.acquisition_depth--;
+                       if (!method_desc->method.mutex->mutex.acquisition_depth) {
+                               walk_state->thread->current_sync_level =
+                                   method_desc->method.mutex->mutex.
+                                   original_sync_level;
+
+                               acpi_os_release_mutex(method_desc->method.
+                                                     mutex->mutex.os_mutex);
+                               method_desc->method.mutex->mutex.thread_id = 0;
+                       }
+               }
        }
 
        /* Decrement the thread count on the method */
index 028b22a3154ebb888245d030bd38db6ce04cb3ab..e36218206bb013d030fc3d75487834403ecf5458 100644 (file)
@@ -607,11 +607,9 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
                                }
                        }
 
-                       acpi_ex_exit_interpreter();
                        status =
                            acpi_ev_initialize_region
                            (acpi_ns_get_attached_object(node), FALSE);
-                       acpi_ex_enter_interpreter();
 
                        if (ACPI_FAILURE(status)) {
                                /*
index 3843f1fc5dbbd6166a2005302d8df22726fd0fa4..75ddd160a716faaa10c81ac92ddca37d1a73dcbf 100644 (file)
@@ -45,6 +45,7 @@
 #include "accommon.h"
 #include "acevents.h"
 #include "acnamesp.h"
+#include "acinterp.h"
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evrgnini")
@@ -597,9 +598,11 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
                                        }
                                }
 
+                               acpi_ex_exit_interpreter();
                                status =
                                    acpi_ev_execute_reg_method(region_obj,
                                                               ACPI_REG_CONNECT);
+                               acpi_ex_enter_interpreter();
 
                                if (acpi_ns_locked) {
                                        status =
index 334d3c5ba617dc23a46198bdd3ccaafe9b12223f..d1f20143bb113ffdc751514d793f929aab38bec1 100644 (file)
@@ -137,7 +137,9 @@ acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node)
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                          "**** Begin Table Object Initialization\n"));
 
+       acpi_ex_enter_interpreter();
        status = acpi_ds_initialize_objects(table_index, node);
+       acpi_ex_exit_interpreter();
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                          "**** Completed Table Object Initialization\n"));
index f0a029e68d3e2989b7e3ad79a02d1d0c36e1b0f4..0d099a24f776ac9bd665f3aab8006793031aef48 100644 (file)
@@ -662,7 +662,7 @@ static int ghes_proc(struct ghes *ghes)
        ghes_do_proc(ghes, ghes->estatus);
 out:
        ghes_clear_estatus(ghes);
-       return 0;
+       return rc;
 }
 
 static void ghes_add_timer(struct ghes *ghes)
index c983bf733ad37d7b608c9410108dcef32cdbf02b..bc3d914dfc3e397880581b56b33188f575ea160d 100644 (file)
@@ -87,6 +87,7 @@ struct acpi_pci_link {
 
 static LIST_HEAD(acpi_link_list);
 static DEFINE_MUTEX(acpi_link_lock);
+static int sci_irq = -1, sci_penalty;
 
 /* --------------------------------------------------------------------------
                             PCI Link Device Management
@@ -496,25 +497,13 @@ static int acpi_irq_get_penalty(int irq)
 {
        int penalty = 0;
 
-       /*
-       * Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
-       * with PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be
-       * use for PCI IRQs.
-       */
-       if (irq == acpi_gbl_FADT.sci_interrupt) {
-               u32 type = irq_get_trigger_type(irq) & IRQ_TYPE_SENSE_MASK;
-
-               if (type != IRQ_TYPE_LEVEL_LOW)
-                       penalty += PIRQ_PENALTY_ISA_ALWAYS;
-               else
-                       penalty += PIRQ_PENALTY_PCI_USING;
-       }
+       if (irq == sci_irq)
+               penalty += sci_penalty;
 
        if (irq < ACPI_MAX_ISA_IRQS)
                return penalty + acpi_isa_irq_penalty[irq];
 
-       penalty += acpi_irq_pci_sharing_penalty(irq);
-       return penalty;
+       return penalty + acpi_irq_pci_sharing_penalty(irq);
 }
 
 int __init acpi_irq_penalty_init(void)
@@ -619,6 +608,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
                            acpi_device_bid(link->device));
                return -ENODEV;
        } else {
+               if (link->irq.active < ACPI_MAX_ISA_IRQS)
+                       acpi_isa_irq_penalty[link->irq.active] +=
+                               PIRQ_PENALTY_PCI_USING;
+
                printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
                       acpi_device_name(link->device),
                       acpi_device_bid(link->device), link->irq.active);
@@ -849,7 +842,7 @@ static int __init acpi_irq_penalty_update(char *str, int used)
                        continue;
 
                if (used)
-                       new_penalty = acpi_irq_get_penalty(irq) +
+                       new_penalty = acpi_isa_irq_penalty[irq] +
                                        PIRQ_PENALTY_ISA_USED;
                else
                        new_penalty = 0;
@@ -871,7 +864,7 @@ static int __init acpi_irq_penalty_update(char *str, int used)
 void acpi_penalize_isa_irq(int irq, int active)
 {
        if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
-               acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
+               acpi_isa_irq_penalty[irq] +=
                  (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
 }
 
@@ -881,6 +874,17 @@ bool acpi_isa_irq_available(int irq)
                    acpi_irq_get_penalty(irq) < PIRQ_PENALTY_ISA_ALWAYS);
 }
 
+void acpi_penalize_sci_irq(int irq, int trigger, int polarity)
+{
+       sci_irq = irq;
+
+       if (trigger == ACPI_MADT_TRIGGER_LEVEL &&
+           polarity == ACPI_MADT_POLARITY_ACTIVE_LOW)
+               sci_penalty = PIRQ_PENALTY_PCI_USING;
+       else
+               sci_penalty = PIRQ_PENALTY_ISA_ALWAYS;
+}
+
 /*
  * Over-ride default table to reserve additional IRQs for use by ISA
  * e.g. acpi_irq_isa=5
index 562af94bec357f09ab1a33394a2ec742f9f88977..3c71b982bf2a35ae1a406e35fac2683577edb2b8 100644 (file)
@@ -1002,7 +1002,7 @@ static int binder_dec_node(struct binder_node *node, int strong, int internal)
 
 
 static struct binder_ref *binder_get_ref(struct binder_proc *proc,
-                                        uint32_t desc)
+                                        u32 desc, bool need_strong_ref)
 {
        struct rb_node *n = proc->refs_by_desc.rb_node;
        struct binder_ref *ref;
@@ -1010,12 +1010,16 @@ static struct binder_ref *binder_get_ref(struct binder_proc *proc,
        while (n) {
                ref = rb_entry(n, struct binder_ref, rb_node_desc);
 
-               if (desc < ref->desc)
+               if (desc < ref->desc) {
                        n = n->rb_left;
-               else if (desc > ref->desc)
+               } else if (desc > ref->desc) {
                        n = n->rb_right;
-               else
+               } else if (need_strong_ref && !ref->strong) {
+                       binder_user_error("tried to use weak ref as strong ref\n");
+                       return NULL;
+               } else {
                        return ref;
+               }
        }
        return NULL;
 }
@@ -1285,7 +1289,10 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
                } break;
                case BINDER_TYPE_HANDLE:
                case BINDER_TYPE_WEAK_HANDLE: {
-                       struct binder_ref *ref = binder_get_ref(proc, fp->handle);
+                       struct binder_ref *ref;
+
+                       ref = binder_get_ref(proc, fp->handle,
+                                            fp->type == BINDER_TYPE_HANDLE);
 
                        if (ref == NULL) {
                                pr_err("transaction release %d bad handle %d\n",
@@ -1380,7 +1387,7 @@ static void binder_transaction(struct binder_proc *proc,
                if (tr->target.handle) {
                        struct binder_ref *ref;
 
-                       ref = binder_get_ref(proc, tr->target.handle);
+                       ref = binder_get_ref(proc, tr->target.handle, true);
                        if (ref == NULL) {
                                binder_user_error("%d:%d got transaction to invalid handle\n",
                                        proc->pid, thread->pid);
@@ -1577,7 +1584,9 @@ static void binder_transaction(struct binder_proc *proc,
                                fp->type = BINDER_TYPE_HANDLE;
                        else
                                fp->type = BINDER_TYPE_WEAK_HANDLE;
+                       fp->binder = 0;
                        fp->handle = ref->desc;
+                       fp->cookie = 0;
                        binder_inc_ref(ref, fp->type == BINDER_TYPE_HANDLE,
                                       &thread->todo);
 
@@ -1589,7 +1598,10 @@ static void binder_transaction(struct binder_proc *proc,
                } break;
                case BINDER_TYPE_HANDLE:
                case BINDER_TYPE_WEAK_HANDLE: {
-                       struct binder_ref *ref = binder_get_ref(proc, fp->handle);
+                       struct binder_ref *ref;
+
+                       ref = binder_get_ref(proc, fp->handle,
+                                            fp->type == BINDER_TYPE_HANDLE);
 
                        if (ref == NULL) {
                                binder_user_error("%d:%d got transaction with invalid handle, %d\n",
@@ -1624,7 +1636,9 @@ static void binder_transaction(struct binder_proc *proc,
                                        return_error = BR_FAILED_REPLY;
                                        goto err_binder_get_ref_for_node_failed;
                                }
+                               fp->binder = 0;
                                fp->handle = new_ref->desc;
+                               fp->cookie = 0;
                                binder_inc_ref(new_ref, fp->type == BINDER_TYPE_HANDLE, NULL);
                                trace_binder_transaction_ref_to_ref(t, ref,
                                                                    new_ref);
@@ -1678,6 +1692,7 @@ static void binder_transaction(struct binder_proc *proc,
                        binder_debug(BINDER_DEBUG_TRANSACTION,
                                     "        fd %d -> %d\n", fp->handle, target_fd);
                        /* TODO: fput? */
+                       fp->binder = 0;
                        fp->handle = target_fd;
                } break;
 
@@ -1800,7 +1815,9 @@ static int binder_thread_write(struct binder_proc *proc,
                                                ref->desc);
                                }
                        } else
-                               ref = binder_get_ref(proc, target);
+                               ref = binder_get_ref(proc, target,
+                                                    cmd == BC_ACQUIRE ||
+                                                    cmd == BC_RELEASE);
                        if (ref == NULL) {
                                binder_user_error("%d:%d refcount change on invalid ref %d\n",
                                        proc->pid, thread->pid, target);
@@ -1996,7 +2013,7 @@ static int binder_thread_write(struct binder_proc *proc,
                        if (get_user(cookie, (binder_uintptr_t __user *)ptr))
                                return -EFAULT;
                        ptr += sizeof(binder_uintptr_t);
-                       ref = binder_get_ref(proc, target);
+                       ref = binder_get_ref(proc, target, false);
                        if (ref == NULL) {
                                binder_user_error("%d:%d %s invalid ref %d\n",
                                        proc->pid, thread->pid,
index ba5f11cebee2a1ce6528116cdc9af25b7a25af44..9669fc7c19df7fe05b922daf25e0392677433e26 100644 (file)
@@ -1418,30 +1418,33 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
         * Message mode could be enforced. In this case assume that advantage
         * of multipe MSIs is negated and use single MSI mode instead.
         */
-       nvec = pci_alloc_irq_vectors(pdev, n_ports, INT_MAX,
-                       PCI_IRQ_MSIX | PCI_IRQ_MSI);
-       if (nvec > 0) {
-               if (!(readl(hpriv->mmio + HOST_CTL) & HOST_MRSM)) {
-                       hpriv->get_irq_vector = ahci_get_irq_vector;
-                       hpriv->flags |= AHCI_HFLAG_MULTI_MSI;
-                       return nvec;
+       if (n_ports > 1) {
+               nvec = pci_alloc_irq_vectors(pdev, n_ports, INT_MAX,
+                               PCI_IRQ_MSIX | PCI_IRQ_MSI);
+               if (nvec > 0) {
+                       if (!(readl(hpriv->mmio + HOST_CTL) & HOST_MRSM)) {
+                               hpriv->get_irq_vector = ahci_get_irq_vector;
+                               hpriv->flags |= AHCI_HFLAG_MULTI_MSI;
+                               return nvec;
+                       }
+
+                       /*
+                        * Fallback to single MSI mode if the controller
+                        * enforced MRSM mode.
+                        */
+                       printk(KERN_INFO
+                               "ahci: MRSM is on, fallback to single MSI\n");
+                       pci_free_irq_vectors(pdev);
                }
 
                /*
-                * Fallback to single MSI mode if the controller enforced MRSM
-                * mode.
+                * -ENOSPC indicated we don't have enough vectors.  Don't bother
+                * trying a single vectors for any other error:
                 */
-               printk(KERN_INFO "ahci: MRSM is on, fallback to single MSI\n");
-               pci_free_irq_vectors(pdev);
+               if (nvec < 0 && nvec != -ENOSPC)
+                       return nvec;
        }
 
-       /*
-        * -ENOSPC indicated we don't have enough vectors.  Don't bother trying
-        * a single vectors for any other error:
-        */
-       if (nvec < 0 && nvec != -ENOSPC)
-               return nvec;
-
        /*
         * If the host is not capable of supporting per-port vectors, fall
         * back to single MSI before finally attempting single MSI-X.
@@ -1617,7 +1620,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                /* legacy intx interrupts */
                pci_intx(pdev, 1);
        }
-       hpriv->irq = pdev->irq;
+       hpriv->irq = pci_irq_vector(pdev, 0);
 
        if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss)
                host->flags |= ATA_HOST_PARALLEL_SCAN;
index fdf44cac08e6d0026dab6095f46b55924cd89b1d..d02e7c0f5bfdff1c6c56372113e230e55be54f5f 100644 (file)
@@ -213,14 +213,16 @@ config DEBUG_DEVRES
          If you are unsure about this, Say N here.
 
 config DEBUG_TEST_DRIVER_REMOVE
-       bool "Test driver remove calls during probe"
+       bool "Test driver remove calls during probe (UNSTABLE)"
        depends on DEBUG_KERNEL
        help
          Say Y here if you want the Driver core to test driver remove functions
          by calling probe, remove, probe. This tests the remove path without
          having to unbind the driver or unload the driver module.
 
-         If you are unsure about this, say N here.
+         This option is expected to find errors and may render your system
+         unusable. You should say N here unless you are explicitly looking to
+         test this functionality.
 
 config SYS_HYPERVISOR
        bool
index 811e11c82f32907a98a02a442ecb76cb1da471fb..0809cda93cc031360257c7f0802964e15f0f0d51 100644 (file)
@@ -2954,7 +2954,7 @@ DAC960_DetectController(struct pci_dev *PCI_Device,
        case DAC960_PD_Controller:
          if (!request_region(Controller->IO_Address, 0x80,
                              Controller->FullModelName)) {
-               DAC960_Error("IO port 0x%d busy for Controller at\n",
+               DAC960_Error("IO port 0x%lx busy for Controller at\n",
                             Controller, Controller->IO_Address);
                goto Failure;
          }
@@ -2990,7 +2990,7 @@ DAC960_DetectController(struct pci_dev *PCI_Device,
        case DAC960_P_Controller:
          if (!request_region(Controller->IO_Address, 0x80,
                              Controller->FullModelName)){
-               DAC960_Error("IO port 0x%d busy for Controller at\n",
+               DAC960_Error("IO port 0x%lx busy for Controller at\n",
                             Controller, Controller->IO_Address);
                goto Failure;
          }
index ba405b55329fb7d784213ea582eae429f05c2bc2..19a16b2dbb917afea67225290ee2d8da654db41d 100644 (file)
@@ -164,7 +164,7 @@ static void sock_shutdown(struct nbd_device *nbd)
        spin_lock(&nbd->sock_lock);
 
        if (!nbd->sock) {
-               spin_unlock_irq(&nbd->sock_lock);
+               spin_unlock(&nbd->sock_lock);
                return;
        }
 
index abb71628ab614628d62acd3d16a91ee9eae8c9b4..7b274ff4632c6944e32b95d605ee9aa9769f7082 100644 (file)
@@ -415,15 +415,15 @@ struct rbd_device {
 };
 
 /*
- * Flag bits for rbd_dev->flags.  If atomicity is required,
- * rbd_dev->lock is used to protect access.
- *
- * Currently, only the "removing" flag (which is coupled with the
- * "open_count" field) requires atomic access.
+ * Flag bits for rbd_dev->flags:
+ * - REMOVING (which is coupled with rbd_dev->open_count) is protected
+ *   by rbd_dev->lock
+ * - BLACKLISTED is protected by rbd_dev->lock_rwsem
  */
 enum rbd_dev_flags {
        RBD_DEV_FLAG_EXISTS,    /* mapped snapshot has not been deleted */
        RBD_DEV_FLAG_REMOVING,  /* this mapping is being removed */
+       RBD_DEV_FLAG_BLACKLISTED, /* our ceph_client is blacklisted */
 };
 
 static DEFINE_MUTEX(client_mutex);     /* Serialize client creation */
@@ -3926,6 +3926,7 @@ static void rbd_reregister_watch(struct work_struct *work)
        struct rbd_device *rbd_dev = container_of(to_delayed_work(work),
                                            struct rbd_device, watch_dwork);
        bool was_lock_owner = false;
+       bool need_to_wake = false;
        int ret;
 
        dout("%s rbd_dev %p\n", __func__, rbd_dev);
@@ -3935,19 +3936,27 @@ static void rbd_reregister_watch(struct work_struct *work)
                was_lock_owner = rbd_release_lock(rbd_dev);
 
        mutex_lock(&rbd_dev->watch_mutex);
-       if (rbd_dev->watch_state != RBD_WATCH_STATE_ERROR)
-               goto fail_unlock;
+       if (rbd_dev->watch_state != RBD_WATCH_STATE_ERROR) {
+               mutex_unlock(&rbd_dev->watch_mutex);
+               goto out;
+       }
 
        ret = __rbd_register_watch(rbd_dev);
        if (ret) {
                rbd_warn(rbd_dev, "failed to reregister watch: %d", ret);
-               if (ret != -EBLACKLISTED)
+               if (ret == -EBLACKLISTED || ret == -ENOENT) {
+                       set_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags);
+                       need_to_wake = true;
+               } else {
                        queue_delayed_work(rbd_dev->task_wq,
                                           &rbd_dev->watch_dwork,
                                           RBD_RETRY_DELAY);
-               goto fail_unlock;
+               }
+               mutex_unlock(&rbd_dev->watch_mutex);
+               goto out;
        }
 
+       need_to_wake = true;
        rbd_dev->watch_state = RBD_WATCH_STATE_REGISTERED;
        rbd_dev->watch_cookie = rbd_dev->watch_handle->linger_id;
        mutex_unlock(&rbd_dev->watch_mutex);
@@ -3963,13 +3972,10 @@ static void rbd_reregister_watch(struct work_struct *work)
                                 ret);
        }
 
+out:
        up_write(&rbd_dev->lock_rwsem);
-       wake_requests(rbd_dev, true);
-       return;
-
-fail_unlock:
-       mutex_unlock(&rbd_dev->watch_mutex);
-       up_write(&rbd_dev->lock_rwsem);
+       if (need_to_wake)
+               wake_requests(rbd_dev, true);
 }
 
 /*
@@ -4074,7 +4080,9 @@ static void rbd_wait_state_locked(struct rbd_device *rbd_dev)
                up_read(&rbd_dev->lock_rwsem);
                schedule();
                down_read(&rbd_dev->lock_rwsem);
-       } while (rbd_dev->lock_state != RBD_LOCK_STATE_LOCKED);
+       } while (rbd_dev->lock_state != RBD_LOCK_STATE_LOCKED &&
+                !test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags));
+
        finish_wait(&rbd_dev->lock_waitq, &wait);
 }
 
@@ -4166,8 +4174,16 @@ static void rbd_queue_workfn(struct work_struct *work)
 
        if (must_be_locked) {
                down_read(&rbd_dev->lock_rwsem);
-               if (rbd_dev->lock_state != RBD_LOCK_STATE_LOCKED)
+               if (rbd_dev->lock_state != RBD_LOCK_STATE_LOCKED &&
+                   !test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags))
                        rbd_wait_state_locked(rbd_dev);
+
+               WARN_ON((rbd_dev->lock_state == RBD_LOCK_STATE_LOCKED) ^
+                       !test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags));
+               if (test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags)) {
+                       result = -EBLACKLISTED;
+                       goto err_unlock;
+               }
        }
 
        img_request = rbd_img_request_create(rbd_dev, offset, length, op_type,
index 7010dcac93288aa1984ea9d7d232bdd163e4d37a..78751057164aedfe29b270a69d10c7c6f7b3b73a 100644 (file)
@@ -111,6 +111,7 @@ config OMAP_OCP2SCP
 config QCOM_EBI2
        bool "Qualcomm External Bus Interface 2 (EBI2)"
        depends on HAS_IOMEM
+       depends on ARCH_QCOM || COMPILE_TEST
        help
          Say y here to enable support for the Qualcomm External Bus
          Interface 2, which can be used to connect things like NAND Flash,
index 482794526e8cd52418dc1c1e6e5b200943d3c4c8..d2d2c89de5b4428e627eb06d9733ec1bcf2c2b0d 100644 (file)
@@ -84,14 +84,14 @@ static size_t rng_buffer_size(void)
 
 static void add_early_randomness(struct hwrng *rng)
 {
-       unsigned char bytes[16];
        int bytes_read;
+       size_t size = min_t(size_t, 16, rng_buffer_size());
 
        mutex_lock(&reading_mutex);
-       bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1);
+       bytes_read = rng_get_data(rng, rng_buffer, size, 1);
        mutex_unlock(&reading_mutex);
        if (bytes_read > 0)
-               add_device_randomness(bytes, bytes_read);
+               add_device_randomness(rng_buffer, bytes_read);
 }
 
 static inline void cleanup_rng(struct kref *kref)
index 5a9350b1069a3495b2d1e4d116fcb2d780bbd9d2..7f816655cbbfafc9ea3f16097ba4a6f8a0f4b91b 100644 (file)
@@ -76,3 +76,11 @@ config IPMI_POWEROFF
         the IPMI management controller is capable of this.
 
 endif # IPMI_HANDLER
+
+config ASPEED_BT_IPMI_BMC
+       depends on ARCH_ASPEED
+       tristate "BT IPMI bmc driver"
+       help
+         Provides a driver for the BT (Block Transfer) IPMI interface
+         found on Aspeed SOCs (AST2400 and AST2500). The driver
+         implements the BMC side of the BT interface.
index f3ffde1f5f1f53c3c702458b5e2d33f84866e0b9..0d98cd91def1dba3f70f8aae98d01bc04522c8b1 100644 (file)
@@ -11,3 +11,4 @@ obj-$(CONFIG_IPMI_SSIF) += ipmi_ssif.o
 obj-$(CONFIG_IPMI_POWERNV) += ipmi_powernv.o
 obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o
 obj-$(CONFIG_IPMI_POWEROFF) += ipmi_poweroff.o
+obj-$(CONFIG_ASPEED_BT_IPMI_BMC) += bt-bmc.o
diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
new file mode 100644 (file)
index 0000000..b49e613
--- /dev/null
@@ -0,0 +1,505 @@
+/*
+ * Copyright (c) 2015-2016, IBM Corporation.
+ *
+ * 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.
+ */
+
+#include <linux/atomic.h>
+#include <linux/bt-bmc.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/miscdevice.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/poll.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+
+/*
+ * This is a BMC device used to communicate to the host
+ */
+#define DEVICE_NAME    "ipmi-bt-host"
+
+#define BT_IO_BASE     0xe4
+#define BT_IRQ         10
+
+#define BT_CR0         0x0
+#define   BT_CR0_IO_BASE               16
+#define   BT_CR0_IRQ                   12
+#define   BT_CR0_EN_CLR_SLV_RDP                0x8
+#define   BT_CR0_EN_CLR_SLV_WRP                0x4
+#define   BT_CR0_ENABLE_IBT            0x1
+#define BT_CR1         0x4
+#define   BT_CR1_IRQ_H2B       0x01
+#define   BT_CR1_IRQ_HBUSY     0x40
+#define BT_CR2         0x8
+#define   BT_CR2_IRQ_H2B       0x01
+#define   BT_CR2_IRQ_HBUSY     0x40
+#define BT_CR3         0xc
+#define BT_CTRL                0x10
+#define   BT_CTRL_B_BUSY               0x80
+#define   BT_CTRL_H_BUSY               0x40
+#define   BT_CTRL_OEM0                 0x20
+#define   BT_CTRL_SMS_ATN              0x10
+#define   BT_CTRL_B2H_ATN              0x08
+#define   BT_CTRL_H2B_ATN              0x04
+#define   BT_CTRL_CLR_RD_PTR           0x02
+#define   BT_CTRL_CLR_WR_PTR           0x01
+#define BT_BMC2HOST    0x14
+#define BT_INTMASK     0x18
+#define   BT_INTMASK_B2H_IRQEN         0x01
+#define   BT_INTMASK_B2H_IRQ           0x02
+#define   BT_INTMASK_BMC_HWRST         0x80
+
+#define BT_BMC_BUFFER_SIZE 256
+
+struct bt_bmc {
+       struct device           dev;
+       struct miscdevice       miscdev;
+       void __iomem            *base;
+       int                     irq;
+       wait_queue_head_t       queue;
+       struct timer_list       poll_timer;
+       struct mutex            mutex;
+};
+
+static atomic_t open_count = ATOMIC_INIT(0);
+
+static u8 bt_inb(struct bt_bmc *bt_bmc, int reg)
+{
+       return ioread8(bt_bmc->base + reg);
+}
+
+static void bt_outb(struct bt_bmc *bt_bmc, u8 data, int reg)
+{
+       iowrite8(data, bt_bmc->base + reg);
+}
+
+static void clr_rd_ptr(struct bt_bmc *bt_bmc)
+{
+       bt_outb(bt_bmc, BT_CTRL_CLR_RD_PTR, BT_CTRL);
+}
+
+static void clr_wr_ptr(struct bt_bmc *bt_bmc)
+{
+       bt_outb(bt_bmc, BT_CTRL_CLR_WR_PTR, BT_CTRL);
+}
+
+static void clr_h2b_atn(struct bt_bmc *bt_bmc)
+{
+       bt_outb(bt_bmc, BT_CTRL_H2B_ATN, BT_CTRL);
+}
+
+static void set_b_busy(struct bt_bmc *bt_bmc)
+{
+       if (!(bt_inb(bt_bmc, BT_CTRL) & BT_CTRL_B_BUSY))
+               bt_outb(bt_bmc, BT_CTRL_B_BUSY, BT_CTRL);
+}
+
+static void clr_b_busy(struct bt_bmc *bt_bmc)
+{
+       if (bt_inb(bt_bmc, BT_CTRL) & BT_CTRL_B_BUSY)
+               bt_outb(bt_bmc, BT_CTRL_B_BUSY, BT_CTRL);
+}
+
+static void set_b2h_atn(struct bt_bmc *bt_bmc)
+{
+       bt_outb(bt_bmc, BT_CTRL_B2H_ATN, BT_CTRL);
+}
+
+static u8 bt_read(struct bt_bmc *bt_bmc)
+{
+       return bt_inb(bt_bmc, BT_BMC2HOST);
+}
+
+static ssize_t bt_readn(struct bt_bmc *bt_bmc, u8 *buf, size_t n)
+{
+       int i;
+
+       for (i = 0; i < n; i++)
+               buf[i] = bt_read(bt_bmc);
+       return n;
+}
+
+static void bt_write(struct bt_bmc *bt_bmc, u8 c)
+{
+       bt_outb(bt_bmc, c, BT_BMC2HOST);
+}
+
+static ssize_t bt_writen(struct bt_bmc *bt_bmc, u8 *buf, size_t n)
+{
+       int i;
+
+       for (i = 0; i < n; i++)
+               bt_write(bt_bmc, buf[i]);
+       return n;
+}
+
+static void set_sms_atn(struct bt_bmc *bt_bmc)
+{
+       bt_outb(bt_bmc, BT_CTRL_SMS_ATN, BT_CTRL);
+}
+
+static struct bt_bmc *file_bt_bmc(struct file *file)
+{
+       return container_of(file->private_data, struct bt_bmc, miscdev);
+}
+
+static int bt_bmc_open(struct inode *inode, struct file *file)
+{
+       struct bt_bmc *bt_bmc = file_bt_bmc(file);
+
+       if (atomic_inc_return(&open_count) == 1) {
+               clr_b_busy(bt_bmc);
+               return 0;
+       }
+
+       atomic_dec(&open_count);
+       return -EBUSY;
+}
+
+/*
+ * The BT (Block Transfer) interface means that entire messages are
+ * buffered by the host before a notification is sent to the BMC that
+ * there is data to be read. The first byte is the length and the
+ * message data follows. The read operation just tries to capture the
+ * whole before returning it to userspace.
+ *
+ * BT Message format :
+ *
+ *    Byte 1  Byte 2     Byte 3  Byte 4  Byte 5:N
+ *    Length  NetFn/LUN  Seq     Cmd     Data
+ *
+ */
+static ssize_t bt_bmc_read(struct file *file, char __user *buf,
+                          size_t count, loff_t *ppos)
+{
+       struct bt_bmc *bt_bmc = file_bt_bmc(file);
+       u8 len;
+       int len_byte = 1;
+       u8 kbuffer[BT_BMC_BUFFER_SIZE];
+       ssize_t ret = 0;
+       ssize_t nread;
+
+       if (!access_ok(VERIFY_WRITE, buf, count))
+               return -EFAULT;
+
+       WARN_ON(*ppos);
+
+       if (wait_event_interruptible(bt_bmc->queue,
+                                    bt_inb(bt_bmc, BT_CTRL) & BT_CTRL_H2B_ATN))
+               return -ERESTARTSYS;
+
+       mutex_lock(&bt_bmc->mutex);
+
+       if (unlikely(!(bt_inb(bt_bmc, BT_CTRL) & BT_CTRL_H2B_ATN))) {
+               ret = -EIO;
+               goto out_unlock;
+       }
+
+       set_b_busy(bt_bmc);
+       clr_h2b_atn(bt_bmc);
+       clr_rd_ptr(bt_bmc);
+
+       /*
+        * The BT frames start with the message length, which does not
+        * include the length byte.
+        */
+       kbuffer[0] = bt_read(bt_bmc);
+       len = kbuffer[0];
+
+       /* We pass the length back to userspace as well */
+       if (len + 1 > count)
+               len = count - 1;
+
+       while (len) {
+               nread = min_t(ssize_t, len, sizeof(kbuffer) - len_byte);
+
+               bt_readn(bt_bmc, kbuffer + len_byte, nread);
+
+               if (copy_to_user(buf, kbuffer, nread + len_byte)) {
+                       ret = -EFAULT;
+                       break;
+               }
+               len -= nread;
+               buf += nread + len_byte;
+               ret += nread + len_byte;
+               len_byte = 0;
+       }
+
+       clr_b_busy(bt_bmc);
+
+out_unlock:
+       mutex_unlock(&bt_bmc->mutex);
+       return ret;
+}
+
+/*
+ * BT Message response format :
+ *
+ *    Byte 1  Byte 2     Byte 3  Byte 4  Byte 5  Byte 6:N
+ *    Length  NetFn/LUN  Seq     Cmd     Code    Data
+ */
+static ssize_t bt_bmc_write(struct file *file, const char __user *buf,
+                           size_t count, loff_t *ppos)
+{
+       struct bt_bmc *bt_bmc = file_bt_bmc(file);
+       u8 kbuffer[BT_BMC_BUFFER_SIZE];
+       ssize_t ret = 0;
+       ssize_t nwritten;
+
+       /*
+        * send a minimum response size
+        */
+       if (count < 5)
+               return -EINVAL;
+
+       if (!access_ok(VERIFY_READ, buf, count))
+               return -EFAULT;
+
+       WARN_ON(*ppos);
+
+       /*
+        * There's no interrupt for clearing bmc busy so we have to
+        * poll
+        */
+       if (wait_event_interruptible(bt_bmc->queue,
+                                    !(bt_inb(bt_bmc, BT_CTRL) &
+                                      (BT_CTRL_H_BUSY | BT_CTRL_B2H_ATN))))
+               return -ERESTARTSYS;
+
+       mutex_lock(&bt_bmc->mutex);
+
+       if (unlikely(bt_inb(bt_bmc, BT_CTRL) &
+                    (BT_CTRL_H_BUSY | BT_CTRL_B2H_ATN))) {
+               ret = -EIO;
+               goto out_unlock;
+       }
+
+       clr_wr_ptr(bt_bmc);
+
+       while (count) {
+               nwritten = min_t(ssize_t, count, sizeof(kbuffer));
+               if (copy_from_user(&kbuffer, buf, nwritten)) {
+                       ret = -EFAULT;
+                       break;
+               }
+
+               bt_writen(bt_bmc, kbuffer, nwritten);
+
+               count -= nwritten;
+               buf += nwritten;
+               ret += nwritten;
+       }
+
+       set_b2h_atn(bt_bmc);
+
+out_unlock:
+       mutex_unlock(&bt_bmc->mutex);
+       return ret;
+}
+
+static long bt_bmc_ioctl(struct file *file, unsigned int cmd,
+                        unsigned long param)
+{
+       struct bt_bmc *bt_bmc = file_bt_bmc(file);
+
+       switch (cmd) {
+       case BT_BMC_IOCTL_SMS_ATN:
+               set_sms_atn(bt_bmc);
+               return 0;
+       }
+       return -EINVAL;
+}
+
+static int bt_bmc_release(struct inode *inode, struct file *file)
+{
+       struct bt_bmc *bt_bmc = file_bt_bmc(file);
+
+       atomic_dec(&open_count);
+       set_b_busy(bt_bmc);
+       return 0;
+}
+
+static unsigned int bt_bmc_poll(struct file *file, poll_table *wait)
+{
+       struct bt_bmc *bt_bmc = file_bt_bmc(file);
+       unsigned int mask = 0;
+       u8 ctrl;
+
+       poll_wait(file, &bt_bmc->queue, wait);
+
+       ctrl = bt_inb(bt_bmc, BT_CTRL);
+
+       if (ctrl & BT_CTRL_H2B_ATN)
+               mask |= POLLIN;
+
+       if (!(ctrl & (BT_CTRL_H_BUSY | BT_CTRL_B2H_ATN)))
+               mask |= POLLOUT;
+
+       return mask;
+}
+
+static const struct file_operations bt_bmc_fops = {
+       .owner          = THIS_MODULE,
+       .open           = bt_bmc_open,
+       .read           = bt_bmc_read,
+       .write          = bt_bmc_write,
+       .release        = bt_bmc_release,
+       .poll           = bt_bmc_poll,
+       .unlocked_ioctl = bt_bmc_ioctl,
+};
+
+static void poll_timer(unsigned long data)
+{
+       struct bt_bmc *bt_bmc = (void *)data;
+
+       bt_bmc->poll_timer.expires += msecs_to_jiffies(500);
+       wake_up(&bt_bmc->queue);
+       add_timer(&bt_bmc->poll_timer);
+}
+
+static irqreturn_t bt_bmc_irq(int irq, void *arg)
+{
+       struct bt_bmc *bt_bmc = arg;
+       u32 reg;
+
+       reg = ioread32(bt_bmc->base + BT_CR2);
+       reg &= BT_CR2_IRQ_H2B | BT_CR2_IRQ_HBUSY;
+       if (!reg)
+               return IRQ_NONE;
+
+       /* ack pending IRQs */
+       iowrite32(reg, bt_bmc->base + BT_CR2);
+
+       wake_up(&bt_bmc->queue);
+       return IRQ_HANDLED;
+}
+
+static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
+                            struct platform_device *pdev)
+{
+       struct device *dev = &pdev->dev;
+       u32 reg;
+       int rc;
+
+       bt_bmc->irq = platform_get_irq(pdev, 0);
+       if (!bt_bmc->irq)
+               return -ENODEV;
+
+       rc = devm_request_irq(dev, bt_bmc->irq, bt_bmc_irq, IRQF_SHARED,
+                             DEVICE_NAME, bt_bmc);
+       if (rc < 0) {
+               dev_warn(dev, "Unable to request IRQ %d\n", bt_bmc->irq);
+               bt_bmc->irq = 0;
+               return rc;
+       }
+
+       /*
+        * Configure IRQs on the bmc clearing the H2B and HBUSY bits;
+        * H2B will be asserted when the bmc has data for us; HBUSY
+        * will be cleared (along with B2H) when we can write the next
+        * message to the BT buffer
+        */
+       reg = ioread32(bt_bmc->base + BT_CR1);
+       reg |= BT_CR1_IRQ_H2B | BT_CR1_IRQ_HBUSY;
+       iowrite32(reg, bt_bmc->base + BT_CR1);
+
+       return 0;
+}
+
+static int bt_bmc_probe(struct platform_device *pdev)
+{
+       struct bt_bmc *bt_bmc;
+       struct device *dev;
+       struct resource *res;
+       int rc;
+
+       if (!pdev || !pdev->dev.of_node)
+               return -ENODEV;
+
+       dev = &pdev->dev;
+       dev_info(dev, "Found bt bmc device\n");
+
+       bt_bmc = devm_kzalloc(dev, sizeof(*bt_bmc), GFP_KERNEL);
+       if (!bt_bmc)
+               return -ENOMEM;
+
+       dev_set_drvdata(&pdev->dev, bt_bmc);
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       bt_bmc->base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(bt_bmc->base))
+               return PTR_ERR(bt_bmc->base);
+
+       mutex_init(&bt_bmc->mutex);
+       init_waitqueue_head(&bt_bmc->queue);
+
+       bt_bmc->miscdev.minor   = MISC_DYNAMIC_MINOR,
+               bt_bmc->miscdev.name    = DEVICE_NAME,
+               bt_bmc->miscdev.fops    = &bt_bmc_fops,
+               bt_bmc->miscdev.parent = dev;
+       rc = misc_register(&bt_bmc->miscdev);
+       if (rc) {
+               dev_err(dev, "Unable to register misc device\n");
+               return rc;
+       }
+
+       bt_bmc_config_irq(bt_bmc, pdev);
+
+       if (bt_bmc->irq) {
+               dev_info(dev, "Using IRQ %d\n", bt_bmc->irq);
+       } else {
+               dev_info(dev, "No IRQ; using timer\n");
+               setup_timer(&bt_bmc->poll_timer, poll_timer,
+                           (unsigned long)bt_bmc);
+               bt_bmc->poll_timer.expires = jiffies + msecs_to_jiffies(10);
+               add_timer(&bt_bmc->poll_timer);
+       }
+
+       iowrite32((BT_IO_BASE << BT_CR0_IO_BASE) |
+                 (BT_IRQ << BT_CR0_IRQ) |
+                 BT_CR0_EN_CLR_SLV_RDP |
+                 BT_CR0_EN_CLR_SLV_WRP |
+                 BT_CR0_ENABLE_IBT,
+                 bt_bmc->base + BT_CR0);
+
+       clr_b_busy(bt_bmc);
+
+       return 0;
+}
+
+static int bt_bmc_remove(struct platform_device *pdev)
+{
+       struct bt_bmc *bt_bmc = dev_get_drvdata(&pdev->dev);
+
+       misc_deregister(&bt_bmc->miscdev);
+       if (!bt_bmc->irq)
+               del_timer_sync(&bt_bmc->poll_timer);
+       return 0;
+}
+
+static const struct of_device_id bt_bmc_match[] = {
+       { .compatible = "aspeed,ast2400-bt-bmc" },
+       { },
+};
+
+static struct platform_driver bt_bmc_driver = {
+       .driver = {
+               .name           = DEVICE_NAME,
+               .of_match_table = bt_bmc_match,
+       },
+       .probe = bt_bmc_probe,
+       .remove = bt_bmc_remove,
+};
+
+module_platform_driver(bt_bmc_driver);
+
+MODULE_DEVICE_TABLE(of, bt_bmc_match);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Alistair Popple <alistair@popple.id.au>");
+MODULE_DESCRIPTION("Linux device interface to the BT interface");
index d8619998cfb57ffffa9fa29e80498072d390db86..fcdd886819f5c85d88767d9d2042b8fef7a1d11f 100644 (file)
@@ -2891,11 +2891,11 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
                intf->curr_channel = IPMI_MAX_CHANNELS;
        }
 
+       rv = ipmi_bmc_register(intf, i);
+
        if (rv == 0)
                rv = add_proc_entries(intf, i);
 
-       rv = ipmi_bmc_register(intf, i);
-
  out:
        if (rv) {
                if (intf->proc_dir)
@@ -2982,8 +2982,6 @@ int ipmi_unregister_smi(ipmi_smi_t intf)
        int intf_num = intf->intf_num;
        ipmi_user_t user;
 
-       ipmi_bmc_unregister(intf);
-
        mutex_lock(&smi_watchers_mutex);
        mutex_lock(&ipmi_interfaces_mutex);
        intf->intf_num = -1;
@@ -3007,6 +3005,7 @@ int ipmi_unregister_smi(ipmi_smi_t intf)
        mutex_unlock(&ipmi_interfaces_mutex);
 
        remove_proc_entries(intf);
+       ipmi_bmc_unregister(intf);
 
        /*
         * Call all the watcher interfaces to tell them that
index 190122e64a3a5e78079423c4f08f96a7ac52a1b2..85a449cf61e3fa79b36849f84a831e05683d48dc 100644 (file)
@@ -203,7 +203,7 @@ at91_clk_register_programmable(struct regmap *regmap,
        ret = clk_hw_register(NULL, &prog->hw);
        if (ret) {
                kfree(prog);
-               hw = &prog->hw;
+               hw = ERR_PTR(ret);
        }
 
        return hw;
index b68bf573dcfb743a353f8312b67ec1585421f1f8..8c7763fd9efc52b30f02d9ebcd4fdb10d2876465 100644 (file)
@@ -502,8 +502,12 @@ static long bcm2835_pll_rate_from_divisors(unsigned long parent_rate,
 static long bcm2835_pll_round_rate(struct clk_hw *hw, unsigned long rate,
                                   unsigned long *parent_rate)
 {
+       struct bcm2835_pll *pll = container_of(hw, struct bcm2835_pll, hw);
+       const struct bcm2835_pll_data *data = pll->data;
        u32 ndiv, fdiv;
 
+       rate = clamp(rate, data->min_rate, data->max_rate);
+
        bcm2835_pll_choose_ndiv_and_fdiv(rate, *parent_rate, &ndiv, &fdiv);
 
        return bcm2835_pll_rate_from_divisors(*parent_rate, ndiv, fdiv, 1);
@@ -608,13 +612,6 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,
        u32 ana[4];
        int i;
 
-       if (rate < data->min_rate || rate > data->max_rate) {
-               dev_err(cprman->dev, "%s: rate out of spec: %lu vs (%lu, %lu)\n",
-                       clk_hw_get_name(hw), rate,
-                       data->min_rate, data->max_rate);
-               return -EINVAL;
-       }
-
        if (rate > data->max_fb_rate) {
                use_fb_prediv = true;
                rate /= 2;
index b637f5979023f92659b2c6cd927f030a275b1532..eb953d3b0b69bef048312fe9b6ec3c2678d815bb 100644 (file)
@@ -216,6 +216,7 @@ static int max77686_clk_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
+       drv_data->num_clks = num_clks;
        drv_data->max_clk_data = devm_kcalloc(dev, num_clks,
                                              sizeof(*drv_data->max_clk_data),
                                              GFP_KERNEL);
index fe364e63f8de899867d2c6e8bb47394b8e871426..c0e8e1f196aae4f15c39bf39a725db8fd192f101 100644 (file)
@@ -195,7 +195,7 @@ static void __init hi6220_clk_sys_init(struct device_node *np)
        hi6220_clk_register_divider(hi6220_div_clks_sys,
                        ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
 }
-CLK_OF_DECLARE(hi6220_clk_sys, "hisilicon,hi6220-sysctrl", hi6220_clk_sys_init);
+CLK_OF_DECLARE_DRIVER(hi6220_clk_sys, "hisilicon,hi6220-sysctrl", hi6220_clk_sys_init);
 
 
 /* clocks in media controller */
@@ -252,7 +252,7 @@ static void __init hi6220_clk_media_init(struct device_node *np)
        hi6220_clk_register_divider(hi6220_div_clks_media,
                                ARRAY_SIZE(hi6220_div_clks_media), clk_data);
 }
-CLK_OF_DECLARE(hi6220_clk_media, "hisilicon,hi6220-mediactrl", hi6220_clk_media_init);
+CLK_OF_DECLARE_DRIVER(hi6220_clk_media, "hisilicon,hi6220-mediactrl", hi6220_clk_media_init);
 
 
 /* clocks in pmctrl */
index 380c372d528ec1b0ec593e00eb052547515208e8..f042bd2a6a998651481e7ca594333c3856f6d8dc 100644 (file)
@@ -8,6 +8,7 @@ config COMMON_CLK_MEDIATEK
 
 config COMMON_CLK_MT8135
        bool "Clock driver for Mediatek MT8135"
+       depends on ARCH_MEDIATEK || COMPILE_TEST
        select COMMON_CLK_MEDIATEK
        default ARCH_MEDIATEK
        ---help---
@@ -15,6 +16,7 @@ config COMMON_CLK_MT8135
 
 config COMMON_CLK_MT8173
        bool "Clock driver for Mediatek MT8173"
+       depends on ARCH_MEDIATEK || COMPILE_TEST
        select COMMON_CLK_MEDIATEK
        default ARCH_MEDIATEK
        ---help---
index 45905fc0d75b3e650403da4aa83513322f630cea..cecb0fdfaef6cd354893f9f4628427c7dee655e5 100644 (file)
@@ -305,7 +305,7 @@ static const struct of_device_id armada_3700_periph_clock_of_match[] = {
 };
 static int armada_3700_add_composite_clk(const struct clk_periph_data *data,
                                         void __iomem *reg, spinlock_t *lock,
-                                        struct device *dev, struct clk_hw *hw)
+                                        struct device *dev, struct clk_hw **hw)
 {
        const struct clk_ops *mux_ops = NULL, *gate_ops = NULL,
                *rate_ops = NULL;
@@ -329,6 +329,7 @@ static int armada_3700_add_composite_clk(const struct clk_periph_data *data,
                gate->lock = lock;
                gate_ops = gate_hw->init->ops;
                gate->reg = reg + (u64)gate->reg;
+               gate->flags = CLK_GATE_SET_TO_DISABLE;
        }
 
        if (data->rate_hw) {
@@ -353,13 +354,13 @@ static int armada_3700_add_composite_clk(const struct clk_periph_data *data,
                }
        }
 
-       hw = clk_hw_register_composite(dev, data->name, data->parent_names,
+       *hw = clk_hw_register_composite(dev, data->name, data->parent_names,
                                       data->num_parents, mux_hw,
                                       mux_ops, rate_hw, rate_ops,
                                       gate_hw, gate_ops, CLK_IGNORE_UNUSED);
 
-       if (IS_ERR(hw))
-               return PTR_ERR(hw);
+       if (IS_ERR(*hw))
+               return PTR_ERR(*hw);
 
        return 0;
 }
@@ -400,7 +401,7 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
        spin_lock_init(&driver_data->lock);
 
        for (i = 0; i < num_periph; i++) {
-               struct clk_hw *hw = driver_data->hw_data->hws[i];
+               struct clk_hw **hw = &driver_data->hw_data->hws[i];
 
                if (armada_3700_add_composite_clk(&data[i], reg,
                                                  &driver_data->lock, dev, hw))
index 51d152f735cc5be186c9b0b1e2bf00cef2381b7b..17e68a724945608382924ce18b64f3df9d172db8 100644 (file)
@@ -106,6 +106,7 @@ static const struct of_device_id exynos_audss_clk_of_match[] = {
        },
        { },
 };
+MODULE_DEVICE_TABLE(of, exynos_audss_clk_of_match);
 
 static void exynos_audss_clk_teardown(void)
 {
index 5ffb898d0839df896ac7a82b266c46202bbdf0e9..26c53f7963a438dcaaac252229cea31419ab44ea 100644 (file)
@@ -79,7 +79,7 @@ static int uniphier_clk_probe(struct platform_device *pdev)
        hw_data->num = clk_num;
 
        /* avoid returning NULL for unused idx */
-       for (; clk_num >= 0; clk_num--)
+       while (--clk_num >= 0)
                hw_data->hws[clk_num] = ERR_PTR(-EINVAL);
 
        for (p = data; p->name; p++) {
@@ -110,6 +110,10 @@ static int uniphier_clk_remove(struct platform_device *pdev)
 
 static const struct of_device_id uniphier_clk_match[] = {
        /* System clock */
+       {
+               .compatible = "socionext,uniphier-sld3-clock",
+               .data = uniphier_sld3_sys_clk_data,
+       },
        {
                .compatible = "socionext,uniphier-ld4-clock",
                .data = uniphier_ld4_sys_clk_data,
@@ -138,7 +142,7 @@ static const struct of_device_id uniphier_clk_match[] = {
                .compatible = "socionext,uniphier-ld20-clock",
                .data = uniphier_ld20_sys_clk_data,
        },
-       /* Media I/O clock */
+       /* Media I/O clock, SD clock */
        {
                .compatible = "socionext,uniphier-sld3-mio-clock",
                .data = uniphier_sld3_mio_clk_data,
@@ -156,20 +160,20 @@ static const struct of_device_id uniphier_clk_match[] = {
                .data = uniphier_sld3_mio_clk_data,
        },
        {
-               .compatible = "socionext,uniphier-pro5-mio-clock",
-               .data = uniphier_pro5_mio_clk_data,
+               .compatible = "socionext,uniphier-pro5-sd-clock",
+               .data = uniphier_pro5_sd_clk_data,
        },
        {
-               .compatible = "socionext,uniphier-pxs2-mio-clock",
-               .data = uniphier_pro5_mio_clk_data,
+               .compatible = "socionext,uniphier-pxs2-sd-clock",
+               .data = uniphier_pro5_sd_clk_data,
        },
        {
                .compatible = "socionext,uniphier-ld11-mio-clock",
                .data = uniphier_sld3_mio_clk_data,
        },
        {
-               .compatible = "socionext,uniphier-ld20-mio-clock",
-               .data = uniphier_pro5_mio_clk_data,
+               .compatible = "socionext,uniphier-ld20-sd-clock",
+               .data = uniphier_pro5_sd_clk_data,
        },
        /* Peripheral clock */
        {
index 6aa7ec768d0bfad0141ed2ccc24611be6c34962e..218d20f099cec2da27eb2a80fc761b8b6b1c263e 100644 (file)
@@ -93,7 +93,7 @@ const struct uniphier_clk_data uniphier_sld3_mio_clk_data[] = {
        { /* sentinel */ }
 };
 
-const struct uniphier_clk_data uniphier_pro5_mio_clk_data[] = {
+const struct uniphier_clk_data uniphier_pro5_sd_clk_data[] = {
        UNIPHIER_MIO_CLK_SD_FIXED,
        UNIPHIER_MIO_CLK_SD(0, 0),
        UNIPHIER_MIO_CLK_SD(1, 1),
index 15a2f2cbe0d90e4ab5d68d4d9eb310bdf5164cf2..2c243a894f3b9fe19bd9575e2ca639f5939fa503 100644 (file)
@@ -42,7 +42,7 @@ static u8 uniphier_clk_mux_get_parent(struct clk_hw *hw)
        struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw);
        int num_parents = clk_hw_get_num_parents(hw);
        int ret;
-       u32 val;
+       unsigned int val;
        u8 i;
 
        ret = regmap_read(mux->regmap, mux->reg, &val);
index 3ae184062388bf487be8b91c5b52193fd7383d75..0244dba1f4cf554567c37bd15978bd8813fc3be9 100644 (file)
@@ -115,7 +115,7 @@ extern const struct uniphier_clk_data uniphier_pxs2_sys_clk_data[];
 extern const struct uniphier_clk_data uniphier_ld11_sys_clk_data[];
 extern const struct uniphier_clk_data uniphier_ld20_sys_clk_data[];
 extern const struct uniphier_clk_data uniphier_sld3_mio_clk_data[];
-extern const struct uniphier_clk_data uniphier_pro5_mio_clk_data[];
+extern const struct uniphier_clk_data uniphier_pro5_sd_clk_data[];
 extern const struct uniphier_clk_data uniphier_ld4_peri_clk_data[];
 extern const struct uniphier_clk_data uniphier_pro4_peri_clk_data[];
 
index 245190839359301edd5896e9bb2196c961a2847e..e2c6e43cf8ca31e27af1b6c8630f7a0c590e8b7a 100644 (file)
@@ -417,6 +417,16 @@ config SYS_SUPPORTS_SH_TMU
 config SYS_SUPPORTS_EM_STI
         bool
 
+config CLKSRC_JCORE_PIT
+       bool "J-Core PIT timer driver" if COMPILE_TEST
+       depends on OF
+       depends on GENERIC_CLOCKEVENTS
+       depends on HAS_IOMEM
+       select CLKSRC_MMIO
+       help
+         This enables build of clocksource and clockevent driver for
+         the integrated PIT in the J-Core synthesizable, open source SoC.
+
 config SH_TIMER_CMT
        bool "Renesas CMT timer driver" if COMPILE_TEST
        depends on GENERIC_CLOCKEVENTS
index fd9d6df0bbc0993c3b7862a08f89dc3a9725be9d..cf87f407f1adbfaab8d485bea93f6ee859d8e3d6 100644 (file)
@@ -5,6 +5,7 @@ obj-$(CONFIG_ATMEL_TCB_CLKSRC)  += tcb_clksrc.o
 obj-$(CONFIG_X86_PM_TIMER)     += acpi_pm.o
 obj-$(CONFIG_SCx200HR_TIMER)   += scx200_hrt.o
 obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC)   += cs5535-clockevt.o
+obj-$(CONFIG_CLKSRC_JCORE_PIT)         += jcore-pit.o
 obj-$(CONFIG_SH_TIMER_CMT)     += sh_cmt.o
 obj-$(CONFIG_SH_TIMER_MTU2)    += sh_mtu2.o
 obj-$(CONFIG_SH_TIMER_TMU)     += sh_tmu.o
diff --git a/drivers/clocksource/jcore-pit.c b/drivers/clocksource/jcore-pit.c
new file mode 100644 (file)
index 0000000..54e1665
--- /dev/null
@@ -0,0 +1,249 @@
+/*
+ * J-Core SoC PIT/clocksource driver
+ *
+ * Copyright (C) 2015-2016 Smart Energy Instruments, Inc.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/clockchips.h>
+#include <linux/clocksource.h>
+#include <linux/sched_clock.h>
+#include <linux/cpu.h>
+#include <linux/cpuhotplug.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
+
+#define PIT_IRQ_SHIFT          12
+#define PIT_PRIO_SHIFT         20
+#define PIT_ENABLE_SHIFT       26
+#define PIT_PRIO_MASK          0xf
+
+#define REG_PITEN              0x00
+#define REG_THROT              0x10
+#define REG_COUNT              0x14
+#define REG_BUSPD              0x18
+#define REG_SECHI              0x20
+#define REG_SECLO              0x24
+#define REG_NSEC               0x28
+
+struct jcore_pit {
+       struct clock_event_device       ced;
+       void __iomem                    *base;
+       unsigned long                   periodic_delta;
+       u32                             enable_val;
+};
+
+static void __iomem *jcore_pit_base;
+static struct jcore_pit __percpu *jcore_pit_percpu;
+
+static notrace u64 jcore_sched_clock_read(void)
+{
+       u32 seclo, nsec, seclo0;
+       __iomem void *base = jcore_pit_base;
+
+       seclo = readl(base + REG_SECLO);
+       do {
+               seclo0 = seclo;
+               nsec  = readl(base + REG_NSEC);
+               seclo = readl(base + REG_SECLO);
+       } while (seclo0 != seclo);
+
+       return seclo * NSEC_PER_SEC + nsec;
+}
+
+static cycle_t jcore_clocksource_read(struct clocksource *cs)
+{
+       return jcore_sched_clock_read();
+}
+
+static int jcore_pit_disable(struct jcore_pit *pit)
+{
+       writel(0, pit->base + REG_PITEN);
+       return 0;
+}
+
+static int jcore_pit_set(unsigned long delta, struct jcore_pit *pit)
+{
+       jcore_pit_disable(pit);
+       writel(delta, pit->base + REG_THROT);
+       writel(pit->enable_val, pit->base + REG_PITEN);
+       return 0;
+}
+
+static int jcore_pit_set_state_shutdown(struct clock_event_device *ced)
+{
+       struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced);
+
+       return jcore_pit_disable(pit);
+}
+
+static int jcore_pit_set_state_oneshot(struct clock_event_device *ced)
+{
+       struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced);
+
+       return jcore_pit_disable(pit);
+}
+
+static int jcore_pit_set_state_periodic(struct clock_event_device *ced)
+{
+       struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced);
+
+       return jcore_pit_set(pit->periodic_delta, pit);
+}
+
+static int jcore_pit_set_next_event(unsigned long delta,
+                                   struct clock_event_device *ced)
+{
+       struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced);
+
+       return jcore_pit_set(delta, pit);
+}
+
+static int jcore_pit_local_init(unsigned cpu)
+{
+       struct jcore_pit *pit = this_cpu_ptr(jcore_pit_percpu);
+       unsigned buspd, freq;
+
+       pr_info("Local J-Core PIT init on cpu %u\n", cpu);
+
+       buspd = readl(pit->base + REG_BUSPD);
+       freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd);
+       pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd);
+
+       clockevents_config_and_register(&pit->ced, freq, 1, ULONG_MAX);
+
+       return 0;
+}
+
+static irqreturn_t jcore_timer_interrupt(int irq, void *dev_id)
+{
+       struct jcore_pit *pit = this_cpu_ptr(dev_id);
+
+       if (clockevent_state_oneshot(&pit->ced))
+               jcore_pit_disable(pit);
+
+       pit->ced.event_handler(&pit->ced);
+
+       return IRQ_HANDLED;
+}
+
+static int __init jcore_pit_init(struct device_node *node)
+{
+       int err;
+       unsigned pit_irq, cpu;
+       unsigned long hwirq;
+       u32 irqprio, enable_val;
+
+       jcore_pit_base = of_iomap(node, 0);
+       if (!jcore_pit_base) {
+               pr_err("Error: Cannot map base address for J-Core PIT\n");
+               return -ENXIO;
+       }
+
+       pit_irq = irq_of_parse_and_map(node, 0);
+       if (!pit_irq) {
+               pr_err("Error: J-Core PIT has no IRQ\n");
+               return -ENXIO;
+       }
+
+       pr_info("Initializing J-Core PIT at %p IRQ %d\n",
+               jcore_pit_base, pit_irq);
+
+       err = clocksource_mmio_init(jcore_pit_base, "jcore_pit_cs",
+                                   NSEC_PER_SEC, 400, 32,
+                                   jcore_clocksource_read);
+       if (err) {
+               pr_err("Error registering clocksource device: %d\n", err);
+               return err;
+       }
+
+       sched_clock_register(jcore_sched_clock_read, 32, NSEC_PER_SEC);
+
+       jcore_pit_percpu = alloc_percpu(struct jcore_pit);
+       if (!jcore_pit_percpu) {
+               pr_err("Failed to allocate memory for clock event device\n");
+               return -ENOMEM;
+       }
+
+       err = request_irq(pit_irq, jcore_timer_interrupt,
+                         IRQF_TIMER | IRQF_PERCPU,
+                         "jcore_pit", jcore_pit_percpu);
+       if (err) {
+               pr_err("pit irq request failed: %d\n", err);
+               free_percpu(jcore_pit_percpu);
+               return err;
+       }
+
+       /*
+        * The J-Core PIT is not hard-wired to a particular IRQ, but
+        * integrated with the interrupt controller such that the IRQ it
+        * generates is programmable, as follows:
+        *
+        * The bit layout of the PIT enable register is:
+        *
+        *      .....e..ppppiiiiiiii............
+        *
+        * where the .'s indicate unrelated/unused bits, e is enable,
+        * p is priority, and i is hard irq number.
+        *
+        * For the PIT included in AIC1 (obsolete but still in use),
+        * any hard irq (trap number) can be programmed via the 8
+        * iiiiiiii bits, and a priority (0-15) is programmable
+        * separately in the pppp bits.
+        *
+        * For the PIT included in AIC2 (current), the programming
+        * interface is equivalent modulo interrupt mapping. This is
+        * why a different compatible tag was not used. However only
+        * traps 64-127 (the ones actually intended to be used for
+        * interrupts, rather than syscalls/exceptions/etc.) can be
+        * programmed (the high 2 bits of i are ignored) and the
+        * priority pppp is <<2'd and or'd onto the irq number. This
+        * choice seems to have been made on the hardware engineering
+        * side under an assumption that preserving old AIC1 priority
+        * mappings was important. Future models will likely ignore
+        * the pppp field.
+        */
+       hwirq = irq_get_irq_data(pit_irq)->hwirq;
+       irqprio = (hwirq >> 2) & PIT_PRIO_MASK;
+       enable_val = (1U << PIT_ENABLE_SHIFT)
+                  | (hwirq << PIT_IRQ_SHIFT)
+                  | (irqprio << PIT_PRIO_SHIFT);
+
+       for_each_present_cpu(cpu) {
+               struct jcore_pit *pit = per_cpu_ptr(jcore_pit_percpu, cpu);
+
+               pit->base = of_iomap(node, cpu);
+               if (!pit->base) {
+                       pr_err("Unable to map PIT for cpu %u\n", cpu);
+                       continue;
+               }
+
+               pit->ced.name = "jcore_pit";
+               pit->ced.features = CLOCK_EVT_FEAT_PERIODIC
+                                 | CLOCK_EVT_FEAT_ONESHOT
+                                 | CLOCK_EVT_FEAT_PERCPU;
+               pit->ced.cpumask = cpumask_of(cpu);
+               pit->ced.rating = 400;
+               pit->ced.irq = pit_irq;
+               pit->ced.set_state_shutdown = jcore_pit_set_state_shutdown;
+               pit->ced.set_state_periodic = jcore_pit_set_state_periodic;
+               pit->ced.set_state_oneshot = jcore_pit_set_state_oneshot;
+               pit->ced.set_next_event = jcore_pit_set_next_event;
+
+               pit->enable_val = enable_val;
+       }
+
+       cpuhp_setup_state(CPUHP_AP_JCORE_TIMER_STARTING,
+                         "AP_JCORE_TIMER_STARTING",
+                         jcore_pit_local_init, NULL);
+
+       return 0;
+}
+
+CLOCKSOURCE_OF_DECLARE(jcore_pit, "jcore,pit", jcore_pit_init);
index c184eb84101e9f9a72354baf4c87c4d2ada92d19..4f87f3e76d8328ec6ca462882f873a51b2f72995 100644 (file)
@@ -152,6 +152,13 @@ static irqreturn_t sun5i_timer_interrupt(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
+static cycle_t sun5i_clksrc_read(struct clocksource *clksrc)
+{
+       struct sun5i_timer_clksrc *cs = to_sun5i_timer_clksrc(clksrc);
+
+       return ~readl(cs->timer.base + TIMER_CNTVAL_LO_REG(1));
+}
+
 static int sun5i_rate_cb_clksrc(struct notifier_block *nb,
                                unsigned long event, void *data)
 {
@@ -210,8 +217,13 @@ static int __init sun5i_setup_clocksource(struct device_node *node,
        writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
               base + TIMER_CTL_REG(1));
 
-       ret = clocksource_mmio_init(base + TIMER_CNTVAL_LO_REG(1), node->name,
-                                   rate, 340, 32, clocksource_mmio_readl_down);
+       cs->clksrc.name = node->name;
+       cs->clksrc.rating = 340;
+       cs->clksrc.read = sun5i_clksrc_read;
+       cs->clksrc.mask = CLOCKSOURCE_MASK(32);
+       cs->clksrc.flags = CLOCK_SOURCE_IS_CONTINUOUS;
+
+       ret = clocksource_register_hz(&cs->clksrc, rate);
        if (ret) {
                pr_err("Couldn't register clock source.\n");
                goto err_remove_notifier;
index f535f812325841a683d5691fc61bd89860681229..4737520ec8230a830d80e81c0dbc9dbaa96d0dc7 100644 (file)
@@ -179,6 +179,7 @@ struct _pid {
 /**
  * struct cpudata -    Per CPU instance data storage
  * @cpu:               CPU number for this instance data
+ * @policy:            CPUFreq policy value
  * @update_util:       CPUFreq utility callback information
  * @update_util_set:   CPUFreq utility callback is set
  * @iowait_boost:      iowait-related boost fraction
@@ -201,6 +202,7 @@ struct _pid {
 struct cpudata {
        int cpu;
 
+       unsigned int policy;
        struct update_util_data update_util;
        bool   update_util_set;
 
@@ -1142,10 +1144,8 @@ static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max)
        *min = clamp_t(int, min_perf, cpu->pstate.min_pstate, max_perf);
 }
 
-static void intel_pstate_set_min_pstate(struct cpudata *cpu)
+static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate)
 {
-       int pstate = cpu->pstate.min_pstate;
-
        trace_cpu_frequency(pstate * cpu->pstate.scaling, cpu->cpu);
        cpu->pstate.current_pstate = pstate;
        /*
@@ -1157,6 +1157,20 @@ static void intel_pstate_set_min_pstate(struct cpudata *cpu)
                      pstate_funcs.get_val(cpu, pstate));
 }
 
+static void intel_pstate_set_min_pstate(struct cpudata *cpu)
+{
+       intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate);
+}
+
+static void intel_pstate_max_within_limits(struct cpudata *cpu)
+{
+       int min_pstate, max_pstate;
+
+       update_turbo_state();
+       intel_pstate_get_min_max(cpu, &min_pstate, &max_pstate);
+       intel_pstate_set_pstate(cpu, max_pstate);
+}
+
 static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
 {
        cpu->pstate.min_pstate = pstate_funcs.get_min();
@@ -1325,7 +1339,8 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
 
        from = cpu->pstate.current_pstate;
 
-       target_pstate = pstate_funcs.get_target_pstate(cpu);
+       target_pstate = cpu->policy == CPUFREQ_POLICY_PERFORMANCE ?
+               cpu->pstate.turbo_pstate : pstate_funcs.get_target_pstate(cpu);
 
        intel_pstate_update_pstate(cpu, target_pstate);
 
@@ -1491,7 +1506,9 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
        pr_debug("set_policy cpuinfo.max %u policy->max %u\n",
                 policy->cpuinfo.max_freq, policy->max);
 
-       cpu = all_cpu_data[0];
+       cpu = all_cpu_data[policy->cpu];
+       cpu->policy = policy->policy;
+
        if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
            policy->max < policy->cpuinfo.max_freq &&
            policy->max > cpu->pstate.max_pstate * cpu->pstate.scaling) {
@@ -1499,7 +1516,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
                policy->max = policy->cpuinfo.max_freq;
        }
 
-       if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
+       if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE) {
                limits = &performance_limits;
                if (policy->max >= policy->cpuinfo.max_freq) {
                        pr_debug("set performance\n");
@@ -1535,6 +1552,15 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
        limits->max_perf = round_up(limits->max_perf, FRAC_BITS);
 
  out:
+       if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE) {
+               /*
+                * NOHZ_FULL CPUs need this as the governor callback may not
+                * be invoked on them.
+                */
+               intel_pstate_clear_update_util_hook(policy->cpu);
+               intel_pstate_max_within_limits(cpu);
+       }
+
        intel_pstate_set_update_util_hook(policy->cpu);
 
        intel_pstate_hwp_set_policy(policy);
index daadd20aa936a85e087ba0145147ffa48eac05a9..3e2ab3b14eea205f19e8b436291e5117cec9567d 100644 (file)
@@ -14,7 +14,7 @@ if DEV_DAX
 
 config DEV_DAX_PMEM
        tristate "PMEM DAX: direct access to persistent memory"
-       depends on NVDIMM_DAX
+       depends on LIBNVDIMM && NVDIMM_DAX
        default DEV_DAX
        help
          Support raw access to persistent memory.  Note that this
index 9630d8837ba94ed3badc9a3755b53c08123b9a51..4a15fa5df98bce0d41bab5fd291a7a10d52963f7 100644 (file)
@@ -44,7 +44,6 @@ static void dax_pmem_percpu_exit(void *data)
 
        dev_dbg(dax_pmem->dev, "%s\n", __func__);
        percpu_ref_exit(ref);
-       wait_for_completion(&dax_pmem->cmp);
 }
 
 static void dax_pmem_percpu_kill(void *data)
@@ -54,6 +53,7 @@ static void dax_pmem_percpu_kill(void *data)
 
        dev_dbg(dax_pmem->dev, "%s\n", __func__);
        percpu_ref_kill(ref);
+       wait_for_completion(&dax_pmem->cmp);
 }
 
 static int dax_pmem_probe(struct device *dev)
index ca957a5f4291228a77c85b65cf08f0fb690bf522..b8cde096a808f552fde97e0cb85c101ab4139881 100644 (file)
@@ -51,7 +51,7 @@ static void qcom_usb_extcon_detect_cable(struct work_struct *work)
        if (ret)
                return;
 
-       extcon_set_state(info->edev, EXTCON_USB_HOST, !id);
+       extcon_set_state_sync(info->edev, EXTCON_USB_HOST, !id);
 }
 
 static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id)
index 631c977b0da5f817b7ecf950d94f90198a53abbe..180f0a96528cee063d3da64fa620d6de0eebdfcf 100644 (file)
@@ -566,6 +566,11 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
 
        lynx->registers = ioremap_nocache(pci_resource_start(dev, 0),
                                          PCILYNX_MAX_REGISTER);
+       if (lynx->registers == NULL) {
+               dev_err(&dev->dev, "Failed to map registers\n");
+               ret = -ENOMEM;
+               goto fail_deallocate_lynx;
+       }
 
        lynx->rcv_start_pcl = pci_alloc_consistent(lynx->pci_device,
                                sizeof(struct pcl), &lynx->rcv_start_pcl_bus);
@@ -578,7 +583,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
            lynx->rcv_buffer == NULL) {
                dev_err(&dev->dev, "Failed to allocate receive buffer\n");
                ret = -ENOMEM;
-               goto fail_deallocate;
+               goto fail_deallocate_buffers;
        }
        lynx->rcv_start_pcl->next       = cpu_to_le32(lynx->rcv_pcl_bus);
        lynx->rcv_pcl->next             = cpu_to_le32(PCL_NEXT_INVALID);
@@ -641,7 +646,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
                dev_err(&dev->dev,
                        "Failed to allocate shared interrupt %d\n", dev->irq);
                ret = -EIO;
-               goto fail_deallocate;
+               goto fail_deallocate_buffers;
        }
 
        lynx->misc.parent = &dev->dev;
@@ -668,7 +673,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
        reg_write(lynx, PCI_INT_ENABLE, 0);
        free_irq(lynx->pci_device->irq, lynx);
 
-fail_deallocate:
+fail_deallocate_buffers:
        if (lynx->rcv_start_pcl)
                pci_free_consistent(lynx->pci_device, sizeof(struct pcl),
                                lynx->rcv_start_pcl, lynx->rcv_start_pcl_bus);
@@ -679,6 +684,8 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
                pci_free_consistent(lynx->pci_device, PAGE_SIZE,
                                lynx->rcv_buffer, lynx->rcv_buffer_bus);
        iounmap(lynx->registers);
+
+fail_deallocate_lynx:
        kfree(lynx);
 
 fail_disable:
index c06945160a4154a5f8d518192b7adb16c4ab325d..5e23e2d305e71db52a7f9e27a63ce760f4c752fd 100644 (file)
@@ -11,7 +11,7 @@ cflags-$(CONFIG_X86)          += -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
                                   -mno-mmx -mno-sse
 
 cflags-$(CONFIG_ARM64)         := $(subst -pg,,$(KBUILD_CFLAGS))
-cflags-$(CONFIG_ARM)           := $(subst -pg,,$(KBUILD_CFLAGS)) \
+cflags-$(CONFIG_ARM)           := $(subst -pg,,$(KBUILD_CFLAGS)) -g0 \
                                   -fno-builtin -fpic -mno-single-pic-base
 
 cflags-$(CONFIG_EFI_ARMSTUB)   += -I$(srctree)/scripts/dtc/libfdt
@@ -79,5 +79,6 @@ quiet_cmd_stubcopy = STUBCPY $@
 # decompressor. So move our .data to .data.efistub, which is preserved
 # explicitly by the decompressor linker script.
 #
-STUBCOPY_FLAGS-$(CONFIG_ARM)   += --rename-section .data=.data.efistub
+STUBCOPY_FLAGS-$(CONFIG_ARM)   += --rename-section .data=.data.efistub \
+                                  -R ___ksymtab+sort -R ___kcrctab+sort
 STUBCOPY_RELOC-$(CONFIG_ARM)   := R_ARM_ABS
index 26ee00f6bd5829c04d66b4621643375959c161da..d011cb89d25ed7c83b34b5a35d41fbcbed4a962b 100644 (file)
@@ -284,7 +284,7 @@ config GPIO_MM_LANTIQ
 
 config GPIO_MOCKUP
        tristate "GPIO Testing Driver"
-       depends on GPIOLIB
+       depends on GPIOLIB && SYSFS
        select GPIO_SYSFS
        help
          This enables GPIO Testing driver, which provides a way to test GPIO
index 9457e2022bf6c1e0c4f8cc4cd11acf224ff68e54..dc37dbe4b46d8889bfaddeac0c492dd6ed56090c 100644 (file)
@@ -219,6 +219,7 @@ static const struct of_device_id ath79_gpio_of_match[] = {
        { .compatible = "qca,ar9340-gpio" },
        {},
 };
+MODULE_DEVICE_TABLE(of, ath79_gpio_of_match);
 
 static int ath79_gpio_probe(struct platform_device *pdev)
 {
index 425501c39527038509a0c3af752598d0c53ee049..793518a30afe6c97a97bfe5db1d62cb1651077c1 100644 (file)
@@ -239,7 +239,7 @@ static int mpc8xxx_gpio_irq_map(struct irq_domain *h, unsigned int irq,
                                irq_hw_number_t hwirq)
 {
        irq_set_chip_data(irq, h->host_data);
-       irq_set_chip_and_handler(irq, &mpc8xxx_irq_chip, handle_level_irq);
+       irq_set_chip_and_handler(irq, &mpc8xxx_irq_chip, handle_edge_irq);
 
        return 0;
 }
index b9daa0bf32a46375784c2f6ade582ba4c46c4a74..ee1724806f46db13d7eb2b41ce900fd2043b3d91 100644 (file)
@@ -308,8 +308,10 @@ static int mxs_gpio_probe(struct platform_device *pdev)
        writel(~0U, port->base + PINCTRL_IRQSTAT(port) + MXS_CLR);
 
        irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id());
-       if (irq_base < 0)
-               return irq_base;
+       if (irq_base < 0) {
+               err = irq_base;
+               goto out_iounmap;
+       }
 
        port->domain = irq_domain_add_legacy(np, 32, irq_base, 0,
                                             &irq_domain_simple_ops, NULL);
@@ -349,6 +351,8 @@ static int mxs_gpio_probe(struct platform_device *pdev)
        irq_domain_remove(port->domain);
 out_irqdesc_free:
        irq_free_descs(irq_base, 32);
+out_iounmap:
+       iounmap(port->base);
        return err;
 }
 
index e7d422a6b90bd71427694b8f3efc607d78c254cd..5b0042776ec7081f49d3eaff1dc56fe08733f3d1 100644 (file)
@@ -409,7 +409,7 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev)
                 * 801/1801/1600, bits are cleared when read.
                 * Edge detect register is not present on 801/1600/1801
                 */
-               if (stmpe->partnum != STMPE801 || stmpe->partnum != STMPE1600 ||
+               if (stmpe->partnum != STMPE801 && stmpe->partnum != STMPE1600 &&
                    stmpe->partnum != STMPE1801) {
                        stmpe_reg_write(stmpe, statmsbreg + i, status[i]);
                        stmpe_reg_write(stmpe,
index 99256115bea55c12710ae6c19a94c09a8e01d918..c2a80b4cbf32c2ce3b83eedf82339a8ad0177b16 100644 (file)
@@ -66,6 +66,7 @@ static const struct of_device_id ts4800_gpio_of_match[] = {
        { .compatible = "technologic,ts4800-gpio", },
        {},
 };
+MODULE_DEVICE_TABLE(of, ts4800_gpio_of_match);
 
 static struct platform_driver ts4800_gpio_driver = {
        .driver = {
index 58ece201b8e62328741a1f62a1fbb33dfedbf996..72a4b326fd0da2f1d84f9e05a97416ff5761c9d3 100644 (file)
@@ -653,14 +653,17 @@ int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
 {
        int idx, i;
        unsigned int irq_flags;
+       int ret = -ENOENT;
 
        for (i = 0, idx = 0; idx <= index; i++) {
                struct acpi_gpio_info info;
                struct gpio_desc *desc;
 
                desc = acpi_get_gpiod_by_index(adev, NULL, i, &info);
-               if (IS_ERR(desc))
+               if (IS_ERR(desc)) {
+                       ret = PTR_ERR(desc);
                        break;
+               }
                if (info.gpioint && idx++ == index) {
                        int irq = gpiod_to_irq(desc);
 
@@ -679,7 +682,7 @@ int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
                }
 
        }
-       return -ENOENT;
+       return ret;
 }
 EXPORT_SYMBOL_GPL(acpi_dev_gpio_irq_get);
 
index f0fc3a0d37c829de62e3c136f37cdb7a835a11b7..20e09b7c2de390120bcd0cf816df4e1ed5f7cc33 100644 (file)
@@ -333,6 +333,13 @@ struct linehandle_state {
        u32 numdescs;
 };
 
+#define GPIOHANDLE_REQUEST_VALID_FLAGS \
+       (GPIOHANDLE_REQUEST_INPUT | \
+       GPIOHANDLE_REQUEST_OUTPUT | \
+       GPIOHANDLE_REQUEST_ACTIVE_LOW | \
+       GPIOHANDLE_REQUEST_OPEN_DRAIN | \
+       GPIOHANDLE_REQUEST_OPEN_SOURCE)
+
 static long linehandle_ioctl(struct file *filep, unsigned int cmd,
                             unsigned long arg)
 {
@@ -344,6 +351,8 @@ static long linehandle_ioctl(struct file *filep, unsigned int cmd,
        if (cmd == GPIOHANDLE_GET_LINE_VALUES_IOCTL) {
                int val;
 
+               memset(&ghd, 0, sizeof(ghd));
+
                /* TODO: check if descriptors are really input */
                for (i = 0; i < lh->numdescs; i++) {
                        val = gpiod_get_value_cansleep(lh->descs[i]);
@@ -444,6 +453,17 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
                u32 lflags = handlereq.flags;
                struct gpio_desc *desc;
 
+               if (offset >= gdev->ngpio) {
+                       ret = -EINVAL;
+                       goto out_free_descs;
+               }
+
+               /* Return an error if a unknown flag is set */
+               if (lflags & ~GPIOHANDLE_REQUEST_VALID_FLAGS) {
+                       ret = -EINVAL;
+                       goto out_free_descs;
+               }
+
                desc = &gdev->descs[offset];
                ret = gpiod_request(desc, lh->label);
                if (ret)
@@ -536,6 +556,10 @@ struct lineevent_state {
        struct mutex read_lock;
 };
 
+#define GPIOEVENT_REQUEST_VALID_FLAGS \
+       (GPIOEVENT_REQUEST_RISING_EDGE | \
+       GPIOEVENT_REQUEST_FALLING_EDGE)
+
 static unsigned int lineevent_poll(struct file *filep,
                                   struct poll_table_struct *wait)
 {
@@ -623,6 +647,8 @@ static long lineevent_ioctl(struct file *filep, unsigned int cmd,
        if (cmd == GPIOHANDLE_GET_LINE_VALUES_IOCTL) {
                int val;
 
+               memset(&ghd, 0, sizeof(ghd));
+
                val = gpiod_get_value_cansleep(le->desc);
                if (val < 0)
                        return val;
@@ -726,6 +752,18 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
        lflags = eventreq.handleflags;
        eflags = eventreq.eventflags;
 
+       if (offset >= gdev->ngpio) {
+               ret = -EINVAL;
+               goto out_free_label;
+       }
+
+       /* Return an error if a unknown flag is set */
+       if ((lflags & ~GPIOHANDLE_REQUEST_VALID_FLAGS) ||
+           (eflags & ~GPIOEVENT_REQUEST_VALID_FLAGS)) {
+               ret = -EINVAL;
+               goto out_free_label;
+       }
+
        /* This is just wrong: we don't look for events on output lines */
        if (lflags & GPIOHANDLE_REQUEST_OUTPUT) {
                ret = -EINVAL;
@@ -823,6 +861,8 @@ static long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
        if (cmd == GPIO_GET_CHIPINFO_IOCTL) {
                struct gpiochip_info chipinfo;
 
+               memset(&chipinfo, 0, sizeof(chipinfo));
+
                strncpy(chipinfo.name, dev_name(&gdev->dev),
                        sizeof(chipinfo.name));
                chipinfo.name[sizeof(chipinfo.name)-1] = '\0';
@@ -839,7 +879,7 @@ static long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 
                if (copy_from_user(&lineinfo, ip, sizeof(lineinfo)))
                        return -EFAULT;
-               if (lineinfo.line_offset > gdev->ngpio)
+               if (lineinfo.line_offset >= gdev->ngpio)
                        return -EINVAL;
 
                desc = &gdev->descs[lineinfo.line_offset];
index 2e3a0543760d0967164b2a5833cf9c39a63bf90b..e3281d4e3e414cc9d693932911215c6fc7216d6f 100644 (file)
@@ -765,7 +765,7 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force)
        return ret;
 }
 
-static void amdgpu_connector_destroy(struct drm_connector *connector)
+static void amdgpu_connector_unregister(struct drm_connector *connector)
 {
        struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
 
@@ -773,6 +773,12 @@ static void amdgpu_connector_destroy(struct drm_connector *connector)
                drm_dp_aux_unregister(&amdgpu_connector->ddc_bus->aux);
                amdgpu_connector->ddc_bus->has_aux = false;
        }
+}
+
+static void amdgpu_connector_destroy(struct drm_connector *connector)
+{
+       struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
+
        amdgpu_connector_free_edid(connector);
        kfree(amdgpu_connector->con_priv);
        drm_connector_unregister(connector);
@@ -826,6 +832,7 @@ static const struct drm_connector_funcs amdgpu_connector_lvds_funcs = {
        .dpms = drm_helper_connector_dpms,
        .detect = amdgpu_connector_lvds_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
+       .early_unregister = amdgpu_connector_unregister,
        .destroy = amdgpu_connector_destroy,
        .set_property = amdgpu_connector_set_lcd_property,
 };
@@ -936,6 +943,7 @@ static const struct drm_connector_funcs amdgpu_connector_vga_funcs = {
        .dpms = drm_helper_connector_dpms,
        .detect = amdgpu_connector_vga_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
+       .early_unregister = amdgpu_connector_unregister,
        .destroy = amdgpu_connector_destroy,
        .set_property = amdgpu_connector_set_property,
 };
@@ -1203,6 +1211,7 @@ static const struct drm_connector_funcs amdgpu_connector_dvi_funcs = {
        .detect = amdgpu_connector_dvi_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = amdgpu_connector_set_property,
+       .early_unregister = amdgpu_connector_unregister,
        .destroy = amdgpu_connector_destroy,
        .force = amdgpu_connector_dvi_force,
 };
@@ -1493,6 +1502,7 @@ static const struct drm_connector_funcs amdgpu_connector_dp_funcs = {
        .detect = amdgpu_connector_dp_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = amdgpu_connector_set_property,
+       .early_unregister = amdgpu_connector_unregister,
        .destroy = amdgpu_connector_destroy,
        .force = amdgpu_connector_dvi_force,
 };
@@ -1502,6 +1512,7 @@ static const struct drm_connector_funcs amdgpu_connector_edp_funcs = {
        .detect = amdgpu_connector_dp_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = amdgpu_connector_set_lcd_property,
+       .early_unregister = amdgpu_connector_unregister,
        .destroy = amdgpu_connector_destroy,
        .force = amdgpu_connector_dvi_force,
 };
index e203e5561107146badbb45a2260763c87e06f8e0..a5e2fcbef0f0f24f54bcf54164eb610c463edd49 100644 (file)
@@ -43,6 +43,9 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, struct amdgpu_ctx *ctx)
                ctx->rings[i].sequence = 1;
                ctx->rings[i].fences = &ctx->fences[amdgpu_sched_jobs * i];
        }
+
+       ctx->reset_counter = atomic_read(&adev->gpu_reset_counter);
+
        /* create context entity for each ring */
        for (i = 0; i < adev->num_rings; i++) {
                struct amdgpu_ring *ring = adev->rings[i];
index 7dbe85d67d2682854e8158e35f9ee8f8e0e65d94..b4f4a9239069d1a3f073cd89f1355b2e0dd7e985 100644 (file)
@@ -1408,16 +1408,6 @@ static int amdgpu_late_init(struct amdgpu_device *adev)
        for (i = 0; i < adev->num_ip_blocks; i++) {
                if (!adev->ip_block_status[i].valid)
                        continue;
-               if (adev->ip_blocks[i].type == AMD_IP_BLOCK_TYPE_UVD ||
-                       adev->ip_blocks[i].type == AMD_IP_BLOCK_TYPE_VCE)
-                       continue;
-               /* enable clockgating to save power */
-               r = adev->ip_blocks[i].funcs->set_clockgating_state((void *)adev,
-                                                                   AMD_CG_STATE_GATE);
-               if (r) {
-                       DRM_ERROR("set_clockgating_state(gate) of IP block <%s> failed %d\n", adev->ip_blocks[i].funcs->name, r);
-                       return r;
-               }
                if (adev->ip_blocks[i].funcs->late_init) {
                        r = adev->ip_blocks[i].funcs->late_init((void *)adev);
                        if (r) {
@@ -1426,6 +1416,18 @@ static int amdgpu_late_init(struct amdgpu_device *adev)
                        }
                        adev->ip_block_status[i].late_initialized = true;
                }
+               /* skip CG for VCE/UVD, it's handled specially */
+               if (adev->ip_blocks[i].type != AMD_IP_BLOCK_TYPE_UVD &&
+                   adev->ip_blocks[i].type != AMD_IP_BLOCK_TYPE_VCE) {
+                       /* enable clockgating to save power */
+                       r = adev->ip_blocks[i].funcs->set_clockgating_state((void *)adev,
+                                                                           AMD_CG_STATE_GATE);
+                       if (r) {
+                               DRM_ERROR("set_clockgating_state(gate) of IP block <%s> failed %d\n",
+                                         adev->ip_blocks[i].funcs->name, r);
+                               return r;
+                       }
+               }
        }
 
        return 0;
@@ -1435,6 +1437,30 @@ static int amdgpu_fini(struct amdgpu_device *adev)
 {
        int i, r;
 
+       /* need to disable SMC first */
+       for (i = 0; i < adev->num_ip_blocks; i++) {
+               if (!adev->ip_block_status[i].hw)
+                       continue;
+               if (adev->ip_blocks[i].type == AMD_IP_BLOCK_TYPE_SMC) {
+                       /* ungate blocks before hw fini so that we can shutdown the blocks safely */
+                       r = adev->ip_blocks[i].funcs->set_clockgating_state((void *)adev,
+                                                                           AMD_CG_STATE_UNGATE);
+                       if (r) {
+                               DRM_ERROR("set_clockgating_state(ungate) of IP block <%s> failed %d\n",
+                                         adev->ip_blocks[i].funcs->name, r);
+                               return r;
+                       }
+                       r = adev->ip_blocks[i].funcs->hw_fini((void *)adev);
+                       /* XXX handle errors */
+                       if (r) {
+                               DRM_DEBUG("hw_fini of IP block <%s> failed %d\n",
+                                         adev->ip_blocks[i].funcs->name, r);
+                       }
+                       adev->ip_block_status[i].hw = false;
+                       break;
+               }
+       }
+
        for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
                if (!adev->ip_block_status[i].hw)
                        continue;
@@ -2073,7 +2099,8 @@ static bool amdgpu_check_soft_reset(struct amdgpu_device *adev)
                if (!adev->ip_block_status[i].valid)
                        continue;
                if (adev->ip_blocks[i].funcs->check_soft_reset)
-                       adev->ip_blocks[i].funcs->check_soft_reset(adev);
+                       adev->ip_block_status[i].hang =
+                               adev->ip_blocks[i].funcs->check_soft_reset(adev);
                if (adev->ip_block_status[i].hang) {
                        DRM_INFO("IP block:%d is hang!\n", i);
                        asic_hang = true;
@@ -2102,12 +2129,20 @@ static int amdgpu_pre_soft_reset(struct amdgpu_device *adev)
 
 static bool amdgpu_need_full_reset(struct amdgpu_device *adev)
 {
-       if (adev->ip_block_status[AMD_IP_BLOCK_TYPE_GMC].hang ||
-           adev->ip_block_status[AMD_IP_BLOCK_TYPE_SMC].hang ||
-           adev->ip_block_status[AMD_IP_BLOCK_TYPE_ACP].hang ||
-           adev->ip_block_status[AMD_IP_BLOCK_TYPE_DCE].hang) {
-               DRM_INFO("Some block need full reset!\n");
-               return true;
+       int i;
+
+       for (i = 0; i < adev->num_ip_blocks; i++) {
+               if (!adev->ip_block_status[i].valid)
+                       continue;
+               if ((adev->ip_blocks[i].type == AMD_IP_BLOCK_TYPE_GMC) ||
+                   (adev->ip_blocks[i].type == AMD_IP_BLOCK_TYPE_SMC) ||
+                   (adev->ip_blocks[i].type == AMD_IP_BLOCK_TYPE_ACP) ||
+                   (adev->ip_blocks[i].type == AMD_IP_BLOCK_TYPE_DCE)) {
+                       if (adev->ip_block_status[i].hang) {
+                               DRM_INFO("Some block need full reset!\n");
+                               return true;
+                       }
+               }
        }
        return false;
 }
index fe36caf1b7d7b084762d19fb7fa6516a42dd3fa3..14f57d9915e3fc0aa8d5a8e77b734073f05ecb9b 100644 (file)
@@ -113,24 +113,26 @@ void amdgpu_dpm_print_ps_status(struct amdgpu_device *adev,
        printk("\n");
 }
 
+
 u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev)
 {
        struct drm_device *dev = adev->ddev;
        struct drm_crtc *crtc;
        struct amdgpu_crtc *amdgpu_crtc;
-       u32 line_time_us, vblank_lines;
+       u32 vblank_in_pixels;
        u32 vblank_time_us = 0xffffffff; /* if the displays are off, vblank time is max */
 
        if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) {
                list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
                        amdgpu_crtc = to_amdgpu_crtc(crtc);
                        if (crtc->enabled && amdgpu_crtc->enabled && amdgpu_crtc->hw_mode.clock) {
-                               line_time_us = (amdgpu_crtc->hw_mode.crtc_htotal * 1000) /
-                                       amdgpu_crtc->hw_mode.clock;
-                               vblank_lines = amdgpu_crtc->hw_mode.crtc_vblank_end -
+                               vblank_in_pixels =
+                                       amdgpu_crtc->hw_mode.crtc_htotal *
+                                       (amdgpu_crtc->hw_mode.crtc_vblank_end -
                                        amdgpu_crtc->hw_mode.crtc_vdisplay +
-                                       (amdgpu_crtc->v_border * 2);
-                               vblank_time_us = vblank_lines * line_time_us;
+                                       (amdgpu_crtc->v_border * 2));
+
+                               vblank_time_us = vblank_in_pixels * 1000 / amdgpu_crtc->hw_mode.clock;
                                break;
                        }
                }
index aa074fac0c7f66ef796b2da0704c314c96f2b5d5..f3efb1c5dae96469ecdb6944e991f832b43e26dd 100644 (file)
@@ -754,6 +754,10 @@ static const char *amdgpu_vram_names[] = {
 
 int amdgpu_bo_init(struct amdgpu_device *adev)
 {
+       /* reserve PAT memory space to WC for VRAM */
+       arch_io_reserve_memtype_wc(adev->mc.aper_base,
+                                  adev->mc.aper_size);
+
        /* Add an MTRR for the VRAM */
        adev->mc.vram_mtrr = arch_phys_wc_add(adev->mc.aper_base,
                                              adev->mc.aper_size);
@@ -769,6 +773,7 @@ void amdgpu_bo_fini(struct amdgpu_device *adev)
 {
        amdgpu_ttm_fini(adev);
        arch_phys_wc_del(adev->mc.vram_mtrr);
+       arch_io_free_memtype_wc(adev->mc.aper_base, adev->mc.aper_size);
 }
 
 int amdgpu_bo_fbdev_mmap(struct amdgpu_bo *bo,
index e1fa8731d1e2db7b16c09edf44d195e8d457cf07..3cb5e903cd62896529d2ea18d5ea7f49c2feae73 100644 (file)
@@ -345,8 +345,8 @@ static int amdgpu_debugfs_ring_init(struct amdgpu_device *adev,
        ent = debugfs_create_file(name,
                                  S_IFREG | S_IRUGO, root,
                                  ring, &amdgpu_debugfs_ring_fops);
-       if (IS_ERR(ent))
-               return PTR_ERR(ent);
+       if (!ent)
+               return -ENOMEM;
 
        i_size_write(ent->d_inode, ring->ring_size + 12);
        ring->ent = ent;
index 887483b8b818383c5139ec8c2059e3fd19f16014..dcaf691f56b5577352d2238bdfd27e2f1aca2386 100644 (file)
@@ -555,10 +555,13 @@ struct amdgpu_ttm_tt {
 int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
 {
        struct amdgpu_ttm_tt *gtt = (void *)ttm;
-       int write = !(gtt->userflags & AMDGPU_GEM_USERPTR_READONLY);
+       unsigned int flags = 0;
        unsigned pinned = 0;
        int r;
 
+       if (!(gtt->userflags & AMDGPU_GEM_USERPTR_READONLY))
+               flags |= FOLL_WRITE;
+
        if (gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) {
                /* check that we only use anonymous memory
                   to prevent problems with writeback */
@@ -581,7 +584,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
                list_add(&guptask.list, &gtt->guptasks);
                spin_unlock(&gtt->guptasklock);
 
-               r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
+               r = get_user_pages(userptr, num_pages, flags, p, NULL);
 
                spin_lock(&gtt->guptasklock);
                list_del(&guptask.list);
index f80a0834e889e8ff07b77846f28fcb619632ca14..3c082e1437303d3247da620fcd08ba8a031e62e0 100644 (file)
@@ -1514,14 +1514,16 @@ static int cz_dpm_set_powergating_state(void *handle,
        return 0;
 }
 
-/* borrowed from KV, need future unify */
 static int cz_dpm_get_temperature(struct amdgpu_device *adev)
 {
        int actual_temp = 0;
-       uint32_t temp = RREG32_SMC(0xC0300E0C);
+       uint32_t val = RREG32_SMC(ixTHM_TCON_CUR_TMP);
+       uint32_t temp = REG_GET_FIELD(val, THM_TCON_CUR_TMP, CUR_TEMP);
 
-       if (temp)
+       if (REG_GET_FIELD(val, THM_TCON_CUR_TMP, CUR_TEMP_RANGE_SEL))
                actual_temp = 1000 * ((temp / 8) - 49);
+       else
+               actual_temp = 1000 * (temp / 8);
 
        return actual_temp;
 }
index 613ebb7ed50f5e33699fb254bd417b238f6c2783..4108c686aa7c20619bcbe33d430dc8cbbc6fcbe7 100644 (file)
@@ -3188,16 +3188,11 @@ static int dce_v10_0_wait_for_idle(void *handle)
        return 0;
 }
 
-static int dce_v10_0_check_soft_reset(void *handle)
+static bool dce_v10_0_check_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (dce_v10_0_is_display_hung(adev))
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_DCE].hang = true;
-       else
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_DCE].hang = false;
-
-       return 0;
+       return dce_v10_0_is_display_hung(adev);
 }
 
 static int dce_v10_0_soft_reset(void *handle)
@@ -3205,9 +3200,6 @@ static int dce_v10_0_soft_reset(void *handle)
        u32 srbm_soft_reset = 0, tmp;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_DCE].hang)
-               return 0;
-
        if (dce_v10_0_is_display_hung(adev))
                srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_DC_MASK;
 
index 6c6ff57b1c95f2824537933c8c8ecd6525bda3ab..ee6a48a092143ae6952bbcce9af1f04dc5712614 100644 (file)
@@ -4087,14 +4087,21 @@ static int gfx_v8_0_rlc_load_microcode(struct amdgpu_device *adev)
 static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
 {
        int r;
+       u32 tmp;
 
        gfx_v8_0_rlc_stop(adev);
 
        /* disable CG */
-       WREG32(mmRLC_CGCG_CGLS_CTRL, 0);
+       tmp = RREG32(mmRLC_CGCG_CGLS_CTRL);
+       tmp &= ~(RLC_CGCG_CGLS_CTRL__CGCG_EN_MASK |
+                RLC_CGCG_CGLS_CTRL__CGLS_EN_MASK);
+       WREG32(mmRLC_CGCG_CGLS_CTRL, tmp);
        if (adev->asic_type == CHIP_POLARIS11 ||
-           adev->asic_type == CHIP_POLARIS10)
-               WREG32(mmRLC_CGCG_CGLS_CTRL_3D, 0);
+           adev->asic_type == CHIP_POLARIS10) {
+               tmp = RREG32(mmRLC_CGCG_CGLS_CTRL_3D);
+               tmp &= ~0x3;
+               WREG32(mmRLC_CGCG_CGLS_CTRL_3D, tmp);
+       }
 
        /* disable PG */
        WREG32(mmRLC_PG_CNTL, 0);
@@ -5137,7 +5144,7 @@ static int gfx_v8_0_wait_for_idle(void *handle)
        return -ETIMEDOUT;
 }
 
-static int gfx_v8_0_check_soft_reset(void *handle)
+static bool gfx_v8_0_check_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
@@ -5189,16 +5196,14 @@ static int gfx_v8_0_check_soft_reset(void *handle)
                                                SRBM_SOFT_RESET, SOFT_RESET_SEM, 1);
 
        if (grbm_soft_reset || srbm_soft_reset) {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_GFX].hang = true;
                adev->gfx.grbm_soft_reset = grbm_soft_reset;
                adev->gfx.srbm_soft_reset = srbm_soft_reset;
+               return true;
        } else {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_GFX].hang = false;
                adev->gfx.grbm_soft_reset = 0;
                adev->gfx.srbm_soft_reset = 0;
+               return false;
        }
-
-       return 0;
 }
 
 static void gfx_v8_0_inactive_hqd(struct amdgpu_device *adev,
@@ -5226,7 +5231,8 @@ static int gfx_v8_0_pre_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_GFX].hang)
+       if ((!adev->gfx.grbm_soft_reset) &&
+           (!adev->gfx.srbm_soft_reset))
                return 0;
 
        grbm_soft_reset = adev->gfx.grbm_soft_reset;
@@ -5264,7 +5270,8 @@ static int gfx_v8_0_soft_reset(void *handle)
        u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
        u32 tmp;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_GFX].hang)
+       if ((!adev->gfx.grbm_soft_reset) &&
+           (!adev->gfx.srbm_soft_reset))
                return 0;
 
        grbm_soft_reset = adev->gfx.grbm_soft_reset;
@@ -5334,7 +5341,8 @@ static int gfx_v8_0_post_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_GFX].hang)
+       if ((!adev->gfx.grbm_soft_reset) &&
+           (!adev->gfx.srbm_soft_reset))
                return 0;
 
        grbm_soft_reset = adev->gfx.grbm_soft_reset;
index 1b319f5bc6962d5d6250db12fcb18302db789ade..c22ef140a54215e5253b7c9605a358a4785f8c05 100644 (file)
@@ -1099,7 +1099,7 @@ static int gmc_v8_0_wait_for_idle(void *handle)
 
 }
 
-static int gmc_v8_0_check_soft_reset(void *handle)
+static bool gmc_v8_0_check_soft_reset(void *handle)
 {
        u32 srbm_soft_reset = 0;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1116,20 +1116,19 @@ static int gmc_v8_0_check_soft_reset(void *handle)
                                                        SRBM_SOFT_RESET, SOFT_RESET_MC, 1);
        }
        if (srbm_soft_reset) {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_GMC].hang = true;
                adev->mc.srbm_soft_reset = srbm_soft_reset;
+               return true;
        } else {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_GMC].hang = false;
                adev->mc.srbm_soft_reset = 0;
+               return false;
        }
-       return 0;
 }
 
 static int gmc_v8_0_pre_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_GMC].hang)
+       if (!adev->mc.srbm_soft_reset)
                return 0;
 
        gmc_v8_0_mc_stop(adev, &adev->mc.save);
@@ -1145,7 +1144,7 @@ static int gmc_v8_0_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_GMC].hang)
+       if (!adev->mc.srbm_soft_reset)
                return 0;
        srbm_soft_reset = adev->mc.srbm_soft_reset;
 
@@ -1175,7 +1174,7 @@ static int gmc_v8_0_post_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_GMC].hang)
+       if (!adev->mc.srbm_soft_reset)
                return 0;
 
        gmc_v8_0_mc_resume(adev, &adev->mc.save);
index f325fd86430b9e3d565f28fd5b11ace2c2a76667..a9d10941fb53d9ab2290fd6bdbe3351d91b0acaa 100644 (file)
@@ -1268,7 +1268,7 @@ static int sdma_v3_0_wait_for_idle(void *handle)
        return -ETIMEDOUT;
 }
 
-static int sdma_v3_0_check_soft_reset(void *handle)
+static bool sdma_v3_0_check_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset = 0;
@@ -1281,14 +1281,12 @@ static int sdma_v3_0_check_soft_reset(void *handle)
        }
 
        if (srbm_soft_reset) {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_SDMA].hang = true;
                adev->sdma.srbm_soft_reset = srbm_soft_reset;
+               return true;
        } else {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_SDMA].hang = false;
                adev->sdma.srbm_soft_reset = 0;
+               return false;
        }
-
-       return 0;
 }
 
 static int sdma_v3_0_pre_soft_reset(void *handle)
@@ -1296,7 +1294,7 @@ static int sdma_v3_0_pre_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset = 0;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_SDMA].hang)
+       if (!adev->sdma.srbm_soft_reset)
                return 0;
 
        srbm_soft_reset = adev->sdma.srbm_soft_reset;
@@ -1315,7 +1313,7 @@ static int sdma_v3_0_post_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset = 0;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_SDMA].hang)
+       if (!adev->sdma.srbm_soft_reset)
                return 0;
 
        srbm_soft_reset = adev->sdma.srbm_soft_reset;
@@ -1335,7 +1333,7 @@ static int sdma_v3_0_soft_reset(void *handle)
        u32 srbm_soft_reset = 0;
        u32 tmp;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_SDMA].hang)
+       if (!adev->sdma.srbm_soft_reset)
                return 0;
 
        srbm_soft_reset = adev->sdma.srbm_soft_reset;
index 8bd08925b370b753fbe217031c1e29e5b3b4426e..3de7bca5854b1b06f20077d177c5476511d5e74b 100644 (file)
@@ -3499,6 +3499,12 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev,
                max_sclk = 75000;
                max_mclk = 80000;
        }
+       /* Limit clocks for some HD8600 parts */
+       if (adev->pdev->device == 0x6660 &&
+           adev->pdev->revision == 0x83) {
+               max_sclk = 75000;
+               max_mclk = 80000;
+       }
 
        if (rps->vce_active) {
                rps->evclk = adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].evclk;
index d127d59f953a8ded522884fa7f9eba77e648db2d..b4ea229bb4498ff1f84209dec7f211198ed788ed 100644 (file)
@@ -373,7 +373,7 @@ static int tonga_ih_wait_for_idle(void *handle)
        return -ETIMEDOUT;
 }
 
-static int tonga_ih_check_soft_reset(void *handle)
+static bool tonga_ih_check_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset = 0;
@@ -384,21 +384,19 @@ static int tonga_ih_check_soft_reset(void *handle)
                                                SOFT_RESET_IH, 1);
 
        if (srbm_soft_reset) {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_IH].hang = true;
                adev->irq.srbm_soft_reset = srbm_soft_reset;
+               return true;
        } else {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_IH].hang = false;
                adev->irq.srbm_soft_reset = 0;
+               return false;
        }
-
-       return 0;
 }
 
 static int tonga_ih_pre_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_IH].hang)
+       if (!adev->irq.srbm_soft_reset)
                return 0;
 
        return tonga_ih_hw_fini(adev);
@@ -408,7 +406,7 @@ static int tonga_ih_post_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_IH].hang)
+       if (!adev->irq.srbm_soft_reset)
                return 0;
 
        return tonga_ih_hw_init(adev);
@@ -419,7 +417,7 @@ static int tonga_ih_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_IH].hang)
+       if (!adev->irq.srbm_soft_reset)
                return 0;
        srbm_soft_reset = adev->irq.srbm_soft_reset;
 
index e0fd9f21ed9585ce37c310605f2ea56524fa60bc..ab3df6d756562ee33b97d2c48aaf6f7bfadc6f2a 100644 (file)
@@ -770,7 +770,7 @@ static int uvd_v6_0_wait_for_idle(void *handle)
 }
 
 #define AMDGPU_UVD_STATUS_BUSY_MASK    0xfd
-static int uvd_v6_0_check_soft_reset(void *handle)
+static bool uvd_v6_0_check_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset = 0;
@@ -782,19 +782,19 @@ static int uvd_v6_0_check_soft_reset(void *handle)
                srbm_soft_reset = REG_SET_FIELD(srbm_soft_reset, SRBM_SOFT_RESET, SOFT_RESET_UVD, 1);
 
        if (srbm_soft_reset) {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_UVD].hang = true;
                adev->uvd.srbm_soft_reset = srbm_soft_reset;
+               return true;
        } else {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_UVD].hang = false;
                adev->uvd.srbm_soft_reset = 0;
+               return false;
        }
-       return 0;
 }
+
 static int uvd_v6_0_pre_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_UVD].hang)
+       if (!adev->uvd.srbm_soft_reset)
                return 0;
 
        uvd_v6_0_stop(adev);
@@ -806,7 +806,7 @@ static int uvd_v6_0_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_UVD].hang)
+       if (!adev->uvd.srbm_soft_reset)
                return 0;
        srbm_soft_reset = adev->uvd.srbm_soft_reset;
 
@@ -836,7 +836,7 @@ static int uvd_v6_0_post_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_UVD].hang)
+       if (!adev->uvd.srbm_soft_reset)
                return 0;
 
        mdelay(5);
index 3f6db4ec0102d0f54d2b5cba6c33a76b9d64ad46..8533269ec1606f1ed26714d9655a5eae20b49421 100644 (file)
@@ -561,7 +561,7 @@ static int vce_v3_0_wait_for_idle(void *handle)
 #define  AMDGPU_VCE_STATUS_BUSY_MASK (VCE_STATUS_VCPU_REPORT_AUTO_BUSY_MASK | \
                                      VCE_STATUS_VCPU_REPORT_RB0_BUSY_MASK)
 
-static int vce_v3_0_check_soft_reset(void *handle)
+static bool vce_v3_0_check_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset = 0;
@@ -591,16 +591,15 @@ static int vce_v3_0_check_soft_reset(void *handle)
                srbm_soft_reset = REG_SET_FIELD(srbm_soft_reset, SRBM_SOFT_RESET, SOFT_RESET_VCE1, 1);
        }
        WREG32_FIELD(GRBM_GFX_INDEX, INSTANCE_INDEX, 0);
+       mutex_unlock(&adev->grbm_idx_mutex);
 
        if (srbm_soft_reset) {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang = true;
                adev->vce.srbm_soft_reset = srbm_soft_reset;
+               return true;
        } else {
-               adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang = false;
                adev->vce.srbm_soft_reset = 0;
+               return false;
        }
-       mutex_unlock(&adev->grbm_idx_mutex);
-       return 0;
 }
 
 static int vce_v3_0_soft_reset(void *handle)
@@ -608,7 +607,7 @@ static int vce_v3_0_soft_reset(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        u32 srbm_soft_reset;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang)
+       if (!adev->vce.srbm_soft_reset)
                return 0;
        srbm_soft_reset = adev->vce.srbm_soft_reset;
 
@@ -638,7 +637,7 @@ static int vce_v3_0_pre_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang)
+       if (!adev->vce.srbm_soft_reset)
                return 0;
 
        mdelay(5);
@@ -651,7 +650,7 @@ static int vce_v3_0_post_soft_reset(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       if (!adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang)
+       if (!adev->vce.srbm_soft_reset)
                return 0;
 
        mdelay(5);
index c934b78c9e2f056b9ba20ec9f2b182cfa1910e74..bec8125bceb0d2555b49b8badaafbf4494ac47f7 100644 (file)
@@ -165,7 +165,7 @@ struct amd_ip_funcs {
        /* poll for idle */
        int (*wait_for_idle)(void *handle);
        /* check soft reset the IP block */
-       int (*check_soft_reset)(void *handle);
+       bool (*check_soft_reset)(void *handle);
        /* pre soft reset the IP block */
        int (*pre_soft_reset)(void *handle);
        /* soft reset the IP block */
index 92b1178438755ab4e981dfa14741f62a3353da9f..8cee4e0f9fde60c736b56344b378c67c2107d867 100644 (file)
@@ -49,6 +49,7 @@ static const pem_event_action * const uninitialize_event[] = {
        uninitialize_display_phy_access_tasks,
        disable_gfx_voltage_island_power_gating_tasks,
        disable_gfx_clock_gating_tasks,
+       uninitialize_thermal_controller_tasks,
        set_boot_state_tasks,
        adjust_power_state_tasks,
        disable_dynamic_state_management_tasks,
index 7e4fcbbbe08652735c6796a2cbfd62d122434e69..960424913496d671d70fa220600fab6874dbd67d 100644 (file)
@@ -1785,6 +1785,21 @@ static int cz_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_c
        return 0;
 }
 
+static int cz_thermal_get_temperature(struct pp_hwmgr *hwmgr)
+{
+       int actual_temp = 0;
+       uint32_t val = cgs_read_ind_register(hwmgr->device,
+                                            CGS_IND_REG__SMC, ixTHM_TCON_CUR_TMP);
+       uint32_t temp = PHM_GET_FIELD(val, THM_TCON_CUR_TMP, CUR_TEMP);
+
+       if (PHM_GET_FIELD(val, THM_TCON_CUR_TMP, CUR_TEMP_RANGE_SEL))
+               actual_temp = ((temp / 8) - 49) * PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
+       else
+               actual_temp = (temp / 8) * PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
+
+       return actual_temp;
+}
+
 static int cz_read_sensor(struct pp_hwmgr *hwmgr, int idx, int32_t *value)
 {
        struct cz_hwmgr *cz_hwmgr = (struct cz_hwmgr *)(hwmgr->backend);
@@ -1881,6 +1896,9 @@ static int cz_read_sensor(struct pp_hwmgr *hwmgr, int idx, int32_t *value)
        case AMDGPU_PP_SENSOR_VCE_POWER:
                *value = cz_hwmgr->vce_power_gated ? 0 : 1;
                return 0;
+       case AMDGPU_PP_SENSOR_GPU_TEMP:
+               *value = cz_thermal_get_temperature(hwmgr);
+               return 0;
        default:
                return -EINVAL;
        }
index 508245d49d3394055835683f3067e021f6d482d0..609996c84ad5ae8681bc8fa4db53f7e4bcb548e2 100644 (file)
@@ -1030,20 +1030,19 @@ static int smu7_disable_sclk_mclk_dpm(struct pp_hwmgr *hwmgr)
        struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
 
        /* disable SCLK dpm */
-       if (!data->sclk_dpm_key_disabled)
-               PP_ASSERT_WITH_CODE(
-                               (smum_send_msg_to_smc(hwmgr->smumgr,
-                                               PPSMC_MSG_DPM_Disable) == 0),
-                               "Failed to disable SCLK DPM!",
-                               return -EINVAL);
+       if (!data->sclk_dpm_key_disabled) {
+               PP_ASSERT_WITH_CODE(true == smum_is_dpm_running(hwmgr),
+                               "Trying to disable SCLK DPM when DPM is disabled",
+                               return 0);
+               smum_send_msg_to_smc(hwmgr->smumgr, PPSMC_MSG_DPM_Disable);
+       }
 
        /* disable MCLK dpm */
        if (!data->mclk_dpm_key_disabled) {
-               PP_ASSERT_WITH_CODE(
-                               (smum_send_msg_to_smc(hwmgr->smumgr,
-                                               PPSMC_MSG_MCLKDPM_Disable) == 0),
-                               "Failed to disable MCLK DPM!",
-                               return -EINVAL);
+               PP_ASSERT_WITH_CODE(true == smum_is_dpm_running(hwmgr),
+                               "Trying to disable MCLK DPM when DPM is disabled",
+                               return 0);
+               smum_send_msg_to_smc(hwmgr->smumgr, PPSMC_MSG_MCLKDPM_Disable);
        }
 
        return 0;
@@ -1069,10 +1068,13 @@ static int smu7_stop_dpm(struct pp_hwmgr *hwmgr)
                                return -EINVAL);
        }
 
-       if (smu7_disable_sclk_mclk_dpm(hwmgr)) {
-               printk(KERN_ERR "Failed to disable Sclk DPM and Mclk DPM!");
-               return -EINVAL;
-       }
+       smu7_disable_sclk_mclk_dpm(hwmgr);
+
+       PP_ASSERT_WITH_CODE(true == smum_is_dpm_running(hwmgr),
+                       "Trying to disable voltage DPM when DPM is disabled",
+                       return 0);
+
+       smum_send_msg_to_smc(hwmgr->smumgr, PPSMC_MSG_Voltage_Cntl_Disable);
 
        return 0;
 }
@@ -1226,7 +1228,7 @@ int smu7_enable_dpm_tasks(struct pp_hwmgr *hwmgr)
        PP_ASSERT_WITH_CODE((0 == tmp_result),
                        "Failed to enable VR hot GPIO interrupt!", result = tmp_result);
 
-       smum_send_msg_to_smc(hwmgr->smumgr, (PPSMC_Msg)PPSMC_HasDisplay);
+       smum_send_msg_to_smc(hwmgr->smumgr, (PPSMC_Msg)PPSMC_NoDisplay);
 
        tmp_result = smu7_enable_sclk_control(hwmgr);
        PP_ASSERT_WITH_CODE((0 == tmp_result),
@@ -1306,6 +1308,12 @@ int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
        PP_ASSERT_WITH_CODE((tmp_result == 0),
                        "Failed to disable thermal auto throttle!", result = tmp_result);
 
+       if (1 == PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, FEATURE_STATUS, AVS_ON)) {
+               PP_ASSERT_WITH_CODE((0 == smum_send_msg_to_smc(hwmgr->smumgr, PPSMC_MSG_DisableAvfs)),
+                                       "Failed to disable AVFS!",
+                                       return -EINVAL);
+       }
+
        tmp_result = smu7_stop_dpm(hwmgr);
        PP_ASSERT_WITH_CODE((tmp_result == 0),
                        "Failed to stop DPM!", result = tmp_result);
@@ -1452,8 +1460,10 @@ static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
        struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table = NULL;
 
 
-       if (table_info != NULL)
-               sclk_table = table_info->vdd_dep_on_sclk;
+       if (table_info == NULL)
+               return -EINVAL;
+
+       sclk_table = table_info->vdd_dep_on_sclk;
 
        for (i = 0; i < SMU7_MAX_LEAKAGE_COUNT; i++) {
                vv_id = ATOM_VIRTUAL_VOLTAGE_ID0 + i;
@@ -3802,13 +3812,15 @@ static inline bool smu7_are_power_levels_equal(const struct smu7_performance_lev
 
 int smu7_check_states_equal(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *pstate1, const struct pp_hw_power_state *pstate2, bool *equal)
 {
-       const struct smu7_power_state *psa = cast_const_phw_smu7_power_state(pstate1);
-       const struct smu7_power_state *psb = cast_const_phw_smu7_power_state(pstate2);
+       const struct smu7_power_state *psa;
+       const struct smu7_power_state *psb;
        int i;
 
        if (pstate1 == NULL || pstate2 == NULL || equal == NULL)
                return -EINVAL;
 
+       psa = cast_const_phw_smu7_power_state(pstate1);
+       psb = cast_const_phw_smu7_power_state(pstate2);
        /* If the two states don't even have the same number of performance levels they cannot be the same state. */
        if (psa->performance_level_count != psb->performance_level_count) {
                *equal = false;
@@ -4324,6 +4336,7 @@ static const struct pp_hwmgr_func smu7_hwmgr_funcs = {
        .set_mclk_od = smu7_set_mclk_od,
        .get_clock_by_type = smu7_get_clock_by_type,
        .read_sensor = smu7_read_sensor,
+       .dynamic_state_management_disable = smu7_disable_dpm_tasks,
 };
 
 uint8_t smu7_get_sleep_divider_id_from_clock(uint32_t clock,
index eda802bc63c888ead2082e4362768ba763d1d83f..8c889caba420dc2d55ec9340d46ab0a92d468514 100644 (file)
@@ -2458,7 +2458,7 @@ static int iceland_set_mc_special_registers(struct pp_hwmgr *hwmgr,
                        PP_ASSERT_WITH_CODE((j <= SMU71_DISCRETE_MC_REGISTER_ARRAY_SIZE),
                                "Invalid VramInfo table.", return -EINVAL);
 
-                       if (!data->is_memory_gddr5) {
+                       if (!data->is_memory_gddr5 && j < SMU71_DISCRETE_MC_REGISTER_ARRAY_SIZE) {
                                table->mc_reg_address[j].s1 = mmMC_PMG_AUTO_CMD;
                                table->mc_reg_address[j].s0 = mmMC_PMG_AUTO_CMD;
                                for (k = 0; k < table->num_entries; k++) {
index 2f58e9e2a59cb4346e339a43953e3ade8941889a..a51f8cbcfe26d9d4d5d52d2037ed94292533c41e 100644 (file)
@@ -332,17 +332,19 @@ static void armada_drm_crtc_dpms(struct drm_crtc *crtc, int dpms)
 {
        struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
 
-       if (dcrtc->dpms != dpms) {
-               dcrtc->dpms = dpms;
-               if (!IS_ERR(dcrtc->clk) && !dpms_blanked(dpms))
-                       WARN_ON(clk_prepare_enable(dcrtc->clk));
-               armada_drm_crtc_update(dcrtc);
-               if (!IS_ERR(dcrtc->clk) && dpms_blanked(dpms))
-                       clk_disable_unprepare(dcrtc->clk);
+       if (dpms_blanked(dcrtc->dpms) != dpms_blanked(dpms)) {
                if (dpms_blanked(dpms))
                        armada_drm_vblank_off(dcrtc);
-               else
+               else if (!IS_ERR(dcrtc->clk))
+                       WARN_ON(clk_prepare_enable(dcrtc->clk));
+               dcrtc->dpms = dpms;
+               armada_drm_crtc_update(dcrtc);
+               if (!dpms_blanked(dpms))
                        drm_crtc_vblank_on(&dcrtc->crtc);
+               else if (!IS_ERR(dcrtc->clk))
+                       clk_disable_unprepare(dcrtc->clk);
+       } else if (dcrtc->dpms != dpms) {
+               dcrtc->dpms = dpms;
        }
 }
 
index 608df4c90520278e59bfe75d3c3348d66af51e6c..0743e65cb24020fd7c8dffc679b76f15145b0d97 100644 (file)
@@ -267,6 +267,8 @@ int ast_mm_init(struct ast_private *ast)
                return ret;
        }
 
+       arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0),
+                                  pci_resource_len(dev->pdev, 0));
        ast->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0),
                                        pci_resource_len(dev->pdev, 0));
 
@@ -275,11 +277,15 @@ int ast_mm_init(struct ast_private *ast)
 
 void ast_mm_fini(struct ast_private *ast)
 {
+       struct drm_device *dev = ast->dev;
+
        ttm_bo_device_release(&ast->ttm.bdev);
 
        ast_ttm_global_release(ast);
 
        arch_phys_wc_del(ast->fb_mtrr);
+       arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0),
+                               pci_resource_len(dev->pdev, 0));
 }
 
 void ast_ttm_placement(struct ast_bo *bo, int domain)
index bb2438dd8733f4c2c64618629abf1e946395f02a..5e7e63ce7bcef9bd81058c01e886244e28e15f4a 100644 (file)
@@ -267,6 +267,9 @@ int cirrus_mm_init(struct cirrus_device *cirrus)
                return ret;
        }
 
+       arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0),
+                                  pci_resource_len(dev->pdev, 0));
+
        cirrus->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0),
                                           pci_resource_len(dev->pdev, 0));
 
@@ -276,6 +279,8 @@ int cirrus_mm_init(struct cirrus_device *cirrus)
 
 void cirrus_mm_fini(struct cirrus_device *cirrus)
 {
+       struct drm_device *dev = cirrus->dev;
+
        if (!cirrus->mm_inited)
                return;
 
@@ -285,6 +290,8 @@ void cirrus_mm_fini(struct cirrus_device *cirrus)
 
        arch_phys_wc_del(cirrus->fb_mtrr);
        cirrus->fb_mtrr = 0;
+       arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0),
+                               pci_resource_len(dev->pdev, 0));
 }
 
 void cirrus_ttm_placement(struct cirrus_bo *bo, int domain)
index 1df2d33d0b40ed43e0cbd4623e014851b34ce581..ffb2ab389d1d14863ed1e69c17419d560910afe5 100644 (file)
@@ -54,9 +54,6 @@ int drm_name_info(struct seq_file *m, void *data)
 
        mutex_lock(&dev->master_mutex);
        master = dev->master;
-       if (!master)
-               goto out_unlock;
-
        seq_printf(m, "%s", dev->driver->name);
        if (dev->dev)
                seq_printf(m, " dev=%s", dev_name(dev->dev));
@@ -65,7 +62,6 @@ int drm_name_info(struct seq_file *m, void *data)
        if (dev->unique)
                seq_printf(m, " unique=%s", dev->unique);
        seq_printf(m, "\n");
-out_unlock:
        mutex_unlock(&dev->master_mutex);
 
        return 0;
index cb86c7e5495c58b5a855cede81f20e387d5d6ec0..d9230132dfbcc51d1da070769617b1841ee3a248 100644 (file)
@@ -329,20 +329,34 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event,
        /*
         * Append a LINK to the submitted command buffer to return to
         * the ring buffer.  return_target is the ring target address.
-        * We need three dwords: event, wait, link.
+        * We need at most 7 dwords in the return target: 2 cache flush +
+        * 2 semaphore stall + 1 event + 1 wait + 1 link.
         */
-       return_dwords = 3;
+       return_dwords = 7;
        return_target = etnaviv_buffer_reserve(gpu, buffer, return_dwords);
        CMD_LINK(cmdbuf, return_dwords, return_target);
 
        /*
-        * Append event, wait and link pointing back to the wait
-        * command to the ring buffer.
+        * Append a cache flush, stall, event, wait and link pointing back to
+        * the wait command to the ring buffer.
         */
+       if (gpu->exec_state == ETNA_PIPE_2D) {
+               CMD_LOAD_STATE(buffer, VIVS_GL_FLUSH_CACHE,
+                                      VIVS_GL_FLUSH_CACHE_PE2D);
+       } else {
+               CMD_LOAD_STATE(buffer, VIVS_GL_FLUSH_CACHE,
+                                      VIVS_GL_FLUSH_CACHE_DEPTH |
+                                      VIVS_GL_FLUSH_CACHE_COLOR);
+               CMD_LOAD_STATE(buffer, VIVS_TS_FLUSH_CACHE,
+                                      VIVS_TS_FLUSH_CACHE_FLUSH);
+       }
+       CMD_SEM(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
+       CMD_STALL(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
        CMD_LOAD_STATE(buffer, VIVS_GL_EVENT, VIVS_GL_EVENT_EVENT_ID(event) |
                       VIVS_GL_EVENT_FROM_PE);
        CMD_WAIT(buffer);
-       CMD_LINK(buffer, 2, return_target + 8);
+       CMD_LINK(buffer, 2, etnaviv_iommu_get_cmdbuf_va(gpu, buffer) +
+                           buffer->user_size - 4);
 
        if (drm_debug & DRM_UT_DRIVER)
                pr_info("stream link to 0x%08x @ 0x%08x %p\n",
index 5ce3603e6eacb1aab7c59ed66399f743d5346990..0370b842d9cc20c2fdae37406c82a9546106e69b 100644 (file)
@@ -748,19 +748,22 @@ static struct page **etnaviv_gem_userptr_do_get_pages(
        int ret = 0, pinned, npages = etnaviv_obj->base.size >> PAGE_SHIFT;
        struct page **pvec;
        uintptr_t ptr;
+       unsigned int flags = 0;
 
        pvec = drm_malloc_ab(npages, sizeof(struct page *));
        if (!pvec)
                return ERR_PTR(-ENOMEM);
 
+       if (!etnaviv_obj->userptr.ro)
+               flags |= FOLL_WRITE;
+
        pinned = 0;
        ptr = etnaviv_obj->userptr.ptr;
 
        down_read(&mm->mmap_sem);
        while (pinned < npages) {
                ret = get_user_pages_remote(task, mm, ptr, npages - pinned,
-                                           !etnaviv_obj->userptr.ro, 0,
-                                           pvec + pinned, NULL);
+                                           flags, pvec + pinned, NULL);
                if (ret < 0)
                        break;
 
index d3796ed8d8c5b2808cd9edba22d5d10a57563917..169ac96e8f0861f9648e0e3ca3292ca1da61556c 100644 (file)
@@ -330,7 +330,8 @@ u32 etnaviv_iommu_get_cmdbuf_va(struct etnaviv_gpu *gpu,
                        return (u32)buf->vram_node.start;
 
                mutex_lock(&mmu->lock);
-               ret = etnaviv_iommu_find_iova(mmu, &buf->vram_node, buf->size);
+               ret = etnaviv_iommu_find_iova(mmu, &buf->vram_node,
+                                             buf->size + SZ_64K);
                if (ret < 0) {
                        mutex_unlock(&mmu->lock);
                        return 0;
index aa92decf4233df4a4f06252a85c60ac3a7cd7a37..fbd13fabdf2daf93aeb79cb976c47e467fae6971 100644 (file)
@@ -488,7 +488,8 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
                goto err_free;
        }
 
-       ret = get_vaddr_frames(start, npages, true, true, g2d_userptr->vec);
+       ret = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE,
+               g2d_userptr->vec);
        if (ret != npages) {
                DRM_ERROR("failed to get user pages from userptr.\n");
                if (ret < 0)
index 3371635cd4d707192e39104ed1bc13671fc19c69..b2d5e188b1b885708dd02a02021ffa25e5e6dba8 100644 (file)
@@ -51,6 +51,7 @@ static void fsl_dcu_drm_disable_crtc(struct drm_crtc *crtc)
                           DCU_MODE_DCU_MODE(DCU_MODE_OFF));
        regmap_write(fsl_dev->regmap, DCU_UPDATE_MODE,
                     DCU_UPDATE_MODE_READREG);
+       clk_disable_unprepare(fsl_dev->pix_clk);
 }
 
 static void fsl_dcu_drm_crtc_enable(struct drm_crtc *crtc)
@@ -58,6 +59,7 @@ static void fsl_dcu_drm_crtc_enable(struct drm_crtc *crtc)
        struct drm_device *dev = crtc->dev;
        struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
 
+       clk_prepare_enable(fsl_dev->pix_clk);
        regmap_update_bits(fsl_dev->regmap, DCU_DCU_MODE,
                           DCU_MODE_DCU_MODE_MASK,
                           DCU_MODE_DCU_MODE(DCU_MODE_NORMAL));
@@ -116,8 +118,6 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
                     DCU_THRESHOLD_LS_BF_VS(BF_VS_VAL) |
                     DCU_THRESHOLD_OUT_BUF_HIGH(BUF_MAX_VAL) |
                     DCU_THRESHOLD_OUT_BUF_LOW(BUF_MIN_VAL));
-       regmap_write(fsl_dev->regmap, DCU_UPDATE_MODE,
-                    DCU_UPDATE_MODE_READREG);
        return;
 }
 
index 0884c45aefe84a9800b2ec95c57d0f44d1259835..e04efbed1a54f89e4277186405c2b46d59604d52 100644 (file)
@@ -267,12 +267,8 @@ static int fsl_dcu_drm_pm_resume(struct device *dev)
                return ret;
        }
 
-       ret = clk_prepare_enable(fsl_dev->pix_clk);
-       if (ret < 0) {
-               dev_err(dev, "failed to enable pix clk\n");
-               goto disable_dcu_clk;
-       }
-
+       if (fsl_dev->tcon)
+               fsl_tcon_bypass_enable(fsl_dev->tcon);
        fsl_dcu_drm_init_planes(fsl_dev->drm);
        drm_atomic_helper_resume(fsl_dev->drm, fsl_dev->state);
 
@@ -284,10 +280,6 @@ static int fsl_dcu_drm_pm_resume(struct device *dev)
        enable_irq(fsl_dev->irq);
 
        return 0;
-
-disable_dcu_clk:
-       clk_disable_unprepare(fsl_dev->clk);
-       return ret;
 }
 #endif
 
@@ -401,18 +393,12 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
                goto disable_clk;
        }
 
-       ret = clk_prepare_enable(fsl_dev->pix_clk);
-       if (ret < 0) {
-               dev_err(dev, "failed to enable pix clk\n");
-               goto unregister_pix_clk;
-       }
-
        fsl_dev->tcon = fsl_tcon_init(dev);
 
        drm = drm_dev_alloc(driver, dev);
        if (IS_ERR(drm)) {
                ret = PTR_ERR(drm);
-               goto disable_pix_clk;
+               goto unregister_pix_clk;
        }
 
        fsl_dev->dev = dev;
@@ -433,8 +419,6 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
 
 unref:
        drm_dev_unref(drm);
-disable_pix_clk:
-       clk_disable_unprepare(fsl_dev->pix_clk);
 unregister_pix_clk:
        clk_unregister(fsl_dev->pix_clk);
 disable_clk:
@@ -447,7 +431,6 @@ static int fsl_dcu_drm_remove(struct platform_device *pdev)
        struct fsl_dcu_drm_device *fsl_dev = platform_get_drvdata(pdev);
 
        clk_disable_unprepare(fsl_dev->clk);
-       clk_disable_unprepare(fsl_dev->pix_clk);
        clk_unregister(fsl_dev->pix_clk);
        drm_put_dev(fsl_dev->drm);
 
index a7e5486bd1e934be88374df0ce08731f6286ee1a..9e6f7d8112b32f87e2d34657918589c5ffdfab57 100644 (file)
@@ -211,11 +211,6 @@ void fsl_dcu_drm_init_planes(struct drm_device *dev)
                for (j = 1; j <= fsl_dev->soc->layer_regs; j++)
                        regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(i, j), 0);
        }
-       regmap_update_bits(fsl_dev->regmap, DCU_DCU_MODE,
-                          DCU_MODE_DCU_MODE_MASK,
-                          DCU_MODE_DCU_MODE(DCU_MODE_OFF));
-       regmap_write(fsl_dev->regmap, DCU_UPDATE_MODE,
-                    DCU_UPDATE_MODE_READREG);
 }
 
 struct drm_plane *fsl_dcu_drm_primary_create_plane(struct drm_device *dev)
index 26edcc899712d16db8959cbb2a5b01c932431c0b..e1dd75b181189bbc27f81eb92ad3f308b735aa2e 100644 (file)
 #include "fsl_dcu_drm_drv.h"
 #include "fsl_tcon.h"
 
-static int
-fsl_dcu_drm_encoder_atomic_check(struct drm_encoder *encoder,
-                                struct drm_crtc_state *crtc_state,
-                                struct drm_connector_state *conn_state)
-{
-       return 0;
-}
-
-static void fsl_dcu_drm_encoder_disable(struct drm_encoder *encoder)
-{
-       struct drm_device *dev = encoder->dev;
-       struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
-
-       if (fsl_dev->tcon)
-               fsl_tcon_bypass_disable(fsl_dev->tcon);
-}
-
-static void fsl_dcu_drm_encoder_enable(struct drm_encoder *encoder)
-{
-       struct drm_device *dev = encoder->dev;
-       struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
-
-       if (fsl_dev->tcon)
-               fsl_tcon_bypass_enable(fsl_dev->tcon);
-}
-
-static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
-       .atomic_check = fsl_dcu_drm_encoder_atomic_check,
-       .disable = fsl_dcu_drm_encoder_disable,
-       .enable = fsl_dcu_drm_encoder_enable,
-};
-
 static void fsl_dcu_drm_encoder_destroy(struct drm_encoder *encoder)
 {
        drm_encoder_cleanup(encoder);
@@ -68,13 +36,16 @@ int fsl_dcu_drm_encoder_create(struct fsl_dcu_drm_device *fsl_dev,
        int ret;
 
        encoder->possible_crtcs = 1;
+
+       /* Use bypass mode for parallel RGB/LVDS encoder */
+       if (fsl_dev->tcon)
+               fsl_tcon_bypass_enable(fsl_dev->tcon);
+
        ret = drm_encoder_init(fsl_dev->drm, encoder, &encoder_funcs,
                               DRM_MODE_ENCODER_LVDS, NULL);
        if (ret < 0)
                return ret;
 
-       drm_encoder_helper_add(encoder, &encoder_helper_funcs);
-
        return 0;
 }
 
index e537930c64b53d5a18ebbf7fcb79be68f0114acc..c6f780f5abc9cf3776edcfa67a6fa08a6b53239a 100644 (file)
@@ -508,6 +508,10 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work)
        pvec = drm_malloc_gfp(npages, sizeof(struct page *), GFP_TEMPORARY);
        if (pvec != NULL) {
                struct mm_struct *mm = obj->userptr.mm->mm;
+               unsigned int flags = 0;
+
+               if (!obj->userptr.read_only)
+                       flags |= FOLL_WRITE;
 
                ret = -EFAULT;
                if (atomic_inc_not_zero(&mm->mm_users)) {
@@ -517,7 +521,7 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work)
                                        (work->task, mm,
                                         obj->userptr.ptr + pinned * PAGE_SIZE,
                                         npages - pinned,
-                                        !obj->userptr.read_only, 0,
+                                        flags,
                                         pvec + pinned, NULL);
                                if (ret < 0)
                                        break;
index 919b35f2ad2487443c97dc3af28916d67ba6c0fb..dcf7d11ac380d0e6b25e1b7e64440913572d7609 100644 (file)
@@ -266,6 +266,9 @@ int mgag200_mm_init(struct mga_device *mdev)
                return ret;
        }
 
+       arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0),
+                                  pci_resource_len(dev->pdev, 0));
+
        mdev->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0),
                                         pci_resource_len(dev->pdev, 0));
 
@@ -274,10 +277,14 @@ int mgag200_mm_init(struct mga_device *mdev)
 
 void mgag200_mm_fini(struct mga_device *mdev)
 {
+       struct drm_device *dev = mdev->dev;
+
        ttm_bo_device_release(&mdev->ttm.bdev);
 
        mgag200_ttm_global_release(mdev);
 
+       arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0),
+                               pci_resource_len(dev->pdev, 0));
        arch_phys_wc_del(mdev->fb_mtrr);
        mdev->fb_mtrr = 0;
 }
index 1825dbc331926c84de69e13606f38cf4c80a2bed..a6dbe8258040d24b67a7e774f4785e1b1efeb32f 100644 (file)
@@ -398,6 +398,9 @@ nouveau_ttm_init(struct nouveau_drm *drm)
        /* VRAM init */
        drm->gem.vram_available = drm->device.info.ram_user;
 
+       arch_io_reserve_memtype_wc(device->func->resource_addr(device, 1),
+                                  device->func->resource_size(device, 1));
+
        ret = ttm_bo_init_mm(&drm->ttm.bdev, TTM_PL_VRAM,
                              drm->gem.vram_available >> PAGE_SHIFT);
        if (ret) {
@@ -430,6 +433,8 @@ nouveau_ttm_init(struct nouveau_drm *drm)
 void
 nouveau_ttm_fini(struct nouveau_drm *drm)
 {
+       struct nvkm_device *device = nvxx_device(&drm->device);
+
        ttm_bo_clean_mm(&drm->ttm.bdev, TTM_PL_VRAM);
        ttm_bo_clean_mm(&drm->ttm.bdev, TTM_PL_TT);
 
@@ -439,4 +444,7 @@ nouveau_ttm_fini(struct nouveau_drm *drm)
 
        arch_phys_wc_del(drm->ttm.mtrr);
        drm->ttm.mtrr = 0;
+       arch_io_free_memtype_wc(device->func->resource_addr(device, 1),
+                               device->func->resource_size(device, 1));
+
 }
index 6a4b020dd0b45aa504bcb7acd68c49a0ddfc9328..5a26eb4545aae4afea2dc83d6b5e615b1ddcfff3 100644 (file)
@@ -156,19 +156,20 @@ u32 r600_dpm_get_vblank_time(struct radeon_device *rdev)
        struct drm_device *dev = rdev->ddev;
        struct drm_crtc *crtc;
        struct radeon_crtc *radeon_crtc;
-       u32 line_time_us, vblank_lines;
+       u32 vblank_in_pixels;
        u32 vblank_time_us = 0xffffffff; /* if the displays are off, vblank time is max */
 
        if (rdev->num_crtc && rdev->mode_info.mode_config_initialized) {
                list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
                        radeon_crtc = to_radeon_crtc(crtc);
                        if (crtc->enabled && radeon_crtc->enabled && radeon_crtc->hw_mode.clock) {
-                               line_time_us = (radeon_crtc->hw_mode.crtc_htotal * 1000) /
-                                       radeon_crtc->hw_mode.clock;
-                               vblank_lines = radeon_crtc->hw_mode.crtc_vblank_end -
-                                       radeon_crtc->hw_mode.crtc_vdisplay +
-                                       (radeon_crtc->v_border * 2);
-                               vblank_time_us = vblank_lines * line_time_us;
+                               vblank_in_pixels =
+                                       radeon_crtc->hw_mode.crtc_htotal *
+                                       (radeon_crtc->hw_mode.crtc_vblank_end -
+                                        radeon_crtc->hw_mode.crtc_vdisplay +
+                                        (radeon_crtc->v_border * 2));
+
+                               vblank_time_us = vblank_in_pixels * 1000 / radeon_crtc->hw_mode.clock;
                                break;
                        }
                }
index 50e96d2c593dafe05c0e0205288c7f2b7c6a71d9..e18839d52e3e9036c53846b4cb67e5670a52ba7a 100644 (file)
@@ -927,6 +927,16 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
        return ret;
 }
 
+static void radeon_connector_unregister(struct drm_connector *connector)
+{
+       struct radeon_connector *radeon_connector = to_radeon_connector(connector);
+
+       if (radeon_connector->ddc_bus->has_aux) {
+               drm_dp_aux_unregister(&radeon_connector->ddc_bus->aux);
+               radeon_connector->ddc_bus->has_aux = false;
+       }
+}
+
 static void radeon_connector_destroy(struct drm_connector *connector)
 {
        struct radeon_connector *radeon_connector = to_radeon_connector(connector);
@@ -984,6 +994,7 @@ static const struct drm_connector_funcs radeon_lvds_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
        .detect = radeon_lvds_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
+       .early_unregister = radeon_connector_unregister,
        .destroy = radeon_connector_destroy,
        .set_property = radeon_lvds_set_property,
 };
@@ -1111,6 +1122,7 @@ static const struct drm_connector_funcs radeon_vga_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
        .detect = radeon_vga_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
+       .early_unregister = radeon_connector_unregister,
        .destroy = radeon_connector_destroy,
        .set_property = radeon_connector_set_property,
 };
@@ -1188,6 +1200,7 @@ static const struct drm_connector_funcs radeon_tv_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
        .detect = radeon_tv_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
+       .early_unregister = radeon_connector_unregister,
        .destroy = radeon_connector_destroy,
        .set_property = radeon_connector_set_property,
 };
@@ -1519,6 +1532,7 @@ static const struct drm_connector_funcs radeon_dvi_connector_funcs = {
        .detect = radeon_dvi_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = radeon_connector_set_property,
+       .early_unregister = radeon_connector_unregister,
        .destroy = radeon_connector_destroy,
        .force = radeon_dvi_force,
 };
@@ -1832,6 +1846,7 @@ static const struct drm_connector_funcs radeon_dp_connector_funcs = {
        .detect = radeon_dp_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = radeon_connector_set_property,
+       .early_unregister = radeon_connector_unregister,
        .destroy = radeon_connector_destroy,
        .force = radeon_dvi_force,
 };
@@ -1841,6 +1856,7 @@ static const struct drm_connector_funcs radeon_edp_connector_funcs = {
        .detect = radeon_dp_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = radeon_lvds_set_property,
+       .early_unregister = radeon_connector_unregister,
        .destroy = radeon_connector_destroy,
        .force = radeon_dvi_force,
 };
@@ -1850,6 +1866,7 @@ static const struct drm_connector_funcs radeon_lvds_bridge_connector_funcs = {
        .detect = radeon_dp_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = radeon_lvds_set_property,
+       .early_unregister = radeon_connector_unregister,
        .destroy = radeon_connector_destroy,
        .force = radeon_dvi_force,
 };
index b8ab30a7dd6d2f2d215415751539c652a3b1ed55..cdb8cb568c15310589039b2f0c56faf5cbf11b9c 100644 (file)
@@ -1675,20 +1675,20 @@ int radeon_modeset_init(struct radeon_device *rdev)
 
 void radeon_modeset_fini(struct radeon_device *rdev)
 {
-       radeon_fbdev_fini(rdev);
-       kfree(rdev->mode_info.bios_hardcoded_edid);
-
-       /* free i2c buses */
-       radeon_i2c_fini(rdev);
-
        if (rdev->mode_info.mode_config_initialized) {
-               radeon_afmt_fini(rdev);
                drm_kms_helper_poll_fini(rdev->ddev);
                radeon_hpd_fini(rdev);
                drm_crtc_force_disable_all(rdev->ddev);
+               radeon_fbdev_fini(rdev);
+               radeon_afmt_fini(rdev);
                drm_mode_config_cleanup(rdev->ddev);
                rdev->mode_info.mode_config_initialized = false;
        }
+
+       kfree(rdev->mode_info.bios_hardcoded_edid);
+
+       /* free i2c buses */
+       radeon_i2c_fini(rdev);
 }
 
 static bool is_hdtv_mode(const struct drm_display_mode *mode)
index 91c8f433956605e1f5106b69df1af9123e3bd2c5..00ea0002b539b9e9b5b0a063f62deb3b7638fd56 100644 (file)
  *   2.45.0 - Allow setting shader registers using DMA/COPY packet3 on SI
  *   2.46.0 - Add PFP_SYNC_ME support on evergreen
  *   2.47.0 - Add UVD_NO_OP register support
+ *   2.48.0 - TA_CS_BC_BASE_ADDR allowed on SI
  */
 #define KMS_DRIVER_MAJOR       2
-#define KMS_DRIVER_MINOR       47
+#define KMS_DRIVER_MINOR       48
 #define KMS_DRIVER_PATCHLEVEL  0
 int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
 int radeon_driver_unload_kms(struct drm_device *dev);
index 021aa005623f804be130179398a617291032c92b..29f7817af821babcfe36e148c6f5a0fb8065e035 100644 (file)
@@ -982,9 +982,8 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c)
 {
        if (!i2c)
                return;
+       WARN_ON(i2c->has_aux);
        i2c_del_adapter(&i2c->adapter);
-       if (i2c->has_aux)
-               drm_dp_aux_unregister(&i2c->aux);
        kfree(i2c);
 }
 
index be30861afae9a8e2bb1fcc6ee261b5285f4dcb44..41b72ce6613febc033c0e37fe68655faeca65554 100644 (file)
@@ -446,6 +446,10 @@ void radeon_bo_force_delete(struct radeon_device *rdev)
 
 int radeon_bo_init(struct radeon_device *rdev)
 {
+       /* reserve PAT memory space to WC for VRAM */
+       arch_io_reserve_memtype_wc(rdev->mc.aper_base,
+                                  rdev->mc.aper_size);
+
        /* Add an MTRR for the VRAM */
        if (!rdev->fastfb_working) {
                rdev->mc.vram_mtrr = arch_phys_wc_add(rdev->mc.aper_base,
@@ -463,6 +467,7 @@ void radeon_bo_fini(struct radeon_device *rdev)
 {
        radeon_ttm_fini(rdev);
        arch_phys_wc_del(rdev->mc.vram_mtrr);
+       arch_io_free_memtype_wc(rdev->mc.aper_base, rdev->mc.aper_size);
 }
 
 /* Returns how many bytes TTM can move per IB.
index 455268214b893eac36e8bbd65d5e2b18d2735483..3de5e6e216628233ef1ba997bfcab6ae09d24621 100644 (file)
@@ -566,7 +566,8 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_tt *ttm)
                uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE;
                struct page **pages = ttm->pages + pinned;
 
-               r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
+               r = get_user_pages(userptr, num_pages, write ? FOLL_WRITE : 0,
+                                  pages, NULL);
                if (r < 0)
                        goto release_pages;
 
index 7ee9aafbdf744bc0a97f358767e5b2178f24c41a..e402be8821c45271a276f721f1eb9c94fcf4afb5 100644 (file)
@@ -4431,6 +4431,7 @@ static bool si_vm_reg_valid(u32 reg)
        case SPI_CONFIG_CNTL:
        case SPI_CONFIG_CNTL_1:
        case TA_CNTL_AUX:
+       case TA_CS_BC_BASE_ADDR:
                return true;
        default:
                DRM_ERROR("Invalid register 0x%x in CS\n", reg);
index eb220eecba789aaf40ced21852a8d98441e55a3b..65a911ddd509d29d2a5d460ada79674e947a96f3 100644 (file)
 #define        SPI_LB_CU_MASK                                  0x9354
 
 #define        TA_CNTL_AUX                                     0x9508
+#define        TA_CS_BC_BASE_ADDR                              0x950C
 
 #define CC_RB_BACKEND_DISABLE                          0x98F4
 #define                BACKEND_DISABLE(x)                      ((x) << 16)
index 7e2a12c4fed2a49bb5f35714e8ef42f24cf8f7d1..1a3ad769f8c85bc0506741d105669dd66013b533 100644 (file)
@@ -241,8 +241,8 @@ via_lock_all_dma_pages(drm_via_sg_info_t *vsg,  drm_via_dmablit_t *xfer)
        down_read(&current->mm->mmap_sem);
        ret = get_user_pages((unsigned long)xfer->mem_addr,
                             vsg->num_pages,
-                            (vsg->direction == DMA_FROM_DEVICE),
-                            0, vsg->pages, NULL);
+                            (vsg->direction == DMA_FROM_DEVICE) ? FOLL_WRITE : 0,
+                            vsg->pages, NULL);
 
        up_read(&current->mm->mmap_sem);
        if (ret != vsg->num_pages) {
index e8ae3dc476d16fb756fd5ec4380fe644f1f858d0..18061a4bc2f287f9d99debc461a22bcd9c9f3c4d 100644 (file)
@@ -241,15 +241,15 @@ static int vmwgfx_pm_notifier(struct notifier_block *nb, unsigned long val,
                              void *ptr);
 
 MODULE_PARM_DESC(enable_fbdev, "Enable vmwgfx fbdev");
-module_param_named(enable_fbdev, enable_fbdev, int, 0600);
+module_param_named(enable_fbdev, enable_fbdev, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(force_dma_api, "Force using the DMA API for TTM pages");
-module_param_named(force_dma_api, vmw_force_iommu, int, 0600);
+module_param_named(force_dma_api, vmw_force_iommu, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(restrict_iommu, "Try to limit IOMMU usage for TTM pages");
-module_param_named(restrict_iommu, vmw_restrict_iommu, int, 0600);
+module_param_named(restrict_iommu, vmw_restrict_iommu, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(force_coherent, "Force coherent TTM pages");
-module_param_named(force_coherent, vmw_force_coherent, int, 0600);
+module_param_named(force_coherent, vmw_force_coherent, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(restrict_dma_mask, "Restrict DMA mask to 44 bits with IOMMU");
-module_param_named(restrict_dma_mask, vmw_restrict_dma_mask, int, 0600);
+module_param_named(restrict_dma_mask, vmw_restrict_dma_mask, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(assume_16bpp, "Assume 16-bpp when filtering modes");
 module_param_named(assume_16bpp, vmw_assume_16bpp, int, 0600);
 
index 070d750af16d33022f8b3496f38d3667d77169ca..1e59a486bba8a65577bc24464e4ea441731049c4 100644 (file)
@@ -43,7 +43,7 @@
 
 #define VMWGFX_DRIVER_DATE "20160210"
 #define VMWGFX_DRIVER_MAJOR 2
-#define VMWGFX_DRIVER_MINOR 10
+#define VMWGFX_DRIVER_MINOR 11
 #define VMWGFX_DRIVER_PATCHLEVEL 0
 #define VMWGFX_FILE_PAGE_OFFSET 0x00100000
 #define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
index dc5beff2b4aaff83c18dc77187647102efea5266..c7b53d987f06c923c53eaafb0fccdd9631ba72a7 100644 (file)
 
 #define VMW_RES_HT_ORDER 12
 
+/**
+ * enum vmw_resource_relocation_type - Relocation type for resources
+ *
+ * @vmw_res_rel_normal: Traditional relocation. The resource id in the
+ * command stream is replaced with the actual id after validation.
+ * @vmw_res_rel_nop: NOP relocation. The command is unconditionally replaced
+ * with a NOP.
+ * @vmw_res_rel_cond_nop: Conditional NOP relocation. If the resource id
+ * after validation is -1, the command is replaced with a NOP. Otherwise no
+ * action.
+ */
+enum vmw_resource_relocation_type {
+       vmw_res_rel_normal,
+       vmw_res_rel_nop,
+       vmw_res_rel_cond_nop,
+       vmw_res_rel_max
+};
+
 /**
  * struct vmw_resource_relocation - Relocation info for resources
  *
  * @head: List head for the software context's relocation list.
  * @res: Non-ref-counted pointer to the resource.
- * @offset: Offset of 4 byte entries into the command buffer where the
+ * @offset: Offset of single byte entries into the command buffer where the
  * id that needs fixup is located.
+ * @rel_type: Type of relocation.
  */
 struct vmw_resource_relocation {
        struct list_head head;
        const struct vmw_resource *res;
-       unsigned long offset;
+       u32 offset:29;
+       enum vmw_resource_relocation_type rel_type:3;
 };
 
 /**
@@ -109,7 +129,18 @@ static int vmw_bo_to_validate_list(struct vmw_sw_context *sw_context,
                                   struct vmw_dma_buffer *vbo,
                                   bool validate_as_mob,
                                   uint32_t *p_val_node);
-
+/**
+ * vmw_ptr_diff - Compute the offset from a to b in bytes
+ *
+ * @a: A starting pointer.
+ * @b: A pointer offset in the same address space.
+ *
+ * Returns: The offset in bytes between the two pointers.
+ */
+static size_t vmw_ptr_diff(void *a, void *b)
+{
+       return (unsigned long) b - (unsigned long) a;
+}
 
 /**
  * vmw_resources_unreserve - unreserve resources previously reserved for
@@ -409,11 +440,14 @@ static int vmw_resource_context_res_add(struct vmw_private *dev_priv,
  * @list: Pointer to head of relocation list.
  * @res: The resource.
  * @offset: Offset into the command buffer currently being parsed where the
- * id that needs fixup is located. Granularity is 4 bytes.
+ * id that needs fixup is located. Granularity is one byte.
+ * @rel_type: Relocation type.
  */
 static int vmw_resource_relocation_add(struct list_head *list,
                                       const struct vmw_resource *res,
-                                      unsigned long offset)
+                                      unsigned long offset,
+                                      enum vmw_resource_relocation_type
+                                      rel_type)
 {
        struct vmw_resource_relocation *rel;
 
@@ -425,6 +459,7 @@ static int vmw_resource_relocation_add(struct list_head *list,
 
        rel->res = res;
        rel->offset = offset;
+       rel->rel_type = rel_type;
        list_add_tail(&rel->head, list);
 
        return 0;
@@ -459,11 +494,24 @@ static void vmw_resource_relocations_apply(uint32_t *cb,
 {
        struct vmw_resource_relocation *rel;
 
+       /* Validate the struct vmw_resource_relocation member size */
+       BUILD_BUG_ON(SVGA_CB_MAX_SIZE >= (1 << 29));
+       BUILD_BUG_ON(vmw_res_rel_max >= (1 << 3));
+
        list_for_each_entry(rel, list, head) {
-               if (likely(rel->res != NULL))
-                       cb[rel->offset] = rel->res->id;
-               else
-                       cb[rel->offset] = SVGA_3D_CMD_NOP;
+               u32 *addr = (u32 *)((unsigned long) cb + rel->offset);
+               switch (rel->rel_type) {
+               case vmw_res_rel_normal:
+                       *addr = rel->res->id;
+                       break;
+               case vmw_res_rel_nop:
+                       *addr = SVGA_3D_CMD_NOP;
+                       break;
+               default:
+                       if (rel->res->id == -1)
+                               *addr = SVGA_3D_CMD_NOP;
+                       break;
+               }
        }
 }
 
@@ -655,7 +703,9 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
        *p_val = NULL;
        ret = vmw_resource_relocation_add(&sw_context->res_relocations,
                                          res,
-                                         id_loc - sw_context->buf_start);
+                                         vmw_ptr_diff(sw_context->buf_start,
+                                                      id_loc),
+                                         vmw_res_rel_normal);
        if (unlikely(ret != 0))
                return ret;
 
@@ -721,7 +771,8 @@ vmw_cmd_res_check(struct vmw_private *dev_priv,
 
                return vmw_resource_relocation_add
                        (&sw_context->res_relocations, res,
-                        id_loc - sw_context->buf_start);
+                        vmw_ptr_diff(sw_context->buf_start, id_loc),
+                        vmw_res_rel_normal);
        }
 
        ret = vmw_user_resource_lookup_handle(dev_priv,
@@ -2143,10 +2194,10 @@ static int vmw_cmd_shader_define(struct vmw_private *dev_priv,
                return ret;
 
        return vmw_resource_relocation_add(&sw_context->res_relocations,
-                                          NULL, &cmd->header.id -
-                                          sw_context->buf_start);
-
-       return 0;
+                                          NULL,
+                                          vmw_ptr_diff(sw_context->buf_start,
+                                                       &cmd->header.id),
+                                          vmw_res_rel_nop);
 }
 
 /**
@@ -2188,10 +2239,10 @@ static int vmw_cmd_shader_destroy(struct vmw_private *dev_priv,
                return ret;
 
        return vmw_resource_relocation_add(&sw_context->res_relocations,
-                                          NULL, &cmd->header.id -
-                                          sw_context->buf_start);
-
-       return 0;
+                                          NULL,
+                                          vmw_ptr_diff(sw_context->buf_start,
+                                                       &cmd->header.id),
+                                          vmw_res_rel_nop);
 }
 
 /**
@@ -2848,8 +2899,7 @@ static int vmw_cmd_dx_cid_check(struct vmw_private *dev_priv,
  * @header: Pointer to the command header in the command stream.
  *
  * Check that the view exists, and if it was not created using this
- * command batch, make sure it's validated (present in the device) so that
- * the remove command will not confuse the device.
+ * command batch, conditionally make this command a NOP.
  */
 static int vmw_cmd_dx_view_remove(struct vmw_private *dev_priv,
                                  struct vmw_sw_context *sw_context,
@@ -2877,10 +2927,16 @@ static int vmw_cmd_dx_view_remove(struct vmw_private *dev_priv,
                return ret;
 
        /*
-        * Add view to the validate list iff it was not created using this
-        * command batch.
+        * If the view wasn't created during this command batch, it might
+        * have been removed due to a context swapout, so add a
+        * relocation to conditionally make this command a NOP to avoid
+        * device errors.
         */
-       return vmw_view_res_val_add(sw_context, view);
+       return vmw_resource_relocation_add(&sw_context->res_relocations,
+                                          view,
+                                          vmw_ptr_diff(sw_context->buf_start,
+                                                       &cmd->header.id),
+                                          vmw_res_rel_cond_nop);
 }
 
 /**
@@ -3029,6 +3085,35 @@ static int vmw_cmd_dx_genmips(struct vmw_private *dev_priv,
                                   cmd->body.shaderResourceViewId);
 }
 
+/**
+ * vmw_cmd_dx_transfer_from_buffer -
+ * Validate an SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER command
+ *
+ * @dev_priv: Pointer to a device private struct.
+ * @sw_context: The software context being used for this batch.
+ * @header: Pointer to the command header in the command stream.
+ */
+static int vmw_cmd_dx_transfer_from_buffer(struct vmw_private *dev_priv,
+                                          struct vmw_sw_context *sw_context,
+                                          SVGA3dCmdHeader *header)
+{
+       struct {
+               SVGA3dCmdHeader header;
+               SVGA3dCmdDXTransferFromBuffer body;
+       } *cmd = container_of(header, typeof(*cmd), header);
+       int ret;
+
+       ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
+                               user_surface_converter,
+                               &cmd->body.srcSid, NULL);
+       if (ret != 0)
+               return ret;
+
+       return vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
+                                user_surface_converter,
+                                &cmd->body.destSid, NULL);
+}
+
 static int vmw_cmd_check_not_3d(struct vmw_private *dev_priv,
                                struct vmw_sw_context *sw_context,
                                void *buf, uint32_t *size)
@@ -3379,6 +3464,9 @@ static const struct vmw_cmd_entry vmw_cmd_entries[SVGA_3D_CMD_MAX] = {
                    &vmw_cmd_buffer_copy_check, true, false, true),
        VMW_CMD_DEF(SVGA_3D_CMD_DX_PRED_COPY_REGION,
                    &vmw_cmd_pred_copy_check, true, false, true),
+       VMW_CMD_DEF(SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER,
+                   &vmw_cmd_dx_transfer_from_buffer,
+                   true, false, true),
 };
 
 static int vmw_cmd_check(struct vmw_private *dev_priv,
@@ -3848,14 +3936,14 @@ static void *vmw_execbuf_cmdbuf(struct vmw_private *dev_priv,
        int ret;
 
        *header = NULL;
-       if (!dev_priv->cman || kernel_commands)
-               return kernel_commands;
-
        if (command_size > SVGA_CB_MAX_SIZE) {
                DRM_ERROR("Command buffer is too large.\n");
                return ERR_PTR(-EINVAL);
        }
 
+       if (!dev_priv->cman || kernel_commands)
+               return kernel_commands;
+
        /* If possible, add a little space for fencing. */
        cmdbuf_size = command_size + 512;
        cmdbuf_size = min_t(size_t, cmdbuf_size, SVGA_CB_MAX_SIZE);
@@ -4232,9 +4320,6 @@ void __vmw_execbuf_release_pinned_bo(struct vmw_private *dev_priv,
        ttm_bo_unref(&query_val.bo);
        ttm_bo_unref(&pinned_val.bo);
        vmw_dmabuf_unreference(&dev_priv->pinned_bo);
-       DRM_INFO("Dummy query bo pin count: %d\n",
-                dev_priv->dummy_query_bo->pin_count);
-
 out_unlock:
        return;
 
index 6a328d507a285e027bf9f355b2f5cb9b9a6da8c7..52ca1c9d070ee734f3ce80c516bd3bed3f087252 100644 (file)
@@ -574,10 +574,8 @@ static int vmw_user_dmabuf_synccpu_grab(struct vmw_user_dma_buffer *user_bo,
                bool nonblock = !!(flags & drm_vmw_synccpu_dontblock);
                long lret;
 
-               if (nonblock)
-                       return reservation_object_test_signaled_rcu(bo->resv, true) ? 0 : -EBUSY;
-
-               lret = reservation_object_wait_timeout_rcu(bo->resv, true, true, MAX_SCHEDULE_TIMEOUT);
+               lret = reservation_object_wait_timeout_rcu(bo->resv, true, true,
+                                       nonblock ? 0 : MAX_SCHEDULE_TIMEOUT);
                if (!lret)
                        return -EBUSY;
                else if (lret < 0)
index c2a721a8cef9d99f9e4fe28032eb150ae4d5f472..b445ce9b9757861ecc1ece1071f1c8c3a02a166f 100644 (file)
@@ -324,7 +324,7 @@ static void vmw_hw_surface_destroy(struct vmw_resource *res)
        if (res->id != -1) {
 
                cmd = vmw_fifo_reserve(dev_priv, vmw_surface_destroy_size());
-               if (unlikely(cmd == NULL)) {
+               if (unlikely(!cmd)) {
                        DRM_ERROR("Failed reserving FIFO space for surface "
                                  "destruction.\n");
                        return;
@@ -397,7 +397,7 @@ static int vmw_legacy_srf_create(struct vmw_resource *res)
 
        submit_size = vmw_surface_define_size(srf);
        cmd = vmw_fifo_reserve(dev_priv, submit_size);
-       if (unlikely(cmd == NULL)) {
+       if (unlikely(!cmd)) {
                DRM_ERROR("Failed reserving FIFO space for surface "
                          "creation.\n");
                ret = -ENOMEM;
@@ -446,11 +446,10 @@ static int vmw_legacy_srf_dma(struct vmw_resource *res,
        uint8_t *cmd;
        struct vmw_private *dev_priv = res->dev_priv;
 
-       BUG_ON(val_buf->bo == NULL);
-
+       BUG_ON(!val_buf->bo);
        submit_size = vmw_surface_dma_size(srf);
        cmd = vmw_fifo_reserve(dev_priv, submit_size);
-       if (unlikely(cmd == NULL)) {
+       if (unlikely(!cmd)) {
                DRM_ERROR("Failed reserving FIFO space for surface "
                          "DMA.\n");
                return -ENOMEM;
@@ -538,7 +537,7 @@ static int vmw_legacy_srf_destroy(struct vmw_resource *res)
 
        submit_size = vmw_surface_destroy_size();
        cmd = vmw_fifo_reserve(dev_priv, submit_size);
-       if (unlikely(cmd == NULL)) {
+       if (unlikely(!cmd)) {
                DRM_ERROR("Failed reserving FIFO space for surface "
                          "eviction.\n");
                return -ENOMEM;
@@ -578,7 +577,7 @@ static int vmw_surface_init(struct vmw_private *dev_priv,
        int ret;
        struct vmw_resource *res = &srf->res;
 
-       BUG_ON(res_free == NULL);
+       BUG_ON(!res_free);
        if (!dev_priv->has_mob)
                vmw_fifo_resource_inc(dev_priv);
        ret = vmw_resource_init(dev_priv, res, true, res_free,
@@ -700,7 +699,6 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
        struct drm_vmw_surface_create_req *req = &arg->req;
        struct drm_vmw_surface_arg *rep = &arg->rep;
        struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile;
-       struct drm_vmw_size __user *user_sizes;
        int ret;
        int i, j;
        uint32_t cur_bo_offset;
@@ -748,7 +746,7 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
        }
 
        user_srf = kzalloc(sizeof(*user_srf), GFP_KERNEL);
-       if (unlikely(user_srf == NULL)) {
+       if (unlikely(!user_srf)) {
                ret = -ENOMEM;
                goto out_no_user_srf;
        }
@@ -763,29 +761,21 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
        memcpy(srf->mip_levels, req->mip_levels, sizeof(srf->mip_levels));
        srf->num_sizes = num_sizes;
        user_srf->size = size;
-
-       srf->sizes = kmalloc(srf->num_sizes * sizeof(*srf->sizes), GFP_KERNEL);
-       if (unlikely(srf->sizes == NULL)) {
-               ret = -ENOMEM;
+       srf->sizes = memdup_user((struct drm_vmw_size __user *)(unsigned long)
+                                req->size_addr,
+                                sizeof(*srf->sizes) * srf->num_sizes);
+       if (IS_ERR(srf->sizes)) {
+               ret = PTR_ERR(srf->sizes);
                goto out_no_sizes;
        }
-       srf->offsets = kmalloc(srf->num_sizes * sizeof(*srf->offsets),
-                              GFP_KERNEL);
-       if (unlikely(srf->offsets == NULL)) {
+       srf->offsets = kmalloc_array(srf->num_sizes,
+                                    sizeof(*srf->offsets),
+                                    GFP_KERNEL);
+       if (unlikely(!srf->offsets)) {
                ret = -ENOMEM;
                goto out_no_offsets;
        }
 
-       user_sizes = (struct drm_vmw_size __user *)(unsigned long)
-           req->size_addr;
-
-       ret = copy_from_user(srf->sizes, user_sizes,
-                            srf->num_sizes * sizeof(*srf->sizes));
-       if (unlikely(ret != 0)) {
-               ret = -EFAULT;
-               goto out_no_copy;
-       }
-
        srf->base_size = *srf->sizes;
        srf->autogen_filter = SVGA3D_TEX_FILTER_NONE;
        srf->multisample_count = 0;
@@ -923,7 +913,7 @@ vmw_surface_handle_reference(struct vmw_private *dev_priv,
 
        ret = -EINVAL;
        base = ttm_base_object_lookup_for_ref(dev_priv->tdev, handle);
-       if (unlikely(base == NULL)) {
+       if (unlikely(!base)) {
                DRM_ERROR("Could not find surface to reference.\n");
                goto out_no_lookup;
        }
@@ -1069,7 +1059,7 @@ static int vmw_gb_surface_create(struct vmw_resource *res)
 
        cmd = vmw_fifo_reserve(dev_priv, submit_len);
        cmd2 = (typeof(cmd2))cmd;
-       if (unlikely(cmd == NULL)) {
+       if (unlikely(!cmd)) {
                DRM_ERROR("Failed reserving FIFO space for surface "
                          "creation.\n");
                ret = -ENOMEM;
@@ -1135,7 +1125,7 @@ static int vmw_gb_surface_bind(struct vmw_resource *res,
        submit_size = sizeof(*cmd1) + (res->backup_dirty ? sizeof(*cmd2) : 0);
 
        cmd1 = vmw_fifo_reserve(dev_priv, submit_size);
-       if (unlikely(cmd1 == NULL)) {
+       if (unlikely(!cmd1)) {
                DRM_ERROR("Failed reserving FIFO space for surface "
                          "binding.\n");
                return -ENOMEM;
@@ -1185,7 +1175,7 @@ static int vmw_gb_surface_unbind(struct vmw_resource *res,
 
        submit_size = sizeof(*cmd3) + (readback ? sizeof(*cmd1) : sizeof(*cmd2));
        cmd = vmw_fifo_reserve(dev_priv, submit_size);
-       if (unlikely(cmd == NULL)) {
+       if (unlikely(!cmd)) {
                DRM_ERROR("Failed reserving FIFO space for surface "
                          "unbinding.\n");
                return -ENOMEM;
@@ -1244,7 +1234,7 @@ static int vmw_gb_surface_destroy(struct vmw_resource *res)
        vmw_binding_res_list_scrub(&res->binding_head);
 
        cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd));
-       if (unlikely(cmd == NULL)) {
+       if (unlikely(!cmd)) {
                DRM_ERROR("Failed reserving FIFO space for surface "
                          "destruction.\n");
                mutex_unlock(&dev_priv->binding_mutex);
@@ -1410,7 +1400,7 @@ int vmw_gb_surface_reference_ioctl(struct drm_device *dev, void *data,
 
        user_srf = container_of(base, struct vmw_user_surface, prime.base);
        srf = &user_srf->srf;
-       if (srf->res.backup == NULL) {
+       if (!srf->res.backup) {
                DRM_ERROR("Shared GB surface is missing a backup buffer.\n");
                goto out_bad_resource;
        }
@@ -1524,7 +1514,7 @@ int vmw_surface_gb_priv_define(struct drm_device *dev,
        }
 
        user_srf = kzalloc(sizeof(*user_srf), GFP_KERNEL);
-       if (unlikely(user_srf == NULL)) {
+       if (unlikely(!user_srf)) {
                ret = -ENOMEM;
                goto out_no_user_srf;
        }
index 8fd4bf77f264940ec04631252062e06aafe148c8..818ea7d935333046adc5036d141ffa6cf6be5c40 100644 (file)
@@ -234,58 +234,6 @@ static __u8 pid0011_rdesc_fixed[] = {
        0xC0                /*  End Collection                  */
 };
 
-static __u8 pid0006_rdesc_fixed[] = {
-       0x05, 0x01,        /* Usage Page (Generic Desktop)      */
-       0x09, 0x04,        /* Usage (Joystick)                  */
-       0xA1, 0x01,        /* Collection (Application)          */
-       0xA1, 0x02,        /*   Collection (Logical)            */
-       0x75, 0x08,        /*     Report Size (8)               */
-       0x95, 0x05,        /*     Report Count (5)              */
-       0x15, 0x00,        /*     Logical Minimum (0)           */
-       0x26, 0xFF, 0x00,  /*     Logical Maximum (255)         */
-       0x35, 0x00,        /*     Physical Minimum (0)          */
-       0x46, 0xFF, 0x00,  /*     Physical Maximum (255)        */
-       0x09, 0x30,        /*     Usage (X)                     */
-       0x09, 0x33,        /*     Usage (Ry)                    */
-       0x09, 0x32,        /*     Usage (Z)                     */
-       0x09, 0x31,        /*     Usage (Y)                     */
-       0x09, 0x34,        /*     Usage (Ry)                    */
-       0x81, 0x02,        /*     Input (Variable)              */
-       0x75, 0x04,        /*     Report Size (4)               */
-       0x95, 0x01,        /*     Report Count (1)              */
-       0x25, 0x07,        /*     Logical Maximum (7)           */
-       0x46, 0x3B, 0x01,  /*     Physical Maximum (315)        */
-       0x65, 0x14,        /*     Unit (Centimeter)             */
-       0x09, 0x39,        /*     Usage (Hat switch)            */
-       0x81, 0x42,        /*     Input (Variable)              */
-       0x65, 0x00,        /*     Unit (None)                   */
-       0x75, 0x01,        /*     Report Size (1)               */
-       0x95, 0x0C,        /*     Report Count (12)             */
-       0x25, 0x01,        /*     Logical Maximum (1)           */
-       0x45, 0x01,        /*     Physical Maximum (1)          */
-       0x05, 0x09,        /*     Usage Page (Button)           */
-       0x19, 0x01,        /*     Usage Minimum (0x01)          */
-       0x29, 0x0C,        /*     Usage Maximum (0x0C)          */
-       0x81, 0x02,        /*     Input (Variable)              */
-       0x06, 0x00, 0xFF,  /*     Usage Page (Vendor Defined)   */
-       0x75, 0x01,        /*     Report Size (1)               */
-       0x95, 0x08,        /*     Report Count (8)              */
-       0x25, 0x01,        /*     Logical Maximum (1)           */
-       0x45, 0x01,        /*     Physical Maximum (1)          */
-       0x09, 0x01,        /*     Usage (0x01)                  */
-       0x81, 0x02,        /*     Input (Variable)              */
-       0xC0,              /*   End Collection                  */
-       0xA1, 0x02,        /*   Collection (Logical)            */
-       0x75, 0x08,        /*     Report Size (8)               */
-       0x95, 0x07,        /*     Report Count (7)              */
-       0x46, 0xFF, 0x00,  /*     Physical Maximum (255)        */
-       0x26, 0xFF, 0x00,  /*     Logical Maximum (255)         */
-       0x09, 0x02,        /*     Usage (0x02)                  */
-       0x91, 0x02,        /*     Output (Variable)             */
-       0xC0,              /*   End Collection                  */
-       0xC0               /* End Collection                    */
-};
-
 static __u8 *dr_report_fixup(struct hid_device *hdev, __u8 *rdesc,
                                unsigned int *rsize)
 {
@@ -296,16 +244,34 @@ static __u8 *dr_report_fixup(struct hid_device *hdev, __u8 *rdesc,
                        *rsize = sizeof(pid0011_rdesc_fixed);
                }
                break;
-       case 0x0006:
-               if (*rsize == sizeof(pid0006_rdesc_fixed)) {
-                       rdesc = pid0006_rdesc_fixed;
-                       *rsize = sizeof(pid0006_rdesc_fixed);
-               }
-               break;
        }
        return rdesc;
 }
 
+#define map_abs(c)      hid_map_usage(hi, usage, bit, max, EV_ABS, (c))
+#define map_rel(c)      hid_map_usage(hi, usage, bit, max, EV_REL, (c))
+
+static int dr_input_mapping(struct hid_device *hdev, struct hid_input *hi,
+                           struct hid_field *field, struct hid_usage *usage,
+                           unsigned long **bit, int *max)
+{
+       switch (usage->hid) {
+       /*
+        * revert to the old hid-input behavior where axes
+        * can be randomly assigned when hid->usage is reused.
+        */
+       case HID_GD_X: case HID_GD_Y: case HID_GD_Z:
+       case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ:
+               if (field->flags & HID_MAIN_ITEM_RELATIVE)
+                       map_rel(usage->hid & 0xf);
+               else
+                       map_abs(usage->hid & 0xf);
+               return 1;
+       }
+
+       return 0;
+}
+
 static int dr_probe(struct hid_device *hdev, const struct hid_device_id *id)
 {
        int ret;
@@ -352,6 +318,7 @@ static struct hid_driver dr_driver = {
        .id_table = dr_devices,
        .report_fixup = dr_report_fixup,
        .probe = dr_probe,
+       .input_mapping = dr_input_mapping,
 };
 module_hid_driver(dr_driver);
 
index cd59c79eebdd2bd896c1ff19d687f25686d7fb35..6cfb5cacc2533b3f5a21c488ff7257c44d3b43df 100644 (file)
@@ -64,6 +64,9 @@
 #define USB_VENDOR_ID_AKAI             0x2011
 #define USB_DEVICE_ID_AKAI_MPKMINI2    0x0715
 
+#define USB_VENDOR_ID_AKAI_09E8                0x09E8
+#define USB_DEVICE_ID_AKAI_09E8_MIDIMIX        0x0031
+
 #define USB_VENDOR_ID_ALCOR            0x058f
 #define USB_DEVICE_ID_ALCOR_USBRS232   0x9720
 
index d8d55f37b4f5604e2d10672513267c483726f05e..d3e1ab162f7c6ade6e2a83053ec1d719f1a08daa 100644 (file)
@@ -100,6 +100,7 @@ struct hidled_device {
        const struct hidled_config *config;
        struct hid_device       *hdev;
        struct hidled_rgb       *rgb;
+       u8                      *buf;
        struct mutex            lock;
 };
 
@@ -118,13 +119,19 @@ static int hidled_send(struct hidled_device *ldev, __u8 *buf)
 
        mutex_lock(&ldev->lock);
 
+       /*
+        * buffer provided to hid_hw_raw_request must not be on the stack
+        * and must not be part of a data structure
+        */
+       memcpy(ldev->buf, buf, ldev->config->report_size);
+
        if (ldev->config->report_type == RAW_REQUEST)
-               ret = hid_hw_raw_request(ldev->hdev, buf[0], buf,
+               ret = hid_hw_raw_request(ldev->hdev, buf[0], ldev->buf,
                                         ldev->config->report_size,
                                         HID_FEATURE_REPORT,
                                         HID_REQ_SET_REPORT);
        else if (ldev->config->report_type == OUTPUT_REPORT)
-               ret = hid_hw_output_report(ldev->hdev, buf,
+               ret = hid_hw_output_report(ldev->hdev, ldev->buf,
                                           ldev->config->report_size);
        else
                ret = -EINVAL;
@@ -147,17 +154,21 @@ static int hidled_recv(struct hidled_device *ldev, __u8 *buf)
 
        mutex_lock(&ldev->lock);
 
-       ret = hid_hw_raw_request(ldev->hdev, buf[0], buf,
+       memcpy(ldev->buf, buf, ldev->config->report_size);
+
+       ret = hid_hw_raw_request(ldev->hdev, buf[0], ldev->buf,
                                 ldev->config->report_size,
                                 HID_FEATURE_REPORT,
                                 HID_REQ_SET_REPORT);
        if (ret < 0)
                goto err;
 
-       ret = hid_hw_raw_request(ldev->hdev, buf[0], buf,
+       ret = hid_hw_raw_request(ldev->hdev, buf[0], ldev->buf,
                                 ldev->config->report_size,
                                 HID_FEATURE_REPORT,
                                 HID_REQ_GET_REPORT);
+
+       memcpy(buf, ldev->buf, ldev->config->report_size);
 err:
        mutex_unlock(&ldev->lock);
 
@@ -447,6 +458,10 @@ static int hidled_probe(struct hid_device *hdev, const struct hid_device_id *id)
        if (!ldev)
                return -ENOMEM;
 
+       ldev->buf = devm_kmalloc(&hdev->dev, MAX_REPORT_SIZE, GFP_KERNEL);
+       if (!ldev->buf)
+               return -ENOMEM;
+
        ret = hid_parse(hdev);
        if (ret)
                return ret;
index 0a0eca5da47d0274cca10822e3b8d6aded20b6c7..354d49ea36dd9d434452cff07e2b0fb15356035e 100644 (file)
@@ -56,6 +56,7 @@ static const struct hid_blacklist {
 
        { USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_AKAI, USB_DEVICE_ID_AKAI_MPKMINI2, HID_QUIRK_NO_INIT_REPORTS },
+       { USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX, HID_QUIRK_NO_INIT_REPORTS },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
index 4aa3cb63fd41f4506254187608c995e22359aa28..bcd06306f3e894a379603a4216cadab475be6b69 100644 (file)
@@ -314,10 +314,14 @@ static void heartbeat_onchannelcallback(void *context)
        u8 *hbeat_txf_buf = util_heartbeat.recv_buffer;
        struct icmsg_negotiate *negop = NULL;
 
-       vmbus_recvpacket(channel, hbeat_txf_buf,
-                        PAGE_SIZE, &recvlen, &requestid);
+       while (1) {
+
+               vmbus_recvpacket(channel, hbeat_txf_buf,
+                                PAGE_SIZE, &recvlen, &requestid);
+
+               if (!recvlen)
+                       break;
 
-       if (recvlen > 0) {
                icmsghdrp = (struct icmsg_hdr *)&hbeat_txf_buf[
                                sizeof(struct vmbuspipe_hdr)];
 
index 98114cef1e43962eb433560700d0103a96ed7050..2fe1828bd10b79fc18f1dfbe1f2e0e9c00e99cd3 100644 (file)
@@ -194,10 +194,10 @@ static struct adm9240_data *adm9240_update_device(struct device *dev)
                 * 0.5'C per two measurement cycles thus ignore possible
                 * but unlikely aliasing error on lsb reading. --Grant
                 */
-               data->temp = ((i2c_smbus_read_byte_data(client,
+               data->temp = (i2c_smbus_read_byte_data(client,
                                        ADM9240_REG_TEMP) << 8) |
                                        i2c_smbus_read_byte_data(client,
-                                       ADM9240_REG_TEMP_CONF)) / 128;
+                                       ADM9240_REG_TEMP_CONF);
 
                for (i = 0; i < 2; i++) { /* read fans */
                        data->fan[i] = i2c_smbus_read_byte_data(client,
@@ -263,7 +263,7 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *dummy,
                char *buf)
 {
        struct adm9240_data *data = adm9240_update_device(dev);
-       return sprintf(buf, "%d\n", data->temp * 500); /* 9-bit value */
+       return sprintf(buf, "%d\n", data->temp / 128 * 500); /* 9-bit value */
 }
 
 static ssize_t show_max(struct device *dev, struct device_attribute *devattr,
index bef84e08597307893b699a854b7d97b94dca234c..c1b9275978f9d9ee9172e99e569de7dca48b491d 100644 (file)
@@ -268,11 +268,13 @@ static int max31790_read_pwm(struct device *dev, u32 attr, int channel,
                             long *val)
 {
        struct max31790_data *data = max31790_update_device(dev);
-       u8 fan_config = data->fan_config[channel];
+       u8 fan_config;
 
        if (IS_ERR(data))
                return PTR_ERR(data);
 
+       fan_config = data->fan_config[channel];
+
        switch (attr) {
        case hwmon_pwm_input:
                *val = data->pwm[channel] >> 8;
index 6d94e2ec5b4f7183734fbd1159db5d7013fa6f74..d252276feadf6b0b05cbe370330ed7cef5a16857 100644 (file)
@@ -79,12 +79,12 @@ config I2C_AMD8111
 
 config I2C_HIX5HD2
        tristate "Hix5hd2 high-speed I2C driver"
-       depends on ARCH_HIX5HD2 || COMPILE_TEST
+       depends on ARCH_HISI || ARCH_HIX5HD2 || COMPILE_TEST
        help
-         Say Y here to include support for high-speed I2C controller in the
-         Hisilicon based hix5hd2 SoCs.
+         Say Y here to include support for the high-speed I2C controller
+         used in HiSilicon hix5hd2 SoCs.
 
-         This driver can also be built as a module.  If so, the module
+         This driver can also be built as a module. If so, the module
          will be called i2c-hix5hd2.
 
 config I2C_I801
@@ -589,10 +589,10 @@ config I2C_IMG
 
 config I2C_IMX
        tristate "IMX I2C interface"
-       depends on ARCH_MXC || ARCH_LAYERSCAPE
+       depends on ARCH_MXC || ARCH_LAYERSCAPE || COLDFIRE
        help
          Say Y here if you want to use the IIC bus controller on
-         the Freescale i.MX/MXC or Layerscape processors.
+         the Freescale i.MX/MXC, Layerscape or ColdFire processors.
 
          This driver can also be built as a module.  If so, the module
          will be called i2c-imx.
index 1fe93c43215cf9e5d26385727e7c4f35a7e2fe89..11e866d053680e5af3ba5a06dbaf078700724aa5 100644 (file)
@@ -95,6 +95,9 @@
 #define DW_IC_STATUS_TFE               BIT(2)
 #define DW_IC_STATUS_MST_ACTIVITY      BIT(5)
 
+#define DW_IC_SDA_HOLD_RX_SHIFT                16
+#define DW_IC_SDA_HOLD_RX_MASK         GENMASK(23, DW_IC_SDA_HOLD_RX_SHIFT)
+
 #define DW_IC_ERR_TX_ABRT      0x1
 
 #define DW_IC_TAR_10BITADDR_MASTER BIT(12)
@@ -420,12 +423,20 @@ int i2c_dw_init(struct dw_i2c_dev *dev)
        /* Configure SDA Hold Time if required */
        reg = dw_readl(dev, DW_IC_COMP_VERSION);
        if (reg >= DW_IC_SDA_HOLD_MIN_VERS) {
-               if (dev->sda_hold_time) {
-                       dw_writel(dev, dev->sda_hold_time, DW_IC_SDA_HOLD);
-               } else {
+               if (!dev->sda_hold_time) {
                        /* Keep previous hold time setting if no one set it */
                        dev->sda_hold_time = dw_readl(dev, DW_IC_SDA_HOLD);
                }
+               /*
+                * Workaround for avoiding TX arbitration lost in case I2C
+                * slave pulls SDA down "too quickly" after falling egde of
+                * SCL by enabling non-zero SDA RX hold. Specification says it
+                * extends incoming SDA low to high transition while SCL is
+                * high but it apprears to help also above issue.
+                */
+               if (!(dev->sda_hold_time & DW_IC_SDA_HOLD_RX_MASK))
+                       dev->sda_hold_time |= 1 << DW_IC_SDA_HOLD_RX_SHIFT;
+               dw_writel(dev, dev->sda_hold_time, DW_IC_SDA_HOLD);
        } else {
                dev_warn(dev->dev,
                        "Hardware too old to adjust SDA hold time.\n");
index 9604024e0eb0959e4b77816214eaf3ac939c29ca..49f2084f7bb501a9d36d1698b46c11478beed1bb 100644 (file)
@@ -368,6 +368,7 @@ static const struct of_device_id dc_i2c_match[] = {
        { .compatible = "cnxt,cx92755-i2c" },
        { },
 };
+MODULE_DEVICE_TABLE(of, dc_i2c_match);
 
 static struct platform_driver dc_i2c_driver = {
        .probe   = dc_i2c_probe,
index 08847e8b899872e2bc1bffd1d0936f63ee4f38d7..eb3627f35d12002776447982d493835fe36dc064 100644 (file)
 #define SMBHSTCFG_HST_EN       1
 #define SMBHSTCFG_SMB_SMI_EN   2
 #define SMBHSTCFG_I2C_EN       4
+#define SMBHSTCFG_SPD_WD       0x10
 
 /* TCO configuration bits for TCOCTL */
 #define TCOCTL_EN              0x0100
@@ -865,9 +866,16 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
                block = 1;
                break;
        case I2C_SMBUS_I2C_BLOCK_DATA:
-               /* NB: page 240 of ICH5 datasheet shows that the R/#W
-                * bit should be cleared here, even when reading */
-               outb_p((addr & 0x7f) << 1, SMBHSTADD(priv));
+               /*
+                * NB: page 240 of ICH5 datasheet shows that the R/#W
+                * bit should be cleared here, even when reading.
+                * However if SPD Write Disable is set (Lynx Point and later),
+                * the read will fail if we don't set the R/#W bit.
+                */
+               outb_p(((addr & 0x7f) << 1) |
+                      ((priv->original_hstcfg & SMBHSTCFG_SPD_WD) ?
+                       (read_write & 0x01) : 0),
+                      SMBHSTADD(priv));
                if (read_write == I2C_SMBUS_READ) {
                        /* NB: page 240 of ICH5 datasheet also shows
                         * that DATA1 is the cmd field when reading */
@@ -1573,6 +1581,8 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
                /* Disable SMBus interrupt feature if SMBus using SMI# */
                priv->features &= ~FEATURE_IRQ;
        }
+       if (temp & SMBHSTCFG_SPD_WD)
+               dev_info(&dev->dev, "SPD Write Disable is set\n");
 
        /* Clear special mode bits */
        if (priv->features & (FEATURE_SMBUS_PEC | FEATURE_BLOCK_BUFFER))
index 592a8f26a708db4cb331da5906c492f7af06a6a8..47fc1f1acff7db60a6cf909a43f6d443c04ca91e 100644 (file)
@@ -1009,10 +1009,13 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
        rinfo->sda_gpio = of_get_named_gpio(pdev->dev.of_node, "sda-gpios", 0);
        rinfo->scl_gpio = of_get_named_gpio(pdev->dev.of_node, "scl-gpios", 0);
 
-       if (!gpio_is_valid(rinfo->sda_gpio) ||
-           !gpio_is_valid(rinfo->scl_gpio) ||
-           IS_ERR(i2c_imx->pinctrl_pins_default) ||
-           IS_ERR(i2c_imx->pinctrl_pins_gpio)) {
+       if (rinfo->sda_gpio == -EPROBE_DEFER ||
+           rinfo->scl_gpio == -EPROBE_DEFER) {
+               return -EPROBE_DEFER;
+       } else if (!gpio_is_valid(rinfo->sda_gpio) ||
+                  !gpio_is_valid(rinfo->scl_gpio) ||
+                  IS_ERR(i2c_imx->pinctrl_pins_default) ||
+                  IS_ERR(i2c_imx->pinctrl_pins_gpio)) {
                dev_dbg(&pdev->dev, "recovery information incomplete\n");
                return 0;
        }
index b8ea62105f42c99205c1a241176ebb7210a55c08..30132c3957cdc3d2d76e03a5a82511d9b0a27829 100644 (file)
@@ -729,6 +729,7 @@ static const struct of_device_id jz4780_i2c_of_matches[] = {
        { .compatible = "ingenic,jz4780-i2c", },
        { /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, jz4780_i2c_of_matches);
 
 static int jz4780_i2c_probe(struct platform_device *pdev)
 {
index 50702c7bb244beec821e4d04e0352c07ee516a21..df220666d62741f15eb4bbf99c960d3ec4a0f444 100644 (file)
@@ -694,6 +694,8 @@ static int rk3x_i2c_v0_calc_timings(unsigned long clk_rate,
        t_calc->div_low--;
        t_calc->div_high--;
 
+       /* Give the tuning value 0, that would not update con register */
+       t_calc->tuning = 0;
        /* Maximum divider supported by hw is 0xffff */
        if (t_calc->div_low > 0xffff) {
                t_calc->div_low = 0xffff;
index 263685c7a5128773f12dfc00bd4ba75324aeee4c..05cf192ef1acae340397d9ff67f942bca6d08d3e 100644 (file)
@@ -105,7 +105,7 @@ struct slimpro_i2c_dev {
        struct mbox_chan *mbox_chan;
        struct mbox_client mbox_client;
        struct completion rd_complete;
-       u8 dma_buffer[I2C_SMBUS_BLOCK_MAX];
+       u8 dma_buffer[I2C_SMBUS_BLOCK_MAX + 1]; /* dma_buffer[0] is used for length */
        u32 *resp_msg;
 };
 
index 2a972ed7aa0df113185b9fb567e76d11638739e4..e29ff37a43bd615bba54a39402c78d5574af0d92 100644 (file)
@@ -426,6 +426,7 @@ static const struct of_device_id xlp9xx_i2c_of_match[] = {
        { .compatible = "netlogic,xlp980-i2c", },
        { /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, xlp9xx_i2c_of_match);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id xlp9xx_i2c_acpi_ids[] = {
index 0968f59b6df58690207b182b4fe192d5422e349b..ad17d88d857361663ae98d8faff52a0d9cedbeab 100644 (file)
@@ -358,6 +358,7 @@ static const struct of_device_id xlr_i2c_dt_ids[] = {
        },
        { }
 };
+MODULE_DEVICE_TABLE(of, xlr_i2c_dt_ids);
 
 static int xlr_i2c_probe(struct platform_device *pdev)
 {
index 5ab67219f71e64a95c926e20b4c45cb1edce68bf..1704fc84d647714c9882d0f7f301a6bab2b716ff 100644 (file)
@@ -1681,6 +1681,7 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap,
 static void of_i2c_register_devices(struct i2c_adapter *adap)
 {
        struct device_node *bus, *node;
+       struct i2c_client *client;
 
        /* Only register child devices if the adapter has a node pointer set */
        if (!adap->dev.of_node)
@@ -1695,7 +1696,14 @@ static void of_i2c_register_devices(struct i2c_adapter *adap)
        for_each_available_child_of_node(bus, node) {
                if (of_node_test_and_set_flag(node, OF_POPULATED))
                        continue;
-               of_i2c_register_device(adap, node);
+
+               client = of_i2c_register_device(adap, node);
+               if (IS_ERR(client)) {
+                       dev_warn(&adap->dev,
+                                "Failed to create I2C device for %s\n",
+                                node->full_name);
+                       of_node_clear_flag(node, OF_POPULATED);
+               }
        }
 
        of_node_put(bus);
@@ -2299,6 +2307,7 @@ static int of_i2c_notify(struct notifier_block *nb, unsigned long action,
                if (IS_ERR(client)) {
                        dev_err(&adap->dev, "failed to create client for '%s'\n",
                                 rd->dn->full_name);
+                       of_node_clear_flag(rd->dn, OF_POPULATED);
                        return notifier_from_errno(PTR_ERR(client));
                }
                break;
index 7edcf32386206cfb391afaa10055e1dff0b3eb72..99c051490effa736e91d978442e5882fbc2a54f6 100644 (file)
@@ -437,6 +437,8 @@ config STX104
 config TI_ADC081C
        tristate "Texas Instruments ADC081C/ADC101C/ADC121C family"
        depends on I2C
+       select IIO_BUFFER
+       select IIO_TRIGGERED_BUFFER
        help
          If you say yes here you get support for Texas Instruments ADC081C,
          ADC101C and ADC121C ADC chips.
index bd321b305a0a03a38d2a26ec282eb22e7f37d5b6..ef761a5086304b4b032afa6095e2d9a605128caa 100644 (file)
@@ -213,13 +213,14 @@ static int atlas_check_ec_calibration(struct atlas_data *data)
        struct device *dev = &data->client->dev;
        int ret;
        unsigned int val;
+       __be16  rval;
 
-       ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &val, 2);
+       ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &rval, 2);
        if (ret)
                return ret;
 
-       dev_info(dev, "probe set to K = %d.%.2d", be16_to_cpu(val) / 100,
-                                                be16_to_cpu(val) % 100);
+       val = be16_to_cpu(rval);
+       dev_info(dev, "probe set to K = %d.%.2d", val / 100, val % 100);
 
        ret = regmap_read(data->regmap, ATLAS_REG_EC_CALIB_STATUS, &val);
        if (ret)
index 39dd2026ccc928a7f3c0c1be60948969923594ee..066161a4bccd90e7df35fd0c20e2648dee551a18 100644 (file)
@@ -123,22 +123,24 @@ static int maxim_thermocouple_read(struct maxim_thermocouple_data *data,
 {
        unsigned int storage_bytes = data->chip->read_size;
        unsigned int shift = chan->scan_type.shift + (chan->address * 8);
-       unsigned int buf;
+       __be16 buf16;
+       __be32 buf32;
        int ret;
 
-       ret = spi_read(data->spi, (void *) &buf, storage_bytes);
-       if (ret)
-               return ret;
-
        switch (storage_bytes) {
        case 2:
-               *val = be16_to_cpu(buf);
+               ret = spi_read(data->spi, (void *)&buf16, storage_bytes);
+               *val = be16_to_cpu(buf16);
                break;
        case 4:
-               *val = be32_to_cpu(buf);
+               ret = spi_read(data->spi, (void *)&buf32, storage_bytes);
+               *val = be32_to_cpu(buf32);
                break;
        }
 
+       if (ret)
+               return ret;
+
        /* check to be sure this is a valid reading */
        if (*val & data->chip->status_bit)
                return -EINVAL;
index c68746ce6624cdd7f0fcc9ecd4db851e45c4b497..224ad274ea0b8a73e30304e8e5bc9f935c8b98e5 100644 (file)
@@ -94,6 +94,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
        unsigned long dma_attrs = 0;
        struct scatterlist *sg, *sg_list_start;
        int need_release = 0;
+       unsigned int gup_flags = FOLL_WRITE;
 
        if (dmasync)
                dma_attrs |= DMA_ATTR_WRITE_BARRIER;
@@ -183,6 +184,9 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
        if (ret)
                goto out;
 
+       if (!umem->writable)
+               gup_flags |= FOLL_FORCE;
+
        need_release = 1;
        sg_list_start = umem->sg_head.sgl;
 
@@ -190,7 +194,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
                ret = get_user_pages(cur_base,
                                     min_t(unsigned long, npages,
                                           PAGE_SIZE / sizeof (struct page *)),
-                                    1, !umem->writable, page_list, vma_list);
+                                    gup_flags, page_list, vma_list);
 
                if (ret < 0)
                        goto out;
index 75077a018675e1aa77c7955878250ad521c9d25d..1f0fe3217f2386e03caf4b7e14cd228bddac2020 100644 (file)
@@ -527,6 +527,7 @@ int ib_umem_odp_map_dma_pages(struct ib_umem *umem, u64 user_virt, u64 bcnt,
        u64 off;
        int j, k, ret = 0, start_idx, npages = 0;
        u64 base_virt_addr;
+       unsigned int flags = 0;
 
        if (access_mask == 0)
                return -EINVAL;
@@ -556,6 +557,9 @@ int ib_umem_odp_map_dma_pages(struct ib_umem *umem, u64 user_virt, u64 bcnt,
                goto out_put_task;
        }
 
+       if (access_mask & ODP_WRITE_ALLOWED_BIT)
+               flags |= FOLL_WRITE;
+
        start_idx = (user_virt - ib_umem_start(umem)) >> PAGE_SHIFT;
        k = start_idx;
 
@@ -574,8 +578,7 @@ int ib_umem_odp_map_dma_pages(struct ib_umem *umem, u64 user_virt, u64 bcnt,
                 */
                npages = get_user_pages_remote(owning_process, owning_mm,
                                user_virt, gup_num_pages,
-                               access_mask & ODP_WRITE_ALLOWED_BIT,
-                               0, local_page_list, NULL);
+                               flags, local_page_list, NULL);
                up_read(&owning_mm->mmap_sem);
 
                if (npages < 0)
index 6c00d04b8b2852369f4f43d78c39c68898ff4640..c6fe89d79248fa28d05282440ede6f67cd35e75c 100644 (file)
@@ -472,7 +472,7 @@ int mthca_map_user_db(struct mthca_dev *dev, struct mthca_uar *uar,
                goto out;
        }
 
-       ret = get_user_pages(uaddr & PAGE_MASK, 1, 1, 0, pages, NULL);
+       ret = get_user_pages(uaddr & PAGE_MASK, 1, FOLL_WRITE, pages, NULL);
        if (ret < 0)
                goto out;
 
index 2d2b94fd3633bff1ddbed16d077ee436bbe0ae58..75f08624ac052abed2347cb462990c0545c8d828 100644 (file)
@@ -67,7 +67,8 @@ static int __qib_get_user_pages(unsigned long start_page, size_t num_pages,
 
        for (got = 0; got < num_pages; got += ret) {
                ret = get_user_pages(start_page + got * PAGE_SIZE,
-                                    num_pages - got, 1, 1,
+                                    num_pages - got,
+                                    FOLL_WRITE | FOLL_FORCE,
                                     p + got, NULL);
                if (ret < 0)
                        goto bail_release;
index a0b6ebee4d8a047e2fdffb8bbd831e5c36107fec..1ccee6ea5bc3092f196689c4481b21d9f27b796c 100644 (file)
@@ -111,6 +111,7 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable,
        int i;
        int flags;
        dma_addr_t pa;
+       unsigned int gup_flags;
 
        if (!can_do_mlock())
                return -EPERM;
@@ -135,6 +136,8 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable,
 
        flags = IOMMU_READ | IOMMU_CACHE;
        flags |= (writable) ? IOMMU_WRITE : 0;
+       gup_flags = FOLL_WRITE;
+       gup_flags |= (writable) ? 0 : FOLL_FORCE;
        cur_base = addr & PAGE_MASK;
        ret = 0;
 
@@ -142,7 +145,7 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable,
                ret = get_user_pages(cur_base,
                                        min_t(unsigned long, npages,
                                        PAGE_SIZE / sizeof(struct page *)),
-                                       1, !writable, page_list, NULL);
+                                       gup_flags, page_list, NULL);
 
                if (ret < 0)
                        goto out;
index c0e7b624ce5475aed0022d3b6f79a043110740ff..12102448fdddf1371f5d561c81e04a55091e8b07 100644 (file)
@@ -178,7 +178,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
                       idev->id_vendor, idev->id_device);
 }
 
-ipack_device_attr(id_format, "0x%hhu\n");
+ipack_device_attr(id_format, "0x%hhx\n");
 
 static DEVICE_ATTR_RO(id);
 static DEVICE_ATTR_RO(id_device);
index 82b0b5daf3f5b2af6a91c18923271dc7647a7cef..bc0af3307bbfd6612d2ae18d37a15c8d87a6ea39 100644 (file)
@@ -158,8 +158,8 @@ config PIC32_EVIC
        select IRQ_DOMAIN
 
 config JCORE_AIC
-       bool "J-Core integrated AIC"
-       depends on OF && (SUPERH || COMPILE_TEST)
+       bool "J-Core integrated AIC" if COMPILE_TEST
+       depends on OF
        select IRQ_DOMAIN
        help
          Support for the J-Core integrated AIC.
index efbf0e4304b7073d5aa12bfa97a1d727aace81b7..2a7a38830a8df3ef08fdeebe6f98cd24191f8808 100644 (file)
@@ -85,7 +85,7 @@ static void nps400_irq_eoi_global(struct irq_data *irqd)
        nps_ack_gic();
 }
 
-static void nps400_irq_eoi(struct irq_data *irqd)
+static void nps400_irq_ack(struct irq_data *irqd)
 {
        unsigned int __maybe_unused irq = irqd_to_hwirq(irqd);
 
@@ -103,7 +103,7 @@ static struct irq_chip nps400_irq_chip_percpu = {
        .name           = "NPS400 IC",
        .irq_mask       = nps400_irq_mask,
        .irq_unmask     = nps400_irq_unmask,
-       .irq_eoi        = nps400_irq_eoi,
+       .irq_ack        = nps400_irq_ack,
 };
 
 static int nps400_irq_map(struct irq_domain *d, unsigned int virq,
@@ -135,7 +135,7 @@ static const struct irq_domain_ops nps400_irq_ops = {
 static int __init nps400_of_init(struct device_node *node,
                                 struct device_node *parent)
 {
-       static struct irq_domain *nps400_root_domain;
+       struct irq_domain *nps400_root_domain;
 
        if (parent) {
                pr_err("DeviceTree incore ic not a root irq controller\n");
index 003495d91f9cfd34ea77eec0b52a4f070e58bfd5..c5dee300e8a3e1a40c30d22bba5e1a968e83a21a 100644 (file)
@@ -1023,7 +1023,7 @@ static void its_free_tables(struct its_node *its)
 
 static int its_alloc_tables(struct its_node *its)
 {
-       u64 typer = readq_relaxed(its->base + GITS_TYPER);
+       u64 typer = gic_read_typer(its->base + GITS_TYPER);
        u32 ids = GITS_TYPER_DEVBITS(typer);
        u64 shr = GITS_BASER_InnerShareable;
        u64 cache = GITS_BASER_WaWb;
@@ -1198,7 +1198,7 @@ static void its_cpu_init_collection(void)
                 * We now have to bind each collection to its target
                 * redistributor.
                 */
-               if (readq_relaxed(its->base + GITS_TYPER) & GITS_TYPER_PTA) {
+               if (gic_read_typer(its->base + GITS_TYPER) & GITS_TYPER_PTA) {
                        /*
                         * This ITS wants the physical address of the
                         * redistributor.
@@ -1208,7 +1208,7 @@ static void its_cpu_init_collection(void)
                        /*
                         * This ITS wants a linear CPU number.
                         */
-                       target = readq_relaxed(gic_data_rdist_rd_base() + GICR_TYPER);
+                       target = gic_read_typer(gic_data_rdist_rd_base() + GICR_TYPER);
                        target = GICR_TYPER_CPU_NUMBER(target) << 16;
                }
 
@@ -1691,7 +1691,7 @@ static int __init its_probe_one(struct resource *res,
        INIT_LIST_HEAD(&its->its_device_list);
        its->base = its_base;
        its->phys_base = res->start;
-       its->ite_size = ((readl_relaxed(its_base + GITS_TYPER) >> 4) & 0xf) + 1;
+       its->ite_size = ((gic_read_typer(its_base + GITS_TYPER) >> 4) & 0xf) + 1;
        its->numa_node = numa_node;
 
        its->cmd_base = kzalloc(ITS_CMD_QUEUE_SZ, GFP_KERNEL);
@@ -1763,7 +1763,7 @@ static int __init its_probe_one(struct resource *res,
 
 static bool gic_rdists_supports_plpis(void)
 {
-       return !!(readl_relaxed(gic_data_rdist_rd_base() + GICR_TYPER) & GICR_TYPER_PLPIS);
+       return !!(gic_read_typer(gic_data_rdist_rd_base() + GICR_TYPER) & GICR_TYPER_PLPIS);
 }
 
 int its_cpu_init(void)
index 9b81bd8b929c0bf925d6e3fe578d03b0c2af7afd..19d642eae096b2495f5707470ea5f857d2f9b876 100644 (file)
@@ -153,7 +153,7 @@ static void gic_enable_redist(bool enable)
                        return; /* No PM support in this redistributor */
        }
 
-       while (count--) {
+       while (--count) {
                val = readl_relaxed(rbase + GICR_WAKER);
                if (enable ^ (bool)(val & GICR_WAKER_ChildrenAsleep))
                        break;
index 58e5b4e870561c6361ff50a9e5869cf8abd4e356..d6c404b3584d5118799f8376d384c2f71b728a69 100644 (file)
@@ -1279,7 +1279,7 @@ static bool gic_check_eoimode(struct device_node *node, void __iomem **base)
                 */
                *base += 0xf000;
                cpuif_res.start += 0xf000;
-               pr_warn("GIC: Adjusting CPU interface base to %pa",
+               pr_warn("GIC: Adjusting CPU interface base to %pa\n",
                        &cpuif_res.start);
        }
 
index 84b01dec277dfee6f35c286c43448ed258a48199..033bccb41455c46c32d5473fa46940c2770973e9 100644 (file)
 
 static struct irq_chip jcore_aic;
 
+/*
+ * The J-Core AIC1 and AIC2 are cpu-local interrupt controllers and do
+ * not distinguish or use distinct irq number ranges for per-cpu event
+ * interrupts (timer, IPI). Since information to determine whether a
+ * particular irq number should be treated as per-cpu is not available
+ * at mapping time, we use a wrapper handler function which chooses
+ * the right handler at runtime based on whether IRQF_PERCPU was used
+ * when requesting the irq.
+ */
+
+static void handle_jcore_irq(struct irq_desc *desc)
+{
+       if (irqd_is_per_cpu(irq_desc_get_irq_data(desc)))
+               handle_percpu_irq(desc);
+       else
+               handle_simple_irq(desc);
+}
+
 static int jcore_aic_irqdomain_map(struct irq_domain *d, unsigned int irq,
                                   irq_hw_number_t hwirq)
 {
        struct irq_chip *aic = d->host_data;
 
-       irq_set_chip_and_handler(irq, aic, handle_simple_irq);
+       irq_set_chip_and_handler(irq, aic, handle_jcore_irq);
 
        return 0;
 }
index 8abde6b8cedc4540dac80b73256317fb671dbd69..6d53810963f7531a7e5048dad5c55ef53e8aa914 100644 (file)
@@ -266,7 +266,7 @@ static struct raid_type {
        {"raid10_offset", "raid10 offset (striped mirrors)",        0, 2, 10, ALGORITHM_RAID10_OFFSET},
        {"raid10_near",   "raid10 near (striped mirrors)",          0, 2, 10, ALGORITHM_RAID10_NEAR},
        {"raid10",        "raid10 (striped mirrors)",               0, 2, 10, ALGORITHM_RAID10_DEFAULT},
-       {"raid4",         "raid4 (dedicated last parity disk)",     1, 2, 4,  ALGORITHM_PARITY_N}, /* raid4 layout = raid5_n */
+       {"raid4",         "raid4 (dedicated first parity disk)",    1, 2, 5,  ALGORITHM_PARITY_0}, /* raid4 layout = raid5_0 */
        {"raid5_n",       "raid5 (dedicated last parity disk)",     1, 2, 5,  ALGORITHM_PARITY_N},
        {"raid5_ls",      "raid5 (left symmetric)",                 1, 2, 5,  ALGORITHM_LEFT_SYMMETRIC},
        {"raid5_rs",      "raid5 (right symmetric)",                1, 2, 5,  ALGORITHM_RIGHT_SYMMETRIC},
@@ -2087,11 +2087,11 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
                /*
                 * No takeover/reshaping, because we don't have the extended v1.9.0 metadata
                 */
-               if (le32_to_cpu(sb->level) != mddev->level) {
+               if (le32_to_cpu(sb->level) != mddev->new_level) {
                        DMERR("Reshaping/takeover raid sets not yet supported. (raid level/stripes/size change)");
                        return -EINVAL;
                }
-               if (le32_to_cpu(sb->layout) != mddev->layout) {
+               if (le32_to_cpu(sb->layout) != mddev->new_layout) {
                        DMERR("Reshaping raid sets not yet supported. (raid layout change)");
                        DMERR("  0x%X vs 0x%X", le32_to_cpu(sb->layout), mddev->layout);
                        DMERR("  Old layout: %s w/ %d copies",
@@ -2102,7 +2102,7 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
                              raid10_md_layout_to_copies(mddev->layout));
                        return -EINVAL;
                }
-               if (le32_to_cpu(sb->stripe_sectors) != mddev->chunk_sectors) {
+               if (le32_to_cpu(sb->stripe_sectors) != mddev->new_chunk_sectors) {
                        DMERR("Reshaping raid sets not yet supported. (stripe sectors change)");
                        return -EINVAL;
                }
@@ -2115,6 +2115,8 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
                        return -EINVAL;
                }
 
+               DMINFO("Discovered old metadata format; upgrading to extended metadata format");
+
                /* Table line is checked vs. authoritative superblock */
                rs_set_new(rs);
        }
@@ -2258,7 +2260,8 @@ static int super_validate(struct raid_set *rs, struct md_rdev *rdev)
        if (!mddev->events && super_init_validation(rs, rdev))
                return -EINVAL;
 
-       if (le32_to_cpu(sb->compat_features) != FEATURE_FLAG_SUPPORTS_V190) {
+       if (le32_to_cpu(sb->compat_features) &&
+           le32_to_cpu(sb->compat_features) != FEATURE_FLAG_SUPPORTS_V190) {
                rs->ti->error = "Unable to assemble array: Unknown flag(s) in compatible feature flags";
                return -EINVAL;
        }
@@ -3646,7 +3649,7 @@ static void raid_resume(struct dm_target *ti)
 
 static struct target_type raid_target = {
        .name = "raid",
-       .version = {1, 9, 0},
+       .version = {1, 9, 1},
        .module = THIS_MODULE,
        .ctr = raid_ctr,
        .dtr = raid_dtr,
index bdf1606f67bcfbfcfadcfdc65f2c559c68fff5c9..9a8b71067c6eba52dca7a4050a75cc51199ffbe5 100644 (file)
@@ -145,7 +145,6 @@ static void dispatch_bios(void *context, struct bio_list *bio_list)
 
 struct dm_raid1_bio_record {
        struct mirror *m;
-       /* if details->bi_bdev == NULL, details were not saved */
        struct dm_bio_details details;
        region_t write_region;
 };
@@ -1200,8 +1199,6 @@ static int mirror_map(struct dm_target *ti, struct bio *bio)
        struct dm_raid1_bio_record *bio_record =
          dm_per_bio_data(bio, sizeof(struct dm_raid1_bio_record));
 
-       bio_record->details.bi_bdev = NULL;
-
        if (rw == WRITE) {
                /* Save region for mirror_end_io() handler */
                bio_record->write_region = dm_rh_bio_to_region(ms->rh, bio);
@@ -1260,22 +1257,12 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, int error)
        }
 
        if (error == -EOPNOTSUPP)
-               goto out;
+               return error;
 
        if ((error == -EWOULDBLOCK) && (bio->bi_opf & REQ_RAHEAD))
-               goto out;
+               return error;
 
        if (unlikely(error)) {
-               if (!bio_record->details.bi_bdev) {
-                       /*
-                        * There wasn't enough memory to record necessary
-                        * information for a retry or there was no other
-                        * mirror in-sync.
-                        */
-                       DMERR_LIMIT("Mirror read failed.");
-                       return -EIO;
-               }
-
                m = bio_record->m;
 
                DMERR("Mirror read failed from %s. Trying alternative device.",
@@ -1291,7 +1278,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, int error)
                        bd = &bio_record->details;
 
                        dm_bio_restore(bd, bio);
-                       bio_record->details.bi_bdev = NULL;
+                       bio->bi_error = 0;
 
                        queue_bio(ms, bio, rw);
                        return DM_ENDIO_INCOMPLETE;
@@ -1299,9 +1286,6 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, int error)
                DMERR("All replicated volumes dead, failing I/O");
        }
 
-out:
-       bio_record->details.bi_bdev = NULL;
-
        return error;
 }
 
index dc75bea0d541b3a2892d688c7eaf3093e1168790..1d0d2adc050a5539a4b430bd9e055f99e1abb5d7 100644 (file)
@@ -856,8 +856,11 @@ int dm_old_init_request_queue(struct mapped_device *md)
        kthread_init_worker(&md->kworker);
        md->kworker_task = kthread_run(kthread_worker_fn, &md->kworker,
                                       "kdmwork-%s", dm_device_name(md));
-       if (IS_ERR(md->kworker_task))
-               return PTR_ERR(md->kworker_task);
+       if (IS_ERR(md->kworker_task)) {
+               int error = PTR_ERR(md->kworker_task);
+               md->kworker_task = NULL;
+               return error;
+       }
 
        elv_register_queue(md->queue);
 
index 3e407a9cde1f190baade6d22e78c30ae5b27b438..c4b53b332607bec3f303671da385656713498e04 100644 (file)
@@ -695,37 +695,32 @@ int dm_table_add_target(struct dm_table *t, const char *type,
 
        tgt->type = dm_get_target_type(type);
        if (!tgt->type) {
-               DMERR("%s: %s: unknown target type", dm_device_name(t->md),
-                     type);
+               DMERR("%s: %s: unknown target type", dm_device_name(t->md), type);
                return -EINVAL;
        }
 
        if (dm_target_needs_singleton(tgt->type)) {
                if (t->num_targets) {
-                       DMERR("%s: target type %s must appear alone in table",
-                             dm_device_name(t->md), type);
-                       return -EINVAL;
+                       tgt->error = "singleton target type must appear alone in table";
+                       goto bad;
                }
                t->singleton = true;
        }
 
        if (dm_target_always_writeable(tgt->type) && !(t->mode & FMODE_WRITE)) {
-               DMERR("%s: target type %s may not be included in read-only tables",
-                     dm_device_name(t->md), type);
-               return -EINVAL;
+               tgt->error = "target type may not be included in a read-only table";
+               goto bad;
        }
 
        if (t->immutable_target_type) {
                if (t->immutable_target_type != tgt->type) {
-                       DMERR("%s: immutable target type %s cannot be mixed with other target types",
-                             dm_device_name(t->md), t->immutable_target_type->name);
-                       return -EINVAL;
+                       tgt->error = "immutable target type cannot be mixed with other target types";
+                       goto bad;
                }
        } else if (dm_target_is_immutable(tgt->type)) {
                if (t->num_targets) {
-                       DMERR("%s: immutable target type %s cannot be mixed with other target types",
-                             dm_device_name(t->md), tgt->type->name);
-                       return -EINVAL;
+                       tgt->error = "immutable target type cannot be mixed with other target types";
+                       goto bad;
                }
                t->immutable_target_type = tgt->type;
        }
@@ -740,7 +735,6 @@ int dm_table_add_target(struct dm_table *t, const char *type,
         */
        if (!adjoin(t, tgt)) {
                tgt->error = "Gap in table";
-               r = -EINVAL;
                goto bad;
        }
 
index 147af9536d0c10d4054f42306383e6fe118a6ce4..ef7bf1dd6900893c8faf728cb57a93ad8b17af54 100644 (file)
@@ -1423,8 +1423,6 @@ static void cleanup_mapped_device(struct mapped_device *md)
        if (md->bs)
                bioset_free(md->bs);
 
-       cleanup_srcu_struct(&md->io_barrier);
-
        if (md->disk) {
                spin_lock(&_minor_lock);
                md->disk->private_data = NULL;
@@ -1436,6 +1434,8 @@ static void cleanup_mapped_device(struct mapped_device *md)
        if (md->queue)
                blk_cleanup_queue(md->queue);
 
+       cleanup_srcu_struct(&md->io_barrier);
+
        if (md->bdev) {
                bdput(md->bdev);
                md->bdev = NULL;
index 4769469fe842964574eae3a72b812f579ab5f63f..2c9232ef7baa4b57efd020547d0b2af3f42199d4 100644 (file)
@@ -124,8 +124,8 @@ int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr,
        }
 
        /* Get user pages for DMA Xfer */
-       err = get_user_pages_unlocked(user_dma.uaddr, user_dma.page_count, 0,
-                       1, dma->map);
+       err = get_user_pages_unlocked(user_dma.uaddr, user_dma.page_count,
+                       dma->map, FOLL_FORCE);
 
        if (user_dma.page_count != err) {
                IVTV_DEBUG_WARN("failed to map user pages, returned %d instead of %d\n",
index b094054cda6e55b64852598d6d22dd6d57e6cdaa..f7299d3d82449ddaefc1ee76fd3f8cb33650e5b4 100644 (file)
@@ -76,11 +76,12 @@ static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma,
 
        /* Get user pages for DMA Xfer */
        y_pages = get_user_pages_unlocked(y_dma.uaddr,
-                       y_dma.page_count, 0, 1, &dma->map[0]);
+                       y_dma.page_count, &dma->map[0], FOLL_FORCE);
        uv_pages = 0; /* silence gcc. value is set and consumed only if: */
        if (y_pages == y_dma.page_count) {
                uv_pages = get_user_pages_unlocked(uv_dma.uaddr,
-                               uv_dma.page_count, 0, 1, &dma->map[y_pages]);
+                               uv_dma.page_count, &dma->map[y_pages],
+                               FOLL_FORCE);
        }
 
        if (y_pages != y_dma.page_count || uv_pages != uv_dma.page_count) {
index e668dde6d85722d2b68d7f399452d22bbf6d8342..a31b95cb3b09c0623be42762cea8d4dc08c99170 100644 (file)
@@ -214,7 +214,7 @@ static int omap_vout_get_userptr(struct videobuf_buffer *vb, u32 virtp,
        if (!vec)
                return -ENOMEM;
 
-       ret = get_vaddr_frames(virtp, 1, true, false, vec);
+       ret = get_vaddr_frames(virtp, 1, FOLL_WRITE, vec);
        if (ret != 1) {
                frame_vector_destroy(vec);
                return -EINVAL;
index f300f060b3f34cdfeb8b1e12b90d9ab345c6b629..1db0af6c7f94810bf9270b0ebb5961de6b1802a5 100644 (file)
@@ -156,6 +156,7 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
 {
        unsigned long first, last;
        int err, rw = 0;
+       unsigned int flags = FOLL_FORCE;
 
        dma->direction = direction;
        switch (dma->direction) {
@@ -178,12 +179,14 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
        if (NULL == dma->pages)
                return -ENOMEM;
 
+       if (rw == READ)
+               flags |= FOLL_WRITE;
+
        dprintk(1, "init user [0x%lx+0x%lx => %d pages]\n",
                data, size, dma->nr_pages);
 
        err = get_user_pages(data & PAGE_MASK, dma->nr_pages,
-                            rw == READ, 1, /* force */
-                            dma->pages, NULL);
+                            flags, dma->pages, NULL);
 
        if (err != dma->nr_pages) {
                dma->nr_pages = (err >= 0) ? err : 0;
index 3c3b517f1d1cacb5a7131263cd80c112bd22d619..1cd322e939c70520e9e915575590bf516c0e46ee 100644 (file)
@@ -42,6 +42,10 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
        unsigned long first, last;
        unsigned long nr;
        struct frame_vector *vec;
+       unsigned int flags = FOLL_FORCE;
+
+       if (write)
+               flags |= FOLL_WRITE;
 
        first = start >> PAGE_SHIFT;
        last = (start + length - 1) >> PAGE_SHIFT;
@@ -49,7 +53,7 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
        vec = frame_vector_create(nr);
        if (!vec)
                return ERR_PTR(-ENOMEM);
-       ret = get_vaddr_frames(start & PAGE_MASK, nr, write, true, vec);
+       ret = get_vaddr_frames(start & PAGE_MASK, nr, flags, vec);
        if (ret < 0)
                goto out_destroy;
        /* We accept only complete set of PFNs */
index d34bc35303851634d143f924a790a47a7f006e8c..2e3cf012ef485f863dd2de36d26dae8caae7156b 100644 (file)
@@ -524,6 +524,7 @@ static void rtsx_usb_ms_handle_req(struct work_struct *work)
        int rc;
 
        if (!host->req) {
+               pm_runtime_get_sync(ms_dev(host));
                do {
                        rc = memstick_next_req(msh, &host->req);
                        dev_dbg(ms_dev(host), "next req %d\n", rc);
@@ -544,6 +545,7 @@ static void rtsx_usb_ms_handle_req(struct work_struct *work)
                                                host->req->error);
                        }
                } while (!rc);
+               pm_runtime_put(ms_dev(host));
        }
 
 }
@@ -570,6 +572,7 @@ static int rtsx_usb_ms_set_param(struct memstick_host *msh,
        dev_dbg(ms_dev(host), "%s: param = %d, value = %d\n",
                        __func__, param, value);
 
+       pm_runtime_get_sync(ms_dev(host));
        mutex_lock(&ucr->dev_mutex);
 
        err = rtsx_usb_card_exclusive_check(ucr, RTSX_USB_MS_CARD);
@@ -635,6 +638,7 @@ static int rtsx_usb_ms_set_param(struct memstick_host *msh,
        }
 out:
        mutex_unlock(&ucr->dev_mutex);
+       pm_runtime_put(ms_dev(host));
 
        /* power-on delay */
        if (param == MEMSTICK_POWER && value == MEMSTICK_POWER_ON)
@@ -681,6 +685,7 @@ static int rtsx_usb_detect_ms_card(void *__host)
        int err;
 
        for (;;) {
+               pm_runtime_get_sync(ms_dev(host));
                mutex_lock(&ucr->dev_mutex);
 
                /* Check pending MS card changes */
@@ -703,6 +708,7 @@ static int rtsx_usb_detect_ms_card(void *__host)
                }
 
 poll_again:
+               pm_runtime_put(ms_dev(host));
                if (host->eject)
                        break;
 
index f3d34b941f8599e91e121b7dfe8cbc115e9f138e..2e5233b6097110e72ae147f21ed15cf259b0a5a9 100644 (file)
@@ -229,6 +229,14 @@ int cxl_start_context(struct cxl_context *ctx, u64 wed,
        if (ctx->status == STARTED)
                goto out; /* already started */
 
+       /*
+        * Increment the mapped context count for adapter. This also checks
+        * if adapter_context_lock is taken.
+        */
+       rc = cxl_adapter_context_get(ctx->afu->adapter);
+       if (rc)
+               goto out;
+
        if (task) {
                ctx->pid = get_task_pid(task, PIDTYPE_PID);
                ctx->glpid = get_task_pid(task->group_leader, PIDTYPE_PID);
@@ -239,7 +247,10 @@ int cxl_start_context(struct cxl_context *ctx, u64 wed,
        cxl_ctx_get();
 
        if ((rc = cxl_ops->attach_process(ctx, kernel, wed, 0))) {
+               put_pid(ctx->glpid);
                put_pid(ctx->pid);
+               ctx->glpid = ctx->pid = NULL;
+               cxl_adapter_context_put(ctx->afu->adapter);
                cxl_ctx_put();
                goto out;
        }
index c466ee2b0c973a7c77cb16566770dec3b426db33..5e506c19108ad22da4a002957fd056711138b0f3 100644 (file)
@@ -238,6 +238,9 @@ int __detach_context(struct cxl_context *ctx)
        put_pid(ctx->glpid);
 
        cxl_ctx_put();
+
+       /* Decrease the attached context count on the adapter */
+       cxl_adapter_context_put(ctx->afu->adapter);
        return 0;
 }
 
index 01d372aba131416524ec565748ea4f9e52a795ee..a144073593fa1e5170bba669d7ba467eb06ada5b 100644 (file)
@@ -618,6 +618,14 @@ struct cxl {
        bool perst_select_user;
        bool perst_same_image;
        bool psl_timebase_synced;
+
+       /*
+        * number of contexts mapped on to this card. Possible values are:
+        * >0: Number of contexts mapped and new one can be mapped.
+        *  0: No active contexts and new ones can be mapped.
+        * -1: No contexts mapped and new ones cannot be mapped.
+        */
+       atomic_t contexts_num;
 };
 
 int cxl_pci_alloc_one_irq(struct cxl *adapter);
@@ -944,4 +952,20 @@ bool cxl_pci_is_vphb_device(struct pci_dev *dev);
 
 /* decode AFU error bits in the PSL register PSL_SERR_An */
 void cxl_afu_decode_psl_serr(struct cxl_afu *afu, u64 serr);
+
+/*
+ * Increments the number of attached contexts on an adapter.
+ * In case an adapter_context_lock is taken the return -EBUSY.
+ */
+int cxl_adapter_context_get(struct cxl *adapter);
+
+/* Decrements the number of attached contexts on an adapter */
+void cxl_adapter_context_put(struct cxl *adapter);
+
+/* If no active contexts then prevents contexts from being attached */
+int cxl_adapter_context_lock(struct cxl *adapter);
+
+/* Unlock the contexts-lock if taken. Warn and force unlock otherwise */
+void cxl_adapter_context_unlock(struct cxl *adapter);
+
 #endif
index 5fb9894b157faaae236fd75d4b41cceba069b3d1..77080cc5fa0aa4cdbc476729e4cdabcac8afae7b 100644 (file)
@@ -193,6 +193,16 @@ static long afu_ioctl_start_work(struct cxl_context *ctx,
 
        ctx->mmio_err_ff = !!(work.flags & CXL_START_WORK_ERR_FF);
 
+       /*
+        * Increment the mapped context count for adapter. This also checks
+        * if adapter_context_lock is taken.
+        */
+       rc = cxl_adapter_context_get(ctx->afu->adapter);
+       if (rc) {
+               afu_release_irqs(ctx, ctx);
+               goto out;
+       }
+
        /*
         * We grab the PID here and not in the file open to allow for the case
         * where a process (master, some daemon, etc) has opened the chardev on
@@ -205,11 +215,16 @@ static long afu_ioctl_start_work(struct cxl_context *ctx,
        ctx->pid = get_task_pid(current, PIDTYPE_PID);
        ctx->glpid = get_task_pid(current->group_leader, PIDTYPE_PID);
 
+
        trace_cxl_attach(ctx, work.work_element_descriptor, work.num_interrupts, amr);
 
        if ((rc = cxl_ops->attach_process(ctx, false, work.work_element_descriptor,
                                                        amr))) {
                afu_release_irqs(ctx, ctx);
+               cxl_adapter_context_put(ctx->afu->adapter);
+               put_pid(ctx->glpid);
+               put_pid(ctx->pid);
+               ctx->glpid = ctx->pid = NULL;
                goto out;
        }
 
index 9aa58a77a24d13f102546a9c45aa48d780326364..3e102cd6ed914d992152128423cce8cbab33e830 100644 (file)
@@ -1152,6 +1152,9 @@ struct cxl *cxl_guest_init_adapter(struct device_node *np, struct platform_devic
        if ((rc = cxl_sysfs_adapter_add(adapter)))
                goto err_put1;
 
+       /* release the context lock as the adapter is configured */
+       cxl_adapter_context_unlock(adapter);
+
        return adapter;
 
 err_put1:
index d9be23b24aa3b88dce63a8c3f1bf38f9c66ca5ef..62e0dfb5f15b62d64980bb008d448038f8fd3c36 100644 (file)
@@ -243,8 +243,10 @@ struct cxl *cxl_alloc_adapter(void)
        if (dev_set_name(&adapter->dev, "card%i", adapter->adapter_num))
                goto err2;
 
-       return adapter;
+       /* start with context lock taken */
+       atomic_set(&adapter->contexts_num, -1);
 
+       return adapter;
 err2:
        cxl_remove_adapter_nr(adapter);
 err1:
@@ -286,6 +288,44 @@ int cxl_afu_select_best_mode(struct cxl_afu *afu)
        return 0;
 }
 
+int cxl_adapter_context_get(struct cxl *adapter)
+{
+       int rc;
+
+       rc = atomic_inc_unless_negative(&adapter->contexts_num);
+       return rc >= 0 ? 0 : -EBUSY;
+}
+
+void cxl_adapter_context_put(struct cxl *adapter)
+{
+       atomic_dec_if_positive(&adapter->contexts_num);
+}
+
+int cxl_adapter_context_lock(struct cxl *adapter)
+{
+       int rc;
+       /* no active contexts -> contexts_num == 0 */
+       rc = atomic_cmpxchg(&adapter->contexts_num, 0, -1);
+       return rc ? -EBUSY : 0;
+}
+
+void cxl_adapter_context_unlock(struct cxl *adapter)
+{
+       int val = atomic_cmpxchg(&adapter->contexts_num, -1, 0);
+
+       /*
+        * contexts lock taken -> contexts_num == -1
+        * If not true then show a warning and force reset the lock.
+        * This will happen when context_unlock was requested without
+        * doing a context_lock.
+        */
+       if (val != -1) {
+               atomic_set(&adapter->contexts_num, 0);
+               WARN(1, "Adapter context unlocked with %d active contexts",
+                    val);
+       }
+}
+
 static int __init init_cxl(void)
 {
        int rc = 0;
index 7afad8477ad55358f3608abefcf85795407a99a1..e96be9ca4e60437db6bfba9b098fad852790f722 100644 (file)
@@ -1487,6 +1487,8 @@ static int cxl_configure_adapter(struct cxl *adapter, struct pci_dev *dev)
        if ((rc = cxl_native_register_psl_err_irq(adapter)))
                goto err;
 
+       /* Release the context lock as adapter is configured */
+       cxl_adapter_context_unlock(adapter);
        return 0;
 
 err:
index b043c20f158f122d11bbf5dc765ae957ebf9155d..a8b6d6a635e962b057325d9d5d6af96382474eba 100644 (file)
@@ -75,12 +75,31 @@ static ssize_t reset_adapter_store(struct device *device,
        int val;
 
        rc = sscanf(buf, "%i", &val);
-       if ((rc != 1) || (val != 1))
+       if ((rc != 1) || (val != 1 && val != -1))
                return -EINVAL;
 
-       if ((rc = cxl_ops->adapter_reset(adapter)))
-               return rc;
-       return count;
+       /*
+        * See if we can lock the context mapping that's only allowed
+        * when there are no contexts attached to the adapter. Once
+        * taken this will also prevent any context from getting activated.
+        */
+       if (val == 1) {
+               rc =  cxl_adapter_context_lock(adapter);
+               if (rc)
+                       goto out;
+
+               rc = cxl_ops->adapter_reset(adapter);
+               /* In case reset failed release context lock */
+               if (rc)
+                       cxl_adapter_context_unlock(adapter);
+
+       } else if (val == -1) {
+               /* Perform a forced adapter reset */
+               rc = cxl_ops->adapter_reset(adapter);
+       }
+
+out:
+       return rc ? rc : count;
 }
 
 static ssize_t load_image_on_perst_show(struct device *device,
index 8a679ecc8fd108d25ac4ecae8f1f24a33890107e..fc2794b513faf12ca043e760524046ad2d72a9ed 100644 (file)
@@ -352,17 +352,27 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
                if (copy_from_user(sgl->lpage, user_addr + user_size -
                                   sgl->lpage_size, sgl->lpage_size)) {
                        rc = -EFAULT;
-                       goto err_out1;
+                       goto err_out2;
                }
        }
        return 0;
 
+ err_out2:
+       __genwqe_free_consistent(cd, PAGE_SIZE, sgl->lpage,
+                                sgl->lpage_dma_addr);
+       sgl->lpage = NULL;
+       sgl->lpage_dma_addr = 0;
  err_out1:
        __genwqe_free_consistent(cd, PAGE_SIZE, sgl->fpage,
                                 sgl->fpage_dma_addr);
+       sgl->fpage = NULL;
+       sgl->fpage_dma_addr = 0;
  err_out:
        __genwqe_free_consistent(cd, sgl->sgl_size, sgl->sgl,
                                 sgl->sgl_dma_addr);
+       sgl->sgl = NULL;
+       sgl->sgl_dma_addr = 0;
+       sgl->sgl_size = 0;
        return -ENOMEM;
 }
 
index e6e5e55a12ed45f09577899198e7a8735ae7a0e8..60415a2bfcbd4c3f67a832bf3bc388b0af9a1270 100644 (file)
@@ -981,11 +981,13 @@ static bool mei_txe_check_and_ack_intrs(struct mei_device *dev, bool do_ack)
        hisr = mei_txe_br_reg_read(hw, HISR_REG);
 
        aliveness = mei_txe_aliveness_get(dev);
-       if (hhisr & IPC_HHIER_SEC && aliveness)
+       if (hhisr & IPC_HHIER_SEC && aliveness) {
                ipc_isr = mei_txe_sec_reg_read_silent(hw,
                                SEC_IPC_HOST_INT_STATUS_REG);
-       else
+       } else {
                ipc_isr = 0;
+               hhisr &= ~IPC_HHIER_SEC;
+       }
 
        generated = generated ||
                (hisr & HISR_INT_STS_MSK) ||
index e0203b1a20fd17fe88d9db3dc882d4d64eed2cc5..f806a4471eb913f388042886de29ec8de996cbf5 100644 (file)
@@ -1396,8 +1396,7 @@ int __scif_pin_pages(void *addr, size_t len, int *out_prot,
                pinned_pages->nr_pages = get_user_pages(
                                (u64)addr,
                                nr_pages,
-                               !!(prot & SCIF_PROT_WRITE),
-                               0,
+                               (prot & SCIF_PROT_WRITE) ? FOLL_WRITE : 0,
                                pinned_pages->pages,
                                NULL);
                up_write(&mm->mmap_sem);
index a2d97b9b17e3463cebea03c70ec062cafcdac08c..6fb773dbcd0c3233d62136dcf673afb7b80efcea 100644 (file)
@@ -198,7 +198,7 @@ static int non_atomic_pte_lookup(struct vm_area_struct *vma,
 #else
        *pageshift = PAGE_SHIFT;
 #endif
-       if (get_user_pages(vaddr, 1, write, 0, &page, NULL) <= 0)
+       if (get_user_pages(vaddr, 1, write ? FOLL_WRITE : 0, &page, NULL) <= 0)
                return -EFAULT;
        *paddr = page_to_phys(page);
        put_page(page);
index 1525870f460aa65d0aa1b24baf119cb490ca35ed..33741ad4a74a0ee19af50cac294d52f5aa5726ab 100644 (file)
@@ -283,7 +283,7 @@ static void gru_unload_mm_tracker(struct gru_state *gru,
        spin_lock(&gru->gs_asid_lock);
        BUG_ON((asids->mt_ctxbitmap & ctxbitmap) != ctxbitmap);
        asids->mt_ctxbitmap ^= ctxbitmap;
-       gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n",
+       gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum %d, asidmap 0x%lx\n",
                gru->gs_gid, gts, gms, gts->ts_ctxnum, gms->ms_asidmap[0]);
        spin_unlock(&gru->gs_asid_lock);
        spin_unlock(&gms->ms_asid_lock);
index a8cee33ae8d2eaa6187945026e307168c96d0b45..b3fa738ae0050b48ba3f07ef3a02460d72898ea4 100644 (file)
@@ -431,6 +431,12 @@ int vmci_doorbell_create(struct vmci_handle *handle,
        if (vmci_handle_is_invalid(*handle)) {
                u32 context_id = vmci_get_context_id();
 
+               if (context_id == VMCI_INVALID_ID) {
+                       pr_warn("Failed to get context ID\n");
+                       result = VMCI_ERROR_NO_RESOURCES;
+                       goto free_mem;
+               }
+
                /* Let resource code allocate a free ID for us */
                new_handle = vmci_make_handle(context_id, VMCI_INVALID_ID);
        } else {
@@ -525,7 +531,7 @@ int vmci_doorbell_destroy(struct vmci_handle handle)
 
        entry = container_of(resource, struct dbell_entry, resource);
 
-       if (vmci_guest_code_active()) {
+       if (!hlist_unhashed(&entry->node)) {
                int result;
 
                dbell_index_table_remove(entry);
index 896be150e28fa5e0802f85e47cf882fe2ea4104d..d7eaf1eb11e7f3e67646dd7da053213a78fd35bd 100644 (file)
@@ -113,5 +113,5 @@ module_exit(vmci_drv_exit);
 
 MODULE_AUTHOR("VMware, Inc.");
 MODULE_DESCRIPTION("VMware Virtual Machine Communication Interface.");
-MODULE_VERSION("1.1.4.0-k");
+MODULE_VERSION("1.1.5.0-k");
 MODULE_LICENSE("GPL v2");
index c3335112e68c29cfe4a16eae0aabf4368682d357..709a872ed484a9da1ce620238c3222190c612f86 100644 (file)
@@ -46,6 +46,7 @@
 #include <asm/uaccess.h>
 
 #include "queue.h"
+#include "block.h"
 
 MODULE_ALIAS("mmc:block");
 #ifdef MODULE_PARAM_PREFIX
@@ -1786,7 +1787,7 @@ static void mmc_blk_packed_hdr_wrq_prep(struct mmc_queue_req *mqrq,
        struct mmc_blk_data *md = mq->data;
        struct mmc_packed *packed = mqrq->packed;
        bool do_rel_wr, do_data_tag;
-       u32 *packed_cmd_hdr;
+       __le32 *packed_cmd_hdr;
        u8 hdr_blocks;
        u8 i = 1;
 
index 3c15a75bae862d0466ad0ca43bef2b5e49ba13ed..342f1e3f301e9e6e7d0cc918f3f38aae32a88480 100644 (file)
@@ -31,7 +31,7 @@ enum mmc_packed_type {
 
 struct mmc_packed {
        struct list_head        list;
-       u32                     cmd_hdr[1024];
+       __le32                  cmd_hdr[1024];
        unsigned int            blocks;
        u8                      nr_entries;
        u8                      retries;
index 3486bc7fbb64a67a4cf1156c2ac7652541ef60bb..39fc5b2b96c59f826fb8819fb3415ea6c2ac8e99 100644 (file)
@@ -1263,6 +1263,16 @@ static int mmc_select_hs400es(struct mmc_card *card)
                goto out_err;
        }
 
+       if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400_1_2V)
+               err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120);
+
+       if (err && card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400_1_8V)
+               err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180);
+
+       /* If fails try again during next card power cycle */
+       if (err)
+               goto out_err;
+
        err = mmc_select_bus_width(card);
        if (err < 0)
                goto out_err;
@@ -1272,6 +1282,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
        if (err)
                goto out_err;
 
+       mmc_set_clock(host, card->ext_csd.hs_max_dtr);
+
        err = mmc_switch_status(card);
        if (err)
                goto out_err;
index 4106295527b9d0c5a4128f44e09c190791328ca9..6e9c0f8fddb1064c64c195812fdf8ad220728360 100644 (file)
@@ -1138,11 +1138,6 @@ static void sdmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
        dev_dbg(sdmmc_dev(host), "%s\n", __func__);
        mutex_lock(&ucr->dev_mutex);
 
-       if (rtsx_usb_card_exclusive_check(ucr, RTSX_USB_SD_CARD)) {
-               mutex_unlock(&ucr->dev_mutex);
-               return;
-       }
-
        sd_set_power_mode(host, ios->power_mode);
        sd_set_bus_width(host, ios->bus_width);
        sd_set_timing(host, ios->timing, &host->ddr_mode);
@@ -1314,6 +1309,7 @@ static void rtsx_usb_update_led(struct work_struct *work)
                container_of(work, struct rtsx_usb_sdmmc, led_work);
        struct rtsx_ucr *ucr = host->ucr;
 
+       pm_runtime_get_sync(sdmmc_dev(host));
        mutex_lock(&ucr->dev_mutex);
 
        if (host->led.brightness == LED_OFF)
@@ -1322,6 +1318,7 @@ static void rtsx_usb_update_led(struct work_struct *work)
                rtsx_usb_turn_on_led(ucr);
 
        mutex_unlock(&ucr->dev_mutex);
+       pm_runtime_put(sdmmc_dev(host));
 }
 #endif
 
index 1f54fd8755c8e026fd8fb99f7fdb1cbc154acc87..7123ef96ed18523c88553146035103f3517bd372 100644 (file)
@@ -346,7 +346,8 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
        struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
        u32 data;
 
-       if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)) {
+       if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE ||
+                       reg == SDHCI_INT_STATUS)) {
                if ((val & SDHCI_INT_CARD_INT) && !esdhc_is_usdhc(imx_data)) {
                        /*
                         * Clear and then set D3CD bit to avoid missing the
@@ -555,6 +556,25 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
        esdhc_clrset_le(host, 0xffff, val, reg);
 }
 
+static u8 esdhc_readb_le(struct sdhci_host *host, int reg)
+{
+       u8 ret;
+       u32 val;
+
+       switch (reg) {
+       case SDHCI_HOST_CONTROL:
+               val = readl(host->ioaddr + reg);
+
+               ret = val & SDHCI_CTRL_LED;
+               ret |= (val >> 5) & SDHCI_CTRL_DMA_MASK;
+               ret |= (val & ESDHC_CTRL_4BITBUS);
+               ret |= (val & ESDHC_CTRL_8BITBUS) << 3;
+               return ret;
+       }
+
+       return readb(host->ioaddr + reg);
+}
+
 static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg)
 {
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -947,6 +967,7 @@ static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
 static struct sdhci_ops sdhci_esdhc_ops = {
        .read_l = esdhc_readl_le,
        .read_w = esdhc_readw_le,
+       .read_b = esdhc_readb_le,
        .write_l = esdhc_writel_le,
        .write_w = esdhc_writew_le,
        .write_b = esdhc_writeb_le,
index da8e40af6f85e82143bb222f38d5663a2dbf1766..410a55b1c25fe5f2ef32ff8f2d26c4c3286f4b71 100644 (file)
@@ -250,7 +250,7 @@ static void sdhci_arasan_hs400_enhanced_strobe(struct mmc_host *mmc,
        writel(vendor, host->ioaddr + SDHCI_ARASAN_VENDOR_REGISTER);
 }
 
-void sdhci_arasan_reset(struct sdhci_host *host, u8 mask)
+static void sdhci_arasan_reset(struct sdhci_host *host, u8 mask)
 {
        u8 ctrl;
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -265,6 +265,28 @@ void sdhci_arasan_reset(struct sdhci_host *host, u8 mask)
        }
 }
 
+static int sdhci_arasan_voltage_switch(struct mmc_host *mmc,
+                                      struct mmc_ios *ios)
+{
+       switch (ios->signal_voltage) {
+       case MMC_SIGNAL_VOLTAGE_180:
+               /*
+                * Plese don't switch to 1V8 as arasan,5.1 doesn't
+                * actually refer to this setting to indicate the
+                * signal voltage and the state machine will be broken
+                * actually if we force to enable 1V8. That's something
+                * like broken quirk but we could work around here.
+                */
+               return 0;
+       case MMC_SIGNAL_VOLTAGE_330:
+       case MMC_SIGNAL_VOLTAGE_120:
+               /* We don't support 3V3 and 1V2 */
+               break;
+       }
+
+       return -EINVAL;
+}
+
 static struct sdhci_ops sdhci_arasan_ops = {
        .set_clock = sdhci_arasan_set_clock,
        .get_max_clock = sdhci_pltfm_clk_get_max_clock,
@@ -661,6 +683,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 
                host->mmc_host_ops.hs400_enhanced_strobe =
                                        sdhci_arasan_hs400_enhanced_strobe;
+               host->mmc_host_ops.start_signal_voltage_switch =
+                                       sdhci_arasan_voltage_switch;
        }
 
        ret = sdhci_add_host(host);
index 72a1f1f5180a9cc12f5bdc7fffaa03685500f6e0..1d9e00a00e9fc986eb0bb01ff55a0966f03f7d5c 100644 (file)
 #include "sdhci-pci.h"
 #include "sdhci-pci-o2micro.h"
 
+static int sdhci_pci_enable_dma(struct sdhci_host *host);
+static void sdhci_pci_set_bus_width(struct sdhci_host *host, int width);
+static void sdhci_pci_hw_reset(struct sdhci_host *host);
+static int sdhci_pci_select_drive_strength(struct sdhci_host *host,
+                                          struct mmc_card *card,
+                                          unsigned int max_dtr, int host_drv,
+                                          int card_drv, int *drv_type);
+
 /*****************************************************************************\
  *                                                                           *
  * Hardware specific quirk handling                                          *
@@ -390,6 +398,45 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
        return 0;
 }
 
+#define SDHCI_INTEL_PWR_TIMEOUT_CNT    20
+#define SDHCI_INTEL_PWR_TIMEOUT_UDELAY 100
+
+static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
+                                 unsigned short vdd)
+{
+       int cntr;
+       u8 reg;
+
+       sdhci_set_power(host, mode, vdd);
+
+       if (mode == MMC_POWER_OFF)
+               return;
+
+       /*
+        * Bus power might not enable after D3 -> D0 transition due to the
+        * present state not yet having propagated. Retry for up to 2ms.
+        */
+       for (cntr = 0; cntr < SDHCI_INTEL_PWR_TIMEOUT_CNT; cntr++) {
+               reg = sdhci_readb(host, SDHCI_POWER_CONTROL);
+               if (reg & SDHCI_POWER_ON)
+                       break;
+               udelay(SDHCI_INTEL_PWR_TIMEOUT_UDELAY);
+               reg |= SDHCI_POWER_ON;
+               sdhci_writeb(host, reg, SDHCI_POWER_CONTROL);
+       }
+}
+
+static const struct sdhci_ops sdhci_intel_byt_ops = {
+       .set_clock              = sdhci_set_clock,
+       .set_power              = sdhci_intel_set_power,
+       .enable_dma             = sdhci_pci_enable_dma,
+       .set_bus_width          = sdhci_pci_set_bus_width,
+       .reset                  = sdhci_reset,
+       .set_uhs_signaling      = sdhci_set_uhs_signaling,
+       .hw_reset               = sdhci_pci_hw_reset,
+       .select_drive_strength  = sdhci_pci_select_drive_strength,
+};
+
 static const struct sdhci_pci_fixes sdhci_intel_byt_emmc = {
        .allow_runtime_pm = true,
        .probe_slot     = byt_emmc_probe_slot,
@@ -397,6 +444,7 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_emmc = {
        .quirks2        = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
                          SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 |
                          SDHCI_QUIRK2_STOP_WITH_TC,
+       .ops            = &sdhci_intel_byt_ops,
 };
 
 static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {
@@ -405,6 +453,7 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {
                        SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
        .allow_runtime_pm = true,
        .probe_slot     = byt_sdio_probe_slot,
+       .ops            = &sdhci_intel_byt_ops,
 };
 
 static const struct sdhci_pci_fixes sdhci_intel_byt_sd = {
@@ -415,6 +464,7 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sd = {
        .allow_runtime_pm = true,
        .own_cd_for_runtime_pm = true,
        .probe_slot     = byt_sd_probe_slot,
+       .ops            = &sdhci_intel_byt_ops,
 };
 
 /* Define Host controllers for Intel Merrifield platform */
@@ -1648,7 +1698,9 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
        }
 
        host->hw_name = "PCI";
-       host->ops = &sdhci_pci_ops;
+       host->ops = chip->fixes && chip->fixes->ops ?
+                   chip->fixes->ops :
+                   &sdhci_pci_ops;
        host->quirks = chip->quirks;
        host->quirks2 = chip->quirks2;
 
index 9c7c08b9322387f7914024ed404055ed7ba158cb..6bccf56bc5fff654d203ead074a6a53ae0409623 100644 (file)
@@ -65,6 +65,8 @@ struct sdhci_pci_fixes {
 
        int                     (*suspend) (struct sdhci_pci_chip *);
        int                     (*resume) (struct sdhci_pci_chip *);
+
+       const struct sdhci_ops  *ops;
 };
 
 struct sdhci_pci_slot {
index dd1938d341f7ae2af1de80bfa4f39678b865441d..d0f5c05fbc195fcf568d482efa0c5a41a0754a44 100644 (file)
@@ -315,7 +315,7 @@ static void pxav3_set_power(struct sdhci_host *host, unsigned char mode,
        struct mmc_host *mmc = host->mmc;
        u8 pwr = host->pwr;
 
-       sdhci_set_power(host, mode, vdd);
+       sdhci_set_power_noreg(host, mode, vdd);
 
        if (host->pwr == pwr)
                return;
index 48055666c6557a98286dd6d07118c82a218f5c76..71654b90227f6c1eac7115c84276d8490e02e550 100644 (file)
@@ -687,7 +687,7 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
                         * host->clock is in Hz.  target_timeout is in us.
                         * Hence, us = 1000000 * cycles / Hz.  Round up.
                         */
-                       val = 1000000 * data->timeout_clks;
+                       val = 1000000ULL * data->timeout_clks;
                        if (do_div(val, host->clock))
                                target_timeout++;
                        target_timeout += val;
@@ -1077,6 +1077,10 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
        /* Initially, a command has no error */
        cmd->error = 0;
 
+       if ((host->quirks2 & SDHCI_QUIRK2_STOP_WITH_TC) &&
+           cmd->opcode == MMC_STOP_TRANSMISSION)
+               cmd->flags |= MMC_RSP_BUSY;
+
        /* Wait max 10 ms */
        timeout = 10;
 
@@ -1390,8 +1394,8 @@ static void sdhci_set_power_reg(struct sdhci_host *host, unsigned char mode,
                sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
 }
 
-void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
-                    unsigned short vdd)
+void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
+                          unsigned short vdd)
 {
        u8 pwr = 0;
 
@@ -1455,20 +1459,17 @@ void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
                        mdelay(10);
        }
 }
-EXPORT_SYMBOL_GPL(sdhci_set_power);
+EXPORT_SYMBOL_GPL(sdhci_set_power_noreg);
 
-static void __sdhci_set_power(struct sdhci_host *host, unsigned char mode,
-                             unsigned short vdd)
+void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
+                    unsigned short vdd)
 {
-       struct mmc_host *mmc = host->mmc;
-
-       if (host->ops->set_power)
-               host->ops->set_power(host, mode, vdd);
-       else if (!IS_ERR(mmc->supply.vmmc))
-               sdhci_set_power_reg(host, mode, vdd);
+       if (IS_ERR(host->mmc->supply.vmmc))
+               sdhci_set_power_noreg(host, mode, vdd);
        else
-               sdhci_set_power(host, mode, vdd);
+               sdhci_set_power_reg(host, mode, vdd);
 }
+EXPORT_SYMBOL_GPL(sdhci_set_power);
 
 /*****************************************************************************\
  *                                                                           *
@@ -1609,7 +1610,10 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                }
        }
 
-       __sdhci_set_power(host, ios->power_mode, ios->vdd);
+       if (host->ops->set_power)
+               host->ops->set_power(host, ios->power_mode, ios->vdd);
+       else
+               sdhci_set_power(host, ios->power_mode, ios->vdd);
 
        if (host->ops->platform_send_init_74_clocks)
                host->ops->platform_send_init_74_clocks(host, ios->power_mode);
@@ -2409,7 +2413,7 @@ static void sdhci_timeout_data_timer(unsigned long data)
  *                                                                           *
 \*****************************************************************************/
 
-static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask)
+static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
 {
        if (!host->cmd) {
                /*
@@ -2453,11 +2457,6 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask)
                return;
        }
 
-       if ((host->quirks2 & SDHCI_QUIRK2_STOP_WITH_TC) &&
-           !(host->cmd->flags & MMC_RSP_BUSY) && !host->data &&
-           host->cmd->opcode == MMC_STOP_TRANSMISSION)
-               *mask &= ~SDHCI_INT_DATA_END;
-
        if (intmask & SDHCI_INT_RESPONSE)
                sdhci_finish_command(host);
 }
@@ -2680,8 +2679,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
                }
 
                if (intmask & SDHCI_INT_CMD_MASK)
-                       sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK,
-                                     &intmask);
+                       sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK);
 
                if (intmask & SDHCI_INT_DATA_MASK)
                        sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK);
index c722cd23205cd2306ed42feb20f17173493d049e..766df17fb7eb039a8f6ef85cb9e44d6186ad9995 100644 (file)
@@ -683,6 +683,8 @@ u16 sdhci_calc_clk(struct sdhci_host *host, unsigned int clock,
 void sdhci_set_clock(struct sdhci_host *host, unsigned int clock);
 void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
                     unsigned short vdd);
+void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
+                          unsigned short vdd);
 void sdhci_set_bus_width(struct sdhci_host *host, int width);
 void sdhci_reset(struct sdhci_host *host, u8 mask);
 void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing);
index 95c4048a371e87b6f5517b01109b19db85cedc56..388e46be6ad92805f2a6633da6960d8c56b1b837 100644 (file)
@@ -741,6 +741,7 @@ static int try_recover_peb(struct ubi_volume *vol, int pnum, int lnum,
                goto out_put;
        }
 
+       vid_hdr = ubi_get_vid_hdr(vidb);
        ubi_assert(vid_hdr->vol_type == UBI_VID_DYNAMIC);
 
        mutex_lock(&ubi->buf_mutex);
index d6384d9657885c31c01e8fa1a5a2ed82530b0891..c1f5c29e458ef86305376fa7b404f9c5b8e05681 100644 (file)
@@ -287,7 +287,7 @@ static int update_vol(struct ubi_device *ubi, struct ubi_attach_info *ai,
 
                /* new_aeb is newer */
                if (cmp_res & 1) {
-                       victim = ubi_alloc_aeb(ai, aeb->ec, aeb->pnum);
+                       victim = ubi_alloc_aeb(ai, aeb->pnum, aeb->ec);
                        if (!victim)
                                return -ENOMEM;
 
@@ -707,11 +707,11 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
                             fmvhdr->vol_type,
                             be32_to_cpu(fmvhdr->last_eb_bytes));
 
-               if (!av)
-                       goto fail_bad;
-               if (PTR_ERR(av) == -EINVAL) {
-                       ubi_err(ubi, "volume (ID %i) already exists",
-                               fmvhdr->vol_id);
+               if (IS_ERR(av)) {
+                       if (PTR_ERR(av) == -EEXIST)
+                               ubi_err(ubi, "volume (ID %i) already exists",
+                                       fmvhdr->vol_id);
+
                        goto fail_bad;
                }
 
index 8b2b740d6679e61f544a990164eb9e8f2e614f42..124c2432ac9cb3d6e0a696023507f5131774c282 100644 (file)
@@ -89,7 +89,7 @@ config NVDIMM_PFN
          Select Y if unsure
 
 config NVDIMM_DAX
-       tristate "NVDIMM DAX: Raw access to persistent memory"
+       bool "NVDIMM DAX: Raw access to persistent memory"
        default LIBNVDIMM
        depends on NVDIMM_PFN
        help
index 3509cff68ef9c73e1c5bfe79829acfc4b4467cdf..abe5c6bc756c255193d803039973971368b9471d 100644 (file)
@@ -2176,12 +2176,14 @@ static struct device **scan_labels(struct nd_region *nd_region)
        return devs;
 
  err:
-       for (i = 0; devs[i]; i++)
-               if (is_nd_blk(&nd_region->dev))
-                       namespace_blk_release(devs[i]);
-               else
-                       namespace_pmem_release(devs[i]);
-       kfree(devs);
+       if (devs) {
+               for (i = 0; devs[i]; i++)
+                       if (is_nd_blk(&nd_region->dev))
+                               namespace_blk_release(devs[i]);
+                       else
+                               namespace_pmem_release(devs[i]);
+               kfree(devs);
+       }
        return NULL;
 }
 
index 42b3a82170733971a3b1d000b8de4979f0ad311b..24618431a14bae7e891438b3601d017d1d34db4d 100644 (file)
@@ -47,7 +47,7 @@ static struct nd_region *to_region(struct pmem_device *pmem)
        return to_nd_region(to_dev(pmem)->parent);
 }
 
-static void pmem_clear_poison(struct pmem_device *pmem, phys_addr_t offset,
+static int pmem_clear_poison(struct pmem_device *pmem, phys_addr_t offset,
                unsigned int len)
 {
        struct device *dev = to_dev(pmem);
@@ -62,8 +62,12 @@ static void pmem_clear_poison(struct pmem_device *pmem, phys_addr_t offset,
                                __func__, (unsigned long long) sector,
                                cleared / 512, cleared / 512 > 1 ? "s" : "");
                badblocks_clear(&pmem->bb, sector, cleared / 512);
+       } else {
+               return -EIO;
        }
+
        invalidate_pmem(pmem->virt_addr + offset, len);
+       return 0;
 }
 
 static void write_pmem(void *pmem_addr, struct page *page,
@@ -123,7 +127,7 @@ static int pmem_do_bvec(struct pmem_device *pmem, struct page *page,
                flush_dcache_page(page);
                write_pmem(pmem_addr, page, off, len);
                if (unlikely(bad_pmem)) {
-                       pmem_clear_poison(pmem, pmem_off, len);
+                       rc = pmem_clear_poison(pmem, pmem_off, len);
                        write_pmem(pmem_addr, page, off, len);
                }
        }
index 329381a28edf8a7e4b3bb4c6ca2da669ee9caa4a..79e679d12f3b3667ad815e0bd39ab428da6651ac 100644 (file)
@@ -554,7 +554,7 @@ int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id)
 
        /* gcc-4.4.4 (at least) has issues with initializers and anon unions */
        c.identify.opcode = nvme_admin_identify;
-       c.identify.cns = cpu_to_le32(1);
+       c.identify.cns = cpu_to_le32(NVME_ID_CNS_CTRL);
 
        *id = kmalloc(sizeof(struct nvme_id_ctrl), GFP_KERNEL);
        if (!*id)
@@ -572,7 +572,7 @@ static int nvme_identify_ns_list(struct nvme_ctrl *dev, unsigned nsid, __le32 *n
        struct nvme_command c = { };
 
        c.identify.opcode = nvme_admin_identify;
-       c.identify.cns = cpu_to_le32(2);
+       c.identify.cns = cpu_to_le32(NVME_ID_CNS_NS_ACTIVE_LIST);
        c.identify.nsid = cpu_to_le32(nsid);
        return nvme_submit_sync_cmd(dev->admin_q, &c, ns_list, 0x1000);
 }
@@ -900,9 +900,9 @@ static int nvme_revalidate_ns(struct nvme_ns *ns, struct nvme_id_ns **id)
                return -ENODEV;
        }
 
-       if (ns->ctrl->vs >= NVME_VS(1, 1))
+       if (ns->ctrl->vs >= NVME_VS(1, 1, 0))
                memcpy(ns->eui, (*id)->eui64, sizeof(ns->eui));
-       if (ns->ctrl->vs >= NVME_VS(1, 2))
+       if (ns->ctrl->vs >= NVME_VS(1, 2, 0))
                memcpy(ns->uuid, (*id)->nguid, sizeof(ns->uuid));
 
        return 0;
@@ -1086,6 +1086,8 @@ static int nvme_wait_ready(struct nvme_ctrl *ctrl, u64 cap, bool enabled)
        int ret;
 
        while ((ret = ctrl->ops->reg_read32(ctrl, NVME_REG_CSTS, &csts)) == 0) {
+               if (csts == ~0)
+                       return -ENODEV;
                if ((csts & NVME_CSTS_RDY) == bit)
                        break;
 
@@ -1240,7 +1242,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
        }
        page_shift = NVME_CAP_MPSMIN(cap) + 12;
 
-       if (ctrl->vs >= NVME_VS(1, 1))
+       if (ctrl->vs >= NVME_VS(1, 1, 0))
                ctrl->subsystem = NVME_CAP_NSSRC(cap);
 
        ret = nvme_identify_ctrl(ctrl, &id);
@@ -1840,7 +1842,7 @@ static void nvme_scan_work(struct work_struct *work)
                return;
 
        nn = le32_to_cpu(id->nn);
-       if (ctrl->vs >= NVME_VS(1, 1) &&
+       if (ctrl->vs >= NVME_VS(1, 1, 0) &&
            !(ctrl->quirks & NVME_QUIRK_IDENTIFY_CNS)) {
                if (!nvme_scan_ns_list(ctrl, nn))
                        goto done;
index 0fc99f0f257110a063f3e58722b2f0ec08da655e..0248d0e21feedb706b818b01cbfeea164322570c 100644 (file)
@@ -99,6 +99,7 @@ struct nvme_dev {
        dma_addr_t cmb_dma_addr;
        u64 cmb_size;
        u32 cmbsz;
+       u32 cmbloc;
        struct nvme_ctrl ctrl;
        struct completion ioq_wait;
 };
@@ -893,7 +894,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
                         "I/O %d QID %d timeout, reset controller\n",
                         req->tag, nvmeq->qid);
                nvme_dev_disable(dev, false);
-               queue_work(nvme_workq, &dev->reset_work);
+               nvme_reset(dev);
 
                /*
                 * Mark the request as handled, since the inline shutdown
@@ -1214,7 +1215,7 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
        u64 cap = lo_hi_readq(dev->bar + NVME_REG_CAP);
        struct nvme_queue *nvmeq;
 
-       dev->subsystem = readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 1) ?
+       dev->subsystem = readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 1, 0) ?
                                                NVME_CAP_NSSRC(cap) : 0;
 
        if (dev->subsystem &&
@@ -1291,7 +1292,7 @@ static void nvme_watchdog_timer(unsigned long data)
 
        /* Skip controllers under certain specific conditions. */
        if (nvme_should_reset(dev, csts)) {
-               if (queue_work(nvme_workq, &dev->reset_work))
+               if (!nvme_reset(dev))
                        dev_warn(dev->dev,
                                "Failed status: 0x%x, reset controller.\n",
                                csts);
@@ -1331,28 +1332,37 @@ static int nvme_create_io_queues(struct nvme_dev *dev)
        return ret >= 0 ? 0 : ret;
 }
 
+static ssize_t nvme_cmb_show(struct device *dev,
+                            struct device_attribute *attr,
+                            char *buf)
+{
+       struct nvme_dev *ndev = to_nvme_dev(dev_get_drvdata(dev));
+
+       return snprintf(buf, PAGE_SIZE, "cmbloc : x%08x\ncmbsz  : x%08x\n",
+                      ndev->cmbloc, ndev->cmbsz);
+}
+static DEVICE_ATTR(cmb, S_IRUGO, nvme_cmb_show, NULL);
+
 static void __iomem *nvme_map_cmb(struct nvme_dev *dev)
 {
        u64 szu, size, offset;
-       u32 cmbloc;
        resource_size_t bar_size;
        struct pci_dev *pdev = to_pci_dev(dev->dev);
        void __iomem *cmb;
        dma_addr_t dma_addr;
 
-       if (!use_cmb_sqes)
-               return NULL;
-
        dev->cmbsz = readl(dev->bar + NVME_REG_CMBSZ);
        if (!(NVME_CMB_SZ(dev->cmbsz)))
                return NULL;
+       dev->cmbloc = readl(dev->bar + NVME_REG_CMBLOC);
 
-       cmbloc = readl(dev->bar + NVME_REG_CMBLOC);
+       if (!use_cmb_sqes)
+               return NULL;
 
        szu = (u64)1 << (12 + 4 * NVME_CMB_SZU(dev->cmbsz));
        size = szu * NVME_CMB_SZ(dev->cmbsz);
-       offset = szu * NVME_CMB_OFST(cmbloc);
-       bar_size = pci_resource_len(pdev, NVME_CMB_BIR(cmbloc));
+       offset = szu * NVME_CMB_OFST(dev->cmbloc);
+       bar_size = pci_resource_len(pdev, NVME_CMB_BIR(dev->cmbloc));
 
        if (offset > bar_size)
                return NULL;
@@ -1365,7 +1375,7 @@ static void __iomem *nvme_map_cmb(struct nvme_dev *dev)
        if (size > bar_size - offset)
                size = bar_size - offset;
 
-       dma_addr = pci_resource_start(pdev, NVME_CMB_BIR(cmbloc)) + offset;
+       dma_addr = pci_resource_start(pdev, NVME_CMB_BIR(dev->cmbloc)) + offset;
        cmb = ioremap_wc(dma_addr, size);
        if (!cmb)
                return NULL;
@@ -1511,9 +1521,9 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
        return 0;
 }
 
-static void nvme_disable_io_queues(struct nvme_dev *dev)
+static void nvme_disable_io_queues(struct nvme_dev *dev, int queues)
 {
-       int pass, queues = dev->online_queues - 1;
+       int pass;
        unsigned long timeout;
        u8 opcode = nvme_admin_delete_sq;
 
@@ -1616,9 +1626,25 @@ static int nvme_pci_enable(struct nvme_dev *dev)
                        dev->q_depth);
        }
 
-       if (readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 2))
+       /*
+        * CMBs can currently only exist on >=1.2 PCIe devices. We only
+        * populate sysfs if a CMB is implemented. Note that we add the
+        * CMB attribute to the nvme_ctrl kobj which removes the need to remove
+        * it on exit. Since nvme_dev_attrs_group has no name we can pass
+        * NULL as final argument to sysfs_add_file_to_group.
+        */
+
+       if (readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 2, 0)) {
                dev->cmb = nvme_map_cmb(dev);
 
+               if (dev->cmbsz) {
+                       if (sysfs_add_file_to_group(&dev->ctrl.device->kobj,
+                                                   &dev_attr_cmb.attr, NULL))
+                               dev_warn(dev->dev,
+                                        "failed to add sysfs attribute for CMB\n");
+               }
+       }
+
        pci_enable_pcie_error_reporting(pdev);
        pci_save_state(pdev);
        return 0;
@@ -1649,7 +1675,7 @@ static void nvme_pci_disable(struct nvme_dev *dev)
 
 static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
 {
-       int i;
+       int i, queues;
        u32 csts = -1;
 
        del_timer_sync(&dev->watchdog_timer);
@@ -1660,6 +1686,7 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
                csts = readl(dev->bar + NVME_REG_CSTS);
        }
 
+       queues = dev->online_queues - 1;
        for (i = dev->queue_count - 1; i > 0; i--)
                nvme_suspend_queue(dev->queues[i]);
 
@@ -1671,7 +1698,7 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
                if (dev->queue_count)
                        nvme_suspend_queue(dev->queues[0]);
        } else {
-               nvme_disable_io_queues(dev);
+               nvme_disable_io_queues(dev, queues);
                nvme_disable_admin_queue(dev, shutdown);
        }
        nvme_pci_disable(dev);
@@ -1818,11 +1845,10 @@ static int nvme_reset(struct nvme_dev *dev)
 {
        if (!dev->ctrl.admin_q || blk_queue_dying(dev->ctrl.admin_q))
                return -ENODEV;
-
+       if (work_busy(&dev->reset_work))
+               return -ENODEV;
        if (!queue_work(nvme_workq, &dev->reset_work))
                return -EBUSY;
-
-       flush_work(&dev->reset_work);
        return 0;
 }
 
@@ -1846,7 +1872,12 @@ static int nvme_pci_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val)
 
 static int nvme_pci_reset_ctrl(struct nvme_ctrl *ctrl)
 {
-       return nvme_reset(to_nvme_dev(ctrl));
+       struct nvme_dev *dev = to_nvme_dev(ctrl);
+       int ret = nvme_reset(dev);
+
+       if (!ret)
+               flush_work(&dev->reset_work);
+       return ret;
 }
 
 static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = {
@@ -1940,7 +1971,7 @@ static void nvme_reset_notify(struct pci_dev *pdev, bool prepare)
        if (prepare)
                nvme_dev_disable(dev, false);
        else
-               queue_work(nvme_workq, &dev->reset_work);
+               nvme_reset(dev);
 }
 
 static void nvme_shutdown(struct pci_dev *pdev)
@@ -2009,7 +2040,7 @@ static int nvme_resume(struct device *dev)
        struct pci_dev *pdev = to_pci_dev(dev);
        struct nvme_dev *ndev = pci_get_drvdata(pdev);
 
-       queue_work(nvme_workq, &ndev->reset_work);
+       nvme_reset(ndev);
        return 0;
 }
 #endif
@@ -2048,7 +2079,7 @@ static pci_ers_result_t nvme_slot_reset(struct pci_dev *pdev)
 
        dev_info(dev->ctrl.device, "restart after slot reset\n");
        pci_restore_state(pdev);
-       queue_work(nvme_workq, &dev->reset_work);
+       nvme_reset(dev);
        return PCI_ERS_RESULT_RECOVERED;
 }
 
index c2a0a1c7d05d1571c939f531d3619b5800cadbd6..3eaa4d27801ee17c7e1ccaa1b8a489844cb6f5bc 100644 (file)
@@ -606,7 +606,7 @@ static int nvme_fill_device_id_eui64(struct nvme_ns *ns, struct sg_io_hdr *hdr,
        eui = id_ns->eui64;
        len = sizeof(id_ns->eui64);
 
-       if (ns->ctrl->vs >= NVME_VS(1, 2)) {
+       if (ns->ctrl->vs >= NVME_VS(1, 2, 0)) {
                if (bitmap_empty(eui, len * 8)) {
                        eui = id_ns->nguid;
                        len = sizeof(id_ns->nguid);
@@ -679,7 +679,7 @@ static int nvme_trans_device_id_page(struct nvme_ns *ns, struct sg_io_hdr *hdr,
 {
        int res;
 
-       if (ns->ctrl->vs >= NVME_VS(1, 1)) {
+       if (ns->ctrl->vs >= NVME_VS(1, 1, 0)) {
                res = nvme_fill_device_id_eui64(ns, hdr, resp, alloc_len);
                if (res != -EOPNOTSUPP)
                        return res;
index 7ab9c9381b989578cb5faaf6054721ace331c631..6fe4c48a21e46520ad1e0e569a9773813ed7e233 100644 (file)
@@ -199,7 +199,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
         */
 
        /* we support multiple ports and multiples hosts: */
-       id->mic = (1 << 0) | (1 << 1);
+       id->cmic = (1 << 0) | (1 << 1);
 
        /* no limit on data transfer sizes for now */
        id->mdts = 0;
@@ -511,13 +511,13 @@ int nvmet_parse_admin_cmd(struct nvmet_req *req)
        case nvme_admin_identify:
                req->data_len = 4096;
                switch (le32_to_cpu(cmd->identify.cns)) {
-               case 0x00:
+               case NVME_ID_CNS_NS:
                        req->execute = nvmet_execute_identify_ns;
                        return 0;
-               case 0x01:
+               case NVME_ID_CNS_CTRL:
                        req->execute = nvmet_execute_identify_ctrl;
                        return 0;
-               case 0x02:
+               case NVME_ID_CNS_NS_ACTIVE_LIST:
                        req->execute = nvmet_execute_identify_nslist;
                        return 0;
                }
index 6559d5afa7bfd9f808281658f686429c53fc7903..b4cacb6f02583740933ac63c42af32a7377f6687 100644 (file)
@@ -882,7 +882,7 @@ struct nvmet_subsys *nvmet_subsys_alloc(const char *subsysnqn,
        if (!subsys)
                return NULL;
 
-       subsys->ver = (1 << 16) | (2 << 8) | 1; /* NVMe 1.2.1 */
+       subsys->ver = NVME_VS(1, 2, 1); /* NVMe 1.2.1 */
 
        switch (type) {
        case NVME_NQN_NVME:
index 6f65646e89cfd9bc21a95946bfa4fbbe26eb835d..12f39eea569f2fb33cec45884c188d0ad8ae2493 100644 (file)
@@ -54,7 +54,7 @@ static void nvmet_format_discovery_entry(struct nvmf_disc_rsp_page_hdr *hdr,
        /* we support only dynamic controllers */
        e->cntlid = cpu_to_le16(NVME_CNTLID_DYNAMIC);
        e->asqsz = cpu_to_le16(NVMF_AQ_DEPTH);
-       e->nqntype = type;
+       e->subtype = type;
        memcpy(e->trsvcid, port->disc_addr.trsvcid, NVMF_TRSVCID_SIZE);
        memcpy(e->traddr, port->disc_addr.traddr, NVMF_TRADDR_SIZE);
        memcpy(e->tsas.common, port->disc_addr.tsas.common, NVMF_TSAS_SIZE);
@@ -187,7 +187,7 @@ int nvmet_parse_discovery_cmd(struct nvmet_req *req)
        case nvme_admin_identify:
                req->data_len = 4096;
                switch (le32_to_cpu(cmd->identify.cns)) {
-               case 0x01:
+               case NVME_ID_CNS_CTRL:
                        req->execute =
                                nvmet_execute_identify_disc_ctrl;
                        return 0;
index 2cb7315e26d089701679e23a7fc3f8a9ce74e4cf..6537079963424b09bba4df9f0de93bd2a1e5820e 100644 (file)
@@ -247,6 +247,7 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
 
        pp = &pcie->pp;
        pp->dev = dev;
+       pcie->drvdata = match->data;
        pp->ops = pcie->drvdata->ops;
 
        dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
@@ -256,7 +257,6 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
                return PTR_ERR(pcie->pp.dbi_base);
        }
 
-       pcie->drvdata = match->data;
        pcie->lut = pcie->pp.dbi_base + pcie->drvdata->lut_offset;
 
        if (!ls_pcie_is_bridge(pcie))
index 537f58a664fa230d3f6496ff68f4e7495d0f5952..8df6312ed3000a9c0587f318416e20f2329f55cc 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
  *
- * Authors: Joao Pinto <jpinto@synopsys.com>
+ * Authors: Joao Pinto <jpmpinto@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
index bfdd0744b686abdb6d76fafd5132da1c294a7f6c..ad70507cfb566a2291498d4ba723e1a5a4aebd3c 100644 (file)
@@ -610,6 +610,7 @@ static int msi_verify_entries(struct pci_dev *dev)
  * msi_capability_init - configure device's MSI capability structure
  * @dev: pointer to the pci_dev data structure of MSI device function
  * @nvec: number of interrupts to allocate
+ * @affinity: flag to indicate cpu irq affinity mask should be set
  *
  * Setup the MSI capability structure of the device with the requested
  * number of interrupts.  A return value of zero indicates the successful
@@ -752,6 +753,7 @@ static void msix_program_entries(struct pci_dev *dev,
  * @dev: pointer to the pci_dev data structure of MSI-X device function
  * @entries: pointer to an array of struct msix_entry entries
  * @nvec: number of @entries
+ * @affinity: flag to indicate cpu irq affinity mask should be set
  *
  * Setup the MSI-X capability structure of device function with a
  * single MSI-X irq. A return of zero indicates the successful setup of
index c2ac7646b99f4b50cfec9a2d899ba53c55c238c3..a8ac4bcef2c04ad19247a27764f798726bc68892 100644 (file)
@@ -1011,7 +1011,7 @@ xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu,
        rc = acpi_dev_get_resources(adev, &resource_list,
                                    acpi_pmu_dev_add_resource, &res);
        acpi_dev_free_resource_list(&resource_list);
-       if (rc < 0 || IS_ERR(&res)) {
+       if (rc < 0) {
                dev_err(dev, "PMU type %d: No resource address found\n", type);
                goto err;
        }
index e1ab864e1a7f06f7600a435ed4ed80e8513d5336..c8c72e8259d38bc47c83a4222c7311f6e97e7036 100644 (file)
@@ -151,21 +151,21 @@ FUNC_GROUP_DECL(GPID0, F19, E21);
 
 #define GPID2_DESC      SIG_DESC_SET(SCU8C, 9)
 
-#define D20 26
+#define F20 26
 SIG_EXPR_LIST_DECL_SINGLE(SD2DAT0, SD2, SD2_DESC);
 SIG_EXPR_DECL(GPID2IN, GPID2, GPID2_DESC);
 SIG_EXPR_DECL(GPID2IN, GPID, GPID_DESC);
 SIG_EXPR_LIST_DECL_DUAL(GPID2IN, GPID2, GPID);
-MS_PIN_DECL(D20, GPIOD2, SD2DAT0, GPID2IN);
+MS_PIN_DECL(F20, GPIOD2, SD2DAT0, GPID2IN);
 
-#define D21 27
+#define D20 27
 SIG_EXPR_LIST_DECL_SINGLE(SD2DAT1, SD2, SD2_DESC);
 SIG_EXPR_DECL(GPID2OUT, GPID2, GPID2_DESC);
 SIG_EXPR_DECL(GPID2OUT, GPID, GPID_DESC);
 SIG_EXPR_LIST_DECL_DUAL(GPID2OUT, GPID2, GPID);
-MS_PIN_DECL(D21, GPIOD3, SD2DAT1, GPID2OUT);
+MS_PIN_DECL(D20, GPIOD3, SD2DAT1, GPID2OUT);
 
-FUNC_GROUP_DECL(GPID2, D20, D21);
+FUNC_GROUP_DECL(GPID2, F20, D20);
 
 #define GPIE_DESC      SIG_DESC_SET(HW_STRAP1, 21)
 #define GPIE0_DESC     SIG_DESC_SET(SCU8C, 12)
@@ -182,28 +182,88 @@ SIG_EXPR_LIST_DECL_SINGLE(NDCD3, NDCD3, SIG_DESC_SET(SCU80, 17));
 SIG_EXPR_DECL(GPIE0OUT, GPIE0, GPIE0_DESC);
 SIG_EXPR_DECL(GPIE0OUT, GPIE, GPIE_DESC);
 SIG_EXPR_LIST_DECL_DUAL(GPIE0OUT, GPIE0, GPIE);
-MS_PIN_DECL(C20, GPIE0, NDCD3, GPIE0OUT);
+MS_PIN_DECL(C20, GPIOE1, NDCD3, GPIE0OUT);
 
 FUNC_GROUP_DECL(GPIE0, B20, C20);
 
-#define SPI1_DESC      SIG_DESC_SET(HW_STRAP1, 13)
+#define SPI1_DESC              { HW_STRAP1, GENMASK(13, 12), 1, 0 }
+#define SPI1DEBUG_DESC         { HW_STRAP1, GENMASK(13, 12), 2, 0 }
+#define SPI1PASSTHRU_DESC      { HW_STRAP1, GENMASK(13, 12), 3, 0 }
+
 #define C18 64
-SIG_EXPR_LIST_DECL_SINGLE(SYSCS, SPI1, COND1, SPI1_DESC);
+SIG_EXPR_DECL(SYSCS, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SYSCS, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL_DUAL(SYSCS, SPI1DEBUG, SPI1PASSTHRU);
 SS_PIN_DECL(C18, GPIOI0, SYSCS);
 
 #define E15 65
-SIG_EXPR_LIST_DECL_SINGLE(SYSCK, SPI1, COND1, SPI1_DESC);
+SIG_EXPR_DECL(SYSCK, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SYSCK, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL_DUAL(SYSCK, SPI1DEBUG, SPI1PASSTHRU);
 SS_PIN_DECL(E15, GPIOI1, SYSCK);
 
-#define A14 66
-SIG_EXPR_LIST_DECL_SINGLE(SYSMOSI, SPI1, COND1, SPI1_DESC);
-SS_PIN_DECL(A14, GPIOI2, SYSMOSI);
+#define B16 66
+SIG_EXPR_DECL(SYSMOSI, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SYSMOSI, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL_DUAL(SYSMOSI, SPI1DEBUG, SPI1PASSTHRU);
+SS_PIN_DECL(B16, GPIOI2, SYSMOSI);
 
 #define C16 67
-SIG_EXPR_LIST_DECL_SINGLE(SYSMISO, SPI1, COND1, SPI1_DESC);
+SIG_EXPR_DECL(SYSMISO, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SYSMISO, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL_DUAL(SYSMISO, SPI1DEBUG, SPI1PASSTHRU);
 SS_PIN_DECL(C16, GPIOI3, SYSMISO);
 
-FUNC_GROUP_DECL(SPI1, C18, E15, A14, C16);
+#define VB_DESC        SIG_DESC_SET(HW_STRAP1, 5)
+
+#define B15 68
+SIG_EXPR_DECL(SPI1CS0, SPI1, COND1, SPI1_DESC);
+SIG_EXPR_DECL(SPI1CS0, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SPI1CS0, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL(SPI1CS0, SIG_EXPR_PTR(SPI1CS0, SPI1),
+                           SIG_EXPR_PTR(SPI1CS0, SPI1DEBUG),
+                           SIG_EXPR_PTR(SPI1CS0, SPI1PASSTHRU));
+SIG_EXPR_LIST_DECL_SINGLE(VBCS, VGABIOSROM, COND1, VB_DESC);
+MS_PIN_DECL(B15, GPIOI4, SPI1CS0, VBCS);
+
+#define C15 69
+SIG_EXPR_DECL(SPI1CK, SPI1, COND1, SPI1_DESC);
+SIG_EXPR_DECL(SPI1CK, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SPI1CK, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL(SPI1CK, SIG_EXPR_PTR(SPI1CK, SPI1),
+                           SIG_EXPR_PTR(SPI1CK, SPI1DEBUG),
+                           SIG_EXPR_PTR(SPI1CK, SPI1PASSTHRU));
+SIG_EXPR_LIST_DECL_SINGLE(VBCK, VGABIOSROM, COND1, VB_DESC);
+MS_PIN_DECL(C15, GPIOI5, SPI1CK, VBCK);
+
+#define A14 70
+SIG_EXPR_DECL(SPI1MOSI, SPI1, COND1, SPI1_DESC);
+SIG_EXPR_DECL(SPI1MOSI, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SPI1MOSI, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL(SPI1MOSI, SIG_EXPR_PTR(SPI1MOSI, SPI1),
+                           SIG_EXPR_PTR(SPI1MOSI, SPI1DEBUG),
+                           SIG_EXPR_PTR(SPI1MOSI, SPI1PASSTHRU));
+SIG_EXPR_LIST_DECL_SINGLE(VBMOSI, VGABIOSROM, COND1, VB_DESC);
+MS_PIN_DECL(A14, GPIOI6, SPI1MOSI, VBMOSI);
+
+#define A15 71
+SIG_EXPR_DECL(SPI1MISO, SPI1, COND1, SPI1_DESC);
+SIG_EXPR_DECL(SPI1MISO, SPI1DEBUG, COND1, SPI1DEBUG_DESC);
+SIG_EXPR_DECL(SPI1MISO, SPI1PASSTHRU, COND1, SPI1PASSTHRU_DESC);
+SIG_EXPR_LIST_DECL(SPI1MISO, SIG_EXPR_PTR(SPI1MISO, SPI1),
+                           SIG_EXPR_PTR(SPI1MISO, SPI1DEBUG),
+                           SIG_EXPR_PTR(SPI1MISO, SPI1PASSTHRU));
+SIG_EXPR_LIST_DECL_SINGLE(VBMISO, VGABIOSROM, COND1, VB_DESC);
+MS_PIN_DECL(A15, GPIOI7, SPI1MISO, VBMISO);
+
+FUNC_GROUP_DECL(SPI1, B15, C15, A14, A15);
+FUNC_GROUP_DECL(SPI1DEBUG, C18, E15, B16, C16, B15, C15, A14, A15);
+FUNC_GROUP_DECL(SPI1PASSTHRU, C18, E15, B16, C16, B15, C15, A14, A15);
+FUNC_GROUP_DECL(VGABIOSROM, B15, C15, A14, A15);
+
+#define R2 72
+SIG_EXPR_LIST_DECL_SINGLE(SGPMCK, SGPM, SIG_DESC_SET(SCU84, 8));
+SS_PIN_DECL(R2, GPIOJ0, SGPMCK);
 
 #define L2 73
 SIG_EXPR_LIST_DECL_SINGLE(SGPMLD, SGPM, SIG_DESC_SET(SCU84, 9));
@@ -580,6 +640,7 @@ static struct pinctrl_pin_desc aspeed_g5_pins[ASPEED_G5_NR_PINS] = {
        ASPEED_PINCTRL_PIN(A12),
        ASPEED_PINCTRL_PIN(A13),
        ASPEED_PINCTRL_PIN(A14),
+       ASPEED_PINCTRL_PIN(A15),
        ASPEED_PINCTRL_PIN(A2),
        ASPEED_PINCTRL_PIN(A3),
        ASPEED_PINCTRL_PIN(A4),
@@ -592,6 +653,8 @@ static struct pinctrl_pin_desc aspeed_g5_pins[ASPEED_G5_NR_PINS] = {
        ASPEED_PINCTRL_PIN(B12),
        ASPEED_PINCTRL_PIN(B13),
        ASPEED_PINCTRL_PIN(B14),
+       ASPEED_PINCTRL_PIN(B15),
+       ASPEED_PINCTRL_PIN(B16),
        ASPEED_PINCTRL_PIN(B2),
        ASPEED_PINCTRL_PIN(B20),
        ASPEED_PINCTRL_PIN(B3),
@@ -603,6 +666,7 @@ static struct pinctrl_pin_desc aspeed_g5_pins[ASPEED_G5_NR_PINS] = {
        ASPEED_PINCTRL_PIN(C12),
        ASPEED_PINCTRL_PIN(C13),
        ASPEED_PINCTRL_PIN(C14),
+       ASPEED_PINCTRL_PIN(C15),
        ASPEED_PINCTRL_PIN(C16),
        ASPEED_PINCTRL_PIN(C18),
        ASPEED_PINCTRL_PIN(C2),
@@ -614,7 +678,6 @@ static struct pinctrl_pin_desc aspeed_g5_pins[ASPEED_G5_NR_PINS] = {
        ASPEED_PINCTRL_PIN(D10),
        ASPEED_PINCTRL_PIN(D2),
        ASPEED_PINCTRL_PIN(D20),
-       ASPEED_PINCTRL_PIN(D21),
        ASPEED_PINCTRL_PIN(D4),
        ASPEED_PINCTRL_PIN(D5),
        ASPEED_PINCTRL_PIN(D6),
@@ -630,6 +693,7 @@ static struct pinctrl_pin_desc aspeed_g5_pins[ASPEED_G5_NR_PINS] = {
        ASPEED_PINCTRL_PIN(E7),
        ASPEED_PINCTRL_PIN(E9),
        ASPEED_PINCTRL_PIN(F19),
+       ASPEED_PINCTRL_PIN(F20),
        ASPEED_PINCTRL_PIN(F9),
        ASPEED_PINCTRL_PIN(H20),
        ASPEED_PINCTRL_PIN(L1),
@@ -691,11 +755,14 @@ static const struct aspeed_pin_group aspeed_g5_groups[] = {
        ASPEED_PINCTRL_GROUP(RMII2),
        ASPEED_PINCTRL_GROUP(SD1),
        ASPEED_PINCTRL_GROUP(SPI1),
+       ASPEED_PINCTRL_GROUP(SPI1DEBUG),
+       ASPEED_PINCTRL_GROUP(SPI1PASSTHRU),
        ASPEED_PINCTRL_GROUP(TIMER4),
        ASPEED_PINCTRL_GROUP(TIMER5),
        ASPEED_PINCTRL_GROUP(TIMER6),
        ASPEED_PINCTRL_GROUP(TIMER7),
        ASPEED_PINCTRL_GROUP(TIMER8),
+       ASPEED_PINCTRL_GROUP(VGABIOSROM),
 };
 
 static const struct aspeed_pin_function aspeed_g5_functions[] = {
@@ -733,11 +800,14 @@ static const struct aspeed_pin_function aspeed_g5_functions[] = {
        ASPEED_PINCTRL_FUNC(RMII2),
        ASPEED_PINCTRL_FUNC(SD1),
        ASPEED_PINCTRL_FUNC(SPI1),
+       ASPEED_PINCTRL_FUNC(SPI1DEBUG),
+       ASPEED_PINCTRL_FUNC(SPI1PASSTHRU),
        ASPEED_PINCTRL_FUNC(TIMER4),
        ASPEED_PINCTRL_FUNC(TIMER5),
        ASPEED_PINCTRL_FUNC(TIMER6),
        ASPEED_PINCTRL_FUNC(TIMER7),
        ASPEED_PINCTRL_FUNC(TIMER8),
+       ASPEED_PINCTRL_FUNC(VGABIOSROM),
 };
 
 static struct aspeed_pinctrl_data aspeed_g5_pinctrl_data = {
index 0391f9f13f3e6cb0d15334e27f0d6d92733702a7..49aeba91253198c644794c23cb4877368f6905ad 100644 (file)
@@ -166,13 +166,9 @@ static bool aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
                                bool enable, struct regmap *map)
 {
        int i;
-       bool ret;
-
-       ret = aspeed_sig_expr_eval(expr, enable, map);
-       if (ret)
-               return ret;
 
        for (i = 0; i < expr->ndescs; i++) {
+               bool ret;
                const struct aspeed_sig_desc *desc = &expr->descs[i];
                u32 pattern = enable ? desc->enable : desc->disable;
 
@@ -199,12 +195,18 @@ static bool aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
 static bool aspeed_sig_expr_enable(const struct aspeed_sig_expr *expr,
                                   struct regmap *map)
 {
+       if (aspeed_sig_expr_eval(expr, true, map))
+               return true;
+
        return aspeed_sig_expr_set(expr, true, map);
 }
 
 static bool aspeed_sig_expr_disable(const struct aspeed_sig_expr *expr,
                                    struct regmap *map)
 {
+       if (!aspeed_sig_expr_eval(expr, true, map))
+               return true;
+
        return aspeed_sig_expr_set(expr, false, map);
 }
 
index d22a9fe2e6dfc36d63f9e493b61f2f35c2e21f97..71bbeb9321bad587504bf5ca4f4c889019b4b9f4 100644 (file)
@@ -1808,6 +1808,8 @@ static int byt_pinctrl_probe(struct platform_device *pdev)
                return PTR_ERR(vg->pctl_dev);
        }
 
+       raw_spin_lock_init(&vg->lock);
+
        ret = byt_gpio_probe(vg);
        if (ret) {
                pinctrl_unregister(vg->pctl_dev);
@@ -1815,7 +1817,6 @@ static int byt_pinctrl_probe(struct platform_device *pdev)
        }
 
        platform_set_drvdata(pdev, vg);
-       raw_spin_lock_init(&vg->lock);
        pm_runtime_enable(&pdev->dev);
 
        return 0;
index 63387a40b973a417d6dd00ec9fe952413465b159..01443762e57055b88ea9f1accb0cf6e10eda2978 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/pinctrl/pinconf.h>
 #include <linux/pinctrl/pinconf-generic.h>
 
+#include "../core.h"
 #include "pinctrl-intel.h"
 
 /* Offset from regs */
@@ -1056,6 +1057,26 @@ int intel_pinctrl_remove(struct platform_device *pdev)
 EXPORT_SYMBOL_GPL(intel_pinctrl_remove);
 
 #ifdef CONFIG_PM_SLEEP
+static bool intel_pinctrl_should_save(struct intel_pinctrl *pctrl, unsigned pin)
+{
+       const struct pin_desc *pd = pin_desc_get(pctrl->pctldev, pin);
+
+       if (!pd || !intel_pad_usable(pctrl, pin))
+               return false;
+
+       /*
+        * Only restore the pin if it is actually in use by the kernel (or
+        * by userspace). It is possible that some pins are used by the
+        * BIOS during resume and those are not always locked down so leave
+        * them alone.
+        */
+       if (pd->mux_owner || pd->gpio_owner ||
+           gpiochip_line_is_irq(&pctrl->chip, pin))
+               return true;
+
+       return false;
+}
+
 int intel_pinctrl_suspend(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
@@ -1069,7 +1090,7 @@ int intel_pinctrl_suspend(struct device *dev)
                const struct pinctrl_pin_desc *desc = &pctrl->soc->pins[i];
                u32 val;
 
-               if (!intel_pad_usable(pctrl, desc->number))
+               if (!intel_pinctrl_should_save(pctrl, desc->number))
                        continue;
 
                val = readl(intel_get_padcfg(pctrl, desc->number, PADCFG0));
@@ -1130,7 +1151,7 @@ int intel_pinctrl_resume(struct device *dev)
                void __iomem *padcfg;
                u32 val;
 
-               if (!intel_pad_usable(pctrl, desc->number))
+               if (!intel_pinctrl_should_save(pctrl, desc->number))
                        continue;
 
                padcfg = intel_get_padcfg(pctrl, desc->number, PADCFG0);
index 07462d79d04000685c946a19a9cef1d90526400d..1aba2c74160eb5c51ce49dd679de2dd0090fe2dd 100644 (file)
@@ -309,7 +309,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer,
                 * much memory to the process.
                 */
                down_read(&current->mm->mmap_sem);
-               ret = get_user_pages(address, 1, !is_write, 0, &page, NULL);
+               ret = get_user_pages(address, 1, is_write ? 0 : FOLL_WRITE,
+                               &page, NULL);
                up_read(&current->mm->mmap_sem);
                if (ret < 0)
                        break;
index 81b8dcca8891dc00ca5d0cb48c28329d25e70887..b8a21d7b25d4c34e4042caf624ac4c86211c11d0 100644 (file)
@@ -576,6 +576,7 @@ config ASUS_WMI
 config ASUS_NB_WMI
        tristate "Asus Notebook WMI Driver"
        depends on ASUS_WMI
+       depends on SERIO_I8042 || SERIO_I8042 = n
        ---help---
          This is a driver for newer Asus notebooks. It adds extra features
          like wireless radio and bluetooth control, leds, hotkeys, backlight...
index d1a091b93192c7dc4a20d8dbf9901d65d918e1e1..a2323941e67707711f6e2c2738057d2f21744e4d 100644 (file)
@@ -933,6 +933,13 @@ static const struct dmi_system_id no_hw_rfkill_list[] = {
                        DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 900"),
                },
        },
+       {
+               .ident = "Lenovo YOGA 910-13IKB",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 910-13IKB"),
+               },
+       },
        {}
 };
 
index 436dfe871d3230436adb301ccec42563063dfb0b..9013a585507e8a80b4580c084445ec7bbde6e04c 100644 (file)
@@ -892,7 +892,8 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,
                down_read(&current->mm->mmap_sem);
                pinned = get_user_pages(
                                (unsigned long)xfer->loc_addr & PAGE_MASK,
-                               nr_pages, dir == DMA_FROM_DEVICE, 0,
+                               nr_pages,
+                               dir == DMA_FROM_DEVICE ? FOLL_WRITE : 0,
                                page_list, NULL);
                up_read(&current->mm->mmap_sem);
 
index 8b2558e7363e249726336472729350f879519e94..968c3ae4535cf2f2b6fc26c54c02e773b659c104 100644 (file)
@@ -154,7 +154,7 @@ const struct uniphier_reset_data uniphier_sld3_mio_reset_data[] = {
        UNIPHIER_RESET_END,
 };
 
-const struct uniphier_reset_data uniphier_pro5_mio_reset_data[] = {
+const struct uniphier_reset_data uniphier_pro5_sd_reset_data[] = {
        UNIPHIER_MIO_RESET_SD(0, 0),
        UNIPHIER_MIO_RESET_SD(1, 1),
        UNIPHIER_MIO_RESET_EMMC_HW_RESET(6, 1),
@@ -360,7 +360,7 @@ static const struct of_device_id uniphier_reset_match[] = {
                .compatible = "socionext,uniphier-ld20-reset",
                .data = uniphier_ld20_sys_reset_data,
        },
-       /* Media I/O reset */
+       /* Media I/O reset, SD reset */
        {
                .compatible = "socionext,uniphier-sld3-mio-reset",
                .data = uniphier_sld3_mio_reset_data,
@@ -378,20 +378,20 @@ static const struct of_device_id uniphier_reset_match[] = {
                .data = uniphier_sld3_mio_reset_data,
        },
        {
-               .compatible = "socionext,uniphier-pro5-mio-reset",
-               .data = uniphier_pro5_mio_reset_data,
+               .compatible = "socionext,uniphier-pro5-sd-reset",
+               .data = uniphier_pro5_sd_reset_data,
        },
        {
-               .compatible = "socionext,uniphier-pxs2-mio-reset",
-               .data = uniphier_pro5_mio_reset_data,
+               .compatible = "socionext,uniphier-pxs2-sd-reset",
+               .data = uniphier_pro5_sd_reset_data,
        },
        {
                .compatible = "socionext,uniphier-ld11-mio-reset",
                .data = uniphier_sld3_mio_reset_data,
        },
        {
-               .compatible = "socionext,uniphier-ld20-mio-reset",
-               .data = uniphier_pro5_mio_reset_data,
+               .compatible = "socionext,uniphier-ld20-sd-reset",
+               .data = uniphier_pro5_sd_reset_data,
        },
        /* Peripheral reset */
        {
index 831935af738966685415b0e2996dfb0c14af54b7..a7a88476e215e7b027958adb5c162a4d2b959802 100644 (file)
@@ -1205,7 +1205,7 @@ static int verify_fcx_max_data(struct dasd_device *device, __u8 lpm)
                                 mdc, lpm);
                        return mdc;
                }
-               fcx_max_data = mdc * FCX_MAX_DATA_FACTOR;
+               fcx_max_data = (u32)mdc * FCX_MAX_DATA_FACTOR;
                if (fcx_max_data < private->fcx_max_data) {
                        dev_warn(&device->cdev->dev,
                                 "The maximum data size for zHPF requests %u "
@@ -1675,7 +1675,7 @@ static u32 get_fcx_max_data(struct dasd_device *device)
                         " data size for zHPF requests failed\n");
                return 0;
        } else
-               return mdc * FCX_MAX_DATA_FACTOR;
+               return (u32)mdc * FCX_MAX_DATA_FACTOR;
 }
 
 /*
index 46be25c7461e07ed0cc636cf5a1e91a21768abe2..876c7e6e3a99264b169c217389f0b0a22764662d 100644 (file)
@@ -780,7 +780,7 @@ static int cfg_wait_idle(void)
 static int __init chp_init(void)
 {
        struct chp_id chpid;
-       int ret;
+       int state, ret;
 
        ret = crw_register_handler(CRW_RSC_CPATH, chp_process_crw);
        if (ret)
@@ -791,7 +791,9 @@ static int __init chp_init(void)
                return 0;
        /* Register available channel-paths. */
        chp_id_for_each(&chpid) {
-               if (chp_info_get_status(chpid) != CHP_STATUS_NOT_RECOGNIZED)
+               state = chp_info_get_status(chpid);
+               if (state == CHP_STATUS_CONFIGURED ||
+                   state == CHP_STATUS_STANDBY)
                        chp_new(chpid);
        }
 
index 637cf8973c9e1c55d87577815c782d6409b60b5b..581001989937ce1e0aaab11c26136d5e11b4fa4d 100644 (file)
@@ -384,7 +384,7 @@ void zfcp_dbf_san(char *tag, struct zfcp_dbf *dbf,
        /* if (len > rec_len):
         * dump data up to cap_len ignoring small duplicate in rec->payload
         */
-       spin_lock_irqsave(&dbf->pay_lock, flags);
+       spin_lock(&dbf->pay_lock);
        memset(payload, 0, sizeof(*payload));
        memcpy(payload->area, paytag, ZFCP_DBF_TAG_LEN);
        payload->fsf_req_id = req_id;
index db2739079cbb4bcf2817ab450b7236a3df5922bc..790babc5ef660334c86ecb096e405a15d50bceee 100644 (file)
@@ -353,7 +353,7 @@ static void NCR5380_print_phase(struct Scsi_Host *instance)
 #endif
 
 
-static int probe_irq __initdata;
+static int probe_irq;
 
 /**
  * probe_intr  -       helper for IRQ autoprobe
@@ -365,7 +365,7 @@ static int probe_irq __initdata;
  * used by the IRQ probe code.
  */
 
-static irqreturn_t __init probe_intr(int irq, void *dev_id)
+static irqreturn_t probe_intr(int irq, void *dev_id)
 {
        probe_irq = irq;
        return IRQ_HANDLED;
@@ -380,7 +380,7 @@ static irqreturn_t __init probe_intr(int irq, void *dev_id)
  * and then looking to see what interrupt actually turned up.
  */
 
-static int __init __maybe_unused NCR5380_probe_irq(struct Scsi_Host *instance,
+static int __maybe_unused NCR5380_probe_irq(struct Scsi_Host *instance,
                                                int possible)
 {
        struct NCR5380_hostdata *hostdata = shost_priv(instance);
index 68138a647dfc192c93f44c0ca801066a751217bb..d9239c2d49b117175d34379716b464c7b06dcfaa 100644 (file)
@@ -900,8 +900,9 @@ void hwi_ring_cq_db(struct beiscsi_hba *phba,
 static struct sgl_handle *alloc_io_sgl_handle(struct beiscsi_hba *phba)
 {
        struct sgl_handle *psgl_handle;
+       unsigned long flags;
 
-       spin_lock_bh(&phba->io_sgl_lock);
+       spin_lock_irqsave(&phba->io_sgl_lock, flags);
        if (phba->io_sgl_hndl_avbl) {
                beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
                            "BM_%d : In alloc_io_sgl_handle,"
@@ -919,14 +920,16 @@ static struct sgl_handle *alloc_io_sgl_handle(struct beiscsi_hba *phba)
                        phba->io_sgl_alloc_index++;
        } else
                psgl_handle = NULL;
-       spin_unlock_bh(&phba->io_sgl_lock);
+       spin_unlock_irqrestore(&phba->io_sgl_lock, flags);
        return psgl_handle;
 }
 
 static void
 free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
-       spin_lock_bh(&phba->io_sgl_lock);
+       unsigned long flags;
+
+       spin_lock_irqsave(&phba->io_sgl_lock, flags);
        beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
                    "BM_%d : In free_,io_sgl_free_index=%d\n",
                    phba->io_sgl_free_index);
@@ -941,7 +944,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
                             "value there=%p\n", phba->io_sgl_free_index,
                             phba->io_sgl_hndl_base
                             [phba->io_sgl_free_index]);
-                spin_unlock_bh(&phba->io_sgl_lock);
+                spin_unlock_irqrestore(&phba->io_sgl_lock, flags);
                return;
        }
        phba->io_sgl_hndl_base[phba->io_sgl_free_index] = psgl_handle;
@@ -950,7 +953,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
                phba->io_sgl_free_index = 0;
        else
                phba->io_sgl_free_index++;
-       spin_unlock_bh(&phba->io_sgl_lock);
+       spin_unlock_irqrestore(&phba->io_sgl_lock, flags);
 }
 
 static inline struct wrb_handle *
@@ -958,15 +961,16 @@ beiscsi_get_wrb_handle(struct hwi_wrb_context *pwrb_context,
                       unsigned int wrbs_per_cxn)
 {
        struct wrb_handle *pwrb_handle;
+       unsigned long flags;
 
-       spin_lock_bh(&pwrb_context->wrb_lock);
+       spin_lock_irqsave(&pwrb_context->wrb_lock, flags);
        pwrb_handle = pwrb_context->pwrb_handle_base[pwrb_context->alloc_index];
        pwrb_context->wrb_handles_available--;
        if (pwrb_context->alloc_index == (wrbs_per_cxn - 1))
                pwrb_context->alloc_index = 0;
        else
                pwrb_context->alloc_index++;
-       spin_unlock_bh(&pwrb_context->wrb_lock);
+       spin_unlock_irqrestore(&pwrb_context->wrb_lock, flags);
 
        if (pwrb_handle)
                memset(pwrb_handle->pwrb, 0, sizeof(*pwrb_handle->pwrb));
@@ -1001,14 +1005,16 @@ beiscsi_put_wrb_handle(struct hwi_wrb_context *pwrb_context,
                       struct wrb_handle *pwrb_handle,
                       unsigned int wrbs_per_cxn)
 {
-       spin_lock_bh(&pwrb_context->wrb_lock);
+       unsigned long flags;
+
+       spin_lock_irqsave(&pwrb_context->wrb_lock, flags);
        pwrb_context->pwrb_handle_base[pwrb_context->free_index] = pwrb_handle;
        pwrb_context->wrb_handles_available++;
        if (pwrb_context->free_index == (wrbs_per_cxn - 1))
                pwrb_context->free_index = 0;
        else
                pwrb_context->free_index++;
-       spin_unlock_bh(&pwrb_context->wrb_lock);
+       spin_unlock_irqrestore(&pwrb_context->wrb_lock, flags);
 }
 
 /**
@@ -1037,8 +1043,9 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 static struct sgl_handle *alloc_mgmt_sgl_handle(struct beiscsi_hba *phba)
 {
        struct sgl_handle *psgl_handle;
+       unsigned long flags;
 
-       spin_lock_bh(&phba->mgmt_sgl_lock);
+       spin_lock_irqsave(&phba->mgmt_sgl_lock, flags);
        if (phba->eh_sgl_hndl_avbl) {
                psgl_handle = phba->eh_sgl_hndl_base[phba->eh_sgl_alloc_index];
                phba->eh_sgl_hndl_base[phba->eh_sgl_alloc_index] = NULL;
@@ -1056,14 +1063,16 @@ static struct sgl_handle *alloc_mgmt_sgl_handle(struct beiscsi_hba *phba)
                        phba->eh_sgl_alloc_index++;
        } else
                psgl_handle = NULL;
-       spin_unlock_bh(&phba->mgmt_sgl_lock);
+       spin_unlock_irqrestore(&phba->mgmt_sgl_lock, flags);
        return psgl_handle;
 }
 
 void
 free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
-       spin_lock_bh(&phba->mgmt_sgl_lock);
+       unsigned long flags;
+
+       spin_lock_irqsave(&phba->mgmt_sgl_lock, flags);
        beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
                    "BM_%d : In  free_mgmt_sgl_handle,"
                    "eh_sgl_free_index=%d\n",
@@ -1078,7 +1087,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
                            "BM_%d : Double Free in eh SGL ,"
                            "eh_sgl_free_index=%d\n",
                            phba->eh_sgl_free_index);
-               spin_unlock_bh(&phba->mgmt_sgl_lock);
+               spin_unlock_irqrestore(&phba->mgmt_sgl_lock, flags);
                return;
        }
        phba->eh_sgl_hndl_base[phba->eh_sgl_free_index] = psgl_handle;
@@ -1088,7 +1097,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
                phba->eh_sgl_free_index = 0;
        else
                phba->eh_sgl_free_index++;
-       spin_unlock_bh(&phba->mgmt_sgl_lock);
+       spin_unlock_irqrestore(&phba->mgmt_sgl_lock, flags);
 }
 
 static void
index a8762a3efeef3f6e9288646b835ddf868c0013e8..532474109624d9cd9c6a52c040a1027120819886 100644 (file)
@@ -2586,7 +2586,6 @@ static void ipr_process_error(struct ipr_cmnd *ipr_cmd)
        struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb;
        u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
        u32 fd_ioasc;
-       char *envp[] = { "ASYNC_ERR_LOG=1", NULL };
 
        if (ioa_cfg->sis64)
                fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error64.fd_ioasc);
@@ -2607,8 +2606,8 @@ static void ipr_process_error(struct ipr_cmnd *ipr_cmd)
        }
 
        list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_report_q);
+       schedule_work(&ioa_cfg->work_q);
        hostrcb = ipr_get_free_hostrcb(ioa_cfg);
-       kobject_uevent_env(&ioa_cfg->host->shost_dev.kobj, KOBJ_CHANGE, envp);
 
        ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_LOG_DATA, hostrcb);
 }
index c051694bfcb0f42e1e983f409a581f1da5b344d2..f9b6fba689ffb41c6806cdabeb80debe38e25189 100644 (file)
@@ -791,9 +791,9 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 
 free_task:
        /* regular RX path uses back_lock */
-       spin_lock_bh(&session->back_lock);
+       spin_lock(&session->back_lock);
        __iscsi_put_task(task);
-       spin_unlock_bh(&session->back_lock);
+       spin_unlock(&session->back_lock);
        return NULL;
 }
 
index 54d446c9f56e0e77372f9fe67be14d04a96a3d53..b8d3b97b217ac552ed6166e4ebe2a1c1483e5ca2 100644 (file)
@@ -36,9 +36,9 @@ struct scsi_dh_blist {
 };
 
 static const struct scsi_dh_blist scsi_dh_blist[] = {
-       {"DGC", "RAID",                 "clariion" },
-       {"DGC", "DISK",                 "clariion" },
-       {"DGC", "VRAID",                "clariion" },
+       {"DGC", "RAID",                 "emc" },
+       {"DGC", "DISK",                 "emc" },
+       {"DGC", "VRAID",                "emc" },
 
        {"COMPAQ", "MSA1000 VOLUME",    "hp_sw" },
        {"COMPAQ", "HSV110",            "hp_sw" },
index 212e98d940bc222885d8ece9a675df4782cc8be1..6f7128f49c30d62d381556275d667c84eda6ab62 100644 (file)
@@ -1307,7 +1307,6 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget,
 static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
                                enum scsi_scan_mode rescan)
 {
-       char devname[64];
        unsigned char scsi_cmd[MAX_COMMAND_SIZE];
        unsigned int length;
        u64 lun;
@@ -1349,9 +1348,6 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
                }
        }
 
-       sprintf(devname, "host %d channel %d id %d",
-               shost->host_no, sdev->channel, sdev->id);
-
        /*
         * Allocate enough to hold the header (the same size as one scsi_lun)
         * plus the number of luns we are requesting.  511 was the default
@@ -1470,12 +1466,12 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
  out_err:
        kfree(lun_data);
  out:
-       scsi_device_put(sdev);
        if (scsi_device_created(sdev))
                /*
                 * the sdev we used didn't appear in the report luns scan
                 */
                __scsi_remove_device(sdev);
+       scsi_device_put(sdev);
        return ret;
 }
 
index 7af5226aa55ba0937b69b8b0f2d5d070f3eccf7d..618422ea3a4123d8d0b115f8811634e8225de8a1 100644 (file)
@@ -4922,9 +4922,8 @@ static int sgl_map_user_pages(struct st_buffer *STbp,
        res = get_user_pages_unlocked(
                uaddr,
                nr_pages,
-               rw == READ,
-               0, /* don't force */
-               pages);
+               pages,
+               rw == READ ? FOLL_WRITE : 0); /* don't force */
 
        /* Errors and no page mapped should return here */
        if (res < nr_pages)
index 396ded52ab70242b8b3c069c52cc7fed2c44624d..209a8f7ef02bd4b04cabefad50d17351e5e6990c 100644 (file)
@@ -1187,8 +1187,10 @@ int ion_query_heaps(struct ion_client *client, struct ion_heap_query *query)
                hdata.type = heap->type;
                hdata.heap_id = heap->id;
 
-               ret = copy_to_user(&buffer[cnt],
-                                  &hdata, sizeof(hdata));
+               if (copy_to_user(&buffer[cnt], &hdata, sizeof(hdata))) {
+                       ret = -EFAULT;
+                       goto out;
+               }
 
                cnt++;
                if (cnt >= max_cnt)
index 15bac92b7f042023dbe327de670d8cd011a7f323..46b2bb99bfd6b2081a0775ce9ad87393bfcd5b2e 100644 (file)
@@ -107,7 +107,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 
                heap_pdev = of_platform_device_create(node, heaps[i].name,
                                                      &pdev->dev);
-               if (!pdev)
+               if (!heap_pdev)
                        return ERR_PTR(-ENOMEM);
                heap_pdev->dev.platform_data = &heaps[i];
 
index e36ee984485bfcf3aea56f777e9f7ec4c671ed02..34307ac3f2558b1e30794bd77c7c2b85ae4839e3 100644 (file)
@@ -128,6 +128,7 @@ int arche_platform_change_state(enum arche_platform_state state,
        pdev = of_find_device_by_node(np);
        if (!pdev) {
                pr_err("arche-platform device not found\n");
+               of_node_put(np);
                return -ENODEV;
        }
 
index 071bb1cfd3ae1d38c510c19adbf7cdd3d9daa9a7..baab460eeaa3828f7a3f84490f4dda566b647c44 100644 (file)
@@ -1548,7 +1548,8 @@ static int ap_probe(struct usb_interface *interface,
        INIT_LIST_HEAD(&es2->arpcs);
        spin_lock_init(&es2->arpc_lock);
 
-       if (es2_arpc_in_enable(es2))
+       retval = es2_arpc_in_enable(es2);
+       if (retval)
                goto error;
 
        retval = gb_hd_add(hd);
index 5e06e4229e4239e3e307ce2a0faac266ddd1c7e5..250caa00de5e9f4665978ef0105a8b42c2e49420 100644 (file)
@@ -702,15 +702,13 @@ static int gb_gpio_probe(struct gbphy_device *gbphy_dev,
        ret = gb_gpio_irqchip_add(gpio, irqc, 0,
                                   handle_level_irq, IRQ_TYPE_NONE);
        if (ret) {
-               dev_err(&connection->bundle->dev,
-                       "failed to add irq chip: %d\n", ret);
+               dev_err(&gbphy_dev->dev, "failed to add irq chip: %d\n", ret);
                goto exit_line_free;
        }
 
        ret = gpiochip_add(gpio);
        if (ret) {
-               dev_err(&connection->bundle->dev,
-                       "failed to add gpio chip: %d\n", ret);
+               dev_err(&gbphy_dev->dev, "failed to add gpio chip: %d\n", ret);
                goto exit_gpio_irqchip_remove;
        }
 
index 69f67ddbd4a364d00fe31932a15c773599eb8851..660b4674a76f584aa8a426abffc595d05051659c 100644 (file)
@@ -127,7 +127,7 @@ struct gb_module *gb_module_create(struct gb_host_device *hd, u8 module_id,
        return module;
 
 err_put_interfaces:
-       for (--i; i > 0; --i)
+       for (--i; i >= 0; --i)
                gb_interface_put(module->interfaces[i]);
 
        put_device(&module->dev);
index 5ee7954bd9f91af58091454a478b64e1a0dd7741..2633d2bfb1b4f86bfd34e0da52f1e647b105e301 100644 (file)
@@ -888,7 +888,7 @@ static int gb_uart_probe(struct gbphy_device *gbphy_dev,
        minor = alloc_minor(gb_tty);
        if (minor < 0) {
                if (minor == -ENOSPC) {
-                       dev_err(&connection->bundle->dev,
+                       dev_err(&gbphy_dev->dev,
                                "no more free minor numbers\n");
                        retval = -ENODEV;
                } else {
index d626125d7af942511853404649318da45548a662..564b36d4f6486c7c0dad7a18cca4b0bf0155c4a9 100644 (file)
@@ -468,6 +468,8 @@ static inline int __sca3000_get_base_freq(struct sca3000_state *st,
        case SCA3000_MEAS_MODE_OP_2:
                *base_freq = info->option_mode_2_freq;
                break;
+       default:
+               ret = -EINVAL;
        }
 error_ret:
        return ret;
index 6eae605959055ec75def8fde36793f2678758606..23fda9d98bffd571fd0b7d3de323b6b457237e54 100644 (file)
@@ -871,12 +871,10 @@ static ssize_t xattr_cache_store(struct kobject *kobj,
 }
 LUSTRE_RW_ATTR(xattr_cache);
 
-static ssize_t unstable_stats_show(struct kobject *kobj,
-                                  struct attribute *attr,
-                                  char *buf)
+static int ll_unstable_stats_seq_show(struct seq_file *m, void *v)
 {
-       struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
-                                             ll_kobj);
+       struct super_block     *sb    = m->private;
+       struct ll_sb_info      *sbi   = ll_s2sbi(sb);
        struct cl_client_cache *cache = sbi->ll_cache;
        long pages;
        int mb;
@@ -884,19 +882,21 @@ static ssize_t unstable_stats_show(struct kobject *kobj,
        pages = atomic_long_read(&cache->ccc_unstable_nr);
        mb = (pages * PAGE_SIZE) >> 20;
 
-       return sprintf(buf, "unstable_check:     %8d\n"
-                           "unstable_pages: %12ld\n"
-                           "unstable_mb:        %8d\n",
-                           cache->ccc_unstable_check, pages, mb);
+       seq_printf(m,
+                  "unstable_check:     %8d\n"
+                  "unstable_pages: %12ld\n"
+                  "unstable_mb:        %8d\n",
+                  cache->ccc_unstable_check, pages, mb);
+
+       return 0;
 }
 
-static ssize_t unstable_stats_store(struct kobject *kobj,
-                                   struct attribute *attr,
-                                   const char *buffer,
-                                   size_t count)
+static ssize_t ll_unstable_stats_seq_write(struct file *file,
+                                          const char __user *buffer,
+                                          size_t count, loff_t *off)
 {
-       struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
-                                             ll_kobj);
+       struct super_block *sb = ((struct seq_file *)file->private_data)->private;
+       struct ll_sb_info *sbi = ll_s2sbi(sb);
        char kernbuf[128];
        int val, rc;
 
@@ -922,7 +922,7 @@ static ssize_t unstable_stats_store(struct kobject *kobj,
 
        return count;
 }
-LUSTRE_RW_ATTR(unstable_stats);
+LPROC_SEQ_FOPS(ll_unstable_stats);
 
 static ssize_t root_squash_show(struct kobject *kobj, struct attribute *attr,
                                char *buf)
@@ -995,6 +995,7 @@ static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
        /* { "filegroups",   lprocfs_rd_filegroups,  0, 0 }, */
        { "max_cached_mb",    &ll_max_cached_mb_fops, NULL },
        { "statahead_stats",  &ll_statahead_stats_fops, NULL, 0 },
+       { "unstable_stats",   &ll_unstable_stats_fops, NULL },
        { "sbi_flags",        &ll_sbi_flags_fops, NULL, 0 },
        { .name =               "nosquash_nids",
          .fops =               &ll_nosquash_nids_fops          },
@@ -1026,7 +1027,6 @@ static struct attribute *llite_attrs[] = {
        &lustre_attr_max_easize.attr,
        &lustre_attr_default_easize.attr,
        &lustre_attr_xattr_cache.attr,
-       &lustre_attr_unstable_stats.attr,
        &lustre_attr_root_squash.attr,
        NULL,
 };
index c29040fdf9a7757b7c0d428616e244a6e4d5f697..1091b9f1dd070e3d27c269402b43b0a09d96bcdc 100644 (file)
@@ -423,8 +423,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
                actual_pages = get_user_pages(task, task->mm,
                                          (unsigned long)buf & ~(PAGE_SIZE - 1),
                                          num_pages,
-                                         (type == PAGELIST_READ) /*Write */ ,
-                                         0 /*Force */ ,
+                                         (type == PAGELIST_READ) ? FOLL_WRITE : 0,
                                          pages,
                                          NULL /*vmas */);
                up_read(&task->mm->mmap_sem);
index e11c0e07471bc7ebba04e48d3efc746236ec2f4e..7b6cd4d80621e38ff6d47fcd87b45fbe9cd4259b 100644 (file)
@@ -1477,8 +1477,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes)
                current->mm,              /* mm */
                (unsigned long)virt_addr, /* start */
                num_pages,                /* len */
-               0,                        /* write */
-               0,                        /* force */
+               0,                        /* gup_flags */
                pages,                    /* pages (array of page pointers) */
                NULL);                    /* vmas */
        up_read(&current->mm->mmap_sem);
index 78f5613e9467cf5579a57f6d13137af9f5e1d5b9..6ab7443eabdefa2bdf7c4a4653433e10250b9bf2 100644 (file)
@@ -3388,7 +3388,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 
        clients_count++;
 
-       destroy_workqueue(hif_workqueue);
 _fail_:
        return result;
 }
index 39b928c2849d71c47390ef55002dc767f7ae4e12..b7d747e92c7abf589e35154b25482a9dedb57118 100644 (file)
@@ -1804,6 +1804,10 @@ int iscsit_process_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
         * Otherwise, initiator is not expecting a NOPIN is response.
         * Just ignore for now.
         */
+
+       if (cmd)
+               iscsit_free_cmd(cmd, false);
+
         return 0;
 }
 EXPORT_SYMBOL(iscsit_process_nop_out);
@@ -2982,7 +2986,7 @@ iscsit_build_nopin_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn,
 
        pr_debug("Built NOPIN %s Response ITT: 0x%08x, TTT: 0x%08x,"
                " StatSN: 0x%08x, Length %u\n", (nopout_response) ?
-               "Solicitied" : "Unsolicitied", cmd->init_task_tag,
+               "Solicited" : "Unsolicited", cmd->init_task_tag,
                cmd->targ_xfer_tag, cmd->stat_sn, cmd->buf_ptr_size);
 }
 EXPORT_SYMBOL(iscsit_build_nopin_rsp);
index adf419fa429189ceca94d04782221fc34de23b6c..15f79a2ca34ab6e17fd5fda6f68425b9af1809eb 100644 (file)
@@ -434,7 +434,7 @@ static int iscsi_login_zero_tsih_s2(
 
                /*
                 * Make MaxRecvDataSegmentLength PAGE_SIZE aligned for
-                * Immediate Data + Unsolicitied Data-OUT if necessary..
+                * Immediate Data + Unsolicited Data-OUT if necessary..
                 */
                param = iscsi_find_param_from_key("MaxRecvDataSegmentLength",
                                                  conn->param_list);
@@ -646,7 +646,7 @@ static void iscsi_post_login_start_timers(struct iscsi_conn *conn)
 {
        struct iscsi_session *sess = conn->sess;
        /*
-        * FIXME: Unsolicitied NopIN support for ISER
+        * FIXME: Unsolicited NopIN support for ISER
         */
        if (conn->conn_transport->transport_type == ISCSI_INFINIBAND)
                return;
index 6094a6beddde9fb5d045644b6b11b32e6bd149c1..7dfefd66df93874b1359824890b4b760275ff2c6 100644 (file)
@@ -754,15 +754,7 @@ EXPORT_SYMBOL(target_complete_cmd);
 
 void target_complete_cmd_with_length(struct se_cmd *cmd, u8 scsi_status, int length)
 {
-       if (scsi_status != SAM_STAT_GOOD) {
-               return;
-       }
-
-       /*
-        * Calculate new residual count based upon length of SCSI data
-        * transferred.
-        */
-       if (length < cmd->data_length) {
+       if (scsi_status == SAM_STAT_GOOD && length < cmd->data_length) {
                if (cmd->se_cmd_flags & SCF_UNDERFLOW_BIT) {
                        cmd->residual_count += cmd->data_length - length;
                } else {
@@ -771,12 +763,6 @@ void target_complete_cmd_with_length(struct se_cmd *cmd, u8 scsi_status, int len
                }
 
                cmd->data_length = length;
-       } else if (length > cmd->data_length) {
-               cmd->se_cmd_flags |= SCF_OVERFLOW_BIT;
-               cmd->residual_count = length - cmd->data_length;
-       } else {
-               cmd->se_cmd_flags &= ~(SCF_OVERFLOW_BIT | SCF_UNDERFLOW_BIT);
-               cmd->residual_count = 0;
        }
 
        target_complete_cmd(cmd, scsi_status);
@@ -1706,6 +1692,7 @@ void transport_generic_request_failure(struct se_cmd *cmd,
        case TCM_LOGICAL_BLOCK_GUARD_CHECK_FAILED:
        case TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED:
        case TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED:
+       case TCM_COPY_TARGET_DEVICE_NOT_REACHABLE:
                break;
        case TCM_OUT_OF_RESOURCES:
                sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
@@ -2547,8 +2534,12 @@ int target_get_sess_cmd(struct se_cmd *se_cmd, bool ack_kref)
         * fabric acknowledgement that requires two target_put_sess_cmd()
         * invocations before se_cmd descriptor release.
         */
-       if (ack_kref)
-               kref_get(&se_cmd->cmd_kref);
+       if (ack_kref) {
+               if (!kref_get_unless_zero(&se_cmd->cmd_kref))
+                       return -EINVAL;
+
+               se_cmd->se_cmd_flags |= SCF_ACK_KREF;
+       }
 
        spin_lock_irqsave(&se_sess->sess_cmd_lock, flags);
        if (se_sess->sess_tearing_down) {
@@ -2627,7 +2618,7 @@ EXPORT_SYMBOL(target_put_sess_cmd);
  */
 void target_sess_cmd_list_set_waiting(struct se_session *se_sess)
 {
-       struct se_cmd *se_cmd;
+       struct se_cmd *se_cmd, *tmp_cmd;
        unsigned long flags;
        int rc;
 
@@ -2639,14 +2630,16 @@ void target_sess_cmd_list_set_waiting(struct se_session *se_sess)
        se_sess->sess_tearing_down = 1;
        list_splice_init(&se_sess->sess_cmd_list, &se_sess->sess_wait_list);
 
-       list_for_each_entry(se_cmd, &se_sess->sess_wait_list, se_cmd_list) {
+       list_for_each_entry_safe(se_cmd, tmp_cmd,
+                                &se_sess->sess_wait_list, se_cmd_list) {
                rc = kref_get_unless_zero(&se_cmd->cmd_kref);
                if (rc) {
                        se_cmd->cmd_wait_set = 1;
                        spin_lock(&se_cmd->t_state_lock);
                        se_cmd->transport_state |= CMD_T_FABRIC_STOP;
                        spin_unlock(&se_cmd->t_state_lock);
-               }
+               } else
+                       list_del_init(&se_cmd->se_cmd_list);
        }
 
        spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
@@ -2871,6 +2864,12 @@ static const struct sense_info sense_info_table[] = {
                .ascq = 0x03, /* LOGICAL BLOCK REFERENCE TAG CHECK FAILED */
                .add_sector_info = true,
        },
+       [TCM_COPY_TARGET_DEVICE_NOT_REACHABLE] = {
+               .key = COPY_ABORTED,
+               .asc = 0x0d,
+               .ascq = 0x02, /* COPY TARGET DEVICE NOT REACHABLE */
+
+       },
        [TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE] = {
                /*
                 * Returning ILLEGAL REQUEST would cause immediate IO errors on
index 62bf4fe5704a929aa01a5f970f26e7f1020f9442..47562509b4892b07b85cb304a3190804c658d6e9 100644 (file)
@@ -96,7 +96,7 @@ struct tcmu_dev {
        size_t dev_size;
        u32 cmdr_size;
        u32 cmdr_last_cleaned;
-       /* Offset of data ring from start of mb */
+       /* Offset of data area from start of mb */
        /* Must add data_off and mb_addr to get the address */
        size_t data_off;
        size_t data_size;
@@ -349,7 +349,7 @@ static inline size_t spc_bitmap_free(unsigned long *bitmap)
 
 /*
  * We can't queue a command until we have space available on the cmd ring *and*
- * space available on the data ring.
+ * space available on the data area.
  *
  * Called with ring lock held.
  */
@@ -389,7 +389,8 @@ static bool is_ring_space_avail(struct tcmu_dev *udev, size_t cmd_size, size_t d
        return true;
 }
 
-static int tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
+static sense_reason_t
+tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
 {
        struct tcmu_dev *udev = tcmu_cmd->tcmu_dev;
        struct se_cmd *se_cmd = tcmu_cmd->se_cmd;
@@ -405,7 +406,7 @@ static int tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
        DECLARE_BITMAP(old_bitmap, DATA_BLOCK_BITS);
 
        if (test_bit(TCMU_DEV_BIT_BROKEN, &udev->flags))
-               return -EINVAL;
+               return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
 
        /*
         * Must be a certain minimum size for response sense info, but
@@ -432,11 +433,14 @@ static int tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
                BUG_ON(!(se_cmd->t_bidi_data_sg && se_cmd->t_bidi_data_nents));
                data_length += se_cmd->t_bidi_data_sg->length;
        }
-       if ((command_size > (udev->cmdr_size / 2))
-           || data_length > udev->data_size)
-               pr_warn("TCMU: Request of size %zu/%zu may be too big for %u/%zu "
-                       "cmd/data ring buffers\n", command_size, data_length,
+       if ((command_size > (udev->cmdr_size / 2)) ||
+           data_length > udev->data_size) {
+               pr_warn("TCMU: Request of size %zu/%zu is too big for %u/%zu "
+                       "cmd ring/data area\n", command_size, data_length,
                        udev->cmdr_size, udev->data_size);
+               spin_unlock_irq(&udev->cmdr_lock);
+               return TCM_INVALID_CDB_FIELD;
+       }
 
        while (!is_ring_space_avail(udev, command_size, data_length)) {
                int ret;
@@ -450,7 +454,7 @@ static int tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
                finish_wait(&udev->wait_cmdr, &__wait);
                if (!ret) {
                        pr_warn("tcmu: command timed out\n");
-                       return -ETIMEDOUT;
+                       return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
                }
 
                spin_lock_irq(&udev->cmdr_lock);
@@ -487,9 +491,7 @@ static int tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
 
        bitmap_copy(old_bitmap, udev->data_bitmap, DATA_BLOCK_BITS);
 
-       /*
-        * Fix up iovecs, and handle if allocation in data ring wrapped.
-        */
+       /* Handle allocating space from the data area */
        iov = &entry->req.iov[0];
        iov_cnt = 0;
        copy_to_data_area = (se_cmd->data_direction == DMA_TO_DEVICE
@@ -526,10 +528,11 @@ static int tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
        mod_timer(&udev->timeout,
                round_jiffies_up(jiffies + msecs_to_jiffies(TCMU_TIME_OUT)));
 
-       return 0;
+       return TCM_NO_SENSE;
 }
 
-static int tcmu_queue_cmd(struct se_cmd *se_cmd)
+static sense_reason_t
+tcmu_queue_cmd(struct se_cmd *se_cmd)
 {
        struct se_device *se_dev = se_cmd->se_dev;
        struct tcmu_dev *udev = TCMU_DEV(se_dev);
@@ -538,10 +541,10 @@ static int tcmu_queue_cmd(struct se_cmd *se_cmd)
 
        tcmu_cmd = tcmu_alloc_cmd(se_cmd);
        if (!tcmu_cmd)
-               return -ENOMEM;
+               return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
 
        ret = tcmu_queue_cmd_ring(tcmu_cmd);
-       if (ret < 0) {
+       if (ret != TCM_NO_SENSE) {
                pr_err("TCMU: Could not queue command\n");
                spin_lock_irq(&udev->commands_lock);
                idr_remove(&udev->commands, tcmu_cmd->cmd_id);
@@ -561,7 +564,7 @@ static void tcmu_handle_completion(struct tcmu_cmd *cmd, struct tcmu_cmd_entry *
        if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags)) {
                /*
                 * cmd has been completed already from timeout, just reclaim
-                * data ring space and free cmd
+                * data area space and free cmd
                 */
                free_data_area(udev, cmd);
 
@@ -1128,21 +1131,10 @@ static sector_t tcmu_get_blocks(struct se_device *dev)
                       dev->dev_attrib.block_size);
 }
 
-static sense_reason_t
-tcmu_pass_op(struct se_cmd *se_cmd)
-{
-       int ret = tcmu_queue_cmd(se_cmd);
-
-       if (ret != 0)
-               return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
-       else
-               return TCM_NO_SENSE;
-}
-
 static sense_reason_t
 tcmu_parse_cdb(struct se_cmd *cmd)
 {
-       return passthrough_parse_cdb(cmd, tcmu_pass_op);
+       return passthrough_parse_cdb(cmd, tcmu_queue_cmd);
 }
 
 static const struct target_backend_ops tcmu_ops = {
index 75cd85426ae3a27f276947f667794acb7c9454d0..094a1440eacb3dccdd9c35a678a2940c3e03216d 100644 (file)
@@ -104,7 +104,7 @@ static int target_xcopy_locate_se_dev_e4(struct se_cmd *se_cmd, struct xcopy_op
        }
        mutex_unlock(&g_device_mutex);
 
-       pr_err("Unable to locate 0xe4 descriptor for EXTENDED_COPY\n");
+       pr_debug_ratelimited("Unable to locate 0xe4 descriptor for EXTENDED_COPY\n");
        return -EINVAL;
 }
 
@@ -185,7 +185,7 @@ static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op
 
 static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd,
                                struct xcopy_op *xop, unsigned char *p,
-                               unsigned short tdll)
+                               unsigned short tdll, sense_reason_t *sense_ret)
 {
        struct se_device *local_dev = se_cmd->se_dev;
        unsigned char *desc = p;
@@ -193,6 +193,8 @@ static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd,
        unsigned short start = 0;
        bool src = true;
 
+       *sense_ret = TCM_INVALID_PARAMETER_LIST;
+
        if (offset != 0) {
                pr_err("XCOPY target descriptor list length is not"
                        " multiple of %d\n", XCOPY_TARGET_DESC_LEN);
@@ -243,9 +245,16 @@ static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd,
                rc = target_xcopy_locate_se_dev_e4(se_cmd, xop, true);
        else
                rc = target_xcopy_locate_se_dev_e4(se_cmd, xop, false);
-
-       if (rc < 0)
+       /*
+        * If a matching IEEE NAA 0x83 descriptor for the requested device
+        * is not located on this node, return COPY_ABORTED with ASQ/ASQC
+        * 0x0d/0x02 - COPY_TARGET_DEVICE_NOT_REACHABLE to request the
+        * initiator to fall back to normal copy method.
+        */
+       if (rc < 0) {
+               *sense_ret = TCM_COPY_TARGET_DEVICE_NOT_REACHABLE;
                goto out;
+       }
 
        pr_debug("XCOPY TGT desc: Source dev: %p NAA IEEE WWN: 0x%16phN\n",
                 xop->src_dev, &xop->src_tid_wwn[0]);
@@ -653,6 +662,7 @@ static int target_xcopy_read_source(
        rc = target_xcopy_setup_pt_cmd(xpt_cmd, xop, src_dev, &cdb[0],
                                remote_port, true);
        if (rc < 0) {
+               ec_cmd->scsi_status = xpt_cmd->se_cmd.scsi_status;
                transport_generic_free_cmd(se_cmd, 0);
                return rc;
        }
@@ -664,6 +674,7 @@ static int target_xcopy_read_source(
 
        rc = target_xcopy_issue_pt_cmd(xpt_cmd);
        if (rc < 0) {
+               ec_cmd->scsi_status = xpt_cmd->se_cmd.scsi_status;
                transport_generic_free_cmd(se_cmd, 0);
                return rc;
        }
@@ -714,6 +725,7 @@ static int target_xcopy_write_destination(
                                remote_port, false);
        if (rc < 0) {
                struct se_cmd *src_cmd = &xop->src_pt_cmd->se_cmd;
+               ec_cmd->scsi_status = xpt_cmd->se_cmd.scsi_status;
                /*
                 * If the failure happened before the t_mem_list hand-off in
                 * target_xcopy_setup_pt_cmd(), Reset memory + clear flag so that
@@ -729,6 +741,7 @@ static int target_xcopy_write_destination(
 
        rc = target_xcopy_issue_pt_cmd(xpt_cmd);
        if (rc < 0) {
+               ec_cmd->scsi_status = xpt_cmd->se_cmd.scsi_status;
                se_cmd->se_cmd_flags &= ~SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC;
                transport_generic_free_cmd(se_cmd, 0);
                return rc;
@@ -815,9 +828,14 @@ static void target_xcopy_do_work(struct work_struct *work)
 out:
        xcopy_pt_undepend_remotedev(xop);
        kfree(xop);
-
-       pr_warn("target_xcopy_do_work: Setting X-COPY CHECK_CONDITION -> sending response\n");
-       ec_cmd->scsi_status = SAM_STAT_CHECK_CONDITION;
+       /*
+        * Don't override an error scsi status if it has already been set
+        */
+       if (ec_cmd->scsi_status == SAM_STAT_GOOD) {
+               pr_warn_ratelimited("target_xcopy_do_work: rc: %d, Setting X-COPY"
+                       " CHECK_CONDITION -> sending response\n", rc);
+               ec_cmd->scsi_status = SAM_STAT_CHECK_CONDITION;
+       }
        target_complete_cmd(ec_cmd, SAM_STAT_CHECK_CONDITION);
 }
 
@@ -875,7 +893,7 @@ sense_reason_t target_do_xcopy(struct se_cmd *se_cmd)
                " tdll: %hu sdll: %u inline_dl: %u\n", list_id, list_id_usage,
                tdll, sdll, inline_dl);
 
-       rc = target_xcopy_parse_target_descriptors(se_cmd, xop, &p[16], tdll);
+       rc = target_xcopy_parse_target_descriptors(se_cmd, xop, &p[16], tdll, &ret);
        if (rc <= 0)
                goto out;
 
index 216e18cc9133d6709b25168610e98552b96d2647..ff5de9a96643f9b21e06a14af4bcd5e7277689f9 100644 (file)
@@ -572,10 +572,10 @@ static void ft_send_work(struct work_struct *work)
        if (target_submit_cmd(&cmd->se_cmd, cmd->sess->se_sess, fcp->fc_cdb,
                              &cmd->ft_sense_buffer[0], scsilun_to_int(&fcp->fc_lun),
                              ntohl(fcp->fc_dl), task_attr, data_dir,
-                             TARGET_SCF_ACK_KREF))
+                             TARGET_SCF_ACK_KREF | TARGET_SCF_USE_CPUID))
                goto err;
 
-       pr_debug("r_ctl %x alloc target_submit_cmd\n", fh->fh_r_ctl);
+       pr_debug("r_ctl %x target_submit_cmd %p\n", fh->fh_r_ctl, cmd);
        return;
 
 err:
index 6ffbb603d9122a0259daa69db5bcca03ba891aa5..fd5c3de794705bb467f8689540f8045e61629d7f 100644 (file)
 
 #include "tcm_fc.h"
 
+#define TFC_SESS_DBG(lport, fmt, args...) \
+       pr_debug("host%u: rport %6.6x: " fmt,      \
+                (lport)->host->host_no,           \
+                (lport)->port_id, ##args )
+
 static void ft_sess_delete_all(struct ft_tport *);
 
 /*
@@ -167,24 +172,29 @@ static struct ft_sess *ft_sess_get(struct fc_lport *lport, u32 port_id)
        struct ft_tport *tport;
        struct hlist_head *head;
        struct ft_sess *sess;
+       char *reason = "no session created";
 
        rcu_read_lock();
        tport = rcu_dereference(lport->prov[FC_TYPE_FCP]);
-       if (!tport)
+       if (!tport) {
+               reason = "not an FCP port";
                goto out;
+       }
 
        head = &tport->hash[ft_sess_hash(port_id)];
        hlist_for_each_entry_rcu(sess, head, hash) {
                if (sess->port_id == port_id) {
                        kref_get(&sess->kref);
                        rcu_read_unlock();
-                       pr_debug("port_id %x found %p\n", port_id, sess);
+                       TFC_SESS_DBG(lport, "port_id %x found %p\n",
+                                    port_id, sess);
                        return sess;
                }
        }
 out:
        rcu_read_unlock();
-       pr_debug("port_id %x not found\n", port_id);
+       TFC_SESS_DBG(lport, "port_id %x not found, %s\n",
+                    port_id, reason);
        return NULL;
 }
 
@@ -195,7 +205,7 @@ static int ft_sess_alloc_cb(struct se_portal_group *se_tpg,
        struct ft_tport *tport = sess->tport;
        struct hlist_head *head = &tport->hash[ft_sess_hash(sess->port_id)];
 
-       pr_debug("port_id %x sess %p\n", sess->port_id, sess);
+       TFC_SESS_DBG(tport->lport, "port_id %x sess %p\n", sess->port_id, sess);
        hlist_add_head_rcu(&sess->hash, head);
        tport->sess_count++;
 
@@ -223,7 +233,7 @@ static struct ft_sess *ft_sess_create(struct ft_tport *tport, u32 port_id,
 
        sess = kzalloc(sizeof(*sess), GFP_KERNEL);
        if (!sess)
-               return NULL;
+               return ERR_PTR(-ENOMEM);
 
        kref_init(&sess->kref); /* ref for table entry */
        sess->tport = tport;
@@ -234,8 +244,9 @@ static struct ft_sess *ft_sess_create(struct ft_tport *tport, u32 port_id,
                                             TARGET_PROT_NORMAL, &initiatorname[0],
                                             sess, ft_sess_alloc_cb);
        if (IS_ERR(sess->se_sess)) {
+               int rc = PTR_ERR(sess->se_sess);
                kfree(sess);
-               return NULL;
+               sess = ERR_PTR(rc);
        }
        return sess;
 }
@@ -319,7 +330,7 @@ void ft_sess_close(struct se_session *se_sess)
                mutex_unlock(&ft_lport_lock);
                return;
        }
-       pr_debug("port_id %x\n", port_id);
+       TFC_SESS_DBG(sess->tport->lport, "port_id %x close session\n", port_id);
        ft_sess_unhash(sess);
        mutex_unlock(&ft_lport_lock);
        ft_close_sess(sess);
@@ -379,8 +390,13 @@ static int ft_prli_locked(struct fc_rport_priv *rdata, u32 spp_len,
                if (!(fcp_parm & FCP_SPPF_INIT_FCN))
                        return FC_SPP_RESP_CONF;
                sess = ft_sess_create(tport, rdata->ids.port_id, rdata);
-               if (!sess)
-                       return FC_SPP_RESP_RES;
+               if (IS_ERR(sess)) {
+                       if (PTR_ERR(sess) == -EACCES) {
+                               spp->spp_flags &= ~FC_SPP_EST_IMG_PAIR;
+                               return FC_SPP_RESP_CONF;
+                       } else
+                               return FC_SPP_RESP_RES;
+               }
                if (!sess->params)
                        rdata->prli_count++;
                sess->params = fcp_parm;
@@ -423,8 +439,8 @@ static int ft_prli(struct fc_rport_priv *rdata, u32 spp_len,
        mutex_lock(&ft_lport_lock);
        ret = ft_prli_locked(rdata, spp_len, rspp, spp);
        mutex_unlock(&ft_lport_lock);
-       pr_debug("port_id %x flags %x ret %x\n",
-              rdata->ids.port_id, rspp ? rspp->spp_flags : 0, ret);
+       TFC_SESS_DBG(rdata->local_port, "port_id %x flags %x ret %x\n",
+                    rdata->ids.port_id, rspp ? rspp->spp_flags : 0, ret);
        return ret;
 }
 
@@ -477,11 +493,11 @@ static void ft_recv(struct fc_lport *lport, struct fc_frame *fp)
        struct ft_sess *sess;
        u32 sid = fc_frame_sid(fp);
 
-       pr_debug("sid %x\n", sid);
+       TFC_SESS_DBG(lport, "recv sid %x\n", sid);
 
        sess = ft_sess_get(lport, sid);
        if (!sess) {
-               pr_debug("sid %x sess lookup failed\n", sid);
+               TFC_SESS_DBG(lport, "sid %x sess lookup failed\n", sid);
                /* TBD XXX - if FCP_CMND, send PRLO */
                fc_frame_free(fp);
                return;
index 9b4815e81b0df01cf2160d752499b670c4a2d731..19bf2028e508437e46c96e1a5df89e763f6cf59c 100644 (file)
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/pci.h>
+#include <linux/acpi.h>
 #include <linux/thermal.h>
 #include <linux/pm.h>
 
 /* Intel PCH thermal Device IDs */
+#define PCH_THERMAL_DID_HSW_1  0x9C24 /* Haswell PCH */
+#define PCH_THERMAL_DID_HSW_2  0x8C24 /* Haswell PCH */
 #define PCH_THERMAL_DID_WPT    0x9CA4 /* Wildcat Point */
 #define PCH_THERMAL_DID_SKL    0x9D31 /* Skylake PCH */
 
@@ -66,9 +69,53 @@ struct pch_thermal_device {
        unsigned long crt_temp;
        int hot_trip_id;
        unsigned long hot_temp;
+       int psv_trip_id;
+       unsigned long psv_temp;
        bool bios_enabled;
 };
 
+#ifdef CONFIG_ACPI
+
+/*
+ * On some platforms, there is a companion ACPI device, which adds
+ * passive trip temperature using _PSV method. There is no specific
+ * passive temperature setting in MMIO interface of this PCI device.
+ */
+static void pch_wpt_add_acpi_psv_trip(struct pch_thermal_device *ptd,
+                                     int *nr_trips)
+{
+       struct acpi_device *adev;
+
+       ptd->psv_trip_id = -1;
+
+       adev = ACPI_COMPANION(&ptd->pdev->dev);
+       if (adev) {
+               unsigned long long r;
+               acpi_status status;
+
+               status = acpi_evaluate_integer(adev->handle, "_PSV", NULL,
+                                              &r);
+               if (ACPI_SUCCESS(status)) {
+                       unsigned long trip_temp;
+
+                       trip_temp = DECI_KELVIN_TO_MILLICELSIUS(r);
+                       if (trip_temp) {
+                               ptd->psv_temp = trip_temp;
+                               ptd->psv_trip_id = *nr_trips;
+                               ++(*nr_trips);
+                       }
+               }
+       }
+}
+#else
+static void pch_wpt_add_acpi_psv_trip(struct pch_thermal_device *ptd,
+                                     int *nr_trips)
+{
+       ptd->psv_trip_id = -1;
+
+}
+#endif
+
 static int pch_wpt_init(struct pch_thermal_device *ptd, int *nr_trips)
 {
        u8 tsel;
@@ -119,6 +166,8 @@ static int pch_wpt_init(struct pch_thermal_device *ptd, int *nr_trips)
                ++(*nr_trips);
        }
 
+       pch_wpt_add_acpi_psv_trip(ptd, nr_trips);
+
        return 0;
 }
 
@@ -194,6 +243,8 @@ static int pch_get_trip_type(struct thermal_zone_device *tzd, int trip,
                *type = THERMAL_TRIP_CRITICAL;
        else if (ptd->hot_trip_id == trip)
                *type = THERMAL_TRIP_HOT;
+       else if (ptd->psv_trip_id == trip)
+               *type = THERMAL_TRIP_PASSIVE;
        else
                return -EINVAL;
 
@@ -208,6 +259,8 @@ static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *tem
                *temp = ptd->crt_temp;
        else if (ptd->hot_trip_id == trip)
                *temp = ptd->hot_temp;
+       else if (ptd->psv_trip_id == trip)
+               *temp = ptd->psv_temp;
        else
                return -EINVAL;
 
@@ -242,6 +295,11 @@ static int intel_pch_thermal_probe(struct pci_dev *pdev,
                ptd->ops = &pch_dev_ops_wpt;
                dev_name = "pch_skylake";
                break;
+       case PCH_THERMAL_DID_HSW_1:
+       case PCH_THERMAL_DID_HSW_2:
+               ptd->ops = &pch_dev_ops_wpt;
+               dev_name = "pch_haswell";
+               break;
        default:
                dev_err(&pdev->dev, "unknown pch thermal device\n");
                return -ENODEV;
@@ -324,6 +382,8 @@ static int intel_pch_thermal_resume(struct device *device)
 static struct pci_device_id intel_pch_thermal_id[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_WPT) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_SKL) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_HSW_1) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_HSW_2) },
        { 0, },
 };
 MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
index 0e4dc0afcfd244d510b003575249c4c3ce1d16bd..7a223074df3d4338ede8ad0192ce12d0dcb0c1ce 100644 (file)
@@ -669,20 +669,10 @@ static struct thermal_cooling_device_ops powerclamp_cooling_ops = {
        .set_cur_state = powerclamp_set_cur_state,
 };
 
-static const struct x86_cpu_id intel_powerclamp_ids[] __initconst = {
-       { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_MWAIT },
-       { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_ARAT },
-       { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_NONSTOP_TSC },
-       { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_CONSTANT_TSC},
-       {}
-};
-MODULE_DEVICE_TABLE(x86cpu, intel_powerclamp_ids);
-
 static int __init powerclamp_probe(void)
 {
-       if (!x86_match_cpu(intel_powerclamp_ids)) {
-               pr_err("Intel powerclamp does not run on family %d model %d\n",
-                               boot_cpu_data.x86, boot_cpu_data.x86_model);
+       if (!boot_cpu_has(X86_FEATURE_MWAIT)) {
+               pr_err("CPU does not support MWAIT");
                return -ENODEV;
        }
 
index 886fcf37f291ac7c78654aa2f3a511f976846732..b9923464599f6fc18b825d902fe8f14b5555e981 100644 (file)
@@ -213,7 +213,7 @@ static int qrk_serial_setup(struct lpss8250 *lpss, struct uart_port *port)
        struct pci_dev *pdev = to_pci_dev(port->dev);
        int ret;
 
-       ret = pci_alloc_irq_vectors(pdev, 1, 1, 0);
+       ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
        if (ret < 0)
                return ret;
 
index 1bfb6fdbaa20861a40599f6c33facbf615788b6d..1731b98d2471077c762806b63f88993b0a475fc3 100644 (file)
@@ -83,7 +83,8 @@ static const struct serial8250_config uart_config[] = {
                .name           = "16550A",
                .fifo_size      = 16,
                .tx_loadsz      = 16,
-               .fcr            = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
+               .fcr            = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10 |
+                                 UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT,
                .rxtrig_bytes   = {1, 4, 8, 14},
                .flags          = UART_CAP_FIFO,
        },
index b8d9c8c9d02a9762a2be77861554f13e49488a0c..417d9e7038e1aa53ea3da50569d158f7b88d4c78 100644 (file)
@@ -99,7 +99,7 @@ static void uniphier_serial_out(struct uart_port *p, int offset, int value)
        case UART_LCR:
                valshift = UNIPHIER_UART_LCR_SHIFT;
                /* Divisor latch access bit does not exist. */
-               value &= ~(UART_LCR_DLAB << valshift);
+               value &= ~UART_LCR_DLAB;
                /* fall through */
        case UART_MCR:
                offset = UNIPHIER_UART_LCR_MCR;
@@ -199,7 +199,7 @@ static int uniphier_uart_probe(struct platform_device *pdev)
 
        regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!regs) {
-               dev_err(dev, "failed to get memory resource");
+               dev_err(dev, "failed to get memory resource\n");
                return -EINVAL;
        }
 
index c7831407a882d2bb19be29153926d156a2a10a93..25c1d7bc010043b15f1676660bef7577150252cb 100644 (file)
@@ -1625,6 +1625,7 @@ config SERIAL_SPRD_CONSOLE
 config SERIAL_STM32
        tristate "STMicroelectronics STM32 serial port support"
        select SERIAL_CORE
+       depends on HAS_DMA
        depends on ARM || COMPILE_TEST
        help
          This driver is for the on-chip Serial Controller on
index fd8aa1f4ba782b62466dadea4868a0005f6fe5e2..168b10cad47b5437c2152313fcad026e2747300a 100644 (file)
@@ -2132,11 +2132,29 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
                mode |= ATMEL_US_USMODE_RS485;
        } else if (termios->c_cflag & CRTSCTS) {
                /* RS232 with hardware handshake (RTS/CTS) */
-               if (atmel_use_dma_rx(port) && !atmel_use_fifo(port)) {
-                       dev_info(port->dev, "not enabling hardware flow control because DMA is used");
-                       termios->c_cflag &= ~CRTSCTS;
-               } else {
+               if (atmel_use_fifo(port) &&
+                   !mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) {
+                       /*
+                        * with ATMEL_US_USMODE_HWHS set, the controller will
+                        * be able to drive the RTS pin high/low when the RX
+                        * FIFO is above RXFTHRES/below RXFTHRES2.
+                        * It will also disable the transmitter when the CTS
+                        * pin is high.
+                        * This mode is not activated if CTS pin is a GPIO
+                        * because in this case, the transmitter is always
+                        * disabled (there must be an internal pull-up
+                        * responsible for this behaviour).
+                        * If the RTS pin is a GPIO, the controller won't be
+                        * able to drive it according to the FIFO thresholds,
+                        * but it will be handled by the driver.
+                        */
                        mode |= ATMEL_US_USMODE_HWHS;
+               } else {
+                       /*
+                        * For platforms without FIFO, the flow control is
+                        * handled by the driver.
+                        */
+                       mode |= ATMEL_US_USMODE_NORMAL;
                }
        } else {
                /* RS232 without hadware handshake */
index de9d5107c00a0e1430b9ad8f8dfb99b7d4b2c9b3..76103f2c4a8001e36e10fffc7581ee2ee4c885b6 100644 (file)
@@ -328,7 +328,7 @@ static void lpuart_dma_tx(struct lpuart_port *sport)
 
        sport->dma_tx_bytes = uart_circ_chars_pending(xmit);
 
-       if (xmit->tail < xmit->head) {
+       if (xmit->tail < xmit->head || xmit->head == 0) {
                sport->dma_tx_nents = 1;
                sg_init_one(sgl, xmit->buf + xmit->tail, sport->dma_tx_bytes);
        } else {
@@ -359,7 +359,6 @@ static void lpuart_dma_tx(struct lpuart_port *sport)
        sport->dma_tx_in_progress = true;
        sport->dma_tx_cookie = dmaengine_submit(sport->dma_tx_desc);
        dma_async_issue_pending(sport->dma_tx_chan);
-
 }
 
 static void lpuart_dma_tx_complete(void *arg)
index d391650b82e7be9bb63ac7df85a9de3e4fe0bed8..42caccb5e87eeabf732872225ef1527f427acea6 100644 (file)
@@ -419,6 +419,7 @@ static struct dmi_system_id pch_uart_dmi_table[] = {
                },
                (void *)MINNOW_UARTCLK,
        },
+       { }
 };
 
 /* Return UART clock, checking for board specific clocks. */
index 2675792a8f5963a37b82d708b0ce87f8f070d5dd..fb0672554123a196d75fd9eedca35a915ddc12e6 100644 (file)
@@ -1130,9 +1130,13 @@ static int sc16is7xx_gpio_direction_output(struct gpio_chip *chip,
 {
        struct sc16is7xx_port *s = gpiochip_get_data(chip);
        struct uart_port *port = &s->p[0].port;
+       u8 state = sc16is7xx_port_read(port, SC16IS7XX_IOSTATE_REG);
 
-       sc16is7xx_port_update(port, SC16IS7XX_IOSTATE_REG, BIT(offset),
-                             val ? BIT(offset) : 0);
+       if (val)
+               state |= BIT(offset);
+       else
+               state &= ~BIT(offset);
+       sc16is7xx_port_write(port, SC16IS7XX_IOSTATE_REG, state);
        sc16is7xx_port_update(port, SC16IS7XX_IODIR_REG, BIT(offset),
                              BIT(offset));
 
index 6e4f63627479db8d33547ef18fd1e6e365f5bdb7..f2303f390345e14664f31976662f7c804fbbb9d9 100644 (file)
@@ -111,7 +111,7 @@ void uart_write_wakeup(struct uart_port *port)
         * closed.  No cookie for you.
         */
        BUG_ON(!state);
-       tty_wakeup(state->port.tty);
+       tty_port_tty_wakeup(&state->port);
 }
 
 static void uart_stop(struct tty_struct *tty)
@@ -632,7 +632,7 @@ static void uart_flush_buffer(struct tty_struct *tty)
        if (port->ops->flush_buffer)
                port->ops->flush_buffer(port);
        uart_port_unlock(port, flags);
-       tty_wakeup(tty);
+       tty_port_tty_wakeup(&state->port);
 }
 
 /*
@@ -2746,8 +2746,6 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
        uport->cons = drv->cons;
        uport->minor = drv->tty_driver->minor_start + uport->line;
 
-       port->console = uart_console(uport);
-
        /*
         * If this port is a console, then the spinlock is already
         * initialised.
@@ -2761,6 +2759,8 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
 
        uart_configure_port(drv, state, uport);
 
+       port->console = uart_console(uport);
+
        num_groups = 2;
        if (uport->attr_group)
                num_groups++;
index 41d97492310271dbb3f2036d484b7b2ae5ee8c10..cd97ceb76e4ffe6f48af1a614532bdf42318e2de 100644 (file)
@@ -31,7 +31,7 @@ struct stm32_usart_info {
        struct stm32_usart_config cfg;
 };
 
-#define UNDEF_REG ~0
+#define UNDEF_REG 0xff
 
 /* Register offsets */
 struct stm32_usart_info stm32f4_info = {
index f37edaa5ac7577ed77c944d68e1fed7f526674e9..dd4c02fa4820a2f9c07c9ddfafd7fd7dd6be1fea 100644 (file)
@@ -1200,6 +1200,7 @@ static int __init cdns_early_console_setup(struct earlycon_device *device,
 OF_EARLYCON_DECLARE(cdns, "xlnx,xuartps", cdns_early_console_setup);
 OF_EARLYCON_DECLARE(cdns, "cdns,uart-r1p8", cdns_early_console_setup);
 OF_EARLYCON_DECLARE(cdns, "cdns,uart-r1p12", cdns_early_console_setup);
+OF_EARLYCON_DECLARE(cdns, "xlnx,zynqmp-uart", cdns_early_console_setup);
 
 /**
  * cdns_uart_console_write - perform write operation
@@ -1438,6 +1439,7 @@ static const struct of_device_id cdns_uart_of_match[] = {
        { .compatible = "xlnx,xuartps", },
        { .compatible = "cdns,uart-r1p8", },
        { .compatible = "cdns,uart-r1p12", .data = &zynqmp_uart_def },
+       { .compatible = "xlnx,zynqmp-uart", .data = &zynqmp_uart_def },
        {}
 };
 MODULE_DEVICE_TABLE(of, cdns_uart_of_match);
index 06fb39c1d6dd5e06fb7541030d881d9999813771..8c3bf3d613c061615bbcf15a607f371e9208c67b 100644 (file)
@@ -870,10 +870,15 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
        if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)
                return 0;
 
+       if (new_screen_size > (4 << 20))
+               return -EINVAL;
        newscreen = kmalloc(new_screen_size, GFP_USER);
        if (!newscreen)
                return -ENOMEM;
 
+       if (vc == sel_cons)
+               clear_selection();
+
        old_rows = vc->vc_rows;
        old_row_size = vc->vc_size_row;
 
@@ -1176,7 +1181,7 @@ static void csi_J(struct vc_data *vc, int vpar)
                        break;
                case 3: /* erase scroll-back buffer (and whole display) */
                        scr_memsetw(vc->vc_screenbuf, vc->vc_video_erase_char,
-                                   vc->vc_screenbuf_size >> 1);
+                                   vc->vc_screenbuf_size);
                        set_origin(vc);
                        if (con_is_visible(vc))
                                update_screen(vc);
index 96ae69502c86fac5b1b2f7306f049d7f7bb5085f..111b0e0b8698b76d0de983e856c89dadea92734e 100644 (file)
@@ -188,6 +188,8 @@ static void host_stop(struct ci_hdrc *ci)
 
        if (hcd) {
                usb_remove_hcd(hcd);
+               ci->role = CI_ROLE_END;
+               synchronize_irq(ci->irq);
                usb_put_hcd(hcd);
                if (ci->platdata->reg_vbus && !ci_otg_is_fsm_mode(ci) &&
                        (ci->platdata->flags & CI_HDRC_TURN_VBUS_EARLY_ON))
index fa9b26b915071ada49ee1b068ff098c09a962ff1..4c0fa0b173538847e680ae13e983d6a3534311d6 100644 (file)
@@ -463,9 +463,18 @@ static void dwc2_clear_force_mode(struct dwc2_hsotg *hsotg)
  */
 void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg)
 {
+       bool ret;
+
        switch (hsotg->dr_mode) {
        case USB_DR_MODE_HOST:
-               dwc2_force_mode(hsotg, true);
+               ret = dwc2_force_mode(hsotg, true);
+               /*
+                * NOTE: This is required for some rockchip soc based
+                * platforms on their host-only dwc2.
+                */
+               if (!ret)
+                       msleep(50);
+
                break;
        case USB_DR_MODE_PERIPHERAL:
                dwc2_force_mode(hsotg, false);
index aad4107ef927e26388f302ebbbd7907ad9a295c0..2a21a0414b1d385347ac700b4db5fda2f502c523 100644 (file)
@@ -259,6 +259,13 @@ enum dwc2_lx_state {
        DWC2_L3,        /* Off state */
 };
 
+/*
+ * Gadget periodic tx fifo sizes as used by legacy driver
+ * EP0 is not included
+ */
+#define DWC2_G_P_LEGACY_TX_FIFO_SIZE {256, 256, 256, 256, 768, 768, 768, \
+                                          768, 0, 0, 0, 0, 0, 0, 0}
+
 /* Gadget ep0 states */
 enum dwc2_ep0_state {
        DWC2_EP0_SETUP,
index 4cd6403a75668c35bef6a277f987bf41fc55ed27..24fbebc9b409050092c8a54296c445f129422e83 100644 (file)
@@ -186,10 +186,9 @@ static void dwc2_hsotg_ctrl_epint(struct dwc2_hsotg *hsotg,
  */
 static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
 {
-       unsigned int fifo;
+       unsigned int ep;
        unsigned int addr;
        int timeout;
-       u32 dptxfsizn;
        u32 val;
 
        /* Reset fifo map if not correctly cleared during previous session */
@@ -217,16 +216,16 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
         * them to endpoints dynamically according to maxpacket size value of
         * given endpoint.
         */
-       for (fifo = 1; fifo < MAX_EPS_CHANNELS; fifo++) {
-               dptxfsizn = dwc2_readl(hsotg->regs + DPTXFSIZN(fifo));
-
-               val = (dptxfsizn & FIFOSIZE_DEPTH_MASK) | addr;
-               addr += dptxfsizn >> FIFOSIZE_DEPTH_SHIFT;
-
-               if (addr > hsotg->fifo_mem)
-                       break;
+       for (ep = 1; ep < MAX_EPS_CHANNELS; ep++) {
+               if (!hsotg->g_tx_fifo_sz[ep])
+                       continue;
+               val = addr;
+               val |= hsotg->g_tx_fifo_sz[ep] << FIFOSIZE_DEPTH_SHIFT;
+               WARN_ONCE(addr + hsotg->g_tx_fifo_sz[ep] > hsotg->fifo_mem,
+                         "insufficient fifo memory");
+               addr += hsotg->g_tx_fifo_sz[ep];
 
-               dwc2_writel(val, hsotg->regs + DPTXFSIZN(fifo));
+               dwc2_writel(val, hsotg->regs + DPTXFSIZN(ep));
        }
 
        /*
@@ -3807,10 +3806,36 @@ static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg)
 static void dwc2_hsotg_of_probe(struct dwc2_hsotg *hsotg)
 {
        struct device_node *np = hsotg->dev->of_node;
+       u32 len = 0;
+       u32 i = 0;
 
        /* Enable dma if requested in device tree */
        hsotg->g_using_dma = of_property_read_bool(np, "g-use-dma");
 
+       /*
+       * Register TX periodic fifo size per endpoint.
+       * EP0 is excluded since it has no fifo configuration.
+       */
+       if (!of_find_property(np, "g-tx-fifo-size", &len))
+               goto rx_fifo;
+
+       len /= sizeof(u32);
+
+       /* Read tx fifo sizes other than ep0 */
+       if (of_property_read_u32_array(np, "g-tx-fifo-size",
+                                               &hsotg->g_tx_fifo_sz[1], len))
+               goto rx_fifo;
+
+       /* Add ep0 */
+       len++;
+
+       /* Make remaining TX fifos unavailable */
+       if (len < MAX_EPS_CHANNELS) {
+               for (i = len; i < MAX_EPS_CHANNELS; i++)
+                       hsotg->g_tx_fifo_sz[i] = 0;
+       }
+
+rx_fifo:
        /* Register RX fifo size */
        of_property_read_u32(np, "g-rx-fifo-size", &hsotg->g_rx_fifo_sz);
 
@@ -3832,10 +3857,13 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
        struct device *dev = hsotg->dev;
        int epnum;
        int ret;
+       int i;
+       u32 p_tx_fifo[] = DWC2_G_P_LEGACY_TX_FIFO_SIZE;
 
        /* Initialize to legacy fifo configuration values */
        hsotg->g_rx_fifo_sz = 2048;
        hsotg->g_np_g_tx_fifo_sz = 1024;
+       memcpy(&hsotg->g_tx_fifo_sz[1], p_tx_fifo, sizeof(p_tx_fifo));
        /* Device tree specific probe */
        dwc2_hsotg_of_probe(hsotg);
 
@@ -3853,6 +3881,9 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
        dev_dbg(dev, "NonPeriodic TXFIFO size: %d\n",
                                                hsotg->g_np_g_tx_fifo_sz);
        dev_dbg(dev, "RXFIFO size: %d\n", hsotg->g_rx_fifo_sz);
+       for (i = 0; i < MAX_EPS_CHANNELS; i++)
+               dev_dbg(dev, "Periodic TXFIFO%2d size: %d\n", i,
+                                               hsotg->g_tx_fifo_sz[i]);
 
        hsotg->gadget.max_speed = USB_SPEED_HIGH;
        hsotg->gadget.ops = &dwc2_hsotg_gadget_ops;
index 07cc8929f27134e40b1084389fb3efb3c29c58f6..1dfa56a5f1c511a6a40f38cb976ed1096af3c5db 100644 (file)
@@ -783,6 +783,7 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
                req->trb = trb;
                req->trb_dma = dwc3_trb_dma_offset(dep, trb);
                req->first_trb_index = dep->trb_enqueue;
+               dep->queued_requests++;
        }
 
        dwc3_ep_inc_enq(dep);
@@ -833,8 +834,6 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
 
        trb->ctrl |= DWC3_TRB_CTRL_HWO;
 
-       dep->queued_requests++;
-
        trace_dwc3_prepare_trb(dep, trb);
 }
 
@@ -1074,9 +1073,17 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
 
        list_add_tail(&req->list, &dep->pending_list);
 
-       if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
-                       dep->flags & DWC3_EP_PENDING_REQUEST) {
-               if (list_empty(&dep->started_list)) {
+       /*
+        * NOTICE: Isochronous endpoints should NEVER be prestarted. We must
+        * wait for a XferNotReady event so we will know what's the current
+        * (micro-)frame number.
+        *
+        * Without this trick, we are very, very likely gonna get Bus Expiry
+        * errors which will force us issue EndTransfer command.
+        */
+       if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
+               if ((dep->flags & DWC3_EP_PENDING_REQUEST) &&
+                               list_empty(&dep->started_list)) {
                        dwc3_stop_active_transfer(dwc, dep->number, true);
                        dep->flags = DWC3_EP_ENABLED;
                }
@@ -1861,8 +1868,11 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep,
        unsigned int            s_pkt = 0;
        unsigned int            trb_status;
 
-       dep->queued_requests--;
        dwc3_ep_inc_deq(dep);
+
+       if (req->trb == trb)
+               dep->queued_requests--;
+
        trace_dwc3_complete_trb(dep, trb);
 
        /*
@@ -2980,7 +2990,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
        kfree(dwc->setup_buf);
 
 err2:
-       dma_free_coherent(dwc->dev, sizeof(*dwc->ep0_trb),
+       dma_free_coherent(dwc->dev, sizeof(*dwc->ep0_trb) * 2,
                        dwc->ep0_trb, dwc->ep0_trb_addr);
 
 err1:
@@ -3005,7 +3015,7 @@ void dwc3_gadget_exit(struct dwc3 *dwc)
        kfree(dwc->setup_buf);
        kfree(dwc->zlp_buf);
 
-       dma_free_coherent(dwc->dev, sizeof(*dwc->ep0_trb),
+       dma_free_coherent(dwc->dev, sizeof(*dwc->ep0_trb) * 2,
                        dwc->ep0_trb, dwc->ep0_trb_addr);
 
        dma_free_coherent(dwc->dev, sizeof(*dwc->ctrl_req),
index 54ad100af35b487758460089ce476b7aaab4d07f..e40d47d47d82ad9afd7124ef3ab0151b6e6ecfa7 100644 (file)
@@ -136,8 +136,60 @@ struct ffs_epfile {
        /*
         * Buffer for holding data from partial reads which may happen since
         * we’re rounding user read requests to a multiple of a max packet size.
+        *
+        * The pointer is initialised with NULL value and may be set by
+        * __ffs_epfile_read_data function to point to a temporary buffer.
+        *
+        * In normal operation, calls to __ffs_epfile_read_buffered will consume
+        * data from said buffer and eventually free it.  Importantly, while the
+        * function is using the buffer, it sets the pointer to NULL.  This is
+        * all right since __ffs_epfile_read_data and __ffs_epfile_read_buffered
+        * can never run concurrently (they are synchronised by epfile->mutex)
+        * so the latter will not assign a new value to the pointer.
+        *
+        * Meanwhile ffs_func_eps_disable frees the buffer (if the pointer is
+        * valid) and sets the pointer to READ_BUFFER_DROP value.  This special
+        * value is crux of the synchronisation between ffs_func_eps_disable and
+        * __ffs_epfile_read_data.
+        *
+        * Once __ffs_epfile_read_data is about to finish it will try to set the
+        * pointer back to its old value (as described above), but seeing as the
+        * pointer is not-NULL (namely READ_BUFFER_DROP) it will instead free
+        * the buffer.
+        *
+        * == State transitions ==
+        *
+        * â€¢ ptr == NULL:  (initial state)
+        *   â—¦ __ffs_epfile_read_buffer_free: go to ptr == DROP
+        *   â—¦ __ffs_epfile_read_buffered:    nop
+        *   â—¦ __ffs_epfile_read_data allocates temp buffer: go to ptr == buf
+        *   â—¦ reading finishes:              n/a, not in â€˜and reading’ state
+        * â€¢ ptr == DROP:
+        *   â—¦ __ffs_epfile_read_buffer_free: nop
+        *   â—¦ __ffs_epfile_read_buffered:    go to ptr == NULL
+        *   â—¦ __ffs_epfile_read_data allocates temp buffer: free buf, nop
+        *   â—¦ reading finishes:              n/a, not in â€˜and reading’ state
+        * â€¢ ptr == buf:
+        *   â—¦ __ffs_epfile_read_buffer_free: free buf, go to ptr == DROP
+        *   â—¦ __ffs_epfile_read_buffered:    go to ptr == NULL and reading
+        *   â—¦ __ffs_epfile_read_data:        n/a, __ffs_epfile_read_buffered
+        *                                    is always called first
+        *   â—¦ reading finishes:              n/a, not in â€˜and reading’ state
+        * â€¢ ptr == NULL and reading:
+        *   â—¦ __ffs_epfile_read_buffer_free: go to ptr == DROP and reading
+        *   â—¦ __ffs_epfile_read_buffered:    n/a, mutex is held
+        *   â—¦ __ffs_epfile_read_data:        n/a, mutex is held
+        *   â—¦ reading finishes and â€¦
+        *     â€¦ all data read:               free buf, go to ptr == NULL
+        *     â€¦ otherwise:                   go to ptr == buf and reading
+        * â€¢ ptr == DROP and reading:
+        *   â—¦ __ffs_epfile_read_buffer_free: nop
+        *   â—¦ __ffs_epfile_read_buffered:    n/a, mutex is held
+        *   â—¦ __ffs_epfile_read_data:        n/a, mutex is held
+        *   â—¦ reading finishes:              free buf, go to ptr == DROP
         */
-       struct ffs_buffer               *read_buffer;   /* P: epfile->mutex */
+       struct ffs_buffer               *read_buffer;
+#define READ_BUFFER_DROP ((struct ffs_buffer *)ERR_PTR(-ESHUTDOWN))
 
        char                            name[5];
 
@@ -736,25 +788,47 @@ static void ffs_epfile_async_io_complete(struct usb_ep *_ep,
        schedule_work(&io_data->work);
 }
 
+static void __ffs_epfile_read_buffer_free(struct ffs_epfile *epfile)
+{
+       /*
+        * See comment in struct ffs_epfile for full read_buffer pointer
+        * synchronisation story.
+        */
+       struct ffs_buffer *buf = xchg(&epfile->read_buffer, READ_BUFFER_DROP);
+       if (buf && buf != READ_BUFFER_DROP)
+               kfree(buf);
+}
+
 /* Assumes epfile->mutex is held. */
 static ssize_t __ffs_epfile_read_buffered(struct ffs_epfile *epfile,
                                          struct iov_iter *iter)
 {
-       struct ffs_buffer *buf = epfile->read_buffer;
+       /*
+        * Null out epfile->read_buffer so ffs_func_eps_disable does not free
+        * the buffer while we are using it.  See comment in struct ffs_epfile
+        * for full read_buffer pointer synchronisation story.
+        */
+       struct ffs_buffer *buf = xchg(&epfile->read_buffer, NULL);
        ssize_t ret;
-       if (!buf)
+       if (!buf || buf == READ_BUFFER_DROP)
                return 0;
 
        ret = copy_to_iter(buf->data, buf->length, iter);
        if (buf->length == ret) {
                kfree(buf);
-               epfile->read_buffer = NULL;
-       } else if (unlikely(iov_iter_count(iter))) {
+               return ret;
+       }
+
+       if (unlikely(iov_iter_count(iter))) {
                ret = -EFAULT;
        } else {
                buf->length -= ret;
                buf->data += ret;
        }
+
+       if (cmpxchg(&epfile->read_buffer, NULL, buf))
+               kfree(buf);
+
        return ret;
 }
 
@@ -783,7 +857,15 @@ static ssize_t __ffs_epfile_read_data(struct ffs_epfile *epfile,
        buf->length = data_len;
        buf->data = buf->storage;
        memcpy(buf->storage, data + ret, data_len);
-       epfile->read_buffer = buf;
+
+       /*
+        * At this point read_buffer is NULL or READ_BUFFER_DROP (if
+        * ffs_func_eps_disable has been called in the meanwhile).  See comment
+        * in struct ffs_epfile for full read_buffer pointer synchronisation
+        * story.
+        */
+       if (unlikely(cmpxchg(&epfile->read_buffer, NULL, buf)))
+               kfree(buf);
 
        return ret;
 }
@@ -1097,8 +1179,7 @@ ffs_epfile_release(struct inode *inode, struct file *file)
 
        ENTER();
 
-       kfree(epfile->read_buffer);
-       epfile->read_buffer = NULL;
+       __ffs_epfile_read_buffer_free(epfile);
        ffs_data_closed(epfile->ffs);
 
        return 0;
@@ -1724,24 +1805,20 @@ static void ffs_func_eps_disable(struct ffs_function *func)
        unsigned count            = func->ffs->eps_count;
        unsigned long flags;
 
+       spin_lock_irqsave(&func->ffs->eps_lock, flags);
        do {
-               if (epfile)
-                       mutex_lock(&epfile->mutex);
-               spin_lock_irqsave(&func->ffs->eps_lock, flags);
                /* pending requests get nuked */
                if (likely(ep->ep))
                        usb_ep_disable(ep->ep);
                ++ep;
-               spin_unlock_irqrestore(&func->ffs->eps_lock, flags);
 
                if (epfile) {
                        epfile->ep = NULL;
-                       kfree(epfile->read_buffer);
-                       epfile->read_buffer = NULL;
-                       mutex_unlock(&epfile->mutex);
+                       __ffs_epfile_read_buffer_free(epfile);
                        ++epfile;
                }
        } while (--count);
+       spin_unlock_irqrestore(&func->ffs->eps_lock, flags);
 }
 
 static int ffs_func_eps_enable(struct ffs_function *func)
index 9c8c9ed1dc9e0b2186e60e66488ea1159f22d7b8..fe1811650dbc3d9fb0fc6a983486cbae3b653475 100644 (file)
@@ -590,8 +590,9 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
 
        /* throttle high/super speed IRQ rate back slightly */
        if (gadget_is_dualspeed(dev->gadget))
-               req->no_interrupt = (dev->gadget->speed == USB_SPEED_HIGH ||
-                                    dev->gadget->speed == USB_SPEED_SUPER)
+               req->no_interrupt = (((dev->gadget->speed == USB_SPEED_HIGH ||
+                                      dev->gadget->speed == USB_SPEED_SUPER)) &&
+                                       !list_empty(&dev->tx_reqs))
                        ? ((atomic_read(&dev->tx_qlen) % dev->qmult) != 0)
                        : 0;
 
index bb1f6c8f0f01ab492c6b5c0d1852c655d2cc26ee..45bc997d071131c1e7ef51c3968dd5e295994f44 100644 (file)
@@ -1978,7 +1978,7 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
                        dev_err(&pdev->dev, "of_probe: name error(%d)\n", ret);
                        goto err;
                }
-               ep->ep.name = name;
+               ep->ep.name = kasprintf(GFP_KERNEL, "ep%d", ep->index);
 
                ep->ep_regs = udc->regs + USBA_EPT_BASE(i);
                ep->dma_regs = udc->regs + USBA_DMA_BASE(i);
index 876dca4fc2162520603afdfd430e26d54b82531f..a268d9e8d6cfb17b214278e23c44267cf8c06e33 100644 (file)
@@ -39,7 +39,7 @@
 
 #define DRIVER_DESC "EHCI generic platform driver"
 #define EHCI_MAX_CLKS 4
-#define EHCI_MAX_RSTS 3
+#define EHCI_MAX_RSTS 4
 #define hcd_to_ehci_priv(h) ((struct ehci_platform_priv *)hcd_to_ehci(h)->priv)
 
 struct ehci_platform_priv {
index 5b5880c0ae1916d14c1ce997b8be9d3c2a9d3798..b38a228134df108d148037232126e815d9557a7b 100644 (file)
@@ -221,6 +221,12 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
        ohci->num_ports = board->ports;
        at91_start_hc(pdev);
 
+       /*
+        * The RemoteWakeupConnected bit has to be set explicitly
+        * before calling ohci_run. The reset value of this bit is 0.
+        */
+       ohci->hc_control = OHCI_CTRL_RWC;
+
        retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
        if (retval == 0) {
                device_wakeup_enable(hcd->self.controller);
@@ -677,9 +683,6 @@ ohci_hcd_at91_drv_suspend(struct device *dev)
         * REVISIT: some boards will be able to turn VBUS off...
         */
        if (!ohci_at91->wakeup) {
-               ohci->hc_control = ohci_readl(ohci, &ohci->regs->control);
-               ohci->hc_control &= OHCI_CTRL_RWC;
-               ohci_writel(ohci, ohci->hc_control, &ohci->regs->control);
                ohci->rh_state = OHCI_RH_HALTED;
 
                /* flush the writes */
index 1700908b84ef8b7c15716f07e448345f25fae392..86612ac3fda220e3d1c9b1b5c959f45f723d543d 100644 (file)
@@ -72,7 +72,7 @@
 static const char      hcd_name [] = "ohci_hcd";
 
 #define        STATECHANGE_DELAY       msecs_to_jiffies(300)
-#define        IO_WATCHDOG_DELAY       msecs_to_jiffies(250)
+#define        IO_WATCHDOG_DELAY       msecs_to_jiffies(275)
 
 #include "ohci.h"
 #include "pci-quirks.h"
index 730b9fd266852db5812e98456c9ff8299aa40ae6..0ef16900efedd7783489ade75594b4d0da798318 100644 (file)
@@ -1166,7 +1166,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                                xhci_set_link_state(xhci, port_array, wIndex,
                                                        XDEV_RESUME);
                                spin_unlock_irqrestore(&xhci->lock, flags);
-                               msleep(20);
+                               msleep(USB_RESUME_TIMEOUT);
                                spin_lock_irqsave(&xhci->lock, flags);
                                xhci_set_link_state(xhci, port_array, wIndex,
                                                        XDEV_U0);
@@ -1355,6 +1355,35 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
        return 0;
 }
 
+/*
+ * Workaround for missing Cold Attach Status (CAS) if device re-plugged in S3.
+ * warm reset a USB3 device stuck in polling or compliance mode after resume.
+ * See Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8
+ */
+static bool xhci_port_missing_cas_quirk(int port_index,
+                                            __le32 __iomem **port_array)
+{
+       u32 portsc;
+
+       portsc = readl(port_array[port_index]);
+
+       /* if any of these are set we are not stuck */
+       if (portsc & (PORT_CONNECT | PORT_CAS))
+               return false;
+
+       if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) &&
+           ((portsc & PORT_PLS_MASK) != XDEV_COMP_MODE))
+               return false;
+
+       /* clear wakeup/change bits, and do a warm port reset */
+       portsc &= ~(PORT_RWC_BITS | PORT_CEC | PORT_WAKE_BITS);
+       portsc |= PORT_WR;
+       writel(portsc, port_array[port_index]);
+       /* flush write */
+       readl(port_array[port_index]);
+       return true;
+}
+
 int xhci_bus_resume(struct usb_hcd *hcd)
 {
        struct xhci_hcd *xhci = hcd_to_xhci(hcd);
@@ -1392,6 +1421,14 @@ int xhci_bus_resume(struct usb_hcd *hcd)
                u32 temp;
 
                temp = readl(port_array[port_index]);
+
+               /* warm reset CAS limited ports stuck in polling/compliance */
+               if ((xhci->quirks & XHCI_MISSING_CAS) &&
+                   (hcd->speed >= HCD_USB3) &&
+                   xhci_port_missing_cas_quirk(port_index, port_array)) {
+                       xhci_dbg(xhci, "reset stuck port %d\n", port_index);
+                       continue;
+               }
                if (DEV_SUPERSPEED_ANY(temp))
                        temp &= ~(PORT_RWC_BITS | PORT_CEC | PORT_WAKE_BITS);
                else
@@ -1410,7 +1447,7 @@ int xhci_bus_resume(struct usb_hcd *hcd)
 
        if (need_usb2_u3_exit) {
                spin_unlock_irqrestore(&xhci->lock, flags);
-               msleep(20);
+               msleep(USB_RESUME_TIMEOUT);
                spin_lock_irqsave(&xhci->lock, flags);
        }
 
index d7b0f97abbad608200cbfb5b59d0faacfa1b8b43..e96ae80d107e94fd8db8c33cae52ff9153f14730 100644 (file)
 
 #define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI     0x8c31
 #define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI  0x9c31
+#define PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_XHCI       0x9cb1
 #define PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI            0x22b5
 #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI                0xa12f
 #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI       0x9d2f
 #define PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI             0x0aa8
 #define PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI             0x1aa8
+#define PCI_DEVICE_ID_INTEL_APL_XHCI                   0x5aa8
 
 static const char hcd_name[] = "xhci_hcd";
 
@@ -153,7 +155,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
                xhci->quirks |= XHCI_SPURIOUS_REBOOT;
        }
        if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
-               pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI) {
+               (pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI ||
+                pdev->device == PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_XHCI)) {
                xhci->quirks |= XHCI_SPURIOUS_REBOOT;
                xhci->quirks |= XHCI_SPURIOUS_WAKEUP;
        }
@@ -169,6 +172,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
                 pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI) {
                xhci->quirks |= XHCI_SSIC_PORT_UNUSED;
        }
+       if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
+           (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
+            pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI))
+               xhci->quirks |= XHCI_MISSING_CAS;
+
        if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
                        pdev->device == PCI_DEVICE_ID_EJ168) {
                xhci->quirks |= XHCI_RESET_ON_RESUME;
index b2c1dc5dc0f30f17fa2f4354537c193958ab5f78..f945380035d07e2f7af2bb73da9d39bf94475991 100644 (file)
@@ -314,6 +314,8 @@ struct xhci_op_regs {
 #define XDEV_U2                (0x2 << 5)
 #define XDEV_U3                (0x3 << 5)
 #define XDEV_INACTIVE  (0x6 << 5)
+#define XDEV_POLLING   (0x7 << 5)
+#define XDEV_COMP_MODE  (0xa << 5)
 #define XDEV_RESUME    (0xf << 5)
 /* true: port has power (see HCC_PPC) */
 #define PORT_POWER     (1 << 9)
@@ -1653,6 +1655,7 @@ struct xhci_hcd {
 #define XHCI_MTK_HOST          (1 << 21)
 #define XHCI_SSIC_PORT_UNUSED  (1 << 22)
 #define XHCI_NO_64BIT_SUPPORT  (1 << 23)
+#define XHCI_MISSING_CAS       (1 << 24)
        unsigned int            num_active_eps;
        unsigned int            limit_active_eps;
        /* There are two roothubs to keep track of bus suspend info for */
index bff4869a57cd193072215662e984e367eb551cdb..4042ea017985de56346d0ac1dd070f33db079d77 100644 (file)
@@ -1255,6 +1255,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
 
        map_dma_buffer(request, musb, musb_ep);
 
+       pm_runtime_get_sync(musb->controller);
        spin_lock_irqsave(&musb->lock, lockflags);
 
        /* don't queue if the ep is down */
@@ -1275,6 +1276,9 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
 
 unlock:
        spin_unlock_irqrestore(&musb->lock, lockflags);
+       pm_runtime_mark_last_busy(musb->controller);
+       pm_runtime_put_autosuspend(musb->controller);
+
        return status;
 }
 
index 1ab6973d4f6197083e766f70db455c4c7c8bd8e2..cc1225485509cbabda9c3241334889776edf8870 100644 (file)
@@ -287,6 +287,7 @@ static int omap2430_musb_init(struct musb *musb)
        }
        musb->isr = omap2430_musb_interrupt;
        phy_init(musb->phy);
+       phy_power_on(musb->phy);
 
        l = musb_readl(musb->mregs, OTG_INTERFSEL);
 
@@ -323,8 +324,6 @@ static void omap2430_musb_enable(struct musb *musb)
        struct musb_hdrc_platform_data *pdata = dev_get_platdata(dev);
        struct omap_musb_board_data *data = pdata->board_data;
 
-       if (!WARN_ON(!musb->phy))
-               phy_power_on(musb->phy);
 
        switch (glue->status) {
 
@@ -361,9 +360,6 @@ static void omap2430_musb_disable(struct musb *musb)
        struct device *dev = musb->controller;
        struct omap2430_glue *glue = dev_get_drvdata(dev->parent);
 
-       if (!WARN_ON(!musb->phy))
-               phy_power_off(musb->phy);
-
        if (glue->status != MUSB_UNKNOWN)
                omap_control_usb_set_mode(glue->control_otghs,
                        USB_MODE_DISCONNECT);
@@ -375,6 +371,7 @@ static int omap2430_musb_exit(struct musb *musb)
        struct omap2430_glue *glue = dev_get_drvdata(dev->parent);
 
        omap2430_low_level_exit(musb);
+       phy_power_off(musb->phy);
        phy_exit(musb->phy);
        musb->phy = NULL;
        cancel_work_sync(&glue->omap_musb_mailbox_work);
index 1d70add926f0ff632964ca92fc92a3f2f035fb7b..d544b331c9f2ce80d83095f30184e2102eda6ea6 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+#include <linux/delay.h>
 #include <linux/io.h>
 #include "common.h"
 #include "rcar3.h"
@@ -35,10 +36,13 @@ static int usbhs_rcar3_power_ctrl(struct platform_device *pdev,
 
        usbhs_write32(priv, UGCTRL2, UGCTRL2_RESERVED_3 | UGCTRL2_USB0SEL_OTG);
 
-       if (enable)
+       if (enable) {
                usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM);
-       else
+               /* The controller on R-Car Gen3 needs to wait up to 45 usec */
+               udelay(45);
+       } else {
                usbhs_bset(priv, LPSTS, LPSTS_SUSPM, 0);
+       }
 
        return 0;
 }
index 54a4de0efdbaa48fa7e1a49672e114657737b42d..f61477bed3a8d3b16ec444dc090def82bd509798 100644 (file)
@@ -1077,7 +1077,9 @@ static int cp210x_tiocmget(struct tty_struct *tty)
        u8 control;
        int result;
 
-       cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
+       result = cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
+       if (result)
+               return result;
 
        result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
                |((control & CONTROL_RTS) ? TIOCM_RTS : 0)
index b2d767e743fc2258c8b13e84401e5f34b60efcec..0ff7f38d7800502cdf9159299e603d7475ff9beb 100644 (file)
@@ -986,7 +986,8 @@ static const struct usb_device_id id_table_combined[] = {
        /* ekey Devices */
        { USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) },
        /* Infineon Devices */
-       { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) },
+       { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC1798_PID, 1) },
+       { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC2X7_PID, 1) },
        /* GE Healthcare devices */
        { USB_DEVICE(GE_HEALTHCARE_VID, GE_HEALTHCARE_NEMO_TRACKER_PID) },
        /* Active Research (Actisense) devices */
index f87a938cf00571eb69edbd8d625f58041384d5fa..21011c0a4c6401ffd942e83040f3df53099d9e91 100644 (file)
 /*
  * Infineon Technologies
  */
-#define INFINEON_VID           0x058b
-#define INFINEON_TRIBOARD_PID  0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
+#define INFINEON_VID                   0x058b
+#define INFINEON_TRIBOARD_TC1798_PID   0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
+#define INFINEON_TRIBOARD_TC2X7_PID    0x0043 /* DAS JTAG TriBoard TC2X7 V1.0 */
 
 /*
  * Acton Research Corp.
index d213cf44a7e45ef8ae692bf4a9e63d31088cae8b..4a037b4a79cf3168cb45d60d1b6488ac21681570 100644 (file)
@@ -1078,7 +1078,8 @@ static int usb_serial_probe(struct usb_interface *interface,
 
        serial->disconnected = 0;
 
-       usb_serial_console_init(serial->port[0]->minor);
+       if (num_ports > 0)
+               usb_serial_console_init(serial->port[0]->minor);
 exit:
        module_put(type->driver.owner);
        return 0;
index 79b2b628066d81c5e5c6ceda10f707587c55b1c8..79451f7ef1b76301cc881379ad28ce12e4b4dc33 100644 (file)
@@ -133,6 +133,13 @@ static void bytewise_xor(void *_bo, const void *_bi1, const void *_bi2,
                bo[itr] = bi1[itr] ^ bi2[itr];
 }
 
+/* Scratch space for MAC calculations. */
+struct wusb_mac_scratch {
+       struct aes_ccm_b0 b0;
+       struct aes_ccm_b1 b1;
+       struct aes_ccm_a ax;
+};
+
 /*
  * CC-MAC function WUSB1.0[6.5]
  *
@@ -197,16 +204,15 @@ static void bytewise_xor(void *_bo, const void *_bi1, const void *_bi2,
  *       what sg[4] is for. Maybe there is a smarter way to do this.
  */
 static int wusb_ccm_mac(struct crypto_skcipher *tfm_cbc,
-                       struct crypto_cipher *tfm_aes, void *mic,
+                       struct crypto_cipher *tfm_aes,
+                       struct wusb_mac_scratch *scratch,
+                       void *mic,
                        const struct aes_ccm_nonce *n,
                        const struct aes_ccm_label *a, const void *b,
                        size_t blen)
 {
        int result = 0;
        SKCIPHER_REQUEST_ON_STACK(req, tfm_cbc);
-       struct aes_ccm_b0 b0;
-       struct aes_ccm_b1 b1;
-       struct aes_ccm_a ax;
        struct scatterlist sg[4], sg_dst;
        void *dst_buf;
        size_t dst_size;
@@ -218,16 +224,17 @@ static int wusb_ccm_mac(struct crypto_skcipher *tfm_cbc,
         * These checks should be compile time optimized out
         * ensure @a fills b1's mac_header and following fields
         */
-       WARN_ON(sizeof(*a) != sizeof(b1) - sizeof(b1.la));
-       WARN_ON(sizeof(b0) != sizeof(struct aes_ccm_block));
-       WARN_ON(sizeof(b1) != sizeof(struct aes_ccm_block));
-       WARN_ON(sizeof(ax) != sizeof(struct aes_ccm_block));
+       WARN_ON(sizeof(*a) != sizeof(scratch->b1) - sizeof(scratch->b1.la));
+       WARN_ON(sizeof(scratch->b0) != sizeof(struct aes_ccm_block));
+       WARN_ON(sizeof(scratch->b1) != sizeof(struct aes_ccm_block));
+       WARN_ON(sizeof(scratch->ax) != sizeof(struct aes_ccm_block));
 
        result = -ENOMEM;
        zero_padding = blen % sizeof(struct aes_ccm_block);
        if (zero_padding)
                zero_padding = sizeof(struct aes_ccm_block) - zero_padding;
-       dst_size = blen + sizeof(b0) + sizeof(b1) + zero_padding;
+       dst_size = blen + sizeof(scratch->b0) + sizeof(scratch->b1) +
+               zero_padding;
        dst_buf = kzalloc(dst_size, GFP_KERNEL);
        if (!dst_buf)
                goto error_dst_buf;
@@ -235,9 +242,9 @@ static int wusb_ccm_mac(struct crypto_skcipher *tfm_cbc,
        memset(iv, 0, sizeof(iv));
 
        /* Setup B0 */
-       b0.flags = 0x59;        /* Format B0 */
-       b0.ccm_nonce = *n;
-       b0.lm = cpu_to_be16(0); /* WUSB1.0[6.5] sez l(m) is 0 */
+       scratch->b0.flags = 0x59;       /* Format B0 */
+       scratch->b0.ccm_nonce = *n;
+       scratch->b0.lm = cpu_to_be16(0);        /* WUSB1.0[6.5] sez l(m) is 0 */
 
        /* Setup B1
         *
@@ -246,12 +253,12 @@ static int wusb_ccm_mac(struct crypto_skcipher *tfm_cbc,
         * 14'--after clarification, it means to use A's contents
         * for MAC Header, EO, sec reserved and padding.
         */
-       b1.la = cpu_to_be16(blen + 14);
-       memcpy(&b1.mac_header, a, sizeof(*a));
+       scratch->b1.la = cpu_to_be16(blen + 14);
+       memcpy(&scratch->b1.mac_header, a, sizeof(*a));
 
        sg_init_table(sg, ARRAY_SIZE(sg));
-       sg_set_buf(&sg[0], &b0, sizeof(b0));
-       sg_set_buf(&sg[1], &b1, sizeof(b1));
+       sg_set_buf(&sg[0], &scratch->b0, sizeof(scratch->b0));
+       sg_set_buf(&sg[1], &scratch->b1, sizeof(scratch->b1));
        sg_set_buf(&sg[2], b, blen);
        /* 0 if well behaved :) */
        sg_set_buf(&sg[3], bzero, zero_padding);
@@ -276,11 +283,12 @@ static int wusb_ccm_mac(struct crypto_skcipher *tfm_cbc,
         * POS Crypto API: size is assumed to be AES's block size.
         * Thanks for documenting it -- tip taken from airo.c
         */
-       ax.flags = 0x01;                /* as per WUSB 1.0 spec */
-       ax.ccm_nonce = *n;
-       ax.counter = 0;
-       crypto_cipher_encrypt_one(tfm_aes, (void *)&ax, (void *)&ax);
-       bytewise_xor(mic, &ax, iv, 8);
+       scratch->ax.flags = 0x01;               /* as per WUSB 1.0 spec */
+       scratch->ax.ccm_nonce = *n;
+       scratch->ax.counter = 0;
+       crypto_cipher_encrypt_one(tfm_aes, (void *)&scratch->ax,
+                                 (void *)&scratch->ax);
+       bytewise_xor(mic, &scratch->ax, iv, 8);
        result = 8;
 error_cbc_crypt:
        kfree(dst_buf);
@@ -303,6 +311,7 @@ ssize_t wusb_prf(void *out, size_t out_size,
        struct aes_ccm_nonce n = *_n;
        struct crypto_skcipher *tfm_cbc;
        struct crypto_cipher *tfm_aes;
+       struct wusb_mac_scratch *scratch;
        u64 sfn = 0;
        __le64 sfn_le;
 
@@ -329,17 +338,25 @@ ssize_t wusb_prf(void *out, size_t out_size,
                printk(KERN_ERR "E: can't set AES key: %d\n", (int)result);
                goto error_setkey_aes;
        }
+       scratch = kmalloc(sizeof(*scratch), GFP_KERNEL);
+       if (!scratch) {
+               result = -ENOMEM;
+               goto error_alloc_scratch;
+       }
 
        for (bitr = 0; bitr < (len + 63) / 64; bitr++) {
                sfn_le = cpu_to_le64(sfn++);
                memcpy(&n.sfn, &sfn_le, sizeof(n.sfn)); /* n.sfn++... */
-               result = wusb_ccm_mac(tfm_cbc, tfm_aes, out + bytes,
+               result = wusb_ccm_mac(tfm_cbc, tfm_aes, scratch, out + bytes,
                                      &n, a, b, blen);
                if (result < 0)
                        goto error_ccm_mac;
                bytes += result;
        }
        result = bytes;
+
+       kfree(scratch);
+error_alloc_scratch:
 error_ccm_mac:
 error_setkey_aes:
        crypto_free_cipher(tfm_aes);
index 3b1ca441107370d39c54bd4bffa24248eaa730c5..a2564ab91e62d3c2775441d292e54e1d25492a40 100644 (file)
@@ -686,8 +686,8 @@ static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
        if (!pages)
                return -ENOMEM;
 
-       ret = get_user_pages_unlocked((unsigned long)buf, nr_pages, WRITE,
-                       0, pages);
+       ret = get_user_pages_unlocked((unsigned long)buf, nr_pages, pages,
+                       FOLL_WRITE);
 
        if (ret < nr_pages) {
                nr_pages = ret;
index 60bdad3a689b8280b373164f7a13fdcb2a5a1cc2..150ce2abf6c8f193b4e3b5c9fa66001cd709f39e 100644 (file)
@@ -245,8 +245,8 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)
        /* Get the physical addresses of the source buffer */
        down_read(&current->mm->mmap_sem);
        num_pinned = get_user_pages(param.local_vaddr - lb_offset,
-               num_pages, (param.source == -1) ? READ : WRITE,
-               0, pages, NULL);
+               num_pages, (param.source == -1) ? 0 : FOLL_WRITE,
+               pages, NULL);
        up_read(&current->mm->mmap_sem);
 
        if (num_pinned != num_pages) {
index 15b64076bc26257abffd02a60de7b2fe4b22c4e0..bdbadaa47ef3ecb481b200785d4bc1aa9981f6e4 100644 (file)
@@ -156,12 +156,16 @@ size_t vme_get_size(struct vme_resource *resource)
        case VME_MASTER:
                retval = vme_master_get(resource, &enabled, &base, &size,
                        &aspace, &cycle, &dwidth);
+               if (retval)
+                       return 0;
 
                return size;
                break;
        case VME_SLAVE:
                retval = vme_slave_get(resource, &enabled, &base, &size,
                        &buf_base, &aspace, &cycle);
+               if (retval)
+                       return 0;
 
                return size;
                break;
index e473e3b237203fcc7440128e804e3bbb141fc0b2..6d1fbda0f461ca2d2304eaeb43aef35adfd77cf4 100644 (file)
@@ -499,6 +499,10 @@ static int wdat_wdt_resume_noirq(struct device *dev)
                ret = wdat_wdt_enable_reboot(wdat);
                if (ret)
                        return ret;
+
+               ret = wdat_wdt_ping(&wdat->wdd);
+               if (ret)
+                       return ret;
        }
 
        return wdat_wdt_start(&wdat->wdd);
index e12bd3635f832e7fa5330667fe77f32fe305db4b..26e5e8507f031f3118229f5164286160d3bcece6 100644 (file)
@@ -168,7 +168,9 @@ static void do_suspend(void)
 #endif /* CONFIG_HIBERNATE_CALLBACKS */
 
 struct shutdown_handler {
-       const char *command;
+#define SHUTDOWN_CMD_SIZE 11
+       const char command[SHUTDOWN_CMD_SIZE];
+       bool flag;
        void (*cb)(void);
 };
 
@@ -206,22 +208,22 @@ static void do_reboot(void)
        ctrl_alt_del();
 }
 
+static struct shutdown_handler shutdown_handlers[] = {
+       { "poweroff",   true,   do_poweroff },
+       { "halt",       false,  do_poweroff },
+       { "reboot",     true,   do_reboot   },
+#ifdef CONFIG_HIBERNATE_CALLBACKS
+       { "suspend",    true,   do_suspend  },
+#endif
+};
+
 static void shutdown_handler(struct xenbus_watch *watch,
                             const char **vec, unsigned int len)
 {
        char *str;
        struct xenbus_transaction xbt;
        int err;
-       static struct shutdown_handler handlers[] = {
-               { "poweroff",   do_poweroff },
-               { "halt",       do_poweroff },
-               { "reboot",     do_reboot   },
-#ifdef CONFIG_HIBERNATE_CALLBACKS
-               { "suspend",    do_suspend  },
-#endif
-               {NULL, NULL},
-       };
-       static struct shutdown_handler *handler;
+       int idx;
 
        if (shutting_down != SHUTDOWN_INVALID)
                return;
@@ -238,13 +240,13 @@ static void shutdown_handler(struct xenbus_watch *watch,
                return;
        }
 
-       for (handler = &handlers[0]; handler->command; handler++) {
-               if (strcmp(str, handler->command) == 0)
+       for (idx = 0; idx < ARRAY_SIZE(shutdown_handlers); idx++) {
+               if (strcmp(str, shutdown_handlers[idx].command) == 0)
                        break;
        }
 
        /* Only acknowledge commands which we are prepared to handle. */
-       if (handler->cb)
+       if (idx < ARRAY_SIZE(shutdown_handlers))
                xenbus_write(xbt, "control", "shutdown", "");
 
        err = xenbus_transaction_end(xbt, 0);
@@ -253,8 +255,8 @@ static void shutdown_handler(struct xenbus_watch *watch,
                goto again;
        }
 
-       if (handler->cb) {
-               handler->cb();
+       if (idx < ARRAY_SIZE(shutdown_handlers)) {
+               shutdown_handlers[idx].cb();
        } else {
                pr_info("Ignoring shutdown request: %s\n", str);
                shutting_down = SHUTDOWN_INVALID;
@@ -310,6 +312,9 @@ static struct notifier_block xen_reboot_nb = {
 static int setup_shutdown_watcher(void)
 {
        int err;
+       int idx;
+#define FEATURE_PATH_SIZE (SHUTDOWN_CMD_SIZE + sizeof("feature-"))
+       char node[FEATURE_PATH_SIZE];
 
        err = register_xenbus_watch(&shutdown_watch);
        if (err) {
@@ -326,6 +331,14 @@ static int setup_shutdown_watcher(void)
        }
 #endif
 
+       for (idx = 0; idx < ARRAY_SIZE(shutdown_handlers); idx++) {
+               if (!shutdown_handlers[idx].flag)
+                       continue;
+               snprintf(node, FEATURE_PATH_SIZE, "feature-%s",
+                        shutdown_handlers[idx].command);
+               xenbus_printf(XBT_NIL, "control", node, "%u", 1);
+       }
+
        return 0;
 }
 
index c1010f018bd857985b5bf0ada1f5286f0f68b2bf..1e8be12ebb559880fa5d10f05a2782ad46c36be3 100644 (file)
@@ -364,7 +364,7 @@ static int xenbus_write_transaction(unsigned msg_type,
 
 static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u)
 {
-       struct watch_adapter *watch, *tmp_watch;
+       struct watch_adapter *watch;
        char *path, *token;
        int err, rc;
        LIST_HEAD(staging_q);
@@ -399,7 +399,7 @@ static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u)
                }
                list_add(&watch->list, &u->watches);
        } else {
-               list_for_each_entry_safe(watch, tmp_watch, &u->watches, list) {
+               list_for_each_entry(watch, &u->watches, list) {
                        if (!strcmp(watch->token, token) &&
                            !strcmp(watch->watch.node, path)) {
                                unregister_xenbus_watch(&watch->watch);
index 611a231196757abdb040615acf2a80244360a6a2..6d40a972ffb24585c7e386d5817f53672841e0fc 100644 (file)
@@ -335,7 +335,9 @@ static int backend_state;
 static void xenbus_reset_backend_state_changed(struct xenbus_watch *w,
                                        const char **v, unsigned int l)
 {
-       xenbus_scanf(XBT_NIL, v[XS_WATCH_PATH], "", "%i", &backend_state);
+       if (xenbus_scanf(XBT_NIL, v[XS_WATCH_PATH], "", "%i",
+                        &backend_state) != 1)
+               backend_state = XenbusStateUnknown;
        printk(KERN_DEBUG "XENBUS: backend %s %s\n",
                        v[XS_WATCH_PATH], xenbus_strstate(backend_state));
        wake_up(&backend_state_wq);
index ccc70d96958d87e0b2db3fc901b513e51a9aa803..d4d8b7e36b2ffe7b84ddb78e4064b606aaee5e01 100644 (file)
@@ -698,7 +698,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
 
                        ret = btrfs_map_bio(root, comp_bio, mirror_num, 0);
                        if (ret) {
-                               bio->bi_error = ret;
+                               comp_bio->bi_error = ret;
                                bio_endio(comp_bio);
                        }
 
@@ -728,7 +728,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
 
        ret = btrfs_map_bio(root, comp_bio, mirror_num, 0);
        if (ret) {
-               bio->bi_error = ret;
+               comp_bio->bi_error = ret;
                bio_endio(comp_bio);
        }
 
index 01bc36cec26ea132f215aed048bc4f3f5e4e80fd..71261b459863b92ea8e0dff40e99fc79b449286a 100644 (file)
@@ -5805,6 +5805,64 @@ static int changed_extent(struct send_ctx *sctx,
        int ret = 0;
 
        if (sctx->cur_ino != sctx->cmp_key->objectid) {
+
+               if (result == BTRFS_COMPARE_TREE_CHANGED) {
+                       struct extent_buffer *leaf_l;
+                       struct extent_buffer *leaf_r;
+                       struct btrfs_file_extent_item *ei_l;
+                       struct btrfs_file_extent_item *ei_r;
+
+                       leaf_l = sctx->left_path->nodes[0];
+                       leaf_r = sctx->right_path->nodes[0];
+                       ei_l = btrfs_item_ptr(leaf_l,
+                                             sctx->left_path->slots[0],
+                                             struct btrfs_file_extent_item);
+                       ei_r = btrfs_item_ptr(leaf_r,
+                                             sctx->right_path->slots[0],
+                                             struct btrfs_file_extent_item);
+
+                       /*
+                        * We may have found an extent item that has changed
+                        * only its disk_bytenr field and the corresponding
+                        * inode item was not updated. This case happens due to
+                        * very specific timings during relocation when a leaf
+                        * that contains file extent items is COWed while
+                        * relocation is ongoing and its in the stage where it
+                        * updates data pointers. So when this happens we can
+                        * safely ignore it since we know it's the same extent,
+                        * but just at different logical and physical locations
+                        * (when an extent is fully replaced with a new one, we
+                        * know the generation number must have changed too,
+                        * since snapshot creation implies committing the current
+                        * transaction, and the inode item must have been updated
+                        * as well).
+                        * This replacement of the disk_bytenr happens at
+                        * relocation.c:replace_file_extents() through
+                        * relocation.c:btrfs_reloc_cow_block().
+                        */
+                       if (btrfs_file_extent_generation(leaf_l, ei_l) ==
+                           btrfs_file_extent_generation(leaf_r, ei_r) &&
+                           btrfs_file_extent_ram_bytes(leaf_l, ei_l) ==
+                           btrfs_file_extent_ram_bytes(leaf_r, ei_r) &&
+                           btrfs_file_extent_compression(leaf_l, ei_l) ==
+                           btrfs_file_extent_compression(leaf_r, ei_r) &&
+                           btrfs_file_extent_encryption(leaf_l, ei_l) ==
+                           btrfs_file_extent_encryption(leaf_r, ei_r) &&
+                           btrfs_file_extent_other_encoding(leaf_l, ei_l) ==
+                           btrfs_file_extent_other_encoding(leaf_r, ei_r) &&
+                           btrfs_file_extent_type(leaf_l, ei_l) ==
+                           btrfs_file_extent_type(leaf_r, ei_r) &&
+                           btrfs_file_extent_disk_bytenr(leaf_l, ei_l) !=
+                           btrfs_file_extent_disk_bytenr(leaf_r, ei_r) &&
+                           btrfs_file_extent_disk_num_bytes(leaf_l, ei_l) ==
+                           btrfs_file_extent_disk_num_bytes(leaf_r, ei_r) &&
+                           btrfs_file_extent_offset(leaf_l, ei_l) ==
+                           btrfs_file_extent_offset(leaf_r, ei_r) &&
+                           btrfs_file_extent_num_bytes(leaf_l, ei_l) ==
+                           btrfs_file_extent_num_bytes(leaf_r, ei_r))
+                               return 0;
+               }
+
                inconsistent_snapshot_error(sctx, result, "extent");
                return -EIO;
        }
index 528cae123dc9ebaa4c27ea32bd92b05f7d8e2af5..3d33c4e41e5f9a38195436432e54314548076b0d 100644 (file)
@@ -2713,14 +2713,12 @@ static inline void btrfs_remove_all_log_ctxs(struct btrfs_root *root,
                                             int index, int error)
 {
        struct btrfs_log_ctx *ctx;
+       struct btrfs_log_ctx *safe;
 
-       if (!error) {
-               INIT_LIST_HEAD(&root->log_ctxs[index]);
-               return;
-       }
-
-       list_for_each_entry(ctx, &root->log_ctxs[index], list)
+       list_for_each_entry_safe(ctx, safe, &root->log_ctxs[index], list) {
+               list_del_init(&ctx->list);
                ctx->log_ret = error;
+       }
 
        INIT_LIST_HEAD(&root->log_ctxs[index]);
 }
@@ -2961,13 +2959,9 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
        mutex_unlock(&root->log_mutex);
 
 out_wake_log_root:
-       /*
-        * We needn't get log_mutex here because we are sure all
-        * the other tasks are blocked.
-        */
+       mutex_lock(&log_root_tree->log_mutex);
        btrfs_remove_all_log_ctxs(log_root_tree, index2, ret);
 
-       mutex_lock(&log_root_tree->log_mutex);
        log_root_tree->log_transid_committed++;
        atomic_set(&log_root_tree->log_commit[index2], 0);
        mutex_unlock(&log_root_tree->log_mutex);
@@ -2978,10 +2972,8 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
        if (waitqueue_active(&log_root_tree->log_commit_wait[index2]))
                wake_up(&log_root_tree->log_commit_wait[index2]);
 out:
-       /* See above. */
-       btrfs_remove_all_log_ctxs(root, index1, ret);
-
        mutex_lock(&root->log_mutex);
+       btrfs_remove_all_log_ctxs(root, index1, ret);
        root->log_transid_committed++;
        atomic_set(&root->log_commit[index1], 0);
        mutex_unlock(&root->log_mutex);
index 7bf08825cc1107a20842533fd93b4f2c2d128577..18630e80020809f18a6a534b2a88249bfa81bd80 100644 (file)
@@ -1272,7 +1272,8 @@ static ssize_t ceph_read_iter(struct kiocb *iocb, struct iov_iter *to)
                statret = __ceph_do_getattr(inode, page,
                                            CEPH_STAT_CAP_INLINE_DATA, !!page);
                if (statret < 0) {
-                        __free_page(page);
+                       if (page)
+                               __free_page(page);
                        if (statret == -ENODATA) {
                                BUG_ON(retry_op != READ_INLINE);
                                goto again;
index bca1b49c1c4b1bc8d2f83e4389a48c1f107de661..ef4d046473256009843b6b4c82e1b5b1e451b02d 100644 (file)
@@ -1511,7 +1511,8 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
                        ceph_fill_dirfrag(d_inode(parent), rinfo->dir_dir);
        }
 
-       if (ceph_frag_is_leftmost(frag) && req->r_readdir_offset == 2) {
+       if (ceph_frag_is_leftmost(frag) && req->r_readdir_offset == 2 &&
+           !(rinfo->hash_order && req->r_path2)) {
                /* note dir version at start of readdir so we can tell
                 * if any dentries get dropped */
                req->r_dir_release_cnt = atomic64_read(&ci->i_release_count);
index a29ffce981879d5fe46f3858ee90c2fd840f98c1..b382e5910eea8bf7cf7a4711fac79104e6466224 100644 (file)
@@ -845,6 +845,8 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc)
                err = ceph_fs_debugfs_init(fsc);
                if (err < 0)
                        goto fail;
+       } else {
+               root = dget(fsc->sb->s_root);
        }
 
        fsc->mount_state = CEPH_MOUNT_MOUNTED;
index 40b703217977df467aa4b0c4cdc2ffd68423bd30..febc28f9e2c27648e1621531e90cefc482ed2e5d 100644 (file)
@@ -16,7 +16,7 @@
 static int __remove_xattr(struct ceph_inode_info *ci,
                          struct ceph_inode_xattr *xattr);
 
-const struct xattr_handler ceph_other_xattr_handler;
+static const struct xattr_handler ceph_other_xattr_handler;
 
 /*
  * List of handlers for synthetic system.* attributes. Other
@@ -1086,7 +1086,7 @@ static int ceph_set_xattr_handler(const struct xattr_handler *handler,
        return __ceph_setxattr(inode, name, value, size, flags);
 }
 
-const struct xattr_handler ceph_other_xattr_handler = {
+static const struct xattr_handler ceph_other_xattr_handler = {
        .prefix = "",  /* match any name => handlers called with full name */
        .get = ceph_get_xattr_handler,
        .set = ceph_set_xattr_handler,
index 61057b7dbddbe17532940f02677668bb9d67152b..98f87fe8f1862d57866b211abeb76e19837d550a 100644 (file)
@@ -151,7 +151,10 @@ static int do_page_crypto(struct inode *inode,
                        struct page *src_page, struct page *dest_page,
                        gfp_t gfp_flags)
 {
-       u8 xts_tweak[FS_XTS_TWEAK_SIZE];
+       struct {
+               __le64 index;
+               u8 padding[FS_XTS_TWEAK_SIZE - sizeof(__le64)];
+       } xts_tweak;
        struct skcipher_request *req = NULL;
        DECLARE_FS_COMPLETION_RESULT(ecr);
        struct scatterlist dst, src;
@@ -171,17 +174,15 @@ static int do_page_crypto(struct inode *inode,
                req, CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP,
                page_crypt_complete, &ecr);
 
-       BUILD_BUG_ON(FS_XTS_TWEAK_SIZE < sizeof(index));
-       memcpy(xts_tweak, &index, sizeof(index));
-       memset(&xts_tweak[sizeof(index)], 0,
-                       FS_XTS_TWEAK_SIZE - sizeof(index));
+       BUILD_BUG_ON(sizeof(xts_tweak) != FS_XTS_TWEAK_SIZE);
+       xts_tweak.index = cpu_to_le64(index);
+       memset(xts_tweak.padding, 0, sizeof(xts_tweak.padding));
 
        sg_init_table(&dst, 1);
        sg_set_page(&dst, dest_page, PAGE_SIZE, 0);
        sg_init_table(&src, 1);
        sg_set_page(&src, src_page, PAGE_SIZE, 0);
-       skcipher_request_set_crypt(req, &src, &dst, PAGE_SIZE,
-                                       xts_tweak);
+       skcipher_request_set_crypt(req, &src, &dst, PAGE_SIZE, &xts_tweak);
        if (rw == FS_DECRYPT)
                res = crypto_skcipher_decrypt(req);
        else
index ed115acb5dee04bd15726ed2b9f368f6d13315cc..6865663aac69690f7ccdce030c48488a13ce917b 100644 (file)
@@ -109,6 +109,8 @@ int fscrypt_process_policy(struct file *filp,
        if (ret)
                return ret;
 
+       inode_lock(inode);
+
        if (!inode_has_encryption_context(inode)) {
                if (!S_ISDIR(inode->i_mode))
                        ret = -EINVAL;
@@ -127,6 +129,8 @@ int fscrypt_process_policy(struct file *filp,
                ret = -EINVAL;
        }
 
+       inode_unlock(inode);
+
        mnt_drop_write_file(filp);
        return ret;
 }
index 6fcfb3f7b137951b133d3db95431c23bc2d4677f..4e497b9ee71ee96d0647721e4649feff7adaf7c1 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -191,6 +191,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
 {
        struct page *page;
        int ret;
+       unsigned int gup_flags = FOLL_FORCE;
 
 #ifdef CONFIG_STACK_GROWSUP
        if (write) {
@@ -199,12 +200,16 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
                        return NULL;
        }
 #endif
+
+       if (write)
+               gup_flags |= FOLL_WRITE;
+
        /*
         * We are doing an exec().  'current' is the process
         * doing the exec and bprm->mm is the new process's mm.
         */
-       ret = get_user_pages_remote(current, bprm->mm, pos, 1, write,
-                       1, &page, NULL);
+       ret = get_user_pages_remote(current, bprm->mm, pos, 1, gup_flags,
+                       &page, NULL);
        if (ret <= 0)
                return NULL;
 
index 79101651fe9ed2a6ccb3682ba39c590755b5bb00..42f9a0a0c4caf09722bc69fa278d509a7b7f16b3 100644 (file)
@@ -137,7 +137,7 @@ static bool exofs_check_page(struct page *page)
 bad_entry:
        EXOFS_ERR(
                "ERROR [exofs_check_page]: bad entry in directory(0x%lx): %s - "
-               "offset=%lu, inode=0x%llu, rec_len=%d, name_len=%d\n",
+               "offset=%lu, inode=0x%llx, rec_len=%d, name_len=%d\n",
                dir->i_ino, error, (page->index<<PAGE_SHIFT)+offs,
                _LLU(le64_to_cpu(p->inode_no)),
                rec_len, p->name_len);
index d831e24dc88534844aa03a98ba2963f9d3e4b3d0..41b8b44a391cb5dc8ed833cb95b632424372e038 100644 (file)
@@ -622,7 +622,7 @@ static int ext2_get_blocks(struct inode *inode,
                           u32 *bno, bool *new, bool *boundary,
                           int create)
 {
-       int err = -EIO;
+       int err;
        int offsets[4];
        Indirect chain[4];
        Indirect *partial;
@@ -639,7 +639,7 @@ static int ext2_get_blocks(struct inode *inode,
        depth = ext2_block_to_path(inode,iblock,offsets,&blocks_to_boundary);
 
        if (depth == 0)
-               return (err);
+               return -EIO;
 
        partial = ext2_get_branch(inode, depth, offsets, chain, &err);
        /* Simplest case - block found, no allocation needed */
@@ -761,7 +761,6 @@ static int ext2_get_blocks(struct inode *inode,
        ext2_splice_branch(inode, iblock, partial, indirect_blks, count);
        mutex_unlock(&ei->truncate_mutex);
 got_it:
-       *bno = le32_to_cpu(chain[depth-1].key);
        if (count > blocks_to_boundary)
                *boundary = true;
        err = count;
@@ -772,6 +771,8 @@ static int ext2_get_blocks(struct inode *inode,
                brelse(partial->bh);
                partial--;
        }
+       if (err > 0)
+               *bno = le32_to_cpu(chain[depth-1].key);
        return err;
 }
 
index 02ddec6d8a7da3135cef70cc2960bd8789f20378..fdb19543af1e62f9b990c944b92fd5dce0fd644a 100644 (file)
@@ -128,12 +128,12 @@ static void debug_print_tree(struct ext4_sb_info *sbi)
        node = rb_first(&sbi->system_blks);
        while (node) {
                entry = rb_entry(node, struct ext4_system_zone, node);
-               printk("%s%llu-%llu", first ? "" : ", ",
+               printk(KERN_CONT "%s%llu-%llu", first ? "" : ", ",
                       entry->start_blk, entry->start_blk + entry->count - 1);
                first = 0;
                node = rb_next(node);
        }
-       printk("\n");
+       printk(KERN_CONT "\n");
 }
 
 int ext4_setup_system_zone(struct super_block *sb)
index 3ef1df6ae9ec6f67102c52cf9624a317e321d19b..1aba469f82209fe40d602579a17964346749e024 100644 (file)
 #ifdef CONFIG_EXT4_DEBUG
 extern ushort ext4_mballoc_debug;
 
-#define mb_debug(n, fmt, a...)                                         \
-       do {                                                            \
-               if ((n) <= ext4_mballoc_debug) {                        \
-                       printk(KERN_DEBUG "(%s, %d): %s: ",             \
-                              __FILE__, __LINE__, __func__);           \
-                       printk(fmt, ## a);                              \
-               }                                                       \
-       } while (0)
+#define mb_debug(n, fmt, ...)                                          \
+do {                                                                   \
+       if ((n) <= ext4_mballoc_debug) {                                \
+               printk(KERN_DEBUG "(%s, %d): %s: " fmt,                 \
+                      __FILE__, __LINE__, __func__, ##__VA_ARGS__);    \
+       }                                                               \
+} while (0)
 #else
-#define mb_debug(n, fmt, a...)         no_printk(fmt, ## a)
+#define mb_debug(n, fmt, ...)  no_printk(fmt, ##__VA_ARGS__)
 #endif
 
 #define EXT4_MB_HISTORY_ALLOC          1       /* allocation */
index f92f10d4f66ace5dd13c528ac0f2ca005e066667..104f8bfba71822dd55f05b0caaebbf41aa2eb941 100644 (file)
@@ -577,12 +577,13 @@ static inline unsigned dx_node_limit(struct inode *dir)
 static void dx_show_index(char * label, struct dx_entry *entries)
 {
        int i, n = dx_get_count (entries);
-       printk(KERN_DEBUG "%s index ", label);
+       printk(KERN_DEBUG "%s index", label);
        for (i = 0; i < n; i++) {
-               printk("%x->%lu ", i ? dx_get_hash(entries + i) :
-                               0, (unsigned long)dx_get_block(entries + i));
+               printk(KERN_CONT " %x->%lu",
+                      i ? dx_get_hash(entries + i) : 0,
+                      (unsigned long)dx_get_block(entries + i));
        }
-       printk("\n");
+       printk(KERN_CONT "\n");
 }
 
 struct stats
@@ -679,7 +680,7 @@ static struct stats dx_show_leaf(struct inode *dir,
                }
                de = ext4_next_entry(de, size);
        }
-       printk("(%i)\n", names);
+       printk(KERN_CONT "(%i)\n", names);
        return (struct stats) { names, space, 1 };
 }
 
@@ -798,7 +799,7 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
                q = entries + count - 1;
                while (p <= q) {
                        m = p + (q - p) / 2;
-                       dxtrace(printk("."));
+                       dxtrace(printk(KERN_CONT "."));
                        if (dx_get_hash(m) > hash)
                                q = m - 1;
                        else
@@ -810,7 +811,7 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
                        at = entries;
                        while (n--)
                        {
-                               dxtrace(printk(","));
+                               dxtrace(printk(KERN_CONT ","));
                                if (dx_get_hash(++at) > hash)
                                {
                                        at--;
@@ -821,7 +822,8 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
                }
 
                at = p - 1;
-               dxtrace(printk(" %x->%u\n", at == entries ? 0 : dx_get_hash(at),
+               dxtrace(printk(KERN_CONT " %x->%u\n",
+                              at == entries ? 0 : dx_get_hash(at),
                               dx_get_block(at)));
                frame->entries = entries;
                frame->at = at;
index 6db81fbcbaa6cce558b6ef9f7e613e8284e898a6..20da99da0a343dbc863e165f9ca05cb49d4d4831 100644 (file)
@@ -597,14 +597,15 @@ void __ext4_std_error(struct super_block *sb, const char *function,
 void __ext4_abort(struct super_block *sb, const char *function,
                unsigned int line, const char *fmt, ...)
 {
+       struct va_format vaf;
        va_list args;
 
        save_error_info(sb, function, line);
        va_start(args, fmt);
-       printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: ", sb->s_id,
-              function, line);
-       vprintk(fmt, args);
-       printk("\n");
+       vaf.fmt = fmt;
+       vaf.va = &args;
+       printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: %pV\n",
+              sb->s_id, function, line, &vaf);
        va_end(args);
 
        if ((sb->s_flags & MS_RDONLY) == 0) {
@@ -2715,12 +2716,12 @@ static void print_daily_error_info(unsigned long arg)
                       es->s_first_error_func,
                       le32_to_cpu(es->s_first_error_line));
                if (es->s_first_error_ino)
-                       printk(": inode %u",
+                       printk(KERN_CONT ": inode %u",
                               le32_to_cpu(es->s_first_error_ino));
                if (es->s_first_error_block)
-                       printk(": block %llu", (unsigned long long)
+                       printk(KERN_CONT ": block %llu", (unsigned long long)
                               le64_to_cpu(es->s_first_error_block));
-               printk("\n");
+               printk(KERN_CONT "\n");
        }
        if (es->s_last_error_time) {
                printk(KERN_NOTICE "EXT4-fs (%s): last error at time %u: %.*s:%d",
@@ -2729,12 +2730,12 @@ static void print_daily_error_info(unsigned long arg)
                       es->s_last_error_func,
                       le32_to_cpu(es->s_last_error_line));
                if (es->s_last_error_ino)
-                       printk(": inode %u",
+                       printk(KERN_CONT ": inode %u",
                               le32_to_cpu(es->s_last_error_ino));
                if (es->s_last_error_block)
-                       printk(": block %llu", (unsigned long long)
+                       printk(KERN_CONT ": block %llu", (unsigned long long)
                               le64_to_cpu(es->s_last_error_block));
-               printk("\n");
+               printk(KERN_CONT "\n");
        }
        mod_timer(&sbi->s_err_report, jiffies + 24*60*60*HZ);  /* Once a day */
 }
index 73bcfd41f5f262453e729fc11c4604b5109de842..42145be5c6b4dea4258b35586693ae336f047d25 100644 (file)
@@ -223,14 +223,18 @@ static struct attribute *ext4_attrs[] = {
 EXT4_ATTR_FEATURE(lazy_itable_init);
 EXT4_ATTR_FEATURE(batched_discard);
 EXT4_ATTR_FEATURE(meta_bg_resize);
+#ifdef CONFIG_EXT4_FS_ENCRYPTION
 EXT4_ATTR_FEATURE(encryption);
+#endif
 EXT4_ATTR_FEATURE(metadata_csum_seed);
 
 static struct attribute *ext4_feat_attrs[] = {
        ATTR_LIST(lazy_itable_init),
        ATTR_LIST(batched_discard),
        ATTR_LIST(meta_bg_resize),
+#ifdef CONFIG_EXT4_FS_ENCRYPTION
        ATTR_LIST(encryption),
+#endif
        ATTR_LIST(metadata_csum_seed),
        NULL,
 };
index c15d63389957bda0926a187da5df4bfcf7a9668c..d77be9e9f5352f2eedd1ab005dba20a899bbbbf6 100644 (file)
 #include "acl.h"
 
 #ifdef EXT4_XATTR_DEBUG
-# define ea_idebug(inode, f...) do { \
-               printk(KERN_DEBUG "inode %s:%lu: ", \
-                       inode->i_sb->s_id, inode->i_ino); \
-               printk(f); \
-               printk("\n"); \
-       } while (0)
-# define ea_bdebug(bh, f...) do { \
-               printk(KERN_DEBUG "block %pg:%lu: ",               \
-                      bh->b_bdev, (unsigned long) bh->b_blocknr); \
-               printk(f); \
-               printk("\n"); \
-       } while (0)
+# define ea_idebug(inode, fmt, ...)                                    \
+       printk(KERN_DEBUG "inode %s:%lu: " fmt "\n",                    \
+              inode->i_sb->s_id, inode->i_ino, ##__VA_ARGS__)
+# define ea_bdebug(bh, fmt, ...)                                       \
+       printk(KERN_DEBUG "block %pg:%lu: " fmt "\n",                   \
+              bh->b_bdev, (unsigned long)bh->b_blocknr, ##__VA_ARGS__)
 #else
 # define ea_idebug(inode, fmt, ...)    no_printk(fmt, ##__VA_ARGS__)
 # define ea_bdebug(bh, fmt, ...)       no_printk(fmt, ##__VA_ARGS__)
@@ -241,7 +235,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header,
        int error = -EFSCORRUPTED;
 
        if (((void *) header >= end) ||
-           (header->h_magic != le32_to_cpu(EXT4_XATTR_MAGIC)))
+           (header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC)))
                goto errout;
        error = ext4_xattr_check_names(entry, end, entry);
 errout:
index 93985c64d8a8bef1328ddd5f35cc7d047f41fc3a..6f14ee923acd2b4cf75f93bed945f6fc04b79c93 100644 (file)
@@ -852,16 +852,16 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
 
        for (segno = start_segno; segno < end_segno; segno++) {
 
-               if (get_valid_blocks(sbi, segno, 1) == 0 ||
-                                       unlikely(f2fs_cp_error(sbi)))
-                       goto next;
-
                /* find segment summary of victim */
                sum_page = find_get_page(META_MAPPING(sbi),
                                        GET_SUM_BLOCK(sbi, segno));
-               f2fs_bug_on(sbi, !PageUptodate(sum_page));
                f2fs_put_page(sum_page, 0);
 
+               if (get_valid_blocks(sbi, segno, 1) == 0 ||
+                               !PageUptodate(sum_page) ||
+                               unlikely(f2fs_cp_error(sbi)))
+                       goto next;
+
                sum = page_address(sum_page);
                f2fs_bug_on(sbi, type != GET_SUM_TYPE((&sum->footer)));
 
index 013d1d36fbbf7fa3e3f321a05c8a5e956b731cb6..a8ee8c33ca782dbe4a4c17f42bf91fda9e83a523 100644 (file)
@@ -433,8 +433,7 @@ iomap_page_mkwrite_actor(struct inode *inode, loff_t pos, loff_t length,
        struct page *page = data;
        int ret;
 
-       ret = __block_write_begin_int(page, pos & ~PAGE_MASK, length,
-                       NULL, iomap);
+       ret = __block_write_begin_int(page, pos, length, NULL, iomap);
        if (ret)
                return ret;
 
@@ -561,7 +560,7 @@ int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fi,
        }
 
        while (len > 0) {
-               ret = iomap_apply(inode, start, len, 0, ops, &ctx,
+               ret = iomap_apply(inode, start, len, IOMAP_REPORT, ops, &ctx,
                                iomap_fiemap_actor);
                /* inode with no (attribute) mapping will give ENOENT */
                if (ret == -ENOENT)
index ad0c745ebad72e89fd987e0f67de5e61f525ff2a..871c8b39209913d95708398688df19ca31b0eba7 100644 (file)
@@ -687,6 +687,11 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
        pri_bh = NULL;
 
 root_found:
+       /* We don't support read-write mounts */
+       if (!(s->s_flags & MS_RDONLY)) {
+               error = -EACCES;
+               goto out_freebh;
+       }
 
        if (joliet_level && (pri == NULL || !opt.rock)) {
                /* This is the case of Joliet with the norock mount flag.
@@ -1501,9 +1506,6 @@ struct inode *__isofs_iget(struct super_block *sb,
 static struct dentry *isofs_mount(struct file_system_type *fs_type,
        int flags, const char *dev_name, void *data)
 {
-       /* We don't support read-write mounts */
-       if (!(flags & MS_RDONLY))
-               return ERR_PTR(-EACCES);
        return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super);
 }
 
index 3d8246a9faa454ec8e3774b1b6320ce0a12f67da..e1652665bd93d0cf30dece02b5a1b7692fdec811 100644 (file)
@@ -1149,6 +1149,7 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
                JBUFFER_TRACE(jh, "file as BJ_Reserved");
                spin_lock(&journal->j_list_lock);
                __jbd2_journal_file_buffer(jh, transaction, BJ_Reserved);
+               spin_unlock(&journal->j_list_lock);
        } else if (jh->b_transaction == journal->j_committing_transaction) {
                /* first access by this transaction */
                jh->b_modified = 0;
@@ -1156,8 +1157,8 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
                JBUFFER_TRACE(jh, "set next transaction");
                spin_lock(&journal->j_list_lock);
                jh->b_next_transaction = transaction;
+               spin_unlock(&journal->j_list_lock);
        }
-       spin_unlock(&journal->j_list_lock);
        jbd_unlock_bh_state(bh);
 
        /*
index 2bcb86e6e6ca0988cbe4337c970247869db34a24..78219d5644e90aacaf3aeb9fdfe2a234f4e31b84 100644 (file)
@@ -911,6 +911,7 @@ const struct file_operations kernfs_file_fops = {
        .open           = kernfs_fop_open,
        .release        = kernfs_fop_release,
        .poll           = kernfs_fop_poll,
+       .fsync          = noop_fsync,
 };
 
 /**
index ce93b416b490fa558589a6bdd2bb620ffb108fcc..22c5b4aa49611ac46cb50dbf4fc8ef25ec500b34 100644 (file)
@@ -1609,6 +1609,7 @@ int fcntl_getlease(struct file *filp)
 
        ctx = smp_load_acquire(&inode->i_flctx);
        if (ctx && !list_empty_careful(&ctx->flc_lease)) {
+               percpu_down_read_preempt_disable(&file_rwsem);
                spin_lock(&ctx->flc_lock);
                time_out_leases(inode, &dispose);
                list_for_each_entry(fl, &ctx->flc_lease, fl_list) {
@@ -1618,6 +1619,8 @@ int fcntl_getlease(struct file *filp)
                        break;
                }
                spin_unlock(&ctx->flc_lock);
+               percpu_up_read_preempt_enable(&file_rwsem);
+
                locks_dispose_list(&dispose);
        }
        return type;
@@ -2529,11 +2532,14 @@ locks_remove_lease(struct file *filp, struct file_lock_context *ctx)
        if (list_empty(&ctx->flc_lease))
                return;
 
+       percpu_down_read_preempt_disable(&file_rwsem);
        spin_lock(&ctx->flc_lock);
        list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list)
                if (filp == fl->fl_file)
                        lease_modify(fl, F_UNLCK, &dispose);
        spin_unlock(&ctx->flc_lock);
+       percpu_up_read_preempt_enable(&file_rwsem);
+
        locks_dispose_list(&dispose);
 }
 
index 217847679f0eac675492ac049cbc0a42a6f75066..2905479f214a4654223ec90ae13e21138ac2be4d 100644 (file)
@@ -344,9 +344,10 @@ static void bl_write_cleanup(struct work_struct *work)
                u64 start = hdr->args.offset & (loff_t)PAGE_MASK;
                u64 end = (hdr->args.offset + hdr->args.count +
                        PAGE_SIZE - 1) & (loff_t)PAGE_MASK;
+               u64 lwb = hdr->args.offset + hdr->args.count;
 
                ext_tree_mark_written(bl, start >> SECTOR_SHIFT,
-                                       (end - start) >> SECTOR_SHIFT, end);
+                                       (end - start) >> SECTOR_SHIFT, lwb);
        }
 
        pnfs_ld_write_done(hdr);
index ad917bd72b38c3b213ce994ee2d063b111cb6277..7897826d7c51bb33f3459939cdb9cac6ab4e9178 100644 (file)
@@ -1545,7 +1545,7 @@ static int update_open_stateid(struct nfs4_state *state,
        struct nfs_client *clp = server->nfs_client;
        struct nfs_inode *nfsi = NFS_I(state->inode);
        struct nfs_delegation *deleg_cur;
-       nfs4_stateid freeme = {0};
+       nfs4_stateid freeme = { };
        int ret = 0;
 
        fmode &= (FMODE_READ|FMODE_WRITE);
index 1e8fe844e69fdaa92c80c9ca162d736c8b06a984..5355efba4bc8c13f4e2ac2f5a7dfe7a6a6284225 100644 (file)
@@ -73,7 +73,7 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
                }
        }
 
-       dentry->d_time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
+       orangefs_set_timeout(dentry);
        ret = 1;
 out_release_op:
        op_release(new_op);
@@ -94,8 +94,9 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
 static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags)
 {
        int ret;
+       unsigned long time = (unsigned long) dentry->d_fsdata;
 
-       if (time_before(jiffies, dentry->d_time))
+       if (time_before(jiffies, time))
                return 1;
 
        if (flags & LOOKUP_RCU)
index 66ea0cc37b189fc0b129606ef9893cc68a4b6d43..02cc6139ec90798900f6c626934c9f6d2baee266 100644 (file)
@@ -621,9 +621,9 @@ static int orangefs_file_release(struct inode *inode, struct file *file)
         * readahead cache (if any); this forces an expensive refresh of
         * data for the next caller of mmap (or 'get_block' accesses)
         */
-       if (file->f_path.dentry->d_inode &&
-           file->f_path.dentry->d_inode->i_mapping &&
-           mapping_nrpages(&file->f_path.dentry->d_inode->i_data)) {
+       if (file_inode(file) &&
+           file_inode(file)->i_mapping &&
+           mapping_nrpages(&file_inode(file)->i_data)) {
                if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) {
                        gossip_debug(GOSSIP_INODE_DEBUG,
                            "calling flush_racache on %pU\n",
@@ -632,7 +632,7 @@ static int orangefs_file_release(struct inode *inode, struct file *file)
                        gossip_debug(GOSSIP_INODE_DEBUG,
                            "flush_racache finished\n");
                }
-               truncate_inode_pages(file->f_path.dentry->d_inode->i_mapping,
+               truncate_inode_pages(file_inode(file)->i_mapping,
                                     0);
        }
        return 0;
@@ -648,7 +648,7 @@ static int orangefs_fsync(struct file *file,
 {
        int ret = -EINVAL;
        struct orangefs_inode_s *orangefs_inode =
-               ORANGEFS_I(file->f_path.dentry->d_inode);
+               ORANGEFS_I(file_inode(file));
        struct orangefs_kernel_op_s *new_op = NULL;
 
        /* required call */
@@ -661,7 +661,7 @@ static int orangefs_fsync(struct file *file,
 
        ret = service_operation(new_op,
                        "orangefs_fsync",
-                       get_interruptible_flag(file->f_path.dentry->d_inode));
+                       get_interruptible_flag(file_inode(file)));
 
        gossip_debug(GOSSIP_FILE_DEBUG,
                     "orangefs_fsync got return value of %d\n",
@@ -669,7 +669,7 @@ static int orangefs_fsync(struct file *file,
 
        op_release(new_op);
 
-       orangefs_flush_inode(file->f_path.dentry->d_inode);
+       orangefs_flush_inode(file_inode(file));
        return ret;
 }
 
index d15d3d2dba6225ce52bf97127a2de62dae609b8d..a290ff6ec7569dc3b5eea9ded2df0e8483c49d65 100644 (file)
@@ -72,7 +72,7 @@ static int orangefs_create(struct inode *dir,
 
        d_instantiate(dentry, inode);
        unlock_new_inode(inode);
-       dentry->d_time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
+       orangefs_set_timeout(dentry);
        ORANGEFS_I(inode)->getattr_time = jiffies - 1;
 
        gossip_debug(GOSSIP_NAME_DEBUG,
@@ -183,7 +183,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
                goto out;
        }
 
-       dentry->d_time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
+       orangefs_set_timeout(dentry);
 
        inode = orangefs_iget(dir->i_sb, &new_op->downcall.resp.lookup.refn);
        if (IS_ERR(inode)) {
@@ -322,7 +322,7 @@ static int orangefs_symlink(struct inode *dir,
 
        d_instantiate(dentry, inode);
        unlock_new_inode(inode);
-       dentry->d_time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
+       orangefs_set_timeout(dentry);
        ORANGEFS_I(inode)->getattr_time = jiffies - 1;
 
        gossip_debug(GOSSIP_NAME_DEBUG,
@@ -386,7 +386,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
 
        d_instantiate(dentry, inode);
        unlock_new_inode(inode);
-       dentry->d_time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
+       orangefs_set_timeout(dentry);
        ORANGEFS_I(inode)->getattr_time = jiffies - 1;
 
        gossip_debug(GOSSIP_NAME_DEBUG,
index 0a82048f3aafadbc3b8195acba3a877ed65f2a0d..3bf803d732c5b3702f735c5776cae6d249b85364 100644 (file)
@@ -580,4 +580,11 @@ static inline void orangefs_i_size_write(struct inode *inode, loff_t i_size)
 #endif
 }
 
+static inline void orangefs_set_timeout(struct dentry *dentry)
+{
+       unsigned long time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
+
+       dentry->d_fsdata = (void *) time;
+}
+
 #endif /* __ORANGEFSKERNEL_H */
index 89600fd5963d46d5a5bd0915bde36850f7e71110..81818adb8e9ee3cc1adfbd5d0487d427f8c1f531 100644 (file)
@@ -412,10 +412,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
        mm = get_task_mm(task);
        if (mm) {
                vsize = task_vsize(mm);
-               if (permitted) {
-                       eip = KSTK_EIP(task);
-                       esp = KSTK_ESP(task);
-               }
+               /*
+                * esp and eip are intentionally zeroed out.  There is no
+                * non-racy way to read them without freezing the task.
+                * Programs that need reliable values can use ptrace(2).
+                */
        }
 
        get_task_comm(tcomm, task);
index c2964d890c9a58910d4d9c2b53c5845637fed70e..ca651ac00660889a86fcd5c27d4a29aa709d5a53 100644 (file)
@@ -832,6 +832,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
        unsigned long addr = *ppos;
        ssize_t copied;
        char *page;
+       unsigned int flags;
 
        if (!mm)
                return 0;
@@ -844,6 +845,11 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
        if (!atomic_inc_not_zero(&mm->mm_users))
                goto free;
 
+       /* Maybe we should limit FOLL_FORCE to actual ptrace users? */
+       flags = FOLL_FORCE;
+       if (write)
+               flags |= FOLL_WRITE;
+
        while (count > 0) {
                int this_len = min_t(int, count, PAGE_SIZE);
 
@@ -852,7 +858,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
                        break;
                }
 
-               this_len = access_remote_vm(mm, addr, page, this_len, write);
+               this_len = access_remote_vm(mm, addr, page, this_len, flags);
                if (!this_len) {
                        if (!copied)
                                copied = -EIO;
@@ -964,8 +970,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
                max_len = min_t(size_t, PAGE_SIZE, count);
                this_len = min(max_len, this_len);
 
-               retval = access_remote_vm(mm, (env_start + src),
-                       page, this_len, 0);
+               retval = access_remote_vm(mm, (env_start + src), page, this_len, 0);
 
                if (retval <= 0) {
                        ret = retval;
@@ -1007,6 +1012,9 @@ static ssize_t auxv_read(struct file *file, char __user *buf,
 {
        struct mm_struct *mm = file->private_data;
        unsigned int nwords = 0;
+
+       if (!mm)
+               return 0;
        do {
                nwords += 2;
        } while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */
index 6909582ce5e5b9f6d94a89a4e1eb184488c0518e..35b92d81692f098efc911cbdd334182a96c546a8 100644 (file)
@@ -266,24 +266,15 @@ static int do_maps_open(struct inode *inode, struct file *file,
  * /proc/PID/maps that is the stack of the main task.
  */
 static int is_stack(struct proc_maps_private *priv,
-                   struct vm_area_struct *vma, int is_pid)
+                   struct vm_area_struct *vma)
 {
-       int stack = 0;
-
-       if (is_pid) {
-               stack = vma->vm_start <= vma->vm_mm->start_stack &&
-                       vma->vm_end >= vma->vm_mm->start_stack;
-       } else {
-               struct inode *inode = priv->inode;
-               struct task_struct *task;
-
-               rcu_read_lock();
-               task = pid_task(proc_pid(inode), PIDTYPE_PID);
-               if (task)
-                       stack = vma_is_stack_for_task(vma, task);
-               rcu_read_unlock();
-       }
-       return stack;
+       /*
+        * We make no effort to guess what a given thread considers to be
+        * its "stack".  It's not even well-defined for programs written
+        * languages like Go.
+        */
+       return vma->vm_start <= vma->vm_mm->start_stack &&
+               vma->vm_end >= vma->vm_mm->start_stack;
 }
 
 static void
@@ -354,7 +345,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
                        goto done;
                }
 
-               if (is_stack(priv, vma, is_pid))
+               if (is_stack(priv, vma))
                        name = "[stack]";
        }
 
@@ -1669,7 +1660,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
                seq_file_path(m, file, "\n\t= ");
        } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
                seq_puts(m, " heap");
-       } else if (is_stack(proc_priv, vma, is_pid)) {
+       } else if (is_stack(proc_priv, vma)) {
                seq_puts(m, " stack");
        }
 
index faacb0c0d857602111bfc04f2e374c451059c358..37175621e8906881adf4e034ce06224664120031 100644 (file)
@@ -124,25 +124,17 @@ unsigned long task_statm(struct mm_struct *mm,
 }
 
 static int is_stack(struct proc_maps_private *priv,
-                   struct vm_area_struct *vma, int is_pid)
+                   struct vm_area_struct *vma)
 {
        struct mm_struct *mm = vma->vm_mm;
-       int stack = 0;
-
-       if (is_pid) {
-               stack = vma->vm_start <= mm->start_stack &&
-                       vma->vm_end >= mm->start_stack;
-       } else {
-               struct inode *inode = priv->inode;
-               struct task_struct *task;
-
-               rcu_read_lock();
-               task = pid_task(proc_pid(inode), PIDTYPE_PID);
-               if (task)
-                       stack = vma_is_stack_for_task(vma, task);
-               rcu_read_unlock();
-       }
-       return stack;
+
+       /*
+        * We make no effort to guess what a given thread considers to be
+        * its "stack".  It's not even well-defined for programs written
+        * languages like Go.
+        */
+       return vma->vm_start <= mm->start_stack &&
+               vma->vm_end >= mm->start_stack;
 }
 
 /*
@@ -184,7 +176,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
        if (file) {
                seq_pad(m, ' ');
                seq_file_path(m, file, "");
-       } else if (mm && is_stack(priv, vma, is_pid)) {
+       } else if (mm && is_stack(priv, vma)) {
                seq_pad(m, ' ');
                seq_printf(m, "[stack]");
        }
index c8f60df2733eba516b189716a6b3bb3ab64520d1..ca16c5d7bab1726af305fa3a1a534ab5bc78cb4e 100644 (file)
@@ -439,7 +439,7 @@ static unsigned int vfs_dent_type(uint8_t type)
  */
 static int ubifs_readdir(struct file *file, struct dir_context *ctx)
 {
-       int err;
+       int err = 0;
        struct qstr nm;
        union ubifs_key key;
        struct ubifs_dent_node *dent;
@@ -541,14 +541,20 @@ static int ubifs_readdir(struct file *file, struct dir_context *ctx)
        kfree(file->private_data);
        file->private_data = NULL;
 
-       if (err != -ENOENT) {
+       if (err != -ENOENT)
                ubifs_err(c, "cannot find next direntry, error %d", err);
-               return err;
-       }
+       else
+               /*
+                * -ENOENT is a non-fatal error in this context, the TNC uses
+                * it to indicate that the cursor moved past the current directory
+                * and readdir() has to stop.
+                */
+               err = 0;
+
 
        /* 2 is a special value indicating that there are no more direntries */
        ctx->pos = 2;
-       return 0;
+       return err;
 }
 
 /* Free saved readdir() state when the directory is closed */
@@ -1060,9 +1066,9 @@ static void unlock_4_inodes(struct inode *inode1, struct inode *inode2,
        mutex_unlock(&ubifs_inode(inode1)->ui_mutex);
 }
 
-static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
-                       struct inode *new_dir, struct dentry *new_dentry,
-                       unsigned int flags)
+static int do_rename(struct inode *old_dir, struct dentry *old_dentry,
+                    struct inode *new_dir, struct dentry *new_dentry,
+                    unsigned int flags)
 {
        struct ubifs_info *c = old_dir->i_sb->s_fs_info;
        struct inode *old_inode = d_inode(old_dentry);
@@ -1323,7 +1329,7 @@ static int ubifs_xrename(struct inode *old_dir, struct dentry *old_dentry,
        return err;
 }
 
-static int ubifs_rename2(struct inode *old_dir, struct dentry *old_dentry,
+static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
                        struct inode *new_dir, struct dentry *new_dentry,
                        unsigned int flags)
 {
@@ -1336,7 +1342,7 @@ static int ubifs_rename2(struct inode *old_dir, struct dentry *old_dentry,
        if (flags & RENAME_EXCHANGE)
                return ubifs_xrename(old_dir, old_dentry, new_dir, new_dentry);
 
-       return ubifs_rename(old_dir, old_dentry, new_dir, new_dentry, flags);
+       return do_rename(old_dir, old_dentry, new_dir, new_dentry, flags);
 }
 
 int ubifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
@@ -1387,7 +1393,7 @@ const struct inode_operations ubifs_dir_inode_operations = {
        .mkdir       = ubifs_mkdir,
        .rmdir       = ubifs_rmdir,
        .mknod       = ubifs_mknod,
-       .rename      = ubifs_rename2,
+       .rename      = ubifs_rename,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
        .listxattr   = ubifs_listxattr,
index 6c2f4d41ed737c0bf90482a8674ea1a29948fca4..d9f9615bfd71a24c4235795cef11f7c5b1c4c6b6 100644 (file)
@@ -172,6 +172,7 @@ static int create_xattr(struct ubifs_info *c, struct inode *host,
        host_ui->xattr_cnt -= 1;
        host_ui->xattr_size -= CALC_DENT_SIZE(nm->len);
        host_ui->xattr_size -= CALC_XATTR_BYTES(size);
+       host_ui->xattr_names -= nm->len;
        mutex_unlock(&host_ui->ui_mutex);
 out_free:
        make_bad_inode(inode);
@@ -478,6 +479,7 @@ static int remove_xattr(struct ubifs_info *c, struct inode *host,
        host_ui->xattr_cnt += 1;
        host_ui->xattr_size += CALC_DENT_SIZE(nm->len);
        host_ui->xattr_size += CALC_XATTR_BYTES(ui->data_len);
+       host_ui->xattr_names += nm->len;
        mutex_unlock(&host_ui->ui_mutex);
        ubifs_release_budget(c, &req);
        make_bad_inode(inode);
index c27344cf38e177187f048eb799297f281eea5a2f..c6eb21940783e4de3c555520eddbba48d0b19be4 100644 (file)
@@ -3974,9 +3974,6 @@ xfs_bmap_remap_alloc(
         * allocating, so skip that check by pretending to be freeing.
         */
        error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING);
-       if (error)
-               goto error0;
-error0:
        xfs_perag_put(args.pag);
        if (error)
                trace_xfs_bmap_remap_alloc_error(ap->ip, error, _RET_IP_);
@@ -3999,6 +3996,39 @@ xfs_bmap_alloc(
        return xfs_bmap_btalloc(ap);
 }
 
+/* Trim extent to fit a logical block range. */
+void
+xfs_trim_extent(
+       struct xfs_bmbt_irec    *irec,
+       xfs_fileoff_t           bno,
+       xfs_filblks_t           len)
+{
+       xfs_fileoff_t           distance;
+       xfs_fileoff_t           end = bno + len;
+
+       if (irec->br_startoff + irec->br_blockcount <= bno ||
+           irec->br_startoff >= end) {
+               irec->br_blockcount = 0;
+               return;
+       }
+
+       if (irec->br_startoff < bno) {
+               distance = bno - irec->br_startoff;
+               if (isnullstartblock(irec->br_startblock))
+                       irec->br_startblock = DELAYSTARTBLOCK;
+               if (irec->br_startblock != DELAYSTARTBLOCK &&
+                   irec->br_startblock != HOLESTARTBLOCK)
+                       irec->br_startblock += distance;
+               irec->br_startoff += distance;
+               irec->br_blockcount -= distance;
+       }
+
+       if (end < irec->br_startoff + irec->br_blockcount) {
+               distance = irec->br_startoff + irec->br_blockcount - end;
+               irec->br_blockcount -= distance;
+       }
+}
+
 /*
  * Trim the returned map to the required bounds
  */
@@ -4829,6 +4859,219 @@ xfs_bmap_split_indlen(
        return stolen;
 }
 
+int
+xfs_bmap_del_extent_delay(
+       struct xfs_inode        *ip,
+       int                     whichfork,
+       xfs_extnum_t            *idx,
+       struct xfs_bmbt_irec    *got,
+       struct xfs_bmbt_irec    *del)
+{
+       struct xfs_mount        *mp = ip->i_mount;
+       struct xfs_ifork        *ifp = XFS_IFORK_PTR(ip, whichfork);
+       struct xfs_bmbt_irec    new;
+       int64_t                 da_old, da_new, da_diff = 0;
+       xfs_fileoff_t           del_endoff, got_endoff;
+       xfs_filblks_t           got_indlen, new_indlen, stolen;
+       int                     error = 0, state = 0;
+       bool                    isrt;
+
+       XFS_STATS_INC(mp, xs_del_exlist);
+
+       isrt = (whichfork == XFS_DATA_FORK) && XFS_IS_REALTIME_INODE(ip);
+       del_endoff = del->br_startoff + del->br_blockcount;
+       got_endoff = got->br_startoff + got->br_blockcount;
+       da_old = startblockval(got->br_startblock);
+       da_new = 0;
+
+       ASSERT(*idx >= 0);
+       ASSERT(*idx < ifp->if_bytes / sizeof(struct xfs_bmbt_rec));
+       ASSERT(del->br_blockcount > 0);
+       ASSERT(got->br_startoff <= del->br_startoff);
+       ASSERT(got_endoff >= del_endoff);
+
+       if (isrt) {
+               int64_t rtexts = XFS_FSB_TO_B(mp, del->br_blockcount);
+
+               do_div(rtexts, mp->m_sb.sb_rextsize);
+               xfs_mod_frextents(mp, rtexts);
+       }
+
+       /*
+        * Update the inode delalloc counter now and wait to update the
+        * sb counters as we might have to borrow some blocks for the
+        * indirect block accounting.
+        */
+       xfs_trans_reserve_quota_nblks(NULL, ip, -((long)del->br_blockcount), 0,
+                       isrt ? XFS_QMOPT_RES_RTBLKS : XFS_QMOPT_RES_REGBLKS);
+       ip->i_delayed_blks -= del->br_blockcount;
+
+       if (whichfork == XFS_COW_FORK)
+               state |= BMAP_COWFORK;
+
+       if (got->br_startoff == del->br_startoff)
+               state |= BMAP_LEFT_CONTIG;
+       if (got_endoff == del_endoff)
+               state |= BMAP_RIGHT_CONTIG;
+
+       switch (state & (BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG)) {
+       case BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG:
+               /*
+                * Matches the whole extent.  Delete the entry.
+                */
+               xfs_iext_remove(ip, *idx, 1, state);
+               --*idx;
+               break;
+       case BMAP_LEFT_CONTIG:
+               /*
+                * Deleting the first part of the extent.
+                */
+               trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
+               got->br_startoff = del_endoff;
+               got->br_blockcount -= del->br_blockcount;
+               da_new = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(ip,
+                               got->br_blockcount), da_old);
+               got->br_startblock = nullstartblock((int)da_new);
+               xfs_bmbt_set_all(xfs_iext_get_ext(ifp, *idx), got);
+               trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_);
+               break;
+       case BMAP_RIGHT_CONTIG:
+               /*
+                * Deleting the last part of the extent.
+                */
+               trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
+               got->br_blockcount = got->br_blockcount - del->br_blockcount;
+               da_new = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(ip,
+                               got->br_blockcount), da_old);
+               got->br_startblock = nullstartblock((int)da_new);
+               xfs_bmbt_set_all(xfs_iext_get_ext(ifp, *idx), got);
+               trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_);
+               break;
+       case 0:
+               /*
+                * Deleting the middle of the extent.
+                *
+                * Distribute the original indlen reservation across the two new
+                * extents.  Steal blocks from the deleted extent if necessary.
+                * Stealing blocks simply fudges the fdblocks accounting below.
+                * Warn if either of the new indlen reservations is zero as this
+                * can lead to delalloc problems.
+                */
+               trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
+
+               got->br_blockcount = del->br_startoff - got->br_startoff;
+               got_indlen = xfs_bmap_worst_indlen(ip, got->br_blockcount);
+
+               new.br_blockcount = got_endoff - del_endoff;
+               new_indlen = xfs_bmap_worst_indlen(ip, new.br_blockcount);
+
+               WARN_ON_ONCE(!got_indlen || !new_indlen);
+               stolen = xfs_bmap_split_indlen(da_old, &got_indlen, &new_indlen,
+                                                      del->br_blockcount);
+
+               got->br_startblock = nullstartblock((int)got_indlen);
+               xfs_bmbt_set_all(xfs_iext_get_ext(ifp, *idx), got);
+               trace_xfs_bmap_post_update(ip, *idx, 0, _THIS_IP_);
+
+               new.br_startoff = del_endoff;
+               new.br_state = got->br_state;
+               new.br_startblock = nullstartblock((int)new_indlen);
+
+               ++*idx;
+               xfs_iext_insert(ip, *idx, 1, &new, state);
+
+               da_new = got_indlen + new_indlen - stolen;
+               del->br_blockcount -= stolen;
+               break;
+       }
+
+       ASSERT(da_old >= da_new);
+       da_diff = da_old - da_new;
+       if (!isrt)
+               da_diff += del->br_blockcount;
+       if (da_diff)
+               xfs_mod_fdblocks(mp, da_diff, false);
+       return error;
+}
+
+void
+xfs_bmap_del_extent_cow(
+       struct xfs_inode        *ip,
+       xfs_extnum_t            *idx,
+       struct xfs_bmbt_irec    *got,
+       struct xfs_bmbt_irec    *del)
+{
+       struct xfs_mount        *mp = ip->i_mount;
+       struct xfs_ifork        *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
+       struct xfs_bmbt_irec    new;
+       xfs_fileoff_t           del_endoff, got_endoff;
+       int                     state = BMAP_COWFORK;
+
+       XFS_STATS_INC(mp, xs_del_exlist);
+
+       del_endoff = del->br_startoff + del->br_blockcount;
+       got_endoff = got->br_startoff + got->br_blockcount;
+
+       ASSERT(*idx >= 0);
+       ASSERT(*idx < ifp->if_bytes / sizeof(struct xfs_bmbt_rec));
+       ASSERT(del->br_blockcount > 0);
+       ASSERT(got->br_startoff <= del->br_startoff);
+       ASSERT(got_endoff >= del_endoff);
+       ASSERT(!isnullstartblock(got->br_startblock));
+
+       if (got->br_startoff == del->br_startoff)
+               state |= BMAP_LEFT_CONTIG;
+       if (got_endoff == del_endoff)
+               state |= BMAP_RIGHT_CONTIG;
+
+       switch (state & (BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG)) {
+       case BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG:
+               /*
+                * Matches the whole extent.  Delete the entry.
+                */
+               xfs_iext_remove(ip, *idx, 1, state);
+               --*idx;
+               break;
+       case BMAP_LEFT_CONTIG:
+               /*
+                * Deleting the first part of the extent.
+                */
+               trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
+               got->br_startoff = del_endoff;
+               got->br_blockcount -= del->br_blockcount;
+               got->br_startblock = del->br_startblock + del->br_blockcount;
+               xfs_bmbt_set_all(xfs_iext_get_ext(ifp, *idx), got);
+               trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_);
+               break;
+       case BMAP_RIGHT_CONTIG:
+               /*
+                * Deleting the last part of the extent.
+                */
+               trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
+               got->br_blockcount -= del->br_blockcount;
+               xfs_bmbt_set_all(xfs_iext_get_ext(ifp, *idx), got);
+               trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_);
+               break;
+       case 0:
+               /*
+                * Deleting the middle of the extent.
+                */
+               trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
+               got->br_blockcount = del->br_startoff - got->br_startoff;
+               xfs_bmbt_set_all(xfs_iext_get_ext(ifp, *idx), got);
+               trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_);
+
+               new.br_startoff = del_endoff;
+               new.br_blockcount = got_endoff - del_endoff;
+               new.br_state = got->br_state;
+               new.br_startblock = del->br_startblock + del->br_blockcount;
+
+               ++*idx;
+               xfs_iext_insert(ip, *idx, 1, &new, state);
+               break;
+       }
+}
+
 /*
  * Called by xfs_bmapi to update file extent records and the btree
  * after removing space (or undoing a delayed allocation).
@@ -5171,175 +5414,6 @@ xfs_bmap_del_extent(
        return error;
 }
 
-/* Remove an extent from the CoW fork.  Similar to xfs_bmap_del_extent. */
-int
-xfs_bunmapi_cow(
-       struct xfs_inode                *ip,
-       struct xfs_bmbt_irec            *del)
-{
-       xfs_filblks_t                   da_new;
-       xfs_filblks_t                   da_old;
-       xfs_fsblock_t                   del_endblock = 0;
-       xfs_fileoff_t                   del_endoff;
-       int                             delay;
-       struct xfs_bmbt_rec_host        *ep;
-       int                             error;
-       struct xfs_bmbt_irec            got;
-       xfs_fileoff_t                   got_endoff;
-       struct xfs_ifork                *ifp;
-       struct xfs_mount                *mp;
-       xfs_filblks_t                   nblks;
-       struct xfs_bmbt_irec            new;
-       /* REFERENCED */
-       uint                            qfield;
-       xfs_filblks_t                   temp;
-       xfs_filblks_t                   temp2;
-       int                             state = BMAP_COWFORK;
-       int                             eof;
-       xfs_extnum_t                    eidx;
-
-       mp = ip->i_mount;
-       XFS_STATS_INC(mp, xs_del_exlist);
-
-       ep = xfs_bmap_search_extents(ip, del->br_startoff, XFS_COW_FORK, &eof,
-                       &eidx, &got, &new);
-
-       ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK); ifp = ifp;
-       ASSERT((eidx >= 0) && (eidx < ifp->if_bytes /
-               (uint)sizeof(xfs_bmbt_rec_t)));
-       ASSERT(del->br_blockcount > 0);
-       ASSERT(got.br_startoff <= del->br_startoff);
-       del_endoff = del->br_startoff + del->br_blockcount;
-       got_endoff = got.br_startoff + got.br_blockcount;
-       ASSERT(got_endoff >= del_endoff);
-       delay = isnullstartblock(got.br_startblock);
-       ASSERT(isnullstartblock(del->br_startblock) == delay);
-       qfield = 0;
-       error = 0;
-       /*
-        * If deleting a real allocation, must free up the disk space.
-        */
-       if (!delay) {
-               nblks = del->br_blockcount;
-               qfield = XFS_TRANS_DQ_BCOUNT;
-               /*
-                * Set up del_endblock and cur for later.
-                */
-               del_endblock = del->br_startblock + del->br_blockcount;
-               da_old = da_new = 0;
-       } else {
-               da_old = startblockval(got.br_startblock);
-               da_new = 0;
-               nblks = 0;
-       }
-       qfield = qfield;
-       nblks = nblks;
-
-       /*
-        * Set flag value to use in switch statement.
-        * Left-contig is 2, right-contig is 1.
-        */
-       switch (((got.br_startoff == del->br_startoff) << 1) |
-               (got_endoff == del_endoff)) {
-       case 3:
-               /*
-                * Matches the whole extent.  Delete the entry.
-                */
-               xfs_iext_remove(ip, eidx, 1, BMAP_COWFORK);
-               --eidx;
-               break;
-
-       case 2:
-               /*
-                * Deleting the first part of the extent.
-                */
-               trace_xfs_bmap_pre_update(ip, eidx, state, _THIS_IP_);
-               xfs_bmbt_set_startoff(ep, del_endoff);
-               temp = got.br_blockcount - del->br_blockcount;
-               xfs_bmbt_set_blockcount(ep, temp);
-               if (delay) {
-                       temp = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(ip, temp),
-                               da_old);
-                       xfs_bmbt_set_startblock(ep, nullstartblock((int)temp));
-                       trace_xfs_bmap_post_update(ip, eidx, state, _THIS_IP_);
-                       da_new = temp;
-                       break;
-               }
-               xfs_bmbt_set_startblock(ep, del_endblock);
-               trace_xfs_bmap_post_update(ip, eidx, state, _THIS_IP_);
-               break;
-
-       case 1:
-               /*
-                * Deleting the last part of the extent.
-                */
-               temp = got.br_blockcount - del->br_blockcount;
-               trace_xfs_bmap_pre_update(ip, eidx, state, _THIS_IP_);
-               xfs_bmbt_set_blockcount(ep, temp);
-               if (delay) {
-                       temp = XFS_FILBLKS_MIN(xfs_bmap_worst_indlen(ip, temp),
-                               da_old);
-                       xfs_bmbt_set_startblock(ep, nullstartblock((int)temp));
-                       trace_xfs_bmap_post_update(ip, eidx, state, _THIS_IP_);
-                       da_new = temp;
-                       break;
-               }
-               trace_xfs_bmap_post_update(ip, eidx, state, _THIS_IP_);
-               break;
-
-       case 0:
-               /*
-                * Deleting the middle of the extent.
-                */
-               temp = del->br_startoff - got.br_startoff;
-               trace_xfs_bmap_pre_update(ip, eidx, state, _THIS_IP_);
-               xfs_bmbt_set_blockcount(ep, temp);
-               new.br_startoff = del_endoff;
-               temp2 = got_endoff - del_endoff;
-               new.br_blockcount = temp2;
-               new.br_state = got.br_state;
-               if (!delay) {
-                       new.br_startblock = del_endblock;
-               } else {
-                       temp = xfs_bmap_worst_indlen(ip, temp);
-                       xfs_bmbt_set_startblock(ep, nullstartblock((int)temp));
-                       temp2 = xfs_bmap_worst_indlen(ip, temp2);
-                       new.br_startblock = nullstartblock((int)temp2);
-                       da_new = temp + temp2;
-                       while (da_new > da_old) {
-                               if (temp) {
-                                       temp--;
-                                       da_new--;
-                                       xfs_bmbt_set_startblock(ep,
-                                               nullstartblock((int)temp));
-                               }
-                               if (da_new == da_old)
-                                       break;
-                               if (temp2) {
-                                       temp2--;
-                                       da_new--;
-                                       new.br_startblock =
-                                               nullstartblock((int)temp2);
-                               }
-                       }
-               }
-               trace_xfs_bmap_post_update(ip, eidx, state, _THIS_IP_);
-               xfs_iext_insert(ip, eidx + 1, 1, &new, state);
-               ++eidx;
-               break;
-       }
-
-       /*
-        * Account for change in delayed indirect blocks.
-        * Nothing to do for disk quota accounting here.
-        */
-       ASSERT(da_old >= da_new);
-       if (da_old > da_new)
-               xfs_mod_fdblocks(mp, (int64_t)(da_old - da_new), false);
-
-       return error;
-}
-
 /*
  * Unmap (remove) blocks from a file.
  * If nexts is nonzero then the number of extents to remove is limited to
index f97db7132564569dc7f2aefbf05f27da719c8e10..7cae6ec27fa6b26a84984fddb3dc35d6556e2122 100644 (file)
@@ -190,6 +190,8 @@ void        xfs_bmap_trace_exlist(struct xfs_inode *ip, xfs_extnum_t cnt,
 #define        XFS_BMAP_TRACE_EXLIST(ip,c,w)
 #endif
 
+void   xfs_trim_extent(struct xfs_bmbt_irec *irec, xfs_fileoff_t bno,
+               xfs_filblks_t len);
 int    xfs_bmap_add_attrfork(struct xfs_inode *ip, int size, int rsvd);
 void   xfs_bmap_local_to_extents_empty(struct xfs_inode *ip, int whichfork);
 void   xfs_bmap_add_free(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
@@ -221,7 +223,11 @@ int        xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
                xfs_fileoff_t bno, xfs_filblks_t len, int flags,
                xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
                struct xfs_defer_ops *dfops, int *done);
-int    xfs_bunmapi_cow(struct xfs_inode *ip, struct xfs_bmbt_irec *del);
+int    xfs_bmap_del_extent_delay(struct xfs_inode *ip, int whichfork,
+               xfs_extnum_t *idx, struct xfs_bmbt_irec *got,
+               struct xfs_bmbt_irec *del);
+void   xfs_bmap_del_extent_cow(struct xfs_inode *ip, xfs_extnum_t *idx,
+               struct xfs_bmbt_irec *got, struct xfs_bmbt_irec *del);
 int    xfs_check_nostate_extents(struct xfs_ifork *ifp, xfs_extnum_t idx,
                xfs_extnum_t num);
 uint   xfs_default_attroffset(struct xfs_inode *ip);
index 5c8e6f2ce44f461d343a98b6b49ad6b0b09a3b8b..0e80993c8a5914d3dfa1f861b2b459d7a513d67a 100644 (file)
@@ -4826,7 +4826,7 @@ xfs_btree_calc_size(
        return rval;
 }
 
-int
+static int
 xfs_btree_count_blocks_helper(
        struct xfs_btree_cur    *cur,
        int                     level,
index 3cc3cf7674746f279fcb0acf4eae27d49d089814..ac9a003dd29acf80d7c766788cb40d1f98d9132c 100644 (file)
@@ -191,8 +191,7 @@ xfs_dquot_buf_verify_crc(
        if (mp->m_quotainfo)
                ndquots = mp->m_quotainfo->qi_dqperchunk;
        else
-               ndquots = xfs_calc_dquots_per_chunk(
-                                       XFS_BB_TO_FSB(mp, bp->b_length));
+               ndquots = xfs_calc_dquots_per_chunk(bp->b_length);
 
        for (i = 0; i < ndquots; i++, d++) {
                if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk),
index f6547fc5e016e75a130a738c3e4a1b3a087d7281..6b7579e7b60a228ee6e633221bc64952f4a93a41 100644 (file)
@@ -865,7 +865,6 @@ typedef struct xfs_timestamp {
  * padding field for v3 inodes.
  */
 #define        XFS_DINODE_MAGIC                0x494e  /* 'IN' */
-#define XFS_DINODE_GOOD_VERSION(v)     ((v) >= 1 && (v) <= 3)
 typedef struct xfs_dinode {
        __be16          di_magic;       /* inode magic # = XFS_DINODE_MAGIC */
        __be16          di_mode;        /* mode and type of file */
index 8de9a3a29589bd59c0684c8eab278db3edceba53..134424fac434fdd7fdd3cecf12d3007712b9734b 100644 (file)
@@ -57,6 +57,17 @@ xfs_inobp_check(
 }
 #endif
 
+bool
+xfs_dinode_good_version(
+       struct xfs_mount *mp,
+       __u8            version)
+{
+       if (xfs_sb_version_hascrc(&mp->m_sb))
+               return version == 3;
+
+       return version == 1 || version == 2;
+}
+
 /*
  * If we are doing readahead on an inode buffer, we might be in log recovery
  * reading an inode allocation buffer that hasn't yet been replayed, and hence
@@ -91,7 +102,7 @@ xfs_inode_buf_verify(
 
                dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog));
                di_ok = dip->di_magic == cpu_to_be16(XFS_DINODE_MAGIC) &&
-                           XFS_DINODE_GOOD_VERSION(dip->di_version);
+                       xfs_dinode_good_version(mp, dip->di_version);
                if (unlikely(XFS_TEST_ERROR(!di_ok, mp,
                                                XFS_ERRTAG_ITOBP_INOTOBP,
                                                XFS_RANDOM_ITOBP_INOTOBP))) {
index 62d9d4681c8c28a1294b575903f0720693bc6666..3cfe12a4f58ac8560e1cd92e529a85477ff5ee02 100644 (file)
@@ -74,6 +74,8 @@ void  xfs_inode_from_disk(struct xfs_inode *ip, struct xfs_dinode *from);
 void   xfs_log_dinode_to_disk(struct xfs_log_dinode *from,
                               struct xfs_dinode *to);
 
+bool   xfs_dinode_good_version(struct xfs_mount *mp, __u8 version);
+
 #if defined(DEBUG)
 void   xfs_inobp_check(struct xfs_mount *, struct xfs_buf *);
 #else
index a314fc7b56fa5b0fcfb0e234a9a931eda6de7e73..6e4f7f900fea4c30f44477dc258db5334b980486 100644 (file)
@@ -249,6 +249,7 @@ xfs_file_dio_aio_read(
        struct xfs_inode        *ip = XFS_I(inode);
        loff_t                  isize = i_size_read(inode);
        size_t                  count = iov_iter_count(to);
+       loff_t                  end = iocb->ki_pos + count - 1;
        struct iov_iter         data;
        struct xfs_buftarg      *target;
        ssize_t                 ret = 0;
@@ -272,49 +273,21 @@ xfs_file_dio_aio_read(
 
        file_accessed(iocb->ki_filp);
 
-       /*
-        * Locking is a bit tricky here. If we take an exclusive lock for direct
-        * IO, we effectively serialise all new concurrent read IO to this file
-        * and block it behind IO that is currently in progress because IO in
-        * progress holds the IO lock shared. We only need to hold the lock
-        * exclusive to blow away the page cache, so only take lock exclusively
-        * if the page cache needs invalidation. This allows the normal direct
-        * IO case of no page cache pages to proceeed concurrently without
-        * serialisation.
-        */
        xfs_rw_ilock(ip, XFS_IOLOCK_SHARED);
        if (mapping->nrpages) {
-               xfs_rw_iunlock(ip, XFS_IOLOCK_SHARED);
-               xfs_rw_ilock(ip, XFS_IOLOCK_EXCL);
+               ret = filemap_write_and_wait_range(mapping, iocb->ki_pos, end);
+               if (ret)
+                       goto out_unlock;
 
                /*
-                * The generic dio code only flushes the range of the particular
-                * I/O. Because we take an exclusive lock here, this whole
-                * sequence is considerably more expensive for us. This has a
-                * noticeable performance impact for any file with cached pages,
-                * even when outside of the range of the particular I/O.
-                *
-                * Hence, amortize the cost of the lock against a full file
-                * flush and reduce the chances of repeated iolock cycles going
-                * forward.
+                * Invalidate whole pages. This can return an error if we fail
+                * to invalidate a page, but this should never happen on XFS.
+                * Warn if it does fail.
                 */
-               if (mapping->nrpages) {
-                       ret = filemap_write_and_wait(mapping);
-                       if (ret) {
-                               xfs_rw_iunlock(ip, XFS_IOLOCK_EXCL);
-                               return ret;
-                       }
-
-                       /*
-                        * Invalidate whole pages. This can return an error if
-                        * we fail to invalidate a page, but this should never
-                        * happen on XFS. Warn if it does fail.
-                        */
-                       ret = invalidate_inode_pages2(mapping);
-                       WARN_ON_ONCE(ret);
-                       ret = 0;
-               }
-               xfs_rw_ilock_demote(ip, XFS_IOLOCK_EXCL);
+               ret = invalidate_inode_pages2_range(mapping,
+                               iocb->ki_pos >> PAGE_SHIFT, end >> PAGE_SHIFT);
+               WARN_ON_ONCE(ret);
+               ret = 0;
        }
 
        data = *to;
@@ -324,8 +297,9 @@ xfs_file_dio_aio_read(
                iocb->ki_pos += ret;
                iov_iter_advance(to, ret);
        }
-       xfs_rw_iunlock(ip, XFS_IOLOCK_SHARED);
 
+out_unlock:
+       xfs_rw_iunlock(ip, XFS_IOLOCK_SHARED);
        return ret;
 }
 
@@ -570,61 +544,49 @@ xfs_file_dio_aio_write(
        if ((iocb->ki_pos | count) & target->bt_logical_sectormask)
                return -EINVAL;
 
-       /* "unaligned" here means not aligned to a filesystem block */
-       if ((iocb->ki_pos & mp->m_blockmask) ||
-           ((iocb->ki_pos + count) & mp->m_blockmask))
-               unaligned_io = 1;
-
        /*
-        * We don't need to take an exclusive lock unless there page cache needs
-        * to be invalidated or unaligned IO is being executed. We don't need to
-        * consider the EOF extension case here because
-        * xfs_file_aio_write_checks() will relock the inode as necessary for
-        * EOF zeroing cases and fill out the new inode size as appropriate.
+        * Don't take the exclusive iolock here unless the I/O is unaligned to
+        * the file system block size.  We don't need to consider the EOF
+        * extension case here because xfs_file_aio_write_checks() will relock
+        * the inode as necessary for EOF zeroing cases and fill out the new
+        * inode size as appropriate.
         */
-       if (unaligned_io || mapping->nrpages)
+       if ((iocb->ki_pos & mp->m_blockmask) ||
+           ((iocb->ki_pos + count) & mp->m_blockmask)) {
+               unaligned_io = 1;
                iolock = XFS_IOLOCK_EXCL;
-       else
+       } else {
                iolock = XFS_IOLOCK_SHARED;
-       xfs_rw_ilock(ip, iolock);
-
-       /*
-        * Recheck if there are cached pages that need invalidate after we got
-        * the iolock to protect against other threads adding new pages while
-        * we were waiting for the iolock.
-        */
-       if (mapping->nrpages && iolock == XFS_IOLOCK_SHARED) {
-               xfs_rw_iunlock(ip, iolock);
-               iolock = XFS_IOLOCK_EXCL;
-               xfs_rw_ilock(ip, iolock);
        }
 
+       xfs_rw_ilock(ip, iolock);
+
        ret = xfs_file_aio_write_checks(iocb, from, &iolock);
        if (ret)
                goto out;
        count = iov_iter_count(from);
        end = iocb->ki_pos + count - 1;
 
-       /*
-        * See xfs_file_dio_aio_read() for why we do a full-file flush here.
-        */
        if (mapping->nrpages) {
-               ret = filemap_write_and_wait(VFS_I(ip)->i_mapping);
+               ret = filemap_write_and_wait_range(mapping, iocb->ki_pos, end);
                if (ret)
                        goto out;
+
                /*
                 * Invalidate whole pages. This can return an error if we fail
                 * to invalidate a page, but this should never happen on XFS.
                 * Warn if it does fail.
                 */
-               ret = invalidate_inode_pages2(VFS_I(ip)->i_mapping);
+               ret = invalidate_inode_pages2_range(mapping,
+                               iocb->ki_pos >> PAGE_SHIFT, end >> PAGE_SHIFT);
                WARN_ON_ONCE(ret);
                ret = 0;
        }
 
        /*
         * If we are doing unaligned IO, wait for all other IO to drain,
-        * otherwise demote the lock if we had to flush cached pages
+        * otherwise demote the lock if we had to take the exclusive lock
+        * for other reasons in xfs_file_aio_write_checks.
         */
        if (unaligned_io)
                inode_dio_wait(inode);
@@ -947,134 +909,6 @@ xfs_file_fallocate(
        return error;
 }
 
-/*
- * Flush all file writes out to disk.
- */
-static int
-xfs_file_wait_for_io(
-       struct inode    *inode,
-       loff_t          offset,
-       size_t          len)
-{
-       loff_t          rounding;
-       loff_t          ioffset;
-       loff_t          iendoffset;
-       loff_t          bs;
-       int             ret;
-
-       bs = inode->i_sb->s_blocksize;
-       inode_dio_wait(inode);
-
-       rounding = max_t(xfs_off_t, bs, PAGE_SIZE);
-       ioffset = round_down(offset, rounding);
-       iendoffset = round_up(offset + len, rounding) - 1;
-       ret = filemap_write_and_wait_range(inode->i_mapping, ioffset,
-                                          iendoffset);
-       return ret;
-}
-
-/* Hook up to the VFS reflink function */
-STATIC int
-xfs_file_share_range(
-       struct file     *file_in,
-       loff_t          pos_in,
-       struct file     *file_out,
-       loff_t          pos_out,
-       u64             len,
-       bool            is_dedupe)
-{
-       struct inode    *inode_in;
-       struct inode    *inode_out;
-       ssize_t         ret;
-       loff_t          bs;
-       loff_t          isize;
-       int             same_inode;
-       loff_t          blen;
-       unsigned int    flags = 0;
-
-       inode_in = file_inode(file_in);
-       inode_out = file_inode(file_out);
-       bs = inode_out->i_sb->s_blocksize;
-
-       /* Don't touch certain kinds of inodes */
-       if (IS_IMMUTABLE(inode_out))
-               return -EPERM;
-       if (IS_SWAPFILE(inode_in) ||
-           IS_SWAPFILE(inode_out))
-               return -ETXTBSY;
-
-       /* Reflink only works within this filesystem. */
-       if (inode_in->i_sb != inode_out->i_sb)
-               return -EXDEV;
-       same_inode = (inode_in->i_ino == inode_out->i_ino);
-
-       /* Don't reflink dirs, pipes, sockets... */
-       if (S_ISDIR(inode_in->i_mode) || S_ISDIR(inode_out->i_mode))
-               return -EISDIR;
-       if (S_ISFIFO(inode_in->i_mode) || S_ISFIFO(inode_out->i_mode))
-               return -EINVAL;
-       if (!S_ISREG(inode_in->i_mode) || !S_ISREG(inode_out->i_mode))
-               return -EINVAL;
-
-       /* Don't share DAX file data for now. */
-       if (IS_DAX(inode_in) || IS_DAX(inode_out))
-               return -EINVAL;
-
-       /* Are we going all the way to the end? */
-       isize = i_size_read(inode_in);
-       if (isize == 0)
-               return 0;
-       if (len == 0)
-               len = isize - pos_in;
-
-       /* Ensure offsets don't wrap and the input is inside i_size */
-       if (pos_in + len < pos_in || pos_out + len < pos_out ||
-           pos_in + len > isize)
-               return -EINVAL;
-
-       /* Don't allow dedupe past EOF in the dest file */
-       if (is_dedupe) {
-               loff_t  disize;
-
-               disize = i_size_read(inode_out);
-               if (pos_out >= disize || pos_out + len > disize)
-                       return -EINVAL;
-       }
-
-       /* If we're linking to EOF, continue to the block boundary. */
-       if (pos_in + len == isize)
-               blen = ALIGN(isize, bs) - pos_in;
-       else
-               blen = len;
-
-       /* Only reflink if we're aligned to block boundaries */
-       if (!IS_ALIGNED(pos_in, bs) || !IS_ALIGNED(pos_in + blen, bs) ||
-           !IS_ALIGNED(pos_out, bs) || !IS_ALIGNED(pos_out + blen, bs))
-               return -EINVAL;
-
-       /* Don't allow overlapped reflink within the same file */
-       if (same_inode && pos_out + blen > pos_in && pos_out < pos_in + blen)
-               return -EINVAL;
-
-       /* Wait for the completion of any pending IOs on srcfile */
-       ret = xfs_file_wait_for_io(inode_in, pos_in, len);
-       if (ret)
-               goto out;
-       ret = xfs_file_wait_for_io(inode_out, pos_out, len);
-       if (ret)
-               goto out;
-
-       if (is_dedupe)
-               flags |= XFS_REFLINK_DEDUPE;
-       ret = xfs_reflink_remap_range(XFS_I(inode_in), pos_in, XFS_I(inode_out),
-                       pos_out, len, flags);
-       if (ret < 0)
-               goto out;
-
-out:
-       return ret;
-}
-
 STATIC ssize_t
 xfs_file_copy_range(
        struct file     *file_in,
@@ -1086,7 +920,7 @@ xfs_file_copy_range(
 {
        int             error;
 
-       error = xfs_file_share_range(file_in, pos_in, file_out, pos_out,
+       error = xfs_reflink_remap_range(file_in, pos_in, file_out, pos_out,
                                     len, false);
        if (error)
                return error;
@@ -1101,7 +935,7 @@ xfs_file_clone_range(
        loff_t          pos_out,
        u64             len)
 {
-       return xfs_file_share_range(file_in, pos_in, file_out, pos_out,
+       return xfs_reflink_remap_range(file_in, pos_in, file_out, pos_out,
                                     len, false);
 }
 
@@ -1124,7 +958,7 @@ xfs_file_dedupe_range(
        if (len > XFS_MAX_DEDUPE_LEN)
                len = XFS_MAX_DEDUPE_LEN;
 
-       error = xfs_file_share_range(src_file, loff, dst_file, dst_loff,
+       error = xfs_reflink_remap_range(src_file, loff, dst_file, dst_loff,
                                     len, true);
        if (error)
                return error;
index 14796b744e0a1ebb9f8d428131d2522316262e82..f295049db68159523ac936727c748e7264f80993 100644 (file)
@@ -1656,9 +1656,9 @@ void
 xfs_inode_set_cowblocks_tag(
        xfs_inode_t     *ip)
 {
-       trace_xfs_inode_set_eofblocks_tag(ip);
+       trace_xfs_inode_set_cowblocks_tag(ip);
        return __xfs_inode_set_eofblocks_tag(ip, xfs_queue_cowblocks,
-                       trace_xfs_perag_set_eofblocks,
+                       trace_xfs_perag_set_cowblocks,
                        XFS_ICI_COWBLOCKS_TAG);
 }
 
@@ -1666,7 +1666,7 @@ void
 xfs_inode_clear_cowblocks_tag(
        xfs_inode_t     *ip)
 {
-       trace_xfs_inode_clear_eofblocks_tag(ip);
+       trace_xfs_inode_clear_cowblocks_tag(ip);
        return __xfs_inode_clear_eofblocks_tag(ip,
-                       trace_xfs_perag_clear_eofblocks, XFS_ICI_COWBLOCKS_TAG);
+                       trace_xfs_perag_clear_cowblocks, XFS_ICI_COWBLOCKS_TAG);
 }
index d907eb9f8ef32a079f845c4aa4731bb3413fcb25..436e109bb01e59d32bda87e9dd43ab3229cba509 100644 (file)
@@ -566,6 +566,17 @@ xfs_file_iomap_begin_delay(
        xfs_bmap_search_extents(ip, offset_fsb, XFS_DATA_FORK, &eof, &idx,
                        &got, &prev);
        if (!eof && got.br_startoff <= offset_fsb) {
+               if (xfs_is_reflink_inode(ip)) {
+                       bool            shared;
+
+                       end_fsb = min(XFS_B_TO_FSB(mp, offset + count),
+                                       maxbytes_fsb);
+                       xfs_trim_extent(&got, offset_fsb, end_fsb - offset_fsb);
+                       error = xfs_reflink_reserve_cow(ip, &got, &shared);
+                       if (error)
+                               goto out_unlock;
+               }
+
                trace_xfs_iomap_found(ip, offset, count, 0, &got);
                goto done;
        }
@@ -961,19 +972,13 @@ xfs_file_iomap_begin(
        struct xfs_mount        *mp = ip->i_mount;
        struct xfs_bmbt_irec    imap;
        xfs_fileoff_t           offset_fsb, end_fsb;
-       bool                    shared, trimmed;
        int                     nimaps = 1, error = 0;
+       bool                    shared = false, trimmed = false;
        unsigned                lockmode;
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return -EIO;
 
-       if ((flags & (IOMAP_WRITE | IOMAP_ZERO)) && xfs_is_reflink_inode(ip)) {
-               error = xfs_reflink_reserve_cow_range(ip, offset, length);
-               if (error < 0)
-                       return error;
-       }
-
        if ((flags & IOMAP_WRITE) && !IS_DAX(inode) &&
                   !xfs_get_extsz_hint(ip)) {
                /* Reserve delalloc blocks for regular writeback. */
@@ -981,7 +986,16 @@ xfs_file_iomap_begin(
                                iomap);
        }
 
-       lockmode = xfs_ilock_data_map_shared(ip);
+       /*
+        * COW writes will allocate delalloc space, so we need to make sure
+        * to take the lock exclusively here.
+        */
+       if ((flags & (IOMAP_WRITE | IOMAP_ZERO)) && xfs_is_reflink_inode(ip)) {
+               lockmode = XFS_ILOCK_EXCL;
+               xfs_ilock(ip, XFS_ILOCK_EXCL);
+       } else {
+               lockmode = xfs_ilock_data_map_shared(ip);
+       }
 
        ASSERT(offset <= mp->m_super->s_maxbytes);
        if ((xfs_fsize_t)offset + length > mp->m_super->s_maxbytes)
@@ -991,16 +1005,24 @@ xfs_file_iomap_begin(
 
        error = xfs_bmapi_read(ip, offset_fsb, end_fsb - offset_fsb, &imap,
                               &nimaps, 0);
-       if (error) {
-               xfs_iunlock(ip, lockmode);
-               return error;
+       if (error)
+               goto out_unlock;
+
+       if (flags & IOMAP_REPORT) {
+               /* Trim the mapping to the nearest shared extent boundary. */
+               error = xfs_reflink_trim_around_shared(ip, &imap, &shared,
+                               &trimmed);
+               if (error)
+                       goto out_unlock;
        }
 
-       /* Trim the mapping to the nearest shared extent boundary. */
-       error = xfs_reflink_trim_around_shared(ip, &imap, &shared, &trimmed);
-       if (error) {
-               xfs_iunlock(ip, lockmode);
-               return error;
+       if ((flags & (IOMAP_WRITE | IOMAP_ZERO)) && xfs_is_reflink_inode(ip)) {
+               error = xfs_reflink_reserve_cow(ip, &imap, &shared);
+               if (error)
+                       goto out_unlock;
+
+               end_fsb = imap.br_startoff + imap.br_blockcount;
+               length = XFS_FSB_TO_B(mp, end_fsb) - offset;
        }
 
        if ((flags & IOMAP_WRITE) && imap_needs_alloc(inode, &imap, nimaps)) {
@@ -1039,6 +1061,9 @@ xfs_file_iomap_begin(
        if (shared)
                iomap->flags |= IOMAP_F_SHARED;
        return 0;
+out_unlock:
+       xfs_iunlock(ip, lockmode);
+       return error;
 }
 
 static int
index fc7873942bea51866611aee5a7437f3d4a036a67..b341f10cf4810bf3716aec354f33fbdbf9ab5494 100644 (file)
@@ -1009,6 +1009,7 @@ xfs_mountfs(
  out_quota:
        xfs_qm_unmount_quotas(mp);
  out_rtunmount:
+       mp->m_super->s_flags &= ~MS_ACTIVE;
        xfs_rtunmount_inodes(mp);
  out_rele_rip:
        IRELE(rip);
index 5965e9455d91e03621680a08493610085d5a926c..a279b4e7f5feaa83a0cf1fbbfaf1c4d8e393ecbc 100644 (file)
@@ -182,7 +182,8 @@ xfs_reflink_trim_around_shared(
        if (!xfs_is_reflink_inode(ip) ||
            ISUNWRITTEN(irec) ||
            irec->br_startblock == HOLESTARTBLOCK ||
-           irec->br_startblock == DELAYSTARTBLOCK) {
+           irec->br_startblock == DELAYSTARTBLOCK ||
+           isnullstartblock(irec->br_startblock)) {
                *shared = false;
                return 0;
        }
@@ -227,50 +228,54 @@ xfs_reflink_trim_around_shared(
        }
 }
 
-/* Create a CoW reservation for a range of blocks within a file. */
-static int
-__xfs_reflink_reserve_cow(
+/*
+ * Trim the passed in imap to the next shared/unshared extent boundary, and
+ * if imap->br_startoff points to a shared extent reserve space for it in the
+ * COW fork.  In this case *shared is set to true, else to false.
+ *
+ * Note that imap will always contain the block numbers for the existing blocks
+ * in the data fork, as the upper layers need them for read-modify-write
+ * operations.
+ */
+int
+xfs_reflink_reserve_cow(
        struct xfs_inode        *ip,
-       xfs_fileoff_t           *offset_fsb,
-       xfs_fileoff_t           end_fsb,
-       bool                    *skipped)
+       struct xfs_bmbt_irec    *imap,
+       bool                    *shared)
 {
-       struct xfs_bmbt_irec    got, prev, imap;
-       xfs_fileoff_t           orig_end_fsb;
-       int                     nimaps, eof = 0, error = 0;
-       bool                    shared = false, trimmed = false;
+       struct xfs_bmbt_irec    got, prev;
+       xfs_fileoff_t           end_fsb, orig_end_fsb;
+       int                     eof = 0, error = 0;
+       bool                    trimmed;
        xfs_extnum_t            idx;
        xfs_extlen_t            align;
 
-       /* Already reserved?  Skip the refcount btree access. */
-       xfs_bmap_search_extents(ip, *offset_fsb, XFS_COW_FORK, &eof, &idx,
+       /*
+        * Search the COW fork extent list first.  This serves two purposes:
+        * first this implement the speculative preallocation using cowextisze,
+        * so that we also unshared block adjacent to shared blocks instead
+        * of just the shared blocks themselves.  Second the lookup in the
+        * extent list is generally faster than going out to the shared extent
+        * tree.
+        */
+       xfs_bmap_search_extents(ip, imap->br_startoff, XFS_COW_FORK, &eof, &idx,
                        &got, &prev);
-       if (!eof && got.br_startoff <= *offset_fsb) {
-               end_fsb = orig_end_fsb = got.br_startoff + got.br_blockcount;
-               trace_xfs_reflink_cow_found(ip, &got);
-               goto done;
-       }
+       if (!eof && got.br_startoff <= imap->br_startoff) {
+               trace_xfs_reflink_cow_found(ip, imap);
+               xfs_trim_extent(imap, got.br_startoff, got.br_blockcount);
 
-       /* Read extent from the source file. */
-       nimaps = 1;
-       error = xfs_bmapi_read(ip, *offset_fsb, end_fsb - *offset_fsb,
-                       &imap, &nimaps, 0);
-       if (error)
-               goto out_unlock;
-       ASSERT(nimaps == 1);
+               *shared = true;
+               return 0;
+       }
 
        /* Trim the mapping to the nearest shared extent boundary. */
-       error = xfs_reflink_trim_around_shared(ip, &imap, &shared, &trimmed);
+       error = xfs_reflink_trim_around_shared(ip, imap, shared, &trimmed);
        if (error)
-               goto out_unlock;
-
-       end_fsb = orig_end_fsb = imap.br_startoff + imap.br_blockcount;
+               return error;
 
        /* Not shared?  Just report the (potentially capped) extent. */
-       if (!shared) {
-               *skipped = true;
-               goto done;
-       }
+       if (!*shared)
+               return 0;
 
        /*
         * Fork all the shared blocks from our write offset until the end of
@@ -278,72 +283,38 @@ __xfs_reflink_reserve_cow(
         */
        error = xfs_qm_dqattach_locked(ip, 0);
        if (error)
-               goto out_unlock;
+               return error;
+
+       end_fsb = orig_end_fsb = imap->br_startoff + imap->br_blockcount;
 
        align = xfs_eof_alignment(ip, xfs_get_cowextsz_hint(ip));
        if (align)
                end_fsb = roundup_64(end_fsb, align);
 
 retry:
-       error = xfs_bmapi_reserve_delalloc(ip, XFS_COW_FORK, *offset_fsb,
-                       end_fsb - *offset_fsb, &got,
-                       &prev, &idx, eof);
+       error = xfs_bmapi_reserve_delalloc(ip, XFS_COW_FORK, imap->br_startoff,
+                       end_fsb - imap->br_startoff, &got, &prev, &idx, eof);
        switch (error) {
        case 0:
                break;
        case -ENOSPC:
        case -EDQUOT:
                /* retry without any preallocation */
-               trace_xfs_reflink_cow_enospc(ip, &imap);
+               trace_xfs_reflink_cow_enospc(ip, imap);
                if (end_fsb != orig_end_fsb) {
                        end_fsb = orig_end_fsb;
                        goto retry;
                }
                /*FALLTHRU*/
        default:
-               goto out_unlock;
+               return error;
        }
 
        if (end_fsb != orig_end_fsb)
                xfs_inode_set_cowblocks_tag(ip);
 
        trace_xfs_reflink_cow_alloc(ip, &got);
-done:
-       *offset_fsb = end_fsb;
-out_unlock:
-       return error;
-}
-
-/* Create a CoW reservation for part of a file. */
-int
-xfs_reflink_reserve_cow_range(
-       struct xfs_inode        *ip,
-       xfs_off_t               offset,
-       xfs_off_t               count)
-{
-       struct xfs_mount        *mp = ip->i_mount;
-       xfs_fileoff_t           offset_fsb, end_fsb;
-       bool                    skipped = false;
-       int                     error;
-
-       trace_xfs_reflink_reserve_cow_range(ip, offset, count);
-
-       offset_fsb = XFS_B_TO_FSBT(mp, offset);
-       end_fsb = XFS_B_TO_FSB(mp, offset + count);
-
-       xfs_ilock(ip, XFS_ILOCK_EXCL);
-       while (offset_fsb < end_fsb) {
-               error = __xfs_reflink_reserve_cow(ip, &offset_fsb, end_fsb,
-                               &skipped);
-               if (error) {
-                       trace_xfs_reflink_reserve_cow_range_error(ip, error,
-                               _RET_IP_);
-                       break;
-               }
-       }
-       xfs_iunlock(ip, XFS_ILOCK_EXCL);
-
-       return error;
+       return 0;
 }
 
 /* Allocate all CoW reservations covering a range of blocks in a file. */
@@ -358,9 +329,8 @@ __xfs_reflink_allocate_cow(
        struct xfs_defer_ops    dfops;
        struct xfs_trans        *tp;
        xfs_fsblock_t           first_block;
-       xfs_fileoff_t           next_fsb;
        int                     nimaps = 1, error;
-       bool                    skipped = false;
+       bool                    shared;
 
        xfs_defer_init(&dfops, &first_block);
 
@@ -371,33 +341,38 @@ __xfs_reflink_allocate_cow(
 
        xfs_ilock(ip, XFS_ILOCK_EXCL);
 
-       next_fsb = *offset_fsb;
-       error = __xfs_reflink_reserve_cow(ip, &next_fsb, end_fsb, &skipped);
+       /* Read extent from the source file. */
+       nimaps = 1;
+       error = xfs_bmapi_read(ip, *offset_fsb, end_fsb - *offset_fsb,
+                       &imap, &nimaps, 0);
+       if (error)
+               goto out_unlock;
+       ASSERT(nimaps == 1);
+
+       error = xfs_reflink_reserve_cow(ip, &imap, &shared);
        if (error)
                goto out_trans_cancel;
 
-       if (skipped) {
-               *offset_fsb = next_fsb;
+       if (!shared) {
+               *offset_fsb = imap.br_startoff + imap.br_blockcount;
                goto out_trans_cancel;
        }
 
        xfs_trans_ijoin(tp, ip, 0);
-       error = xfs_bmapi_write(tp, ip, *offset_fsb, next_fsb - *offset_fsb,
+       error = xfs_bmapi_write(tp, ip, imap.br_startoff, imap.br_blockcount,
                        XFS_BMAPI_COWFORK, &first_block,
                        XFS_EXTENTADD_SPACE_RES(mp, XFS_DATA_FORK),
                        &imap, &nimaps, &dfops);
        if (error)
                goto out_trans_cancel;
 
-       /* We might not have been able to map the whole delalloc extent */
-       *offset_fsb = min(*offset_fsb + imap.br_blockcount, next_fsb);
-
        error = xfs_defer_finish(&tp, &dfops, NULL);
        if (error)
                goto out_trans_cancel;
 
        error = xfs_trans_commit(tp);
 
+       *offset_fsb = imap.br_startoff + imap.br_blockcount;
 out_unlock:
        xfs_iunlock(ip, XFS_ILOCK_EXCL);
        return error;
@@ -536,58 +511,49 @@ xfs_reflink_cancel_cow_blocks(
        xfs_fileoff_t                   offset_fsb,
        xfs_fileoff_t                   end_fsb)
 {
-       struct xfs_bmbt_irec            irec;
-       xfs_filblks_t                   count_fsb;
+       struct xfs_ifork                *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
+       struct xfs_bmbt_irec            got, prev, del;
+       xfs_extnum_t                    idx;
        xfs_fsblock_t                   firstfsb;
        struct xfs_defer_ops            dfops;
-       int                             error = 0;
-       int                             nimaps;
+       int                             error = 0, eof = 0;
 
        if (!xfs_is_reflink_inode(ip))
                return 0;
 
-       /* Go find the old extent in the CoW fork. */
-       while (offset_fsb < end_fsb) {
-               nimaps = 1;
-               count_fsb = (xfs_filblks_t)(end_fsb - offset_fsb);
-               error = xfs_bmapi_read(ip, offset_fsb, count_fsb, &irec,
-                               &nimaps, XFS_BMAPI_COWFORK);
-               if (error)
-                       break;
-               ASSERT(nimaps == 1);
-
-               trace_xfs_reflink_cancel_cow(ip, &irec);
+       xfs_bmap_search_extents(ip, offset_fsb, XFS_COW_FORK, &eof, &idx,
+                       &got, &prev);
+       if (eof)
+               return 0;
 
-               if (irec.br_startblock == DELAYSTARTBLOCK) {
-                       /* Free a delayed allocation. */
-                       xfs_mod_fdblocks(ip->i_mount, irec.br_blockcount,
-                                       false);
-                       ip->i_delayed_blks -= irec.br_blockcount;
+       while (got.br_startoff < end_fsb) {
+               del = got;
+               xfs_trim_extent(&del, offset_fsb, end_fsb - offset_fsb);
+               trace_xfs_reflink_cancel_cow(ip, &del);
 
-                       /* Remove the mapping from the CoW fork. */
-                       error = xfs_bunmapi_cow(ip, &irec);
+               if (isnullstartblock(del.br_startblock)) {
+                       error = xfs_bmap_del_extent_delay(ip, XFS_COW_FORK,
+                                       &idx, &got, &del);
                        if (error)
                                break;
-               } else if (irec.br_startblock == HOLESTARTBLOCK) {
-                       /* empty */
                } else {
                        xfs_trans_ijoin(*tpp, ip, 0);
                        xfs_defer_init(&dfops, &firstfsb);
 
                        /* Free the CoW orphan record. */
                        error = xfs_refcount_free_cow_extent(ip->i_mount,
-                                       &dfops, irec.br_startblock,
-                                       irec.br_blockcount);
+                                       &dfops, del.br_startblock,
+                                       del.br_blockcount);
                        if (error)
                                break;
 
                        xfs_bmap_add_free(ip->i_mount, &dfops,
-                                       irec.br_startblock, irec.br_blockcount,
+                                       del.br_startblock, del.br_blockcount,
                                        NULL);
 
                        /* Update quota accounting */
                        xfs_trans_mod_dquot_byino(*tpp, ip, XFS_TRANS_DQ_BCOUNT,
-                                       -(long)irec.br_blockcount);
+                                       -(long)del.br_blockcount);
 
                        /* Roll the transaction */
                        error = xfs_defer_finish(tpp, &dfops, ip);
@@ -597,15 +563,18 @@ xfs_reflink_cancel_cow_blocks(
                        }
 
                        /* Remove the mapping from the CoW fork. */
-                       error = xfs_bunmapi_cow(ip, &irec);
-                       if (error)
-                               break;
+                       xfs_bmap_del_extent_cow(ip, &idx, &got, &del);
                }
 
-               /* Roll on... */
-               offset_fsb = irec.br_startoff + irec.br_blockcount;
+               if (++idx >= ifp->if_bytes / sizeof(struct xfs_bmbt_rec))
+                       break;
+               xfs_bmbt_get_all(xfs_iext_get_ext(ifp, idx), &got);
        }
 
+       /* clear tag if cow fork is emptied */
+       if (!ifp->if_bytes)
+               xfs_inode_clear_cowblocks_tag(ip);
+
        return error;
 }
 
@@ -668,25 +637,26 @@ xfs_reflink_end_cow(
        xfs_off_t                       offset,
        xfs_off_t                       count)
 {
-       struct xfs_bmbt_irec            irec;
-       struct xfs_bmbt_irec            uirec;
+       struct xfs_ifork                *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
+       struct xfs_bmbt_irec            got, prev, del;
        struct xfs_trans                *tp;
        xfs_fileoff_t                   offset_fsb;
        xfs_fileoff_t                   end_fsb;
-       xfs_filblks_t                   count_fsb;
        xfs_fsblock_t                   firstfsb;
        struct xfs_defer_ops            dfops;
-       int                             error;
+       int                             error, eof = 0;
        unsigned int                    resblks;
-       xfs_filblks_t                   ilen;
        xfs_filblks_t                   rlen;
-       int                             nimaps;
+       xfs_extnum_t                    idx;
 
        trace_xfs_reflink_end_cow(ip, offset, count);
 
+       /* No COW extents?  That's easy! */
+       if (ifp->if_bytes == 0)
+               return 0;
+
        offset_fsb = XFS_B_TO_FSBT(ip->i_mount, offset);
        end_fsb = XFS_B_TO_FSB(ip->i_mount, offset + count);
-       count_fsb = (xfs_filblks_t)(end_fsb - offset_fsb);
 
        /* Start a rolling transaction to switch the mappings */
        resblks = XFS_EXTENTADD_SPACE_RES(ip->i_mount, XFS_DATA_FORK);
@@ -698,72 +668,65 @@ xfs_reflink_end_cow(
        xfs_ilock(ip, XFS_ILOCK_EXCL);
        xfs_trans_ijoin(tp, ip, 0);
 
-       /* Go find the old extent in the CoW fork. */
-       while (offset_fsb < end_fsb) {
-               /* Read extent from the source file */
-               nimaps = 1;
-               count_fsb = (xfs_filblks_t)(end_fsb - offset_fsb);
-               error = xfs_bmapi_read(ip, offset_fsb, count_fsb, &irec,
-                               &nimaps, XFS_BMAPI_COWFORK);
-               if (error)
-                       goto out_cancel;
-               ASSERT(nimaps == 1);
+       xfs_bmap_search_extents(ip, end_fsb - 1, XFS_COW_FORK, &eof, &idx,
+                       &got, &prev);
 
-               ASSERT(irec.br_startblock != DELAYSTARTBLOCK);
-               trace_xfs_reflink_cow_remap(ip, &irec);
+       /* If there is a hole at end_fsb - 1 go to the previous extent */
+       if (eof || got.br_startoff > end_fsb) {
+               ASSERT(idx > 0);
+               xfs_bmbt_get_all(xfs_iext_get_ext(ifp, --idx), &got);
+       }
 
-               /*
-                * We can have a hole in the CoW fork if part of a directio
-                * write is CoW but part of it isn't.
-                */
-               rlen = ilen = irec.br_blockcount;
-               if (irec.br_startblock == HOLESTARTBLOCK)
+       /* Walk backwards until we're out of the I/O range... */
+       while (got.br_startoff + got.br_blockcount > offset_fsb) {
+               del = got;
+               xfs_trim_extent(&del, offset_fsb, end_fsb - offset_fsb);
+
+               /* Extent delete may have bumped idx forward */
+               if (!del.br_blockcount) {
+                       idx--;
                        goto next_extent;
+               }
+
+               ASSERT(!isnullstartblock(got.br_startblock));
 
                /* Unmap the old blocks in the data fork. */
-               while (rlen) {
-                       xfs_defer_init(&dfops, &firstfsb);
-                       error = __xfs_bunmapi(tp, ip, irec.br_startoff,
-                                       &rlen, 0, 1, &firstfsb, &dfops);
-                       if (error)
-                               goto out_defer;
-
-                       /*
-                        * Trim the extent to whatever got unmapped.
-                        * Remember, bunmapi works backwards.
-                        */
-                       uirec.br_startblock = irec.br_startblock + rlen;
-                       uirec.br_startoff = irec.br_startoff + rlen;
-                       uirec.br_blockcount = irec.br_blockcount - rlen;
-                       irec.br_blockcount = rlen;
-                       trace_xfs_reflink_cow_remap_piece(ip, &uirec);
+               xfs_defer_init(&dfops, &firstfsb);
+               rlen = del.br_blockcount;
+               error = __xfs_bunmapi(tp, ip, del.br_startoff, &rlen, 0, 1,
+                               &firstfsb, &dfops);
+               if (error)
+                       goto out_defer;
 
-                       /* Free the CoW orphan record. */
-                       error = xfs_refcount_free_cow_extent(tp->t_mountp,
-                                       &dfops, uirec.br_startblock,
-                                       uirec.br_blockcount);
-                       if (error)
-                               goto out_defer;
+               /* Trim the extent to whatever got unmapped. */
+               if (rlen) {
+                       xfs_trim_extent(&del, del.br_startoff + rlen,
+                               del.br_blockcount - rlen);
+               }
+               trace_xfs_reflink_cow_remap(ip, &del);
 
-                       /* Map the new blocks into the data fork. */
-                       error = xfs_bmap_map_extent(tp->t_mountp, &dfops,
-                                       ip, &uirec);
-                       if (error)
-                               goto out_defer;
+               /* Free the CoW orphan record. */
+               error = xfs_refcount_free_cow_extent(tp->t_mountp, &dfops,
+                               del.br_startblock, del.br_blockcount);
+               if (error)
+                       goto out_defer;
 
-                       /* Remove the mapping from the CoW fork. */
-                       error = xfs_bunmapi_cow(ip, &uirec);
-                       if (error)
-                               goto out_defer;
+               /* Map the new blocks into the data fork. */
+               error = xfs_bmap_map_extent(tp->t_mountp, &dfops, ip, &del);
+               if (error)
+                       goto out_defer;
 
-                       error = xfs_defer_finish(&tp, &dfops, ip);
-                       if (error)
-                               goto out_defer;
-               }
+               /* Remove the mapping from the CoW fork. */
+               xfs_bmap_del_extent_cow(ip, &idx, &got, &del);
+
+               error = xfs_defer_finish(&tp, &dfops, ip);
+               if (error)
+                       goto out_defer;
 
 next_extent:
-               /* Roll on... */
-               offset_fsb = irec.br_startoff + ilen;
+               if (idx < 0)
+                       break;
+               xfs_bmbt_get_all(xfs_iext_get_ext(ifp, idx), &got);
        }
 
        error = xfs_trans_commit(tp);
@@ -774,7 +737,6 @@ xfs_reflink_end_cow(
 
 out_defer:
        xfs_defer_cancel(&dfops);
-out_cancel:
        xfs_trans_cancel(tp);
        xfs_iunlock(ip, XFS_ILOCK_EXCL);
 out:
@@ -1312,19 +1274,26 @@ xfs_compare_extents(
  */
 int
 xfs_reflink_remap_range(
-       struct xfs_inode        *src,
-       xfs_off_t               srcoff,
-       struct xfs_inode        *dest,
-       xfs_off_t               destoff,
-       xfs_off_t               len,
-       unsigned int            flags)
+       struct file             *file_in,
+       loff_t                  pos_in,
+       struct file             *file_out,
+       loff_t                  pos_out,
+       u64                     len,
+       bool                    is_dedupe)
 {
+       struct inode            *inode_in = file_inode(file_in);
+       struct xfs_inode        *src = XFS_I(inode_in);
+       struct inode            *inode_out = file_inode(file_out);
+       struct xfs_inode        *dest = XFS_I(inode_out);
        struct xfs_mount        *mp = src->i_mount;
+       loff_t                  bs = inode_out->i_sb->s_blocksize;
+       bool                    same_inode = (inode_in == inode_out);
        xfs_fileoff_t           sfsbno, dfsbno;
        xfs_filblks_t           fsblen;
-       int                     error;
        xfs_extlen_t            cowextsize;
-       bool                    is_same;
+       loff_t                  isize;
+       ssize_t                 ret;
+       loff_t                  blen;
 
        if (!xfs_sb_version_hasreflink(&mp->m_sb))
                return -EOPNOTSUPP;
@@ -1332,17 +1301,8 @@ xfs_reflink_remap_range(
        if (XFS_FORCED_SHUTDOWN(mp))
                return -EIO;
 
-       /* Don't reflink realtime inodes */
-       if (XFS_IS_REALTIME_INODE(src) || XFS_IS_REALTIME_INODE(dest))
-               return -EINVAL;
-
-       if (flags & ~XFS_REFLINK_ALL)
-               return -EINVAL;
-
-       trace_xfs_reflink_remap_range(src, srcoff, len, dest, destoff);
-
        /* Lock both files against IO */
-       if (src->i_ino == dest->i_ino) {
+       if (same_inode) {
                xfs_ilock(src, XFS_IOLOCK_EXCL);
                xfs_ilock(src, XFS_MMAPLOCK_EXCL);
        } else {
@@ -1350,39 +1310,126 @@ xfs_reflink_remap_range(
                xfs_lock_two_inodes(src, dest, XFS_MMAPLOCK_EXCL);
        }
 
+       /* Don't touch certain kinds of inodes */
+       ret = -EPERM;
+       if (IS_IMMUTABLE(inode_out))
+               goto out_unlock;
+
+       ret = -ETXTBSY;
+       if (IS_SWAPFILE(inode_in) || IS_SWAPFILE(inode_out))
+               goto out_unlock;
+
+
+       /* Don't reflink dirs, pipes, sockets... */
+       ret = -EISDIR;
+       if (S_ISDIR(inode_in->i_mode) || S_ISDIR(inode_out->i_mode))
+               goto out_unlock;
+       ret = -EINVAL;
+       if (S_ISFIFO(inode_in->i_mode) || S_ISFIFO(inode_out->i_mode))
+               goto out_unlock;
+       if (!S_ISREG(inode_in->i_mode) || !S_ISREG(inode_out->i_mode))
+               goto out_unlock;
+
+       /* Don't reflink realtime inodes */
+       if (XFS_IS_REALTIME_INODE(src) || XFS_IS_REALTIME_INODE(dest))
+               goto out_unlock;
+
+       /* Don't share DAX file data for now. */
+       if (IS_DAX(inode_in) || IS_DAX(inode_out))
+               goto out_unlock;
+
+       /* Are we going all the way to the end? */
+       isize = i_size_read(inode_in);
+       if (isize == 0) {
+               ret = 0;
+               goto out_unlock;
+       }
+
+       if (len == 0)
+               len = isize - pos_in;
+
+       /* Ensure offsets don't wrap and the input is inside i_size */
+       if (pos_in + len < pos_in || pos_out + len < pos_out ||
+           pos_in + len > isize)
+               goto out_unlock;
+
+       /* Don't allow dedupe past EOF in the dest file */
+       if (is_dedupe) {
+               loff_t  disize;
+
+               disize = i_size_read(inode_out);
+               if (pos_out >= disize || pos_out + len > disize)
+                       goto out_unlock;
+       }
+
+       /* If we're linking to EOF, continue to the block boundary. */
+       if (pos_in + len == isize)
+               blen = ALIGN(isize, bs) - pos_in;
+       else
+               blen = len;
+
+       /* Only reflink if we're aligned to block boundaries */
+       if (!IS_ALIGNED(pos_in, bs) || !IS_ALIGNED(pos_in + blen, bs) ||
+           !IS_ALIGNED(pos_out, bs) || !IS_ALIGNED(pos_out + blen, bs))
+               goto out_unlock;
+
+       /* Don't allow overlapped reflink within the same file */
+       if (same_inode) {
+               if (pos_out + blen > pos_in && pos_out < pos_in + blen)
+                       goto out_unlock;
+       }
+
+       /* Wait for the completion of any pending IOs on both files */
+       inode_dio_wait(inode_in);
+       if (!same_inode)
+               inode_dio_wait(inode_out);
+
+       ret = filemap_write_and_wait_range(inode_in->i_mapping,
+                       pos_in, pos_in + len - 1);
+       if (ret)
+               goto out_unlock;
+
+       ret = filemap_write_and_wait_range(inode_out->i_mapping,
+                       pos_out, pos_out + len - 1);
+       if (ret)
+               goto out_unlock;
+
+       trace_xfs_reflink_remap_range(src, pos_in, len, dest, pos_out);
+
        /*
         * Check that the extents are the same.
         */
-       if (flags & XFS_REFLINK_DEDUPE) {
-               is_same = false;
-               error = xfs_compare_extents(VFS_I(src), srcoff, VFS_I(dest),
-                               destoff, len, &is_same);
-               if (error)
-                       goto out_error;
+       if (is_dedupe) {
+               bool            is_same = false;
+
+               ret = xfs_compare_extents(inode_in, pos_in, inode_out, pos_out,
+                               len, &is_same);
+               if (ret)
+                       goto out_unlock;
                if (!is_same) {
-                       error = -EBADE;
-                       goto out_error;
+                       ret = -EBADE;
+                       goto out_unlock;
                }
        }
 
-       error = xfs_reflink_set_inode_flag(src, dest);
-       if (error)
-               goto out_error;
+       ret = xfs_reflink_set_inode_flag(src, dest);
+       if (ret)
+               goto out_unlock;
 
        /*
         * Invalidate the page cache so that we can clear any CoW mappings
         * in the destination file.
         */
-       truncate_inode_pages_range(&VFS_I(dest)->i_data, destoff,
-                                  PAGE_ALIGN(destoff + len) - 1);
+       truncate_inode_pages_range(&inode_out->i_data, pos_out,
+                                  PAGE_ALIGN(pos_out + len) - 1);
 
-       dfsbno = XFS_B_TO_FSBT(mp, destoff);
-       sfsbno = XFS_B_TO_FSBT(mp, srcoff);
+       dfsbno = XFS_B_TO_FSBT(mp, pos_out);
+       sfsbno = XFS_B_TO_FSBT(mp, pos_in);
        fsblen = XFS_B_TO_FSB(mp, len);
-       error = xfs_reflink_remap_blocks(src, sfsbno, dest, dfsbno, fsblen,
-                       destoff + len);
-       if (error)
-               goto out_error;
+       ret = xfs_reflink_remap_blocks(src, sfsbno, dest, dfsbno, fsblen,
+                       pos_out + len);
+       if (ret)
+               goto out_unlock;
 
        /*
         * Carry the cowextsize hint from src to dest if we're sharing the
@@ -1390,26 +1437,24 @@ xfs_reflink_remap_range(
         * has a cowextsize hint, and the destination file does not.
         */
        cowextsize = 0;
-       if (srcoff == 0 && len == i_size_read(VFS_I(src)) &&
+       if (pos_in == 0 && len == i_size_read(inode_in) &&
            (src->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE) &&
-           destoff == 0 && len >= i_size_read(VFS_I(dest)) &&
+           pos_out == 0 && len >= i_size_read(inode_out) &&
            !(dest->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE))
                cowextsize = src->i_d.di_cowextsize;
 
-       error = xfs_reflink_update_dest(dest, destoff + len, cowextsize);
-       if (error)
-               goto out_error;
+       ret = xfs_reflink_update_dest(dest, pos_out + len, cowextsize);
 
-out_error:
+out_unlock:
        xfs_iunlock(src, XFS_MMAPLOCK_EXCL);
        xfs_iunlock(src, XFS_IOLOCK_EXCL);
        if (src->i_ino != dest->i_ino) {
                xfs_iunlock(dest, XFS_MMAPLOCK_EXCL);
                xfs_iunlock(dest, XFS_IOLOCK_EXCL);
        }
-       if (error)
-               trace_xfs_reflink_remap_range_error(dest, error, _RET_IP_);
-       return error;
+       if (ret)
+               trace_xfs_reflink_remap_range_error(dest, ret, _RET_IP_);
+       return ret;
 }
 
 /*
index 5dc3c8ac12aa5bef547904ca5dbe48275d63bc34..fad11607c9adf3937d6fa739c2ede29c7d0a8bb2 100644 (file)
@@ -26,8 +26,8 @@ extern int xfs_reflink_find_shared(struct xfs_mount *mp, xfs_agnumber_t agno,
 extern int xfs_reflink_trim_around_shared(struct xfs_inode *ip,
                struct xfs_bmbt_irec *irec, bool *shared, bool *trimmed);
 
-extern int xfs_reflink_reserve_cow_range(struct xfs_inode *ip,
-               xfs_off_t offset, xfs_off_t count);
+extern int xfs_reflink_reserve_cow(struct xfs_inode *ip,
+               struct xfs_bmbt_irec *imap, bool *shared);
 extern int xfs_reflink_allocate_cow_range(struct xfs_inode *ip,
                xfs_off_t offset, xfs_off_t count);
 extern bool xfs_reflink_find_cow_mapping(struct xfs_inode *ip, xfs_off_t offset,
@@ -43,11 +43,8 @@ extern int xfs_reflink_cancel_cow_range(struct xfs_inode *ip, xfs_off_t offset,
 extern int xfs_reflink_end_cow(struct xfs_inode *ip, xfs_off_t offset,
                xfs_off_t count);
 extern int xfs_reflink_recover_cow(struct xfs_mount *mp);
-#define XFS_REFLINK_DEDUPE     1       /* only reflink if contents match */
-#define XFS_REFLINK_ALL                (XFS_REFLINK_DEDUPE)
-extern int xfs_reflink_remap_range(struct xfs_inode *src, xfs_off_t srcoff,
-               struct xfs_inode *dest, xfs_off_t destoff, xfs_off_t len,
-               unsigned int flags);
+extern int xfs_reflink_remap_range(struct file *file_in, loff_t pos_in,
+               struct file *file_out, loff_t pos_out, u64 len, bool is_dedupe);
 extern int xfs_reflink_clear_inode_flag(struct xfs_inode *ip,
                struct xfs_trans **tpp);
 extern int xfs_reflink_unshare(struct xfs_inode *ip, xfs_off_t offset,
index 5f8d55d29a11cc4a4db2e30f55766acbeed78b33..276d3023d60f8201b635ae1f0c2ccbf26aac74fd 100644 (file)
@@ -512,13 +512,13 @@ static struct attribute *xfs_error_attrs[] = {
 };
 
 
-struct kobj_type xfs_error_cfg_ktype = {
+static struct kobj_type xfs_error_cfg_ktype = {
        .release = xfs_sysfs_release,
        .sysfs_ops = &xfs_sysfs_ops,
        .default_attrs = xfs_error_attrs,
 };
 
-struct kobj_type xfs_error_ktype = {
+static struct kobj_type xfs_error_ktype = {
        .release = xfs_sysfs_release,
        .sysfs_ops = &xfs_sysfs_ops,
 };
index ad188d3a83f3739db19ed8af577fe4259c9267e8..0907752be62d3de9e385890550a8e92f0402b398 100644 (file)
@@ -3346,7 +3346,7 @@ DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_alloc);
 DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_found);
 DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_enospc);
 
-DEFINE_RW_EVENT(xfs_reflink_reserve_cow_range);
+DEFINE_RW_EVENT(xfs_reflink_reserve_cow);
 DEFINE_RW_EVENT(xfs_reflink_allocate_cow_range);
 
 DEFINE_INODE_IREC_EVENT(xfs_reflink_bounce_dio_write);
@@ -3356,9 +3356,7 @@ DEFINE_INODE_IREC_EVENT(xfs_reflink_trim_irec);
 DEFINE_SIMPLE_IO_EVENT(xfs_reflink_cancel_cow_range);
 DEFINE_SIMPLE_IO_EVENT(xfs_reflink_end_cow);
 DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap);
-DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap_piece);
 
-DEFINE_INODE_ERROR_EVENT(xfs_reflink_reserve_cow_range_error);
 DEFINE_INODE_ERROR_EVENT(xfs_reflink_allocate_cow_range_error);
 DEFINE_INODE_ERROR_EVENT(xfs_reflink_cancel_cow_range_error);
 DEFINE_INODE_ERROR_EVENT(xfs_reflink_end_cow_error);
index 17a940a1447716420d076be01e3402eb314bafb0..8caa79c617035e60a41ee850150d2b472f35df5a 100644 (file)
@@ -21,7 +21,7 @@ extern void pcc_mbox_free_channel(struct mbox_chan *chan);
 static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
                                                         int subspace_id)
 {
-       return NULL;
+       return ERR_PTR(-ENODEV);
 }
 static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
 #endif
index 43199a049da5f1a4d4129c9575f6c5dff1c199d1..63554e9f6e0c68595943e27d2734ad4fa8271007 100644 (file)
@@ -70,7 +70,7 @@ KSYM(__kcrctab_\name):
 #include <generated/autoksyms.h>
 
 #define __EXPORT_SYMBOL(sym, val, sec)                         \
-       __cond_export_sym(sym, val, sec, config_enabled(__KSYM_##sym))
+       __cond_export_sym(sym, val, sec, __is_defined(__KSYM_##sym))
 #define __cond_export_sym(sym, val, sec, conf)                 \
        ___cond_export_sym(sym, val, sec, conf)
 #define ___cond_export_sym(sym, val, sec, enabled)             \
index 4f53e70f68ee5b32ee69cd825e370ba3f65d9ce8..d141c1f0c77824e0ee4d42be87785b171b1457d9 100644 (file)
@@ -72,6 +72,8 @@
 #define ACLK_IPP               200
 #define ACLK_RGA               201
 #define ACLK_CIF0              202
+#define ACLK_CPU               203
+#define ACLK_PERI              204
 
 /* pclk gates */
 #define PCLK_GRF               320
 #define PCLK_EFUSE             347
 #define PCLK_TZPC              348
 #define PCLK_TSADC             349
+#define PCLK_CPU               350
+#define PCLK_PERI              351
 
 /* hclk gates */
 #define HCLK_SDMMC             448
 #define HCLK_IPP               465
 #define HCLK_RGA               466
 #define HCLK_NANDC0            467
+#define HCLK_CPU               468
+#define HCLK_PERI              469
 
-#define CLK_NR_CLKS            (HCLK_NANDC0 + 1)
+#define CLK_NR_CLKS            (HCLK_PERI + 1)
 
 /* soft-reset indices */
 #define SRST_MCORE             2
diff --git a/include/dt-bindings/clock/stih415-clks.h b/include/dt-bindings/clock/stih415-clks.h
deleted file mode 100644 (file)
index d80caa6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * This header provides constants clk index STMicroelectronics
- * STiH415 SoC.
- */
-#ifndef _CLK_STIH415
-#define _CLK_STIH415
-
-/* CLOCKGEN A0 */
-#define CLK_ICN_REG            0
-#define CLK_ETH1_PHY           4
-
-/* CLOCKGEN A1 */
-#define CLK_ICN_IF_2           0
-#define CLK_GMAC0_PHY          3
-
-#endif
diff --git a/include/dt-bindings/mfd/tps65217.h b/include/dt-bindings/mfd/tps65217.h
new file mode 100644 (file)
index 0000000..cafb9e6
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * This header provides macros for TI TPS65217 DT bindings.
+ *
+ * Copyright (C) 2016 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.
+ *
+ * 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/>.
+ */
+
+#ifndef __DT_BINDINGS_TPS65217_H__
+#define __DT_BINDINGS_TPS65217_H__
+
+#define TPS65217_IRQ_USB       0
+#define TPS65217_IRQ_AC                1
+#define TPS65217_IRQ_PB                2
+
+#endif
index 743e66a95e139fc13b27476c9276df1610289007..aaec8baaa354edc0af5d3af3600f9a978976b2f6 100644 (file)
 #define RK_GPIO4       4
 #define RK_GPIO6       6
 
+#define RK_PA0         0
+#define RK_PA1         1
+#define RK_PA2         2
+#define RK_PA3         3
+#define RK_PA4         4
+#define RK_PA5         5
+#define RK_PA6         6
+#define RK_PA7         7
+#define RK_PB0         8
+#define RK_PB1         9
+#define RK_PB2         10
+#define RK_PB3         11
+#define RK_PB4         12
+#define RK_PB5         13
+#define RK_PB6         14
+#define RK_PB7         15
+#define RK_PC0         16
+#define RK_PC1         17
+#define RK_PC2         18
+#define RK_PC3         19
+#define RK_PC4         20
+#define RK_PC5         21
+#define RK_PC6         22
+#define RK_PC7         23
+#define RK_PD0         24
+#define RK_PD1         25
+#define RK_PD2         26
+#define RK_PD3         27
+#define RK_PD4         28
+#define RK_PD5         29
+#define RK_PD6         30
+#define RK_PD7         31
+
 #define RK_FUNC_GPIO   0
 #define RK_FUNC_1      1
 #define RK_FUNC_2      2
diff --git a/include/dt-bindings/power/mt2701-power.h b/include/dt-bindings/power/mt2701-power.h
new file mode 100644 (file)
index 0000000..64cc826
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2015 MediaTek 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.
+ *
+ * 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 _DT_BINDINGS_POWER_MT2701_POWER_H
+#define _DT_BINDINGS_POWER_MT2701_POWER_H
+
+#define MT2701_POWER_DOMAIN_CONN       0
+#define MT2701_POWER_DOMAIN_DISP       1
+#define MT2701_POWER_DOMAIN_MFG                2
+#define MT2701_POWER_DOMAIN_VDEC       3
+#define MT2701_POWER_DOMAIN_ISP                4
+#define MT2701_POWER_DOMAIN_BDP                5
+#define MT2701_POWER_DOMAIN_ETH                6
+#define MT2701_POWER_DOMAIN_HIF                7
+#define MT2701_POWER_DOMAIN_IFR_MSC    8
+
+#endif /* _DT_BINDINGS_POWER_MT2701_POWER_H */
index ddbeda6dbdc87b4121617631efa0f1a486d1b6e2..689a8b9b9c8fdc985401bf253dfe55ab80aa833f 100644 (file)
@@ -326,6 +326,7 @@ struct pci_dev;
 int acpi_pci_irq_enable (struct pci_dev *dev);
 void acpi_penalize_isa_irq(int irq, int active);
 bool acpi_isa_irq_available(int irq);
+void acpi_penalize_sci_irq(int irq, int trigger, int polarity);
 void acpi_pci_irq_disable (struct pci_dev *dev);
 
 extern int ec_read(u8 addr, u8 *val);
index af596381fa0fa05862bb836a02deaeea29fb9fa2..a428aec36aceeb22da48e9d3d755d2423e71969b 100644 (file)
@@ -785,7 +785,7 @@ extern struct of_device_id __clk_of_table;
  * routines, one at of_clk_init(), and one at platform device probe
  */
 #define CLK_OF_DECLARE_DRIVER(name, compat, fn) \
-       static void name##_of_clk_init_driver(struct device_node *np)   \
+       static void __init name##_of_clk_init_driver(struct device_node *np) \
        {                                                               \
                of_node_clear_flag(np, OF_POPULATED);                   \
                fn(np);                                                 \
index 5fa55fc56e18d1971da8c2e031c35a17fe0d51fc..32dc0cbd51ca3729bef594f7a84832bc6389e3ea 100644 (file)
@@ -677,10 +677,10 @@ static inline int cpufreq_table_find_index_dl(struct cpufreq_policy *policy,
                if (best == table - 1)
                        return pos - table;
 
-               return best - pos;
+               return best - table;
        }
 
-       return best - pos;
+       return best - table;
 }
 
 /* Works only on sorted freq-tables */
index 9b207a8c5af3cedecc545dbf179464f32af4c4d0..afe641c02dca3320f3bf4255092deafeb77d536f 100644 (file)
@@ -81,6 +81,7 @@ enum cpuhp_state {
        CPUHP_AP_ARM_ARCH_TIMER_STARTING,
        CPUHP_AP_ARM_GLOBAL_TIMER_STARTING,
        CPUHP_AP_DUMMY_TIMER_STARTING,
+       CPUHP_AP_JCORE_TIMER_STARTING,
        CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING,
        CPUHP_AP_ARM_TWD_STARTING,
        CPUHP_AP_METAG_TIMER_STARTING,
index e2c8419278c192fd8002ae0b470ea2421dc51a57..82ef36eac8a16a8fc2b7b021f345910ac04b04b4 100644 (file)
@@ -141,4 +141,26 @@ enum {
 void *memremap(resource_size_t offset, size_t size, unsigned long flags);
 void memunmap(void *addr);
 
+/*
+ * On x86 PAT systems we have memory tracking that keeps track of
+ * the allowed mappings on memory ranges. This tracking works for
+ * all the in-kernel mapping APIs (ioremap*), but where the user
+ * wishes to map a range from a physical device into user memory
+ * the tracking won't be updated. This API is to be used by
+ * drivers which remap physical device pages into userspace,
+ * and wants to make sure they are mapped WC and not UC.
+ */
+#ifndef arch_io_reserve_memtype_wc
+static inline int arch_io_reserve_memtype_wc(resource_size_t base,
+                                            resource_size_t size)
+{
+       return 0;
+}
+
+static inline void arch_io_free_memtype_wc(resource_size_t base,
+                                          resource_size_t size)
+{
+}
+#endif
+
 #endif /* _LINUX_IO_H */
index e63e288dee836c5c81d88909550ee1155eb160b2..7892f55a1866db26d5c4edabf69a59606a2efa3f 100644 (file)
@@ -19,11 +19,15 @@ struct vm_fault;
 #define IOMAP_UNWRITTEN        0x04    /* blocks allocated @blkno in unwritten state */
 
 /*
- * Flags for iomap mappings:
+ * Flags for all iomap mappings:
  */
-#define IOMAP_F_MERGED 0x01    /* contains multiple blocks/extents */
-#define IOMAP_F_SHARED 0x02    /* block shared with another file */
-#define IOMAP_F_NEW    0x04    /* blocks have been newly allocated */
+#define IOMAP_F_NEW    0x01    /* blocks have been newly allocated */
+
+/*
+ * Flags that only need to be reported for IOMAP_REPORT requests:
+ */
+#define IOMAP_F_MERGED 0x10    /* contains multiple blocks/extents */
+#define IOMAP_F_SHARED 0x20    /* block shared with another file */
 
 /*
  * Magic value for blkno:
@@ -42,8 +46,9 @@ struct iomap {
 /*
  * Flags for iomap_begin / iomap_end.  No flag implies a read.
  */
-#define IOMAP_WRITE            (1 << 0)
-#define IOMAP_ZERO             (1 << 1)
+#define IOMAP_WRITE            (1 << 0) /* writing, must allocate blocks */
+#define IOMAP_ZERO             (1 << 1) /* zeroing operation, may skip holes */
+#define IOMAP_REPORT           (1 << 2) /* report extent status, e.g. FIEMAP */
 
 struct iomap_ops {
        /*
index 8361c8d3edd10d8ae050f491d07cff180f407f35..b7e34313cdfe4a68fee46334158d7d22111993e9 100644 (file)
 #define GITS_BASER_TYPE_SHIFT                  (56)
 #define GITS_BASER_TYPE(r)             (((r) >> GITS_BASER_TYPE_SHIFT) & 7)
 #define GITS_BASER_ENTRY_SIZE_SHIFT            (48)
-#define GITS_BASER_ENTRY_SIZE(r)       ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0xff) + 1)
+#define GITS_BASER_ENTRY_SIZE(r)       ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
 #define GITS_BASER_SHAREABILITY_SHIFT  (10)
 #define GITS_BASER_InnerShareable                                      \
        GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable)
index d600303306eb7b54bbc68b62c89243e778f2a75c..820c0ad54a0117596e63bae6845b1ebd771c3412 100644 (file)
@@ -44,6 +44,7 @@ static inline void kasan_disable_current(void)
 void kasan_unpoison_shadow(const void *address, size_t size);
 
 void kasan_unpoison_task_stack(struct task_struct *task);
+void kasan_unpoison_stack_above_sp_to(const void *watermark);
 
 void kasan_alloc_pages(struct page *page, unsigned int order);
 void kasan_free_pages(struct page *page, unsigned int order);
@@ -85,6 +86,7 @@ size_t kasan_metadata_size(struct kmem_cache *cache);
 static inline void kasan_unpoison_shadow(const void *address, size_t size) {}
 
 static inline void kasan_unpoison_task_stack(struct task_struct *task) {}
+static inline void kasan_unpoison_stack_above_sp_to(const void *watermark) {}
 
 static inline void kasan_enable_current(void) {}
 static inline void kasan_disable_current(void) {}
index 15ec117ec5373e8c98ac801d433e67a8aa11e974..8f2e059e4d45559b54c1fbd087181865beac7af7 100644 (file)
@@ -31,7 +31,6 @@
  * When CONFIG_BOOGER is not defined, we generate a (... 1, 0) pair, and when
  * the last step cherry picks the 2nd arg, we get a zero.
  */
-#define config_enabled(cfg)            ___is_defined(cfg)
 #define __is_defined(x)                        ___is_defined(x)
 #define ___is_defined(val)             ____is_defined(__ARG_PLACEHOLDER_##val)
 #define ____is_defined(arg1_or_junk)   __take_second_arg(arg1_or_junk 1, 0)
  * otherwise. For boolean options, this is equivalent to
  * IS_ENABLED(CONFIG_FOO).
  */
-#define IS_BUILTIN(option) config_enabled(option)
+#define IS_BUILTIN(option) __is_defined(option)
 
 /*
  * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0
  * otherwise.
  */
-#define IS_MODULE(option) config_enabled(option##_MODULE)
+#define IS_MODULE(option) __is_defined(option##_MODULE)
 
 /*
  * IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled
index e9caec6a51e97a618ff5ab9b76dd6371708564e8..a92c8d73aeafc5f5bafa551eacc284f86bad50d0 100644 (file)
@@ -1266,29 +1266,25 @@ static inline int fixup_user_fault(struct task_struct *tsk,
 }
 #endif
 
-extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
+extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len,
+               unsigned int gup_flags);
 extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
-               void *buf, int len, int write);
+               void *buf, int len, unsigned int gup_flags);
 
-long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
-                     unsigned long start, unsigned long nr_pages,
-                     unsigned int foll_flags, struct page **pages,
-                     struct vm_area_struct **vmas, int *nonblocking);
 long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
                            unsigned long start, unsigned long nr_pages,
-                           int write, int force, struct page **pages,
+                           unsigned int gup_flags, struct page **pages,
                            struct vm_area_struct **vmas);
 long get_user_pages(unsigned long start, unsigned long nr_pages,
-                           int write, int force, struct page **pages,
+                           unsigned int gup_flags, struct page **pages,
                            struct vm_area_struct **vmas);
 long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
-                   int write, int force, struct page **pages, int *locked);
+                   unsigned int gup_flags, struct page **pages, int *locked);
 long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
                               unsigned long start, unsigned long nr_pages,
-                              int write, int force, struct page **pages,
-                              unsigned int gup_flags);
+                              struct page **pages, unsigned int gup_flags);
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
-                   int write, int force, struct page **pages);
+                   struct page **pages, unsigned int gup_flags);
 int get_user_pages_fast(unsigned long start, int nr_pages, int write,
                        struct page **pages);
 
@@ -1306,7 +1302,7 @@ struct frame_vector {
 struct frame_vector *frame_vector_create(unsigned int nr_frames);
 void frame_vector_destroy(struct frame_vector *vec);
 int get_vaddr_frames(unsigned long start, unsigned int nr_pfns,
-                    bool write, bool force, struct frame_vector *vec);
+                    unsigned int gup_flags, struct frame_vector *vec);
 void put_vaddr_frames(struct frame_vector *vec);
 int frame_vector_to_pages(struct frame_vector *vec);
 void frame_vector_to_pfns(struct frame_vector *vec);
@@ -1391,7 +1387,7 @@ static inline int stack_guard_page_end(struct vm_area_struct *vma,
                !vma_growsup(vma->vm_next, addr);
 }
 
-int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t);
+int vma_is_stack_for_current(struct vm_area_struct *vma);
 
 extern unsigned long move_page_tables(struct vm_area_struct *vma,
                unsigned long old_addr, struct vm_area_struct *new_vma,
@@ -2232,6 +2228,7 @@ static inline struct page *follow_page(struct vm_area_struct *vma,
 #define FOLL_TRIED     0x800   /* a retry, previous pass started an IO */
 #define FOLL_MLOCK     0x1000  /* lock present pages */
 #define FOLL_REMOTE    0x2000  /* we are working on non-current tsk/mm */
+#define FOLL_COW       0x4000  /* internal GUP flag */
 
 typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
                        void *data);
index 7f2ae99e5daf39406fa5b166f6a1a75c464d1fcd..0f088f3a2fed8df6435819a52360940310272462 100644 (file)
@@ -440,33 +440,7 @@ struct zone {
        seqlock_t               span_seqlock;
 #endif
 
-       /*
-        * wait_table           -- the array holding the hash table
-        * wait_table_hash_nr_entries   -- the size of the hash table array
-        * wait_table_bits      -- wait_table_size == (1 << wait_table_bits)
-        *
-        * The purpose of all these is to keep track of the people
-        * waiting for a page to become available and make them
-        * runnable again when possible. The trouble is that this
-        * consumes a lot of space, especially when so few things
-        * wait on pages at a given time. So instead of using
-        * per-page waitqueues, we use a waitqueue hash table.
-        *
-        * The bucket discipline is to sleep on the same queue when
-        * colliding and wake all in that wait queue when removing.
-        * When something wakes, it must check to be sure its page is
-        * truly available, a la thundering herd. The cost of a
-        * collision is great, but given the expected load of the
-        * table, they should be so rare as to be outweighed by the
-        * benefits from the saved space.
-        *
-        * __wait_on_page_locked() and unlock_page() in mm/filemap.c, are the
-        * primary users of these fields, and in mm/page_alloc.c
-        * free_area_init_core() performs the initialization of them.
-        */
-       wait_queue_head_t       *wait_table;
-       unsigned long           wait_table_hash_nr_entries;
-       unsigned long           wait_table_bits;
+       int initialized;
 
        /* Write-intensive fields used from the page allocator */
        ZONE_PADDING(_pad1_)
@@ -546,7 +520,7 @@ static inline bool zone_spans_pfn(const struct zone *zone, unsigned long pfn)
 
 static inline bool zone_is_initialized(struct zone *zone)
 {
-       return !!zone->wait_table;
+       return zone->initialized;
 }
 
 static inline bool zone_is_empty(struct zone *zone)
index 7676557ce357d682c3c47f0599e66bdd8a42225f..fc3c2420659395039be1288a82e8d62d98aefab3 100644 (file)
@@ -16,7 +16,6 @@
 #define _LINUX_NVME_H
 
 #include <linux/types.h>
-#include <linux/uuid.h>
 
 /* NQN names in commands fields specified one size */
 #define NVMF_NQN_FIELD_LEN     256
@@ -182,7 +181,7 @@ struct nvme_id_ctrl {
        char                    fr[8];
        __u8                    rab;
        __u8                    ieee[3];
-       __u8                    mic;
+       __u8                    cmic;
        __u8                    mdts;
        __le16                  cntlid;
        __le32                  ver;
@@ -202,7 +201,13 @@ struct nvme_id_ctrl {
        __u8                    apsta;
        __le16                  wctemp;
        __le16                  cctemp;
-       __u8                    rsvd270[50];
+       __le16                  mtfa;
+       __le32                  hmpre;
+       __le32                  hmmin;
+       __u8                    tnvmcap[16];
+       __u8                    unvmcap[16];
+       __le32                  rpmbs;
+       __u8                    rsvd316[4];
        __le16                  kas;
        __u8                    rsvd322[190];
        __u8                    sqes;
@@ -267,7 +272,7 @@ struct nvme_id_ns {
        __le16                  nabo;
        __le16                  nabspf;
        __u16                   rsvd46;
-       __le64                  nvmcap[2];
+       __u8                    nvmcap[16];
        __u8                    rsvd64[40];
        __u8                    nguid[16];
        __u8                    eui64[8];
@@ -276,6 +281,16 @@ struct nvme_id_ns {
        __u8                    vs[3712];
 };
 
+enum {
+       NVME_ID_CNS_NS                  = 0x00,
+       NVME_ID_CNS_CTRL                = 0x01,
+       NVME_ID_CNS_NS_ACTIVE_LIST      = 0x02,
+       NVME_ID_CNS_NS_PRESENT_LIST     = 0x10,
+       NVME_ID_CNS_NS_PRESENT          = 0x11,
+       NVME_ID_CNS_CTRL_NS_LIST        = 0x12,
+       NVME_ID_CNS_CTRL_LIST           = 0x13,
+};
+
 enum {
        NVME_NS_FEAT_THIN       = 1 << 0,
        NVME_NS_FLBAS_LBA_MASK  = 0xf,
@@ -556,8 +571,10 @@ enum nvme_admin_opcode {
        nvme_admin_set_features         = 0x09,
        nvme_admin_get_features         = 0x0a,
        nvme_admin_async_event          = 0x0c,
+       nvme_admin_ns_mgmt              = 0x0d,
        nvme_admin_activate_fw          = 0x10,
        nvme_admin_download_fw          = 0x11,
+       nvme_admin_ns_attach            = 0x15,
        nvme_admin_keep_alive           = 0x18,
        nvme_admin_format_nvm           = 0x80,
        nvme_admin_security_send        = 0x81,
@@ -583,6 +600,7 @@ enum {
        NVME_FEAT_WRITE_ATOMIC  = 0x0a,
        NVME_FEAT_ASYNC_EVENT   = 0x0b,
        NVME_FEAT_AUTO_PST      = 0x0c,
+       NVME_FEAT_HOST_MEM_BUF  = 0x0d,
        NVME_FEAT_KATO          = 0x0f,
        NVME_FEAT_SW_PROGRESS   = 0x80,
        NVME_FEAT_HOST_ID       = 0x81,
@@ -745,7 +763,7 @@ struct nvmf_common_command {
 struct nvmf_disc_rsp_page_entry {
        __u8            trtype;
        __u8            adrfam;
-       __u8            nqntype;
+       __u8            subtype;
        __u8            treq;
        __le16          portid;
        __le16          cntlid;
@@ -794,7 +812,7 @@ struct nvmf_connect_command {
 };
 
 struct nvmf_connect_data {
-       uuid_be         hostid;
+       __u8            hostid[16];
        __le16          cntlid;
        char            resv4[238];
        char            subsysnqn[NVMF_NQN_FIELD_LEN];
@@ -905,12 +923,23 @@ enum {
        NVME_SC_INVALID_VECTOR          = 0x108,
        NVME_SC_INVALID_LOG_PAGE        = 0x109,
        NVME_SC_INVALID_FORMAT          = 0x10a,
-       NVME_SC_FIRMWARE_NEEDS_RESET    = 0x10b,
+       NVME_SC_FW_NEEDS_CONV_RESET     = 0x10b,
        NVME_SC_INVALID_QUEUE           = 0x10c,
        NVME_SC_FEATURE_NOT_SAVEABLE    = 0x10d,
        NVME_SC_FEATURE_NOT_CHANGEABLE  = 0x10e,
        NVME_SC_FEATURE_NOT_PER_NS      = 0x10f,
-       NVME_SC_FW_NEEDS_RESET_SUBSYS   = 0x110,
+       NVME_SC_FW_NEEDS_SUBSYS_RESET   = 0x110,
+       NVME_SC_FW_NEEDS_RESET          = 0x111,
+       NVME_SC_FW_NEEDS_MAX_TIME       = 0x112,
+       NVME_SC_FW_ACIVATE_PROHIBITED   = 0x113,
+       NVME_SC_OVERLAPPING_RANGE       = 0x114,
+       NVME_SC_NS_INSUFFICENT_CAP      = 0x115,
+       NVME_SC_NS_ID_UNAVAILABLE       = 0x116,
+       NVME_SC_NS_ALREADY_ATTACHED     = 0x118,
+       NVME_SC_NS_IS_PRIVATE           = 0x119,
+       NVME_SC_NS_NOT_ATTACHED         = 0x11a,
+       NVME_SC_THIN_PROV_NOT_SUPP      = 0x11b,
+       NVME_SC_CTRL_LIST_INVALID       = 0x11c,
 
        /*
         * I/O Command Set Specific - NVM commands:
@@ -941,6 +970,7 @@ enum {
        NVME_SC_REFTAG_CHECK            = 0x284,
        NVME_SC_COMPARE_FAILED          = 0x285,
        NVME_SC_ACCESS_DENIED           = 0x286,
+       NVME_SC_UNWRITTEN_BLOCK         = 0x287,
 
        NVME_SC_DNR                     = 0x4000,
 };
@@ -960,6 +990,7 @@ struct nvme_completion {
        __le16  status;         /* did the command fail, and if so, why? */
 };
 
-#define NVME_VS(major, minor) (((major) << 16) | ((minor) << 8))
+#define NVME_VS(major, minor, tertiary) \
+       (((major) << 16) | ((minor) << 8) | (tertiary))
 
 #endif /* _LINUX_NVME_H */
index 060d0ede88df6dfc34fbfcd1e60629d8dce5373d..4741ecdb981743151b70afff63b10740dfaa4132 100644 (file)
@@ -1257,6 +1257,7 @@ extern u64 perf_swevent_set_period(struct perf_event *event);
 extern void perf_event_enable(struct perf_event *event);
 extern void perf_event_disable(struct perf_event *event);
 extern void perf_event_disable_local(struct perf_event *event);
+extern void perf_event_disable_inatomic(struct perf_event *event);
 extern void perf_event_task_tick(void);
 #else /* !CONFIG_PERF_EVENTS: */
 static inline void *
index 0d7abb8b7315ce3ab5162bc606c64337f3709d20..91a740f6b884236e3ed5771f01397f4647f3cd9d 100644 (file)
@@ -902,8 +902,5 @@ asmlinkage long sys_pkey_mprotect(unsigned long start, size_t len,
                                  unsigned long prot, int pkey);
 asmlinkage long sys_pkey_alloc(unsigned long flags, unsigned long init_val);
 asmlinkage long sys_pkey_free(int pkey);
-//asmlinkage long sys_pkey_get(int pkey, unsigned long flags);
-//asmlinkage long sys_pkey_set(int pkey, unsigned long access_rights,
-//                          unsigned long flags);
 
 #endif
index 45f004e9cc598c0e57f665ca3476b5a1d623b695..2873baf5372a7b1484888566725e2c4dc7368d26 100644 (file)
 struct timespec;
 struct compat_timespec;
 
-#ifdef CONFIG_THREAD_INFO_IN_TASK
-struct thread_info {
-       unsigned long           flags;          /* low level flags */
-};
-
-#define INIT_THREAD_INFO(tsk)                  \
-{                                              \
-       .flags          = 0,                    \
-}
-#endif
-
 #ifdef CONFIG_THREAD_INFO_IN_TASK
 #define current_thread_info() ((struct thread_info *)current)
 #endif
index fb8e3b6febdff7f5fdb3f0335455b9e074647c40..c2119008990a36a54b43ee66d57024df6330e893 100644 (file)
@@ -177,6 +177,7 @@ enum tcm_sense_reason_table {
        TCM_LOGICAL_BLOCK_GUARD_CHECK_FAILED    = R(0x15),
        TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED  = R(0x16),
        TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED  = R(0x17),
+       TCM_COPY_TARGET_DEVICE_NOT_REACHABLE    = R(0x18),
 #undef R
 };
 
index dbfee7e86ba6429319188a03d618881ae34a9ef0..9b1462e38b821a762b284b44a20a96de9f0930d9 100644 (file)
@@ -730,10 +730,6 @@ __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect)
 __SYSCALL(__NR_pkey_alloc,    sys_pkey_alloc)
 #define __NR_pkey_free 290
 __SYSCALL(__NR_pkey_free,     sys_pkey_free)
-#define __NR_pkey_get 291
-//__SYSCALL(__NR_pkey_get,      sys_pkey_get)
-#define __NR_pkey_set 292
-//__SYSCALL(__NR_pkey_set,      sys_pkey_set)
 
 #undef __NR_syscalls
 #define __NR_syscalls 291
index 6965d0909554573d723d9d7eca3bb205e12d2760..cd2be1c8e9fb6cfac94b6dc9e734274a7c1f9932 100644 (file)
@@ -75,6 +75,7 @@ header-y += bpf_perf_event.h
 header-y += bpf.h
 header-y += bpqether.h
 header-y += bsg.h
+header-y += bt-bmc.h
 header-y += btrfs.h
 header-y += can.h
 header-y += capability.h
diff --git a/include/uapi/linux/bt-bmc.h b/include/uapi/linux/bt-bmc.h
new file mode 100644 (file)
index 0000000..d9ec766
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2015-2016, IBM Corporation.
+ *
+ * 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 _UAPI_LINUX_BT_BMC_H
+#define _UAPI_LINUX_BT_BMC_H
+
+#include <linux/ioctl.h>
+
+#define __BT_BMC_IOCTL_MAGIC   0xb1
+#define BT_BMC_IOCTL_SMS_ATN   _IO(__BT_BMC_IOCTL_MAGIC, 0x00)
+
+#endif /* _UAPI_LINUX_BT_BMC_H */
index a521999de4f103954e40db932e8903f3ed7e48f1..bf74eaa5c39f208ea5f1ee41db38e57349512e7d 100644 (file)
@@ -53,7 +53,7 @@ static struct msg_msg *alloc_msg(size_t len)
        size_t alen;
 
        alen = min(len, DATALEN_MSG);
-       msg = kmalloc(sizeof(*msg) + alen, GFP_KERNEL);
+       msg = kmalloc(sizeof(*msg) + alen, GFP_KERNEL_ACCOUNT);
        if (msg == NULL)
                return NULL;
 
@@ -65,7 +65,7 @@ static struct msg_msg *alloc_msg(size_t len)
        while (len > 0) {
                struct msg_msgseg *seg;
                alen = min(len, DATALEN_SEG);
-               seg = kmalloc(sizeof(*seg) + alen, GFP_KERNEL);
+               seg = kmalloc(sizeof(*seg) + alen, GFP_KERNEL_ACCOUNT);
                if (seg == NULL)
                        goto out_err;
                *pseg = seg;
index 5df20d6d152071b40244fb5d85279b8040a641ba..29de1a9352c005c0d4808d2f842c15d29df1b2f8 100644 (file)
@@ -228,7 +228,7 @@ static struct {
        .wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
        .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       .dep_map = {.name = "cpu_hotplug.lock" },
+       .dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map", &cpu_hotplug.dep_map),
 #endif
 };
 
index c6e47e97b33fdb7b0bbabf91016d51bc76d4b63c..0e292132efacaaa09fa4960b92315c9c967b0e82 100644 (file)
@@ -1960,6 +1960,12 @@ void perf_event_disable(struct perf_event *event)
 }
 EXPORT_SYMBOL_GPL(perf_event_disable);
 
+void perf_event_disable_inatomic(struct perf_event *event)
+{
+       event->pending_disable = 1;
+       irq_work_queue(&event->pending);
+}
+
 static void perf_set_shadow_time(struct perf_event *event,
                                 struct perf_event_context *ctx,
                                 u64 tstamp)
@@ -7075,8 +7081,8 @@ static int __perf_event_overflow(struct perf_event *event,
        if (events && atomic_dec_and_test(&event->event_limit)) {
                ret = 1;
                event->pending_kill = POLL_HUP;
-               event->pending_disable = 1;
-               irq_work_queue(&event->pending);
+
+               perf_event_disable_inatomic(event);
        }
 
        READ_ONCE(event->overflow_handler)(event, data, regs);
@@ -8855,7 +8861,10 @@ EXPORT_SYMBOL_GPL(perf_pmu_register);
 
 void perf_pmu_unregister(struct pmu *pmu)
 {
+       int remove_device;
+
        mutex_lock(&pmus_lock);
+       remove_device = pmu_bus_running;
        list_del_rcu(&pmu->entry);
        mutex_unlock(&pmus_lock);
 
@@ -8869,10 +8878,12 @@ void perf_pmu_unregister(struct pmu *pmu)
        free_percpu(pmu->pmu_disable_count);
        if (pmu->type >= PERF_TYPE_MAX)
                idr_remove(&pmu_idr, pmu->type);
-       if (pmu->nr_addr_filters)
-               device_remove_file(pmu->dev, &dev_attr_nr_addr_filters);
-       device_del(pmu->dev);
-       put_device(pmu->dev);
+       if (remove_device) {
+               if (pmu->nr_addr_filters)
+                       device_remove_file(pmu->dev, &dev_attr_nr_addr_filters);
+               device_del(pmu->dev);
+               put_device(pmu->dev);
+       }
        free_pmu_context(pmu);
 }
 EXPORT_SYMBOL_GPL(perf_pmu_unregister);
index d4129bb05e5d044101ba2cbea672f96954b69a51..f9ec9add21647fb4b60c3be08f515112b4bf4a25 100644 (file)
@@ -300,7 +300,8 @@ int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr,
 
 retry:
        /* Read the page with vaddr into memory */
-       ret = get_user_pages_remote(NULL, mm, vaddr, 1, 0, 1, &old_page, &vma);
+       ret = get_user_pages_remote(NULL, mm, vaddr, 1, FOLL_FORCE, &old_page,
+                       &vma);
        if (ret <= 0)
                return ret;
 
@@ -1710,7 +1711,8 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr)
         * but we treat this as a 'remote' access since it is
         * essentially a kernel access to the memory.
         */
-       result = get_user_pages_remote(NULL, mm, vaddr, 1, 0, 1, &page, NULL);
+       result = get_user_pages_remote(NULL, mm, vaddr, 1, FOLL_FORCE, &page,
+                       NULL);
        if (result < 0)
                return result;
 
index 0c5f1a5db654c7da7db4ec168ef44516407d6af5..9c4d304832648a2aa526597c87804e22e2cb715e 100644 (file)
@@ -721,6 +721,7 @@ int irq_set_parent(int irq, int parent_irq)
        irq_put_desc_unlock(desc, flags);
        return 0;
 }
+EXPORT_SYMBOL_GPL(irq_set_parent);
 #endif
 
 /*
index 8d44b3fea9d08f901e3b24ed4a619a4883d4042f..30e6d05aa5a9f726422c7968dabbff5e1c590c2a 100644 (file)
@@ -53,8 +53,15 @@ void notrace __sanitizer_cov_trace_pc(void)
        /*
         * We are interested in code coverage as a function of a syscall inputs,
         * so we ignore code executed in interrupts.
+        * The checks for whether we are in an interrupt are open-coded, because
+        * 1. We can't use in_interrupt() here, since it also returns true
+        *    when we are inside local_bh_disable() section.
+        * 2. We don't want to use (in_irq() | in_serving_softirq() | in_nmi()),
+        *    since that leads to slower generated code (three separate tests,
+        *    one for each of the flags).
         */
-       if (!t || in_interrupt())
+       if (!t || (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_OFFSET
+                                                       | NMI_MASK)))
                return;
        mode = READ_ONCE(t->kcov_mode);
        if (mode == KCOV_MODE_TRACE) {
index 1e7f5da648d991d2fbb69f0022fce67cea3b8b5e..6ccb08f57fcb431d26b266163f53b321b2782bd8 100644 (file)
@@ -498,9 +498,9 @@ static int enter_state(suspend_state_t state)
 
 #ifndef CONFIG_SUSPEND_SKIP_SYNC
        trace_suspend_resume(TPS("sync_filesystems"), 0, true);
-       printk(KERN_INFO "PM: Syncing filesystems ... ");
+       pr_info("PM: Syncing filesystems ... ");
        sys_sync();
-       printk("done.\n");
+       pr_cont("done.\n");
        trace_suspend_resume(TPS("sync_filesystems"), 0, false);
 #endif
 
index d5e3973154739f9453926f28e71ec7e20ba753bb..de08fc90baafaf86d3053831d2cc0acd5cb9828e 100644 (file)
@@ -1769,6 +1769,10 @@ static size_t log_output(int facility, int level, enum log_flags lflags, const c
                cont_flush();
        }
 
+       /* Skip empty continuation lines that couldn't be added - they just flush */
+       if (!text_len && (lflags & LOG_CONT))
+               return 0;
+
        /* If it doesn't end in a newline, try to buffer the current line */
        if (!(lflags & LOG_NEWLINE)) {
                if (cont_add(facility, level, lflags, text, text_len))
index 2a99027312a6af6773027e20029752efddc418e3..e6474f7272ec2ce96c95532ea906da113acd5354 100644 (file)
@@ -537,7 +537,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
                int this_len, retval;
 
                this_len = (len > sizeof(buf)) ? sizeof(buf) : len;
-               retval = access_process_vm(tsk, src, buf, this_len, 0);
+               retval = access_process_vm(tsk, src, buf, this_len, FOLL_FORCE);
                if (!retval) {
                        if (copied)
                                break;
@@ -564,7 +564,8 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds
                this_len = (len > sizeof(buf)) ? sizeof(buf) : len;
                if (copy_from_user(buf, src, this_len))
                        return -EFAULT;
-               retval = access_process_vm(tsk, dst, buf, this_len, 1);
+               retval = access_process_vm(tsk, dst, buf, this_len,
+                               FOLL_FORCE | FOLL_WRITE);
                if (!retval) {
                        if (copied)
                                break;
@@ -1127,7 +1128,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
        unsigned long tmp;
        int copied;
 
-       copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
+       copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), FOLL_FORCE);
        if (copied != sizeof(tmp))
                return -EIO;
        return put_user(tmp, (unsigned long __user *)data);
@@ -1138,7 +1139,8 @@ int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
 {
        int copied;
 
-       copied = access_process_vm(tsk, addr, &data, sizeof(data), 1);
+       copied = access_process_vm(tsk, addr, &data, sizeof(data),
+                       FOLL_FORCE | FOLL_WRITE);
        return (copied == sizeof(data)) ? 0 : -EIO;
 }
 
@@ -1155,7 +1157,8 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
        switch (request) {
        case PTRACE_PEEKTEXT:
        case PTRACE_PEEKDATA:
-               ret = access_process_vm(child, addr, &word, sizeof(word), 0);
+               ret = access_process_vm(child, addr, &word, sizeof(word),
+                               FOLL_FORCE);
                if (ret != sizeof(word))
                        ret = -EIO;
                else
@@ -1164,7 +1167,8 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
 
        case PTRACE_POKETEXT:
        case PTRACE_POKEDATA:
-               ret = access_process_vm(child, addr, &data, sizeof(data), 1);
+               ret = access_process_vm(child, addr, &data, sizeof(data),
+                               FOLL_FORCE | FOLL_WRITE);
                ret = (ret != sizeof(data) ? -EIO : 0);
                break;
 
index 94732d1ab00ab9d9afdebad41642e279249776cb..42d4027f9e2656b763aa3050e38c2ae1803e1890 100644 (file)
@@ -7515,11 +7515,27 @@ static struct kmem_cache *task_group_cache __read_mostly;
 DECLARE_PER_CPU(cpumask_var_t, load_balance_mask);
 DECLARE_PER_CPU(cpumask_var_t, select_idle_mask);
 
+#define WAIT_TABLE_BITS 8
+#define WAIT_TABLE_SIZE (1 << WAIT_TABLE_BITS)
+static wait_queue_head_t bit_wait_table[WAIT_TABLE_SIZE] __cacheline_aligned;
+
+wait_queue_head_t *bit_waitqueue(void *word, int bit)
+{
+       const int shift = BITS_PER_LONG == 32 ? 5 : 6;
+       unsigned long val = (unsigned long)word << shift | bit;
+
+       return bit_wait_table + hash_long(val, WAIT_TABLE_BITS);
+}
+EXPORT_SYMBOL(bit_waitqueue);
+
 void __init sched_init(void)
 {
        int i, j;
        unsigned long alloc_size = 0, ptr;
 
+       for (i = 0; i < WAIT_TABLE_SIZE; i++)
+               init_waitqueue_head(bit_wait_table + i);
+
 #ifdef CONFIG_FAIR_GROUP_SCHED
        alloc_size += 2 * nr_cpu_ids * sizeof(void **);
 #endif
index 2d4ad72f8f3c8c585f0b8876d2255614944cf157..c242944f5cbd560223ce91990ca92666460110bf 100644 (file)
@@ -690,7 +690,14 @@ void init_entity_runnable_average(struct sched_entity *se)
         * will definitely be update (after enqueue).
         */
        sa->period_contrib = 1023;
-       sa->load_avg = scale_load_down(se->load.weight);
+       /*
+        * Tasks are intialized with full load to be seen as heavy tasks until
+        * they get a chance to stabilize to their real load level.
+        * Group entities are intialized with zero load to reflect the fact that
+        * nothing has been attached to the task group yet.
+        */
+       if (entity_is_task(se))
+               sa->load_avg = scale_load_down(se->load.weight);
        sa->load_sum = sa->load_avg * LOAD_AVG_MAX;
        /*
         * At this point, util_avg won't be used in select_task_rq_fair anyway
@@ -5471,13 +5478,18 @@ static inline int select_idle_smt(struct task_struct *p, struct sched_domain *sd
  */
 static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target)
 {
-       struct sched_domain *this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc));
-       u64 avg_idle = this_rq()->avg_idle;
-       u64 avg_cost = this_sd->avg_scan_cost;
+       struct sched_domain *this_sd;
+       u64 avg_cost, avg_idle = this_rq()->avg_idle;
        u64 time, cost;
        s64 delta;
        int cpu, wrap;
 
+       this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc));
+       if (!this_sd)
+               return -1;
+
+       avg_cost = this_sd->avg_scan_cost;
+
        /*
         * Due to large variance we need a large fuzz factor; hackbench in
         * particularly is sensitive here.
@@ -8827,7 +8839,6 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
 {
        struct sched_entity *se;
        struct cfs_rq *cfs_rq;
-       struct rq *rq;
        int i;
 
        tg->cfs_rq = kzalloc(sizeof(cfs_rq) * nr_cpu_ids, GFP_KERNEL);
@@ -8842,8 +8853,6 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
        init_cfs_bandwidth(tg_cfs_bandwidth(tg));
 
        for_each_possible_cpu(i) {
-               rq = cpu_rq(i);
-
                cfs_rq = kzalloc_node(sizeof(struct cfs_rq),
                                      GFP_KERNEL, cpu_to_node(i));
                if (!cfs_rq)
index 4f7053579fe3c9e473bfb9854f959a874e9566ea..9453efe9b25a64bd4aefceae8e5dffef54df64f2 100644 (file)
@@ -480,16 +480,6 @@ void wake_up_bit(void *word, int bit)
 }
 EXPORT_SYMBOL(wake_up_bit);
 
-wait_queue_head_t *bit_waitqueue(void *word, int bit)
-{
-       const int shift = BITS_PER_LONG == 32 ? 5 : 6;
-       const struct zone *zone = page_zone(virt_to_page(word));
-       unsigned long val = (unsigned long)word << shift | bit;
-
-       return &zone->wait_table[hash_long(val, zone->wait_table_bits)];
-}
-EXPORT_SYMBOL(bit_waitqueue);
-
 /*
  * Manipulate the atomic_t address to produce a better bit waitqueue table hash
  * index (we're keying off bit -1, but that would produce a horrible hash
index 1bf81ef913755ae797c90e2affc3330f54d3a7df..744fa611cae06b26d89a04e915f0d7fadf37035b 100644 (file)
@@ -58,7 +58,7 @@ static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp
 DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
 
 const char * const softirq_to_name[NR_SOFTIRQS] = {
-       "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL",
+       "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "IRQ_POLL",
        "TASKLET", "SCHED", "HRTIMER", "RCU"
 };
 
index c3aad685bbc036cc2f03672085aedd9dc9c8fb86..12dd190634ab3e0617ac260133818523f142f8a2 100644 (file)
@@ -542,7 +542,6 @@ static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)
 static int alarm_timer_create(struct k_itimer *new_timer)
 {
        enum  alarmtimer_type type;
-       struct alarm_base *base;
 
        if (!alarmtimer_get_rtcdev())
                return -ENOTSUPP;
@@ -551,7 +550,6 @@ static int alarm_timer_create(struct k_itimer *new_timer)
                return -EPERM;
 
        type = clock2alarm(new_timer->it_clock);
-       base = &alarm_bases[type];
        alarm_init(&new_timer->it.alarm.alarmtimer, type, alarm_handle_timer);
        return 0;
 }
index 2d47980a1bc423df44e8e1324537f4e185b338ae..c611c47de8849b5ac68a8085d85dcd86e143d907 100644 (file)
@@ -878,7 +878,7 @@ static inline struct timer_base *get_timer_base(u32 tflags)
 
 #ifdef CONFIG_NO_HZ_COMMON
 static inline struct timer_base *
-__get_target_base(struct timer_base *base, unsigned tflags)
+get_target_base(struct timer_base *base, unsigned tflags)
 {
 #ifdef CONFIG_SMP
        if ((tflags & TIMER_PINNED) || !base->migration_enabled)
@@ -891,25 +891,27 @@ __get_target_base(struct timer_base *base, unsigned tflags)
 
 static inline void forward_timer_base(struct timer_base *base)
 {
+       unsigned long jnow = READ_ONCE(jiffies);
+
        /*
         * We only forward the base when it's idle and we have a delta between
         * base clock and jiffies.
         */
-       if (!base->is_idle || (long) (jiffies - base->clk) < 2)
+       if (!base->is_idle || (long) (jnow - base->clk) < 2)
                return;
 
        /*
         * If the next expiry value is > jiffies, then we fast forward to
         * jiffies otherwise we forward to the next expiry value.
         */
-       if (time_after(base->next_expiry, jiffies))
-               base->clk = jiffies;
+       if (time_after(base->next_expiry, jnow))
+               base->clk = jnow;
        else
                base->clk = base->next_expiry;
 }
 #else
 static inline struct timer_base *
-__get_target_base(struct timer_base *base, unsigned tflags)
+get_target_base(struct timer_base *base, unsigned tflags)
 {
        return get_timer_this_cpu_base(tflags);
 }
@@ -917,14 +919,6 @@ __get_target_base(struct timer_base *base, unsigned tflags)
 static inline void forward_timer_base(struct timer_base *base) { }
 #endif
 
-static inline struct timer_base *
-get_target_base(struct timer_base *base, unsigned tflags)
-{
-       struct timer_base *target = __get_target_base(base, tflags);
-
-       forward_timer_base(target);
-       return target;
-}
 
 /*
  * We are using hashed locking: Holding per_cpu(timer_bases[x]).lock means
@@ -943,7 +937,14 @@ static struct timer_base *lock_timer_base(struct timer_list *timer,
 {
        for (;;) {
                struct timer_base *base;
-               u32 tf = timer->flags;
+               u32 tf;
+
+               /*
+                * We need to use READ_ONCE() here, otherwise the compiler
+                * might re-read @tf between the check for TIMER_MIGRATING
+                * and spin_lock().
+                */
+               tf = READ_ONCE(timer->flags);
 
                if (!(tf & TIMER_MIGRATING)) {
                        base = get_timer_base(tf);
@@ -964,6 +965,8 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
        unsigned long clk = 0, flags;
        int ret = 0;
 
+       BUG_ON(!timer->function);
+
        /*
         * This is a common optimization triggered by the networking code - if
         * the timer is re-modified to have the same timeout or ends up in the
@@ -972,13 +975,16 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
        if (timer_pending(timer)) {
                if (timer->expires == expires)
                        return 1;
+
                /*
-                * Take the current timer_jiffies of base, but without holding
-                * the lock!
+                * We lock timer base and calculate the bucket index right
+                * here. If the timer ends up in the same bucket, then we
+                * just update the expiry time and avoid the whole
+                * dequeue/enqueue dance.
                 */
-               base = get_timer_base(timer->flags);
-               clk = base->clk;
+               base = lock_timer_base(timer, &flags);
 
+               clk = base->clk;
                idx = calc_wheel_index(expires, clk);
 
                /*
@@ -988,14 +994,14 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
                 */
                if (idx == timer_get_idx(timer)) {
                        timer->expires = expires;
-                       return 1;
+                       ret = 1;
+                       goto out_unlock;
                }
+       } else {
+               base = lock_timer_base(timer, &flags);
        }
 
        timer_stats_timer_set_start_info(timer);
-       BUG_ON(!timer->function);
-
-       base = lock_timer_base(timer, &flags);
 
        ret = detach_if_pending(timer, base, false);
        if (!ret && pending_only)
@@ -1025,12 +1031,16 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
                }
        }
 
+       /* Try to forward a stale timer base clock */
+       forward_timer_base(base);
+
        timer->expires = expires;
        /*
         * If 'idx' was calculated above and the base time did not advance
-        * between calculating 'idx' and taking the lock, only enqueue_timer()
-        * and trigger_dyntick_cpu() is required. Otherwise we need to
-        * (re)calculate the wheel index via internal_add_timer().
+        * between calculating 'idx' and possibly switching the base, only
+        * enqueue_timer() and trigger_dyntick_cpu() is required. Otherwise
+        * we need to (re)calculate the wheel index via
+        * internal_add_timer().
         */
        if (idx != UINT_MAX && clk == base->clk) {
                enqueue_timer(base, timer, idx);
@@ -1510,12 +1520,16 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
        is_max_delta = (nextevt == base->clk + NEXT_TIMER_MAX_DELTA);
        base->next_expiry = nextevt;
        /*
-        * We have a fresh next event. Check whether we can forward the base:
+        * We have a fresh next event. Check whether we can forward the
+        * base. We can only do that when @basej is past base->clk
+        * otherwise we might rewind base->clk.
         */
-       if (time_after(nextevt, jiffies))
-               base->clk = jiffies;
-       else if (time_after(nextevt, base->clk))
-               base->clk = nextevt;
+       if (time_after(basej, base->clk)) {
+               if (time_after(nextevt, basej))
+                       base->clk = basej;
+               else if (time_after(nextevt, base->clk))
+                       base->clk = nextevt;
+       }
 
        if (time_before_eq(nextevt, basej)) {
                expires = basem;
index 33bc56cf60d71fc81f5f5981100406e1c7a91b10..b01e547d4d04475e19590aad8f16c403076f7eb6 100644 (file)
@@ -198,6 +198,7 @@ config FRAME_WARN
        int "Warn for stack frames larger than (needs gcc 4.4)"
        range 0 8192
        default 0 if KASAN
+       default 2048 if GCC_PLUGIN_LATENT_ENTROPY
        default 1024 if !64BIT
        default 2048 if 64BIT
        help
index 0a1139644d328a92ae346ee6fa723d7e18085c75..144fe6b1a03ea536893f6e35d153a895a238b67d 100644 (file)
@@ -292,7 +292,7 @@ unsigned long gen_pool_alloc_algo(struct gen_pool *pool, size_t size,
        struct gen_pool_chunk *chunk;
        unsigned long addr = 0;
        int order = pool->min_alloc_order;
-       int nbits, start_bit = 0, end_bit, remain;
+       int nbits, start_bit, end_bit, remain;
 
 #ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
        BUG_ON(in_nmi());
@@ -307,6 +307,7 @@ unsigned long gen_pool_alloc_algo(struct gen_pool *pool, size_t size,
                if (size > atomic_read(&chunk->avail))
                        continue;
 
+               start_bit = 0;
                end_bit = chunk_size(chunk) >> order;
 retry:
                start_bit = algo(chunk->bits, end_bit, start_bit,
index 60f77f1d470a0589ccdeacbb52a9eb45a8a1cec1..4d830e29998937c8c800445815d665f2e683b84c 100644 (file)
@@ -50,7 +50,7 @@
                                        STACK_ALLOC_ALIGN)
 #define STACK_ALLOC_INDEX_BITS (DEPOT_STACK_BITS - \
                STACK_ALLOC_NULL_PROTECTION_BITS - STACK_ALLOC_OFFSET_BITS)
-#define STACK_ALLOC_SLABS_CAP 1024
+#define STACK_ALLOC_SLABS_CAP 8192
 #define STACK_ALLOC_MAX_SLABS \
        (((1LL << (STACK_ALLOC_INDEX_BITS)) < STACK_ALLOC_SLABS_CAP) ? \
         (1LL << (STACK_ALLOC_INDEX_BITS)) : STACK_ALLOC_SLABS_CAP)
index be0ee11fa0d9ee8ff068244a559a2c52ad96c84c..86e3e0e74d20e78d173c1fa6dc4096f81695634e 100644 (file)
@@ -187,7 +187,7 @@ config MEMORY_HOTPLUG
        bool "Allow for memory hot-add"
        depends on SPARSEMEM || X86_64_ACPI_NUMA
        depends on ARCH_ENABLE_MEMORY_HOTPLUG
-       depends on !KASAN
+       depends on COMPILE_TEST || !KASAN
 
 config MEMORY_HOTPLUG_SPARSE
        def_bool y
index 849f459ad0780e27bc256ff13fd52fa8c9007661..c7fe2f16503f9f906e3f01be0155818ef86c522e 100644 (file)
@@ -790,9 +790,7 @@ EXPORT_SYMBOL(__page_cache_alloc);
  */
 wait_queue_head_t *page_waitqueue(struct page *page)
 {
-       const struct zone *zone = page_zone(page);
-
-       return &zone->wait_table[hash_ptr(page, zone->wait_table_bits)];
+       return bit_waitqueue(page, 0);
 }
 EXPORT_SYMBOL(page_waitqueue);
 
index 381bb07ed14f2271e487fb98d0e95f6ff5470750..db77dcb38afda3d3720a228e14236fb2e324f929 100644 (file)
  * get_vaddr_frames() - map virtual addresses to pfns
  * @start:     starting user address
  * @nr_frames: number of pages / pfns from start to map
- * @write:     whether pages will be written to by the caller
- * @force:     whether to force write access even if user mapping is
- *             readonly. See description of the same argument of
-               get_user_pages().
+ * @gup_flags: flags modifying lookup behaviour
  * @vec:       structure which receives pages / pfns of the addresses mapped.
  *             It should have space for at least nr_frames entries.
  *
@@ -34,7 +31,7 @@
  * This function takes care of grabbing mmap_sem as necessary.
  */
 int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
-                    bool write, bool force, struct frame_vector *vec)
+                    unsigned int gup_flags, struct frame_vector *vec)
 {
        struct mm_struct *mm = current->mm;
        struct vm_area_struct *vma;
@@ -59,7 +56,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
                vec->got_ref = true;
                vec->is_pfns = false;
                ret = get_user_pages_locked(start, nr_frames,
-                       write, force, (struct page **)(vec->ptrs), &locked);
+                       gup_flags, (struct page **)(vec->ptrs), &locked);
                goto out;
        }
 
index 96b2b2fd0fbd13f0b7385e7adc3359c6c7793503..ec4f82704b6f368bf4e128d3feb7356a8c482022 100644 (file)
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -60,6 +60,16 @@ static int follow_pfn_pte(struct vm_area_struct *vma, unsigned long address,
        return -EEXIST;
 }
 
+/*
+ * FOLL_FORCE can write to even unwritable pte's, but only
+ * after we've gone through a COW cycle and they are dirty.
+ */
+static inline bool can_follow_write_pte(pte_t pte, unsigned int flags)
+{
+       return pte_write(pte) ||
+               ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pte_dirty(pte));
+}
+
 static struct page *follow_page_pte(struct vm_area_struct *vma,
                unsigned long address, pmd_t *pmd, unsigned int flags)
 {
@@ -95,7 +105,7 @@ static struct page *follow_page_pte(struct vm_area_struct *vma,
        }
        if ((flags & FOLL_NUMA) && pte_protnone(pte))
                goto no_page;
-       if ((flags & FOLL_WRITE) && !pte_write(pte)) {
+       if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, flags)) {
                pte_unmap_unlock(ptep, ptl);
                return NULL;
        }
@@ -412,7 +422,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
         * reCOWed by userspace write).
         */
        if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE))
-               *flags &= ~FOLL_WRITE;
+               *flags |= FOLL_COW;
        return 0;
 }
 
@@ -516,7 +526,7 @@ static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags)
  * instead of __get_user_pages. __get_user_pages should be used only if
  * you need some special @gup_flags.
  */
-long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                unsigned long start, unsigned long nr_pages,
                unsigned int gup_flags, struct page **pages,
                struct vm_area_struct **vmas, int *nonblocking)
@@ -621,7 +631,6 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
        } while (nr_pages);
        return i;
 }
-EXPORT_SYMBOL(__get_user_pages);
 
 bool vma_permits_fault(struct vm_area_struct *vma, unsigned int fault_flags)
 {
@@ -729,7 +738,6 @@ static __always_inline long __get_user_pages_locked(struct task_struct *tsk,
                                                struct mm_struct *mm,
                                                unsigned long start,
                                                unsigned long nr_pages,
-                                               int write, int force,
                                                struct page **pages,
                                                struct vm_area_struct **vmas,
                                                int *locked, bool notify_drop,
@@ -747,10 +755,6 @@ static __always_inline long __get_user_pages_locked(struct task_struct *tsk,
 
        if (pages)
                flags |= FOLL_GET;
-       if (write)
-               flags |= FOLL_WRITE;
-       if (force)
-               flags |= FOLL_FORCE;
 
        pages_done = 0;
        lock_dropped = false;
@@ -843,12 +847,12 @@ static __always_inline long __get_user_pages_locked(struct task_struct *tsk,
  *          up_read(&mm->mmap_sem);
  */
 long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
-                          int write, int force, struct page **pages,
+                          unsigned int gup_flags, struct page **pages,
                           int *locked)
 {
        return __get_user_pages_locked(current, current->mm, start, nr_pages,
-                                      write, force, pages, NULL, locked, true,
-                                      FOLL_TOUCH);
+                                      pages, NULL, locked, true,
+                                      gup_flags | FOLL_TOUCH);
 }
 EXPORT_SYMBOL(get_user_pages_locked);
 
@@ -864,14 +868,14 @@ EXPORT_SYMBOL(get_user_pages_locked);
  */
 __always_inline long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
                                               unsigned long start, unsigned long nr_pages,
-                                              int write, int force, struct page **pages,
-                                              unsigned int gup_flags)
+                                              struct page **pages, unsigned int gup_flags)
 {
        long ret;
        int locked = 1;
+
        down_read(&mm->mmap_sem);
-       ret = __get_user_pages_locked(tsk, mm, start, nr_pages, write, force,
-                                     pages, NULL, &locked, false, gup_flags);
+       ret = __get_user_pages_locked(tsk, mm, start, nr_pages, pages, NULL,
+                                     &locked, false, gup_flags);
        if (locked)
                up_read(&mm->mmap_sem);
        return ret;
@@ -896,10 +900,10 @@ EXPORT_SYMBOL(__get_user_pages_unlocked);
  * "force" parameter).
  */
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
-                            int write, int force, struct page **pages)
+                            struct page **pages, unsigned int gup_flags)
 {
        return __get_user_pages_unlocked(current, current->mm, start, nr_pages,
-                                        write, force, pages, FOLL_TOUCH);
+                                        pages, gup_flags | FOLL_TOUCH);
 }
 EXPORT_SYMBOL(get_user_pages_unlocked);
 
@@ -910,9 +914,7 @@ EXPORT_SYMBOL(get_user_pages_unlocked);
  * @mm:                mm_struct of target mm
  * @start:     starting user address
  * @nr_pages:  number of pages from start to pin
- * @write:     whether pages will be written to by the caller
- * @force:     whether to force access even when user mapping is currently
- *             protected (but never forces write access to shared mapping).
+ * @gup_flags: flags modifying lookup behaviour
  * @pages:     array that receives pointers to the pages pinned.
  *             Should be at least nr_pages long. Or NULL, if caller
  *             only intends to ensure the pages are faulted in.
@@ -941,9 +943,9 @@ EXPORT_SYMBOL(get_user_pages_unlocked);
  * or similar operation cannot guarantee anything stronger anyway because
  * locks can't be held over the syscall boundary.
  *
- * If write=0, the page must not be written to. If the page is written to,
- * set_page_dirty (or set_page_dirty_lock, as appropriate) must be called
- * after the page is finished with, and before put_page is called.
+ * If gup_flags & FOLL_WRITE == 0, the page must not be written to. If the page
+ * is written to, set_page_dirty (or set_page_dirty_lock, as appropriate) must
+ * be called after the page is finished with, and before put_page is called.
  *
  * get_user_pages is typically used for fewer-copy IO operations, to get a
  * handle on the memory by some means other than accesses via the user virtual
@@ -960,12 +962,12 @@ EXPORT_SYMBOL(get_user_pages_unlocked);
  */
 long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
                unsigned long start, unsigned long nr_pages,
-               int write, int force, struct page **pages,
+               unsigned int gup_flags, struct page **pages,
                struct vm_area_struct **vmas)
 {
-       return __get_user_pages_locked(tsk, mm, start, nr_pages, write, force,
-                                      pages, vmas, NULL, false,
-                                      FOLL_TOUCH | FOLL_REMOTE);
+       return __get_user_pages_locked(tsk, mm, start, nr_pages, pages, vmas,
+                                      NULL, false,
+                                      gup_flags | FOLL_TOUCH | FOLL_REMOTE);
 }
 EXPORT_SYMBOL(get_user_pages_remote);
 
@@ -976,12 +978,12 @@ EXPORT_SYMBOL(get_user_pages_remote);
  * obviously don't pass FOLL_REMOTE in here.
  */
 long get_user_pages(unsigned long start, unsigned long nr_pages,
-               int write, int force, struct page **pages,
+               unsigned int gup_flags, struct page **pages,
                struct vm_area_struct **vmas)
 {
        return __get_user_pages_locked(current, current->mm, start, nr_pages,
-                                      write, force, pages, vmas, NULL, false,
-                                      FOLL_TOUCH);
+                                      pages, vmas, NULL, false,
+                                      gup_flags | FOLL_TOUCH);
 }
 EXPORT_SYMBOL(get_user_pages);
 
@@ -1505,7 +1507,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
                start += nr << PAGE_SHIFT;
                pages += nr;
 
-               ret = get_user_pages_unlocked(start, nr_pages - nr, write, 0, pages);
+               ret = get_user_pages_unlocked(start, nr_pages - nr, pages,
+                               write ? FOLL_WRITE : 0);
 
                /* Have to be a bit careful with return values */
                if (nr > 0) {
index 88af13c00d3cbfedb1d6d42ef5ddcf6ca9a50cab..70c009741aab705c6bb344df1f1851d9582bc7a7 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/string.h>
 #include <linux/types.h>
 #include <linux/vmalloc.h>
+#include <linux/bug.h>
 
 #include "kasan.h"
 #include "../slab.h"
@@ -62,7 +63,7 @@ void kasan_unpoison_shadow(const void *address, size_t size)
        }
 }
 
-static void __kasan_unpoison_stack(struct task_struct *task, void *sp)
+static void __kasan_unpoison_stack(struct task_struct *task, const void *sp)
 {
        void *base = task_stack_page(task);
        size_t size = sp - base;
@@ -77,9 +78,24 @@ void kasan_unpoison_task_stack(struct task_struct *task)
 }
 
 /* Unpoison the stack for the current task beyond a watermark sp value. */
-asmlinkage void kasan_unpoison_remaining_stack(void *sp)
+asmlinkage void kasan_unpoison_task_stack_below(const void *watermark)
 {
-       __kasan_unpoison_stack(current, sp);
+       __kasan_unpoison_stack(current, watermark);
+}
+
+/*
+ * Clear all poison for the region between the current SP and a provided
+ * watermark value, as is sometimes required prior to hand-crafted asm function
+ * returns in the middle of functions.
+ */
+void kasan_unpoison_stack_above_sp_to(const void *watermark)
+{
+       const void *sp = __builtin_frame_address(0);
+       size_t size = watermark - sp;
+
+       if (WARN_ON(sp > watermark))
+               return;
+       kasan_unpoison_shadow(sp, size);
 }
 
 /*
index a5e453cf05c499cf5c7eeb9b66ce14936d4494fd..e5355a5b423fa9fd61a77ebf7b94819ec2e199df 100644 (file)
@@ -1453,8 +1453,11 @@ static void kmemleak_scan(void)
 
                read_lock(&tasklist_lock);
                do_each_thread(g, p) {
-                       scan_block(task_stack_page(p), task_stack_page(p) +
-                                  THREAD_SIZE, NULL);
+                       void *stack = try_get_task_stack(p);
+                       if (stack) {
+                               scan_block(stack, stack + THREAD_SIZE, NULL);
+                               put_task_stack(p);
+                       }
                } while_each_thread(g, p);
                read_unlock(&tasklist_lock);
        }
index 1d05cb9d363d0bfadd6a9c58efccd0551d0bd7f2..234676e31edd3b0609014a3adcf4fb4e200a0c0e 100644 (file)
@@ -554,6 +554,8 @@ int __list_lru_init(struct list_lru *lru, bool memcg_aware,
        err = memcg_init_list_lru(lru, memcg_aware);
        if (err) {
                kfree(lru->node);
+               /* Do this so a list_lru_destroy() doesn't crash: */
+               lru->node = NULL;
                goto out;
        }
 
index ae052b5e3315217874569d0c1cf57ade9cea99a1..0f870ba43942e74d1d535a13437e446da5863b1a 100644 (file)
@@ -1917,6 +1917,15 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,
                     current->flags & PF_EXITING))
                goto force;
 
+       /*
+        * Prevent unbounded recursion when reclaim operations need to
+        * allocate memory. This might exceed the limits temporarily,
+        * but we prefer facilitating memory reclaim and getting back
+        * under the limit over triggering OOM kills in these cases.
+        */
+       if (unlikely(current->flags & PF_MEMALLOC))
+               goto force;
+
        if (unlikely(task_in_memcg_oom(current)))
                goto nomem;
 
index fc1987dfd8cc7f62fa911fd905f743cb3ec53ec3..e18c57bdc75c4c96e3ef79546afe11fab5a3c07a 100644 (file)
@@ -3869,10 +3869,11 @@ EXPORT_SYMBOL_GPL(generic_access_phys);
  * given task for page fault accounting.
  */
 static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
-               unsigned long addr, void *buf, int len, int write)
+               unsigned long addr, void *buf, int len, unsigned int gup_flags)
 {
        struct vm_area_struct *vma;
        void *old_buf = buf;
+       int write = gup_flags & FOLL_WRITE;
 
        down_read(&mm->mmap_sem);
        /* ignore errors, just check how much was successfully transferred */
@@ -3882,7 +3883,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
                struct page *page = NULL;
 
                ret = get_user_pages_remote(tsk, mm, addr, 1,
-                               write, 1, &page, &vma);
+                               gup_flags, &page, &vma);
                if (ret <= 0) {
 #ifndef CONFIG_HAVE_IOREMAP_PROT
                        break;
@@ -3934,14 +3935,14 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
  * @addr:      start address to access
  * @buf:       source or destination buffer
  * @len:       number of bytes to transfer
- * @write:     whether the access is a write
+ * @gup_flags: flags modifying lookup behaviour
  *
  * The caller must hold a reference on @mm.
  */
 int access_remote_vm(struct mm_struct *mm, unsigned long addr,
-               void *buf, int len, int write)
+               void *buf, int len, unsigned int gup_flags)
 {
-       return __access_remote_vm(NULL, mm, addr, buf, len, write);
+       return __access_remote_vm(NULL, mm, addr, buf, len, gup_flags);
 }
 
 /*
@@ -3950,7 +3951,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
  * Do not walk the page table directly, use get_user_pages
  */
 int access_process_vm(struct task_struct *tsk, unsigned long addr,
-               void *buf, int len, int write)
+               void *buf, int len, unsigned int gup_flags)
 {
        struct mm_struct *mm;
        int ret;
@@ -3959,7 +3960,8 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr,
        if (!mm)
                return 0;
 
-       ret = __access_remote_vm(tsk, mm, addr, buf, len, write);
+       ret = __access_remote_vm(tsk, mm, addr, buf, len, gup_flags);
+
        mmput(mm);
 
        return ret;
index 962927309b6e963fa05a0acf09608c2ec6cef761..cad4b9125695cfbfcc7509e942f6d8f8a37f460c 100644 (file)
@@ -268,7 +268,6 @@ void __init register_page_bootmem_info_node(struct pglist_data *pgdat)
        unsigned long i, pfn, end_pfn, nr_pages;
        int node = pgdat->node_id;
        struct page *page;
-       struct zone *zone;
 
        nr_pages = PAGE_ALIGN(sizeof(struct pglist_data)) >> PAGE_SHIFT;
        page = virt_to_page(pgdat);
@@ -276,19 +275,6 @@ void __init register_page_bootmem_info_node(struct pglist_data *pgdat)
        for (i = 0; i < nr_pages; i++, page++)
                get_page_bootmem(node, page, NODE_INFO);
 
-       zone = &pgdat->node_zones[0];
-       for (; zone < pgdat->node_zones + MAX_NR_ZONES - 1; zone++) {
-               if (zone_is_initialized(zone)) {
-                       nr_pages = zone->wait_table_hash_nr_entries
-                               * sizeof(wait_queue_head_t);
-                       nr_pages = PAGE_ALIGN(nr_pages) >> PAGE_SHIFT;
-                       page = virt_to_page(zone->wait_table);
-
-                       for (i = 0; i < nr_pages; i++, page++)
-                               get_page_bootmem(node, page, NODE_INFO);
-               }
-       }
-
        pfn = pgdat->node_start_pfn;
        end_pfn = pgdat_end_pfn(pgdat);
 
@@ -2131,7 +2117,6 @@ void try_offline_node(int nid)
        unsigned long start_pfn = pgdat->node_start_pfn;
        unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages;
        unsigned long pfn;
-       int i;
 
        for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
                unsigned long section_nr = pfn_to_section_nr(pfn);
@@ -2158,20 +2143,6 @@ void try_offline_node(int nid)
         */
        node_set_offline(nid);
        unregister_one_node(nid);
-
-       /* free waittable in each zone */
-       for (i = 0; i < MAX_NR_ZONES; i++) {
-               struct zone *zone = pgdat->node_zones + i;
-
-               /*
-                * wait_table may be allocated from boot memory,
-                * here only free if it's allocated by vmalloc.
-                */
-               if (is_vmalloc_addr(zone->wait_table)) {
-                       vfree(zone->wait_table);
-                       zone->wait_table = NULL;
-               }
-       }
 }
 EXPORT_SYMBOL(try_offline_node);
 
index ad1c96ac313c0f442b1635baaa96555d355a74bb..0b859af06b87df4e17af4180b953a6337c251dff 100644 (file)
@@ -850,7 +850,7 @@ static int lookup_node(unsigned long addr)
        struct page *p;
        int err;
 
-       err = get_user_pages(addr & PAGE_MASK, 1, 0, 0, &p, NULL);
+       err = get_user_pages(addr & PAGE_MASK, 1, 0, &p, NULL);
        if (err >= 0) {
                err = page_to_nid(p);
                put_page(p);
index bcdbe62f3e6da12766f0d96a24aa4c2111614e6b..11936526b08b8c5f5c5d0454f6789008a0c6f313 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/perf_event.h>
 #include <linux/pkeys.h>
 #include <linux/ksm.h>
-#include <linux/pkeys.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/cacheflush.h>
index 95daf81a4855d99d2ae176ab16c92a1b4302b0ae..8b8faaf2a9e95cfc607ff1a5a37c83eadfda59fe 100644 (file)
@@ -109,7 +109,7 @@ unsigned int kobjsize(const void *objp)
        return PAGE_SIZE << compound_order(page);
 }
 
-long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                      unsigned long start, unsigned long nr_pages,
                      unsigned int foll_flags, struct page **pages,
                      struct vm_area_struct **vmas, int *nonblocking)
@@ -160,33 +160,25 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
  * - don't permit access to VMAs that don't support it, such as I/O mappings
  */
 long get_user_pages(unsigned long start, unsigned long nr_pages,
-                   int write, int force, struct page **pages,
+                   unsigned int gup_flags, struct page **pages,
                    struct vm_area_struct **vmas)
 {
-       int flags = 0;
-
-       if (write)
-               flags |= FOLL_WRITE;
-       if (force)
-               flags |= FOLL_FORCE;
-
-       return __get_user_pages(current, current->mm, start, nr_pages, flags,
-                               pages, vmas, NULL);
+       return __get_user_pages(current, current->mm, start, nr_pages,
+                               gup_flags, pages, vmas, NULL);
 }
 EXPORT_SYMBOL(get_user_pages);
 
 long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
-                           int write, int force, struct page **pages,
+                           unsigned int gup_flags, struct page **pages,
                            int *locked)
 {
-       return get_user_pages(start, nr_pages, write, force, pages, NULL);
+       return get_user_pages(start, nr_pages, gup_flags, pages, NULL);
 }
 EXPORT_SYMBOL(get_user_pages_locked);
 
 long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
                               unsigned long start, unsigned long nr_pages,
-                              int write, int force, struct page **pages,
-                              unsigned int gup_flags)
+                              struct page **pages, unsigned int gup_flags)
 {
        long ret;
        down_read(&mm->mmap_sem);
@@ -198,10 +190,10 @@ long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
 EXPORT_SYMBOL(__get_user_pages_unlocked);
 
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
-                            int write, int force, struct page **pages)
+                            struct page **pages, unsigned int gup_flags)
 {
        return __get_user_pages_unlocked(current, current->mm, start, nr_pages,
-                                        write, force, pages, 0);
+                                        pages, gup_flags);
 }
 EXPORT_SYMBOL(get_user_pages_unlocked);
 
@@ -1817,9 +1809,10 @@ void filemap_map_pages(struct fault_env *fe,
 EXPORT_SYMBOL(filemap_map_pages);
 
 static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
-               unsigned long addr, void *buf, int len, int write)
+               unsigned long addr, void *buf, int len, unsigned int gup_flags)
 {
        struct vm_area_struct *vma;
+       int write = gup_flags & FOLL_WRITE;
 
        down_read(&mm->mmap_sem);
 
@@ -1854,21 +1847,22 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
  * @addr:      start address to access
  * @buf:       source or destination buffer
  * @len:       number of bytes to transfer
- * @write:     whether the access is a write
+ * @gup_flags: flags modifying lookup behaviour
  *
  * The caller must hold a reference on @mm.
  */
 int access_remote_vm(struct mm_struct *mm, unsigned long addr,
-               void *buf, int len, int write)
+               void *buf, int len, unsigned int gup_flags)
 {
-       return __access_remote_vm(NULL, mm, addr, buf, len, write);
+       return __access_remote_vm(NULL, mm, addr, buf, len, gup_flags);
 }
 
 /*
  * Access another process' address space.
  * - source/target buffer must be kernel space
  */
-int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write)
+int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len,
+               unsigned int gup_flags)
 {
        struct mm_struct *mm;
 
@@ -1879,7 +1873,7 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
        if (!mm)
                return 0;
 
-       len = __access_remote_vm(tsk, mm, addr, buf, len, write);
+       len = __access_remote_vm(tsk, mm, addr, buf, len, gup_flags);
 
        mmput(mm);
        return len;
index 2b3bf6767d5441a876890dce16d9de2d60f1e2bc..8fd42aa7c4bd0f3f7035cbfc53e9268b50d5d684 100644 (file)
@@ -4224,7 +4224,7 @@ static void show_migration_types(unsigned char type)
        }
 
        *p = '\0';
-       printk("(%s) ", tmp);
+       printk(KERN_CONT "(%s) ", tmp);
 }
 
 /*
@@ -4335,7 +4335,8 @@ void show_free_areas(unsigned int filter)
                        free_pcp += per_cpu_ptr(zone->pageset, cpu)->pcp.count;
 
                show_node(zone);
-               printk("%s"
+               printk(KERN_CONT
+                       "%s"
                        " free:%lukB"
                        " min:%lukB"
                        " low:%lukB"
@@ -4382,8 +4383,8 @@ void show_free_areas(unsigned int filter)
                        K(zone_page_state(zone, NR_FREE_CMA_PAGES)));
                printk("lowmem_reserve[]:");
                for (i = 0; i < MAX_NR_ZONES; i++)
-                       printk(" %ld", zone->lowmem_reserve[i]);
-               printk("\n");
+                       printk(KERN_CONT " %ld", zone->lowmem_reserve[i]);
+               printk(KERN_CONT "\n");
        }
 
        for_each_populated_zone(zone) {
@@ -4394,7 +4395,7 @@ void show_free_areas(unsigned int filter)
                if (skip_free_areas_node(filter, zone_to_nid(zone)))
                        continue;
                show_node(zone);
-               printk("%s: ", zone->name);
+               printk(KERN_CONT "%s: ", zone->name);
 
                spin_lock_irqsave(&zone->lock, flags);
                for (order = 0; order < MAX_ORDER; order++) {
@@ -4412,11 +4413,12 @@ void show_free_areas(unsigned int filter)
                }
                spin_unlock_irqrestore(&zone->lock, flags);
                for (order = 0; order < MAX_ORDER; order++) {
-                       printk("%lu*%lukB ", nr[order], K(1UL) << order);
+                       printk(KERN_CONT "%lu*%lukB ",
+                              nr[order], K(1UL) << order);
                        if (nr[order])
                                show_migration_types(types[order]);
                }
-               printk("= %lukB\n", K(total));
+               printk(KERN_CONT "= %lukB\n", K(total));
        }
 
        hugetlb_show_meminfo();
@@ -4976,72 +4978,6 @@ void __ref build_all_zonelists(pg_data_t *pgdat, struct zone *zone)
 #endif
 }
 
-/*
- * Helper functions to size the waitqueue hash table.
- * Essentially these want to choose hash table sizes sufficiently
- * large so that collisions trying to wait on pages are rare.
- * But in fact, the number of active page waitqueues on typical
- * systems is ridiculously low, less than 200. So this is even
- * conservative, even though it seems large.
- *
- * The constant PAGES_PER_WAITQUEUE specifies the ratio of pages to
- * waitqueues, i.e. the size of the waitq table given the number of pages.
- */
-#define PAGES_PER_WAITQUEUE    256
-
-#ifndef CONFIG_MEMORY_HOTPLUG
-static inline unsigned long wait_table_hash_nr_entries(unsigned long pages)
-{
-       unsigned long size = 1;
-
-       pages /= PAGES_PER_WAITQUEUE;
-
-       while (size < pages)
-               size <<= 1;
-
-       /*
-        * Once we have dozens or even hundreds of threads sleeping
-        * on IO we've got bigger problems than wait queue collision.
-        * Limit the size of the wait table to a reasonable size.
-        */
-       size = min(size, 4096UL);
-
-       return max(size, 4UL);
-}
-#else
-/*
- * A zone's size might be changed by hot-add, so it is not possible to determine
- * a suitable size for its wait_table.  So we use the maximum size now.
- *
- * The max wait table size = 4096 x sizeof(wait_queue_head_t).   ie:
- *
- *    i386 (preemption config)    : 4096 x 16 = 64Kbyte.
- *    ia64, x86-64 (no preemption): 4096 x 20 = 80Kbyte.
- *    ia64, x86-64 (preemption)   : 4096 x 24 = 96Kbyte.
- *
- * The maximum entries are prepared when a zone's memory is (512K + 256) pages
- * or more by the traditional way. (See above).  It equals:
- *
- *    i386, x86-64, powerpc(4K page size) : =  ( 2G + 1M)byte.
- *    ia64(16K page size)                 : =  ( 8G + 4M)byte.
- *    powerpc (64K page size)             : =  (32G +16M)byte.
- */
-static inline unsigned long wait_table_hash_nr_entries(unsigned long pages)
-{
-       return 4096UL;
-}
-#endif
-
-/*
- * This is an integer logarithm so that shifts can be used later
- * to extract the more random high bits from the multiplicative
- * hash function before the remainder is taken.
- */
-static inline unsigned long wait_table_bits(unsigned long size)
-{
-       return ffz(~size);
-}
-
 /*
  * Initially all pages are reserved - free ones are freed
  * up by free_all_bootmem() once the early boot process is
@@ -5304,49 +5240,6 @@ void __init setup_per_cpu_pageset(void)
                        alloc_percpu(struct per_cpu_nodestat);
 }
 
-static noinline __ref
-int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
-{
-       int i;
-       size_t alloc_size;
-
-       /*
-        * The per-page waitqueue mechanism uses hashed waitqueues
-        * per zone.
-        */
-       zone->wait_table_hash_nr_entries =
-                wait_table_hash_nr_entries(zone_size_pages);
-       zone->wait_table_bits =
-               wait_table_bits(zone->wait_table_hash_nr_entries);
-       alloc_size = zone->wait_table_hash_nr_entries
-                                       * sizeof(wait_queue_head_t);
-
-       if (!slab_is_available()) {
-               zone->wait_table = (wait_queue_head_t *)
-                       memblock_virt_alloc_node_nopanic(
-                               alloc_size, zone->zone_pgdat->node_id);
-       } else {
-               /*
-                * This case means that a zone whose size was 0 gets new memory
-                * via memory hot-add.
-                * But it may be the case that a new node was hot-added.  In
-                * this case vmalloc() will not be able to use this new node's
-                * memory - this wait_table must be initialized to use this new
-                * node itself as well.
-                * To use this new node's memory, further consideration will be
-                * necessary.
-                */
-               zone->wait_table = vmalloc(alloc_size);
-       }
-       if (!zone->wait_table)
-               return -ENOMEM;
-
-       for (i = 0; i < zone->wait_table_hash_nr_entries; ++i)
-               init_waitqueue_head(zone->wait_table + i);
-
-       return 0;
-}
-
 static __meminit void zone_pcp_init(struct zone *zone)
 {
        /*
@@ -5367,10 +5260,7 @@ int __meminit init_currently_empty_zone(struct zone *zone,
                                        unsigned long size)
 {
        struct pglist_data *pgdat = zone->zone_pgdat;
-       int ret;
-       ret = zone_wait_table_init(zone, size);
-       if (ret)
-               return ret;
+
        pgdat->nr_zones = zone_idx(zone) + 1;
 
        zone->zone_start_pfn = zone_start_pfn;
@@ -5382,6 +5272,7 @@ int __meminit init_currently_empty_zone(struct zone *zone,
                        zone_start_pfn, (zone_start_pfn + size));
 
        zone_init_free_lists(zone);
+       zone->initialized = 1;
 
        return 0;
 }
index 07514d41ebcc1623b789fc93e09794058ecdc6ca..be8dc8d1edb95b34d8c6b7fbf34321e597e981e1 100644 (file)
@@ -88,12 +88,16 @@ static int process_vm_rw_single_vec(unsigned long addr,
        ssize_t rc = 0;
        unsigned long max_pages_per_loop = PVM_MAX_KMALLOC_PAGES
                / sizeof(struct pages *);
+       unsigned int flags = FOLL_REMOTE;
 
        /* Work out address and page range required */
        if (len == 0)
                return 0;
        nr_pages = (addr + len - 1) / PAGE_SIZE - addr / PAGE_SIZE + 1;
 
+       if (vm_write)
+               flags |= FOLL_WRITE;
+
        while (!rc && nr_pages && iov_iter_count(iter)) {
                int pages = min(nr_pages, max_pages_per_loop);
                size_t bytes;
@@ -104,8 +108,7 @@ static int process_vm_rw_single_vec(unsigned long addr,
                 * current/current->mm
                 */
                pages = __get_user_pages_unlocked(task, mm, pa, pages,
-                                                 vm_write, 0, process_pages,
-                                                 FOLL_REMOTE);
+                                                 process_pages, flags);
                if (pages <= 0)
                        return -EFAULT;
 
index 090fb26b3a39b4feba105650f2a663f5c9972064..0b0550ca85b40c9108b4085873d67babc200885d 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -233,6 +233,7 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent)
        spin_lock_init(&parent->list_lock);
        parent->free_objects = 0;
        parent->free_touched = 0;
+       parent->num_slabs = 0;
 }
 
 #define MAKE_LIST(cachep, listp, slab, nodeid)                         \
@@ -966,7 +967,7 @@ static int setup_kmem_cache_node(struct kmem_cache *cachep,
         * guaranteed to be valid until irq is re-enabled, because it will be
         * freed after synchronize_sched().
         */
-       if (force_change)
+       if (old_shared && force_change)
                synchronize_sched();
 
 fail:
@@ -1382,24 +1383,27 @@ slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid)
        for_each_kmem_cache_node(cachep, node, n) {
                unsigned long active_objs = 0, num_objs = 0, free_objects = 0;
                unsigned long active_slabs = 0, num_slabs = 0;
+               unsigned long num_slabs_partial = 0, num_slabs_free = 0;
+               unsigned long num_slabs_full;
 
                spin_lock_irqsave(&n->list_lock, flags);
-               list_for_each_entry(page, &n->slabs_full, lru) {
-                       active_objs += cachep->num;
-                       active_slabs++;
-               }
+               num_slabs = n->num_slabs;
                list_for_each_entry(page, &n->slabs_partial, lru) {
                        active_objs += page->active;
-                       active_slabs++;
+                       num_slabs_partial++;
                }
                list_for_each_entry(page, &n->slabs_free, lru)
-                       num_slabs++;
+                       num_slabs_free++;
 
                free_objects += n->free_objects;
                spin_unlock_irqrestore(&n->list_lock, flags);
 
-               num_slabs += active_slabs;
                num_objs = num_slabs * cachep->num;
+               active_slabs = num_slabs - num_slabs_free;
+               num_slabs_full = num_slabs -
+                       (num_slabs_partial + num_slabs_free);
+               active_objs += (num_slabs_full * cachep->num);
+
                pr_warn("  node %d: slabs: %ld/%ld, objs: %ld/%ld, free: %ld\n",
                        node, active_slabs, num_slabs, active_objs, num_objs,
                        free_objects);
@@ -2314,6 +2318,7 @@ static int drain_freelist(struct kmem_cache *cache,
 
                page = list_entry(p, struct page, lru);
                list_del(&page->lru);
+               n->num_slabs--;
                /*
                 * Safe to drop the lock. The slab is no longer linked
                 * to the cache.
@@ -2752,6 +2757,8 @@ static void cache_grow_end(struct kmem_cache *cachep, struct page *page)
                list_add_tail(&page->lru, &(n->slabs_free));
        else
                fixup_slab_list(cachep, n, page, &list);
+
+       n->num_slabs++;
        STATS_INC_GROWN(cachep);
        n->free_objects += cachep->num - page->active;
        spin_unlock(&n->list_lock);
@@ -3443,6 +3450,7 @@ static void free_block(struct kmem_cache *cachep, void **objpp,
 
                page = list_last_entry(&n->slabs_free, struct page, lru);
                list_move(&page->lru, list);
+               n->num_slabs--;
        }
 }
 
@@ -4099,6 +4107,8 @@ void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
        unsigned long num_objs;
        unsigned long active_slabs = 0;
        unsigned long num_slabs, free_objects = 0, shared_avail = 0;
+       unsigned long num_slabs_partial = 0, num_slabs_free = 0;
+       unsigned long num_slabs_full = 0;
        const char *name;
        char *error = NULL;
        int node;
@@ -4111,33 +4121,34 @@ void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
                check_irq_on();
                spin_lock_irq(&n->list_lock);
 
-               list_for_each_entry(page, &n->slabs_full, lru) {
-                       if (page->active != cachep->num && !error)
-                               error = "slabs_full accounting error";
-                       active_objs += cachep->num;
-                       active_slabs++;
-               }
+               num_slabs += n->num_slabs;
+
                list_for_each_entry(page, &n->slabs_partial, lru) {
                        if (page->active == cachep->num && !error)
                                error = "slabs_partial accounting error";
                        if (!page->active && !error)
                                error = "slabs_partial accounting error";
                        active_objs += page->active;
-                       active_slabs++;
+                       num_slabs_partial++;
                }
+
                list_for_each_entry(page, &n->slabs_free, lru) {
                        if (page->active && !error)
                                error = "slabs_free accounting error";
-                       num_slabs++;
+                       num_slabs_free++;
                }
+
                free_objects += n->free_objects;
                if (n->shared)
                        shared_avail += n->shared->avail;
 
                spin_unlock_irq(&n->list_lock);
        }
-       num_slabs += active_slabs;
        num_objs = num_slabs * cachep->num;
+       active_slabs = num_slabs - num_slabs_free;
+       num_slabs_full = num_slabs - (num_slabs_partial + num_slabs_free);
+       active_objs += (num_slabs_full * cachep->num);
+
        if (num_objs - active_objs != free_objects && !error)
                error = "free_objects accounting error";
 
index 9653f2e2591ad0982d2dc74c668323a43e5b026d..bc05fdc3edce106b12e5113ad8c8777de6de217d 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -432,6 +432,7 @@ struct kmem_cache_node {
        struct list_head slabs_partial; /* partial list first, better asm code */
        struct list_head slabs_full;
        struct list_head slabs_free;
+       unsigned long num_slabs;
        unsigned long free_objects;
        unsigned int free_limit;
        unsigned int colour_next;       /* Per-node cache coloring */
index 662cddf914af2048ab6c9c674f59d37a7aceba69..1a41553db866f543719c019e36dc2c71c4b3b984 100644 (file)
--- a/mm/util.c
+++ b/mm/util.c
@@ -230,8 +230,10 @@ void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
 }
 
 /* Check if the vma is being used as a stack by this task */
-int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t)
+int vma_is_stack_for_current(struct vm_area_struct *vma)
 {
+       struct task_struct * __maybe_unused t = current;
+
        return (vma->vm_start <= KSTK_ESP(t) && vma->vm_end >= KSTK_ESP(t));
 }
 
@@ -283,7 +285,8 @@ EXPORT_SYMBOL_GPL(__get_user_pages_fast);
 int __weak get_user_pages_fast(unsigned long start,
                                int nr_pages, int write, struct page **pages)
 {
-       return get_user_pages_unlocked(start, nr_pages, write, 0, pages);
+       return get_user_pages_unlocked(start, nr_pages, pages,
+                                      write ? FOLL_WRITE : 0);
 }
 EXPORT_SYMBOL_GPL(get_user_pages_fast);
 
@@ -623,7 +626,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
        if (len > buflen)
                len = buflen;
 
-       res = access_process_vm(task, arg_start, buffer, len, 0);
+       res = access_process_vm(task, arg_start, buffer, len, FOLL_FORCE);
 
        /*
         * If the nul at the end of args has been overwritten, then
@@ -638,7 +641,8 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
                        if (len > buflen - res)
                                len = buflen - res;
                        res += access_process_vm(task, env_start,
-                                                buffer+res, len, 0);
+                                                buffer+res, len,
+                                                FOLL_FORCE);
                        res = strnlen(buffer, res);
                }
        }
index 744f926af442096c36eac4b0d9259c25e7627e0e..76fda22681480b68c9432dce3d18a4e0d89516e7 100644 (file)
@@ -3043,7 +3043,9 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg,
                                            sc.gfp_mask,
                                            sc.reclaim_idx);
 
+       current->flags |= PF_MEMALLOC;
        nr_reclaimed = do_try_to_free_pages(zonelist, &sc);
+       current->flags &= ~PF_MEMALLOC;
 
        trace_mm_vmscan_memcg_reclaim_end(nr_reclaimed);
 
index 00d2601407c5dfd5b8e8a94bf5de2160ae29cc38..1a7c9a79a53c22e8e61e3b6e8e1720db71d9f9a9 100644 (file)
@@ -26,7 +26,7 @@ struct page **ceph_get_direct_page_vector(const void __user *data,
        while (got < num_pages) {
                rc = get_user_pages_unlocked(
                    (unsigned long)data + ((unsigned long)got * PAGE_SIZE),
-                   num_pages - got, write_page, 0, pages + got);
+                   num_pages - got, pages + got, write_page ? FOLL_WRITE : 0);
                if (rc < 0)
                        break;
                BUG_ON(rc == 0);
index f826e87390233c1cfddb87e969642ab44219d84f..d942c7c2bc0aa0ee471de663d3f15587f12a1732 100644 (file)
@@ -41,7 +41,7 @@ config BIG_KEYS
        bool "Large payload keys"
        depends on KEYS
        depends on TMPFS
-       select CRYPTO
+       depends on (CRYPTO_ANSI_CPRNG = y || CRYPTO_DRBG = y)
        select CRYPTO_AES
        select CRYPTO_ECB
        select CRYPTO_RNG
index c0b3030b563486af0f1756d6d73ae32fe02a77c8..835c1ab30d01eb9a8e94b411fce09b856772efb9 100644 (file)
@@ -9,6 +9,7 @@
  * 2 of the Licence, or (at your option) any later version.
  */
 
+#define pr_fmt(fmt) "big_key: "fmt
 #include <linux/init.h>
 #include <linux/seq_file.h>
 #include <linux/file.h>
@@ -341,44 +342,48 @@ long big_key_read(const struct key *key, char __user *buffer, size_t buflen)
  */
 static int __init big_key_init(void)
 {
-       return register_key_type(&key_type_big_key);
-}
-
-/*
- * Initialize big_key crypto and RNG algorithms
- */
-static int __init big_key_crypto_init(void)
-{
-       int ret = -EINVAL;
+       struct crypto_skcipher *cipher;
+       struct crypto_rng *rng;
+       int ret;
 
-       /* init RNG */
-       big_key_rng = crypto_alloc_rng(big_key_rng_name, 0, 0);
-       if (IS_ERR(big_key_rng)) {
-               big_key_rng = NULL;
-               return -EFAULT;
+       rng = crypto_alloc_rng(big_key_rng_name, 0, 0);
+       if (IS_ERR(rng)) {
+               pr_err("Can't alloc rng: %ld\n", PTR_ERR(rng));
+               return PTR_ERR(rng);
        }
 
+       big_key_rng = rng;
+
        /* seed RNG */
-       ret = crypto_rng_reset(big_key_rng, NULL, crypto_rng_seedsize(big_key_rng));
-       if (ret)
-               goto error;
+       ret = crypto_rng_reset(rng, NULL, crypto_rng_seedsize(rng));
+       if (ret) {
+               pr_err("Can't reset rng: %d\n", ret);
+               goto error_rng;
+       }
 
        /* init block cipher */
-       big_key_skcipher = crypto_alloc_skcipher(big_key_alg_name,
-                                                0, CRYPTO_ALG_ASYNC);
-       if (IS_ERR(big_key_skcipher)) {
-               big_key_skcipher = NULL;
-               ret = -EFAULT;
-               goto error;
+       cipher = crypto_alloc_skcipher(big_key_alg_name, 0, CRYPTO_ALG_ASYNC);
+       if (IS_ERR(cipher)) {
+               ret = PTR_ERR(cipher);
+               pr_err("Can't alloc crypto: %d\n", ret);
+               goto error_rng;
+       }
+
+       big_key_skcipher = cipher;
+
+       ret = register_key_type(&key_type_big_key);
+       if (ret < 0) {
+               pr_err("Can't register type: %d\n", ret);
+               goto error_cipher;
        }
 
        return 0;
 
-error:
+error_cipher:
+       crypto_free_skcipher(big_key_skcipher);
+error_rng:
        crypto_free_rng(big_key_rng);
-       big_key_rng = NULL;
        return ret;
 }
 
-device_initcall(big_key_init);
-late_initcall(big_key_crypto_init);
+late_initcall(big_key_init);
index f0611a6368cd2572188f9a066291b9c8d717f95d..b9f531c9e4fa753d326752b63dc2cf599579ffeb 100644 (file)
@@ -181,7 +181,7 @@ static int proc_keys_show(struct seq_file *m, void *v)
        struct timespec now;
        unsigned long timo;
        key_ref_t key_ref, skey_ref;
-       char xbuf[12];
+       char xbuf[16];
        int rc;
 
        struct keyring_search_context ctx = {
index 085057936287bdaa559e7c4be9e593e17ec1dfa9..09fd6108e42134871953f2cb46f9410808c1f702 100644 (file)
@@ -3557,7 +3557,7 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
                } else if (!vma->vm_file &&
                           ((vma->vm_start <= vma->vm_mm->start_stack &&
                             vma->vm_end >= vma->vm_mm->start_stack) ||
-                           vma_is_stack_for_task(vma, current))) {
+                           vma_is_stack_for_current(vma))) {
                        rc = current_has_perm(current, PROCESS__EXECSTACK);
                } else if (vma->vm_file && vma->anon_vma) {
                        /*
index ade7c6cad172a13833a3b41799a142ebf4cb4f46..682b73af77661a4c6260b9f450e015d86c453ede 100644 (file)
@@ -881,7 +881,7 @@ bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos,
         * the execve().
         */
        if (get_user_pages_remote(current, bprm->mm, pos, 1,
-                               0, 1, &page, NULL) <= 0)
+                               FOLL_FORCE, &page, NULL) <= 0)
                return false;
 #else
        page = bprm->page[pos / PAGE_SIZE];
index dcc102813aefa4d1d6e30e24f8644c8d92b12a9f..37d9cfbc29f9c829facd29ffdc2224ada7a63efd 100644 (file)
@@ -448,8 +448,8 @@ snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr)
 
                ktime_get_ts64(&tm);
                tm = timespec64_sub(tm, tmr->last_update);
-               cur_time.tv_nsec = tm.tv_nsec;
-               cur_time.tv_sec = tm.tv_sec;
+               cur_time.tv_nsec += tm.tv_nsec;
+               cur_time.tv_sec += tm.tv_sec;
                snd_seq_sanity_real_time(&cur_time);
        }
        spin_unlock_irqrestore(&tmr->lock, flags);
index d17937b92331e4c1160d1cebb1ed77398a684a01..7e3aa50b21f9d2d2f5ca49f3f9a779ab1276ee4a 100644 (file)
@@ -111,7 +111,7 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                return -EINVAL;
 
        hm = kmalloc(sizeof(*hm), GFP_KERNEL);
-       hr = kmalloc(sizeof(*hr), GFP_KERNEL);
+       hr = kzalloc(sizeof(*hr), GFP_KERNEL);
        if (!hm || !hr) {
                err = -ENOMEM;
                goto out;
index c3469f756ec258cccba7f1a339a4335d318bcc23..c64d986009a9ecf5233464d269a440a0edb6cf23 100644 (file)
@@ -341,8 +341,7 @@ enum {
 
 /* quirks for Nvidia */
 #define AZX_DCAPS_PRESET_NVIDIA \
-       (AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
-        AZX_DCAPS_NO_64BIT | AZX_DCAPS_CORBRP_SELF_CLEAR |\
+       (AZX_DCAPS_NO_MSI | AZX_DCAPS_CORBRP_SELF_CLEAR |\
         AZX_DCAPS_SNOOP_TYPE(NVIDIA))
 
 #define AZX_DCAPS_PRESET_CTHDA \
@@ -1716,6 +1715,10 @@ static int azx_first_init(struct azx *chip)
                }
        }
 
+       /* NVidia hardware normally only supports up to 40 bits of DMA */
+       if (chip->pci->vendor == PCI_VENDOR_ID_NVIDIA)
+               dma_bits = 40;
+
        /* disable 64bit DMA address on some devices */
        if (chip->driver_caps & AZX_DCAPS_NO_64BIT) {
                dev_dbg(card->dev, "Disabling 64bit DMA\n");
index b58e8c76346ac9e87bd208b88ae8882546fa78c1..2f909dd8b7b851680f5c84195f046d58046144c9 100644 (file)
@@ -5811,8 +5811,6 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
 #define ALC295_STANDARD_PINS \
        {0x12, 0xb7a60130}, \
        {0x14, 0x90170110}, \
-       {0x17, 0x21014020}, \
-       {0x18, 0x21a19030}, \
        {0x21, 0x04211020}
 
 #define ALC298_STANDARD_PINS \
@@ -5858,10 +5856,18 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
                {0x14, 0x90170110},
                {0x1b, 0x02011020},
                {0x21, 0x0221101f}),
+       SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+               {0x14, 0x90170110},
+               {0x1b, 0x01011020},
+               {0x21, 0x0221101f}),
        SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
                {0x14, 0x90170130},
                {0x1b, 0x01014020},
                {0x21, 0x0221103f}),
+       SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+               {0x14, 0x90170130},
+               {0x1b, 0x01011020},
+               {0x21, 0x0221103f}),
        SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
                {0x14, 0x90170130},
                {0x1b, 0x02011020},
@@ -6039,7 +6045,13 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
                ALC292_STANDARD_PINS,
                {0x13, 0x90a60140}),
        SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
-               ALC295_STANDARD_PINS),
+               ALC295_STANDARD_PINS,
+               {0x17, 0x21014020},
+               {0x18, 0x21a19030}),
+       SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+               ALC295_STANDARD_PINS,
+               {0x17, 0x21014040},
+               {0x18, 0x21a19050}),
        SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
                ALC298_STANDARD_PINS,
                {0x17, 0x90170110}),
@@ -6613,6 +6625,7 @@ enum {
        ALC891_FIXUP_HEADSET_MODE,
        ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
        ALC662_FIXUP_ACER_VERITON,
+       ALC892_FIXUP_ASROCK_MOBO,
 };
 
 static const struct hda_fixup alc662_fixups[] = {
@@ -6889,6 +6902,16 @@ static const struct hda_fixup alc662_fixups[] = {
                        { }
                }
        },
+       [ALC892_FIXUP_ASROCK_MOBO] = {
+               .type = HDA_FIXUP_PINS,
+               .v.pins = (const struct hda_pintbl[]) {
+                       { 0x15, 0x40f000f0 }, /* disabled */
+                       { 0x16, 0x40f000f0 }, /* disabled */
+                       { 0x18, 0x01014011 }, /* LO */
+                       { 0x1a, 0x01014012 }, /* LO */
+                       { }
+               }
+       },
 };
 
 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -6926,6 +6949,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
        SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
        SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
        SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
+       SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
        SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
        SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
        SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
index c60a776e815d72f14b9b6345f2e8a0266f8ec1b6..8a59d4782a0f4d3c33b3e6840cbe265ba8ee4406 100644 (file)
@@ -2907,6 +2907,23 @@ AU0828_DEVICE(0x2040, 0x7260, "Hauppauge", "HVR-950Q"),
 AU0828_DEVICE(0x2040, 0x7213, "Hauppauge", "HVR-950Q"),
 AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
 
+/* Syntek STK1160 */
+{
+       .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
+                      USB_DEVICE_ID_MATCH_INT_CLASS |
+                      USB_DEVICE_ID_MATCH_INT_SUBCLASS,
+       .idVendor = 0x05e1,
+       .idProduct = 0x0408,
+       .bInterfaceClass = USB_CLASS_AUDIO,
+       .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
+       .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+               .vendor_name = "Syntek",
+               .product_name = "STK1160",
+               .ifnum = QUIRK_ANY_INTERFACE,
+               .type = QUIRK_AUDIO_ALIGN_TRANSFER
+       }
+},
+
 /* Digidesign Mbox */
 {
        /* Thanks to Clemens Ladisch <clemens@ladisch.de> */
index 1188bc849ee3b3253fd8229fca21bf2d6c87856e..a39629206864e5bb74aaddea15ca1ab762877042 100644 (file)
 #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
 
 #define X86_FEATURE_INTEL_PT   ( 7*32+15) /* Intel Processor Trace */
+#define X86_FEATURE_AVX512_4VNNIW (7*32+16) /* AVX-512 Neural Network Instructions */
+#define X86_FEATURE_AVX512_4FMAPS (7*32+17) /* AVX-512 Multiply Accumulation Single precision */
 
 /* Virtualization flags: Linux defined, word 8 */
 #define X86_FEATURE_TPR_SHADOW  ( 8*32+ 0) /* Intel TPR Shadow */
index c0c0b265e88e54b868858a812839c4c24979651e..b63a31be1218830eecc6116cf301f375c0a046c1 100644 (file)
@@ -98,6 +98,15 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
                        *type = INSN_FP_SETUP;
                break;
 
+       case 0x8d:
+               if (insn.rex_prefix.bytes &&
+                   insn.rex_prefix.bytes[0] == 0x48 &&
+                   insn.modrm.nbytes && insn.modrm.bytes[0] == 0x2c &&
+                   insn.sib.nbytes && insn.sib.bytes[0] == 0x24)
+                       /* lea %(rsp), %rbp */
+                       *type = INSN_FP_SETUP;
+               break;
+
        case 0x90:
                *type = INSN_NOP;
                break;
index 143b6cdd7f068f88fa8487aba804621c37523211..e8a1f699058a29ba695bfbf24781562c665e4525 100644 (file)
@@ -97,6 +97,19 @@ static struct instruction *next_insn_same_sec(struct objtool_file *file,
        return next;
 }
 
+static bool gcov_enabled(struct objtool_file *file)
+{
+       struct section *sec;
+       struct symbol *sym;
+
+       list_for_each_entry(sec, &file->elf->sections, list)
+               list_for_each_entry(sym, &sec->symbol_list, list)
+                       if (!strncmp(sym->name, "__gcov_.", 8))
+                               return true;
+
+       return false;
+}
+
 #define for_each_insn(file, insn)                                      \
        list_for_each_entry(insn, &file->insn_list, list)
 
@@ -713,6 +726,7 @@ static struct rela *find_switch_table(struct objtool_file *file,
                                      struct instruction *insn)
 {
        struct rela *text_rela, *rodata_rela;
+       struct instruction *orig_insn = insn;
 
        text_rela = find_rela_by_dest_range(insn->sec, insn->offset, insn->len);
        if (text_rela && text_rela->sym == file->rodata->sym) {
@@ -733,10 +747,16 @@ static struct rela *find_switch_table(struct objtool_file *file,
 
        /* case 3 */
        func_for_each_insn_continue_reverse(file, func, insn) {
-               if (insn->type == INSN_JUMP_UNCONDITIONAL ||
-                   insn->type == INSN_JUMP_DYNAMIC)
+               if (insn->type == INSN_JUMP_DYNAMIC)
                        break;
 
+               /* allow small jumps within the range */
+               if (insn->type == INSN_JUMP_UNCONDITIONAL &&
+                   insn->jump_dest &&
+                   (insn->jump_dest->offset <= insn->offset ||
+                    insn->jump_dest->offset > orig_insn->offset))
+                   break;
+
                text_rela = find_rela_by_dest_range(insn->sec, insn->offset,
                                                    insn->len);
                if (text_rela && text_rela->sym == file->rodata->sym)
@@ -1034,34 +1054,6 @@ static int validate_branch(struct objtool_file *file,
        return 0;
 }
 
-static bool is_gcov_insn(struct instruction *insn)
-{
-       struct rela *rela;
-       struct section *sec;
-       struct symbol *sym;
-       unsigned long offset;
-
-       rela = find_rela_by_dest_range(insn->sec, insn->offset, insn->len);
-       if (!rela)
-               return false;
-
-       if (rela->sym->type != STT_SECTION)
-               return false;
-
-       sec = rela->sym->sec;
-       offset = rela->addend + insn->offset + insn->len - rela->offset;
-
-       list_for_each_entry(sym, &sec->symbol_list, list) {
-               if (sym->type != STT_OBJECT)
-                       continue;
-
-               if (offset >= sym->offset && offset < sym->offset + sym->len)
-                       return (!memcmp(sym->name, "__gcov0.", 8));
-       }
-
-       return false;
-}
-
 static bool is_kasan_insn(struct instruction *insn)
 {
        return (insn->type == INSN_CALL &&
@@ -1083,9 +1075,6 @@ static bool ignore_unreachable_insn(struct symbol *func,
        if (insn->type == INSN_NOP)
                return true;
 
-       if (is_gcov_insn(insn))
-               return true;
-
        /*
         * Check if this (or a subsequent) instruction is related to
         * CONFIG_UBSAN or CONFIG_KASAN.
@@ -1146,6 +1135,19 @@ static int validate_functions(struct objtool_file *file)
                                    ignore_unreachable_insn(func, insn))
                                        continue;
 
+                               /*
+                                * gcov produces a lot of unreachable
+                                * instructions.  If we get an unreachable
+                                * warning and the file has gcov enabled, just
+                                * ignore it, and all other such warnings for
+                                * the file.
+                                */
+                               if (!file->ignore_unreachables &&
+                                   gcov_enabled(file)) {
+                                       file->ignore_unreachables = true;
+                                       continue;
+                               }
+
                                WARN_FUNC("function has unreachable instruction", insn->sec, insn->offset);
                                warnings++;
                        }
index 5ce61a1bda9ca863cbcd4c327f2abd8f621bf1f6..df14e6b67b63b781846d71b80cbc6e8ee1edc0e3 100644 (file)
@@ -36,7 +36,7 @@ SOLIBEXT=so
 # The following works at least on fedora 23, you may need the next
 # line for other distros.
 ifneq (,$(wildcard /usr/sbin/update-java-alternatives))
-JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d ' ' -f 3)
+JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}')
 else
   ifneq (,$(wildcard /usr/sbin/alternatives))
     JDIR=$(shell alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
index fb8e42c7507add43bc9c1848cf3ef300382ee313..4ffff7be92993e02f37fd4be8d79c23b11be9d85 100644 (file)
@@ -601,7 +601,8 @@ int hist_browser__run(struct hist_browser *browser, const char *help)
                        u64 nr_entries;
                        hbt->timer(hbt->arg);
 
-                       if (hist_browser__has_filter(browser))
+                       if (hist_browser__has_filter(browser) ||
+                           symbol_conf.report_hierarchy)
                                hist_browser__update_nr_entries(browser);
 
                        nr_entries = hist_browser__nr_entries(browser);
index 85dd0db0a127995a725eade74a12e5da8569b80c..2f3eded54b0cc65a6d2ac59456a2acf2d7921059 100644 (file)
@@ -1895,7 +1895,6 @@ static int process_numa_topology(struct perf_file_section *section __maybe_unuse
        if (ph->needs_swap)
                nr = bswap_32(nr);
 
-       ph->env.nr_numa_nodes = nr;
        nodes = zalloc(sizeof(*nodes) * nr);
        if (!nodes)
                return -ENOMEM;
@@ -1932,6 +1931,7 @@ static int process_numa_topology(struct perf_file_section *section __maybe_unuse
 
                free(str);
        }
+       ph->env.nr_numa_nodes = nr;
        ph->env.numa_nodes = nodes;
        return 0;
 
index 9f43fda2570f959833c85b89aa29b3612c6d6abb..660fca05bc93bd8f724a9f3cef3f0f3d86abb983 100644 (file)
@@ -136,8 +136,8 @@ do {                                                        \
 group          [^,{}/]*[{][^}]*[}][^,{}/]*
 event_pmu      [^,{}/]+[/][^/]*[/][^,{}/]*
 event          [^,{}/]+
-bpf_object     .*\.(o|bpf)
-bpf_source     .*\.c
+bpf_object     [^,{}]+\.(o|bpf)
+bpf_source     [^,{}]+\.c
 
 num_dec                [0-9]+
 num_hex                0x[a-fA-F0-9]+
index db9668869f6ff6866a72f278def5770d71190994..8035cc1eb9551ab58b2f454f9ff74546dd2ebdde 100644 (file)
@@ -84,7 +84,8 @@ static void async_pf_execute(struct work_struct *work)
         * mm and might be done in another context, so we must
         * use FOLL_REMOTE.
         */
-       __get_user_pages_unlocked(NULL, mm, addr, 1, 1, 0, NULL, FOLL_REMOTE);
+       __get_user_pages_unlocked(NULL, mm, addr, 1, NULL,
+                       FOLL_WRITE | FOLL_REMOTE);
 
        kvm_async_page_present_sync(vcpu, apf);
 
index 81dfc73d3df39851e3b44cd546f5f66046ec5e0f..2907b7b7865455dea81a236a56c411ef1d7d44ac 100644 (file)
@@ -1346,21 +1346,19 @@ unsigned long kvm_vcpu_gfn_to_hva_prot(struct kvm_vcpu *vcpu, gfn_t gfn, bool *w
 static int get_user_page_nowait(unsigned long start, int write,
                struct page **page)
 {
-       int flags = FOLL_TOUCH | FOLL_NOWAIT | FOLL_HWPOISON | FOLL_GET;
+       int flags = FOLL_NOWAIT | FOLL_HWPOISON;
 
        if (write)
                flags |= FOLL_WRITE;
 
-       return __get_user_pages(current, current->mm, start, 1, flags, page,
-                       NULL, NULL);
+       return get_user_pages(start, 1, flags, page, NULL);
 }
 
 static inline int check_user_page_hwpoison(unsigned long addr)
 {
-       int rc, flags = FOLL_TOUCH | FOLL_HWPOISON | FOLL_WRITE;
+       int rc, flags = FOLL_HWPOISON | FOLL_WRITE;
 
-       rc = __get_user_pages(current, current->mm, addr, 1,
-                             flags, NULL, NULL, NULL);
+       rc = get_user_pages(addr, 1, flags, NULL, NULL);
        return rc == -EHWPOISON;
 }
 
@@ -1416,10 +1414,15 @@ static int hva_to_pfn_slow(unsigned long addr, bool *async, bool write_fault,
                down_read(&current->mm->mmap_sem);
                npages = get_user_page_nowait(addr, write_fault, page);
                up_read(&current->mm->mmap_sem);
-       } else
+       } else {
+               unsigned int flags = FOLL_TOUCH | FOLL_HWPOISON;
+
+               if (write_fault)
+                       flags |= FOLL_WRITE;
+
                npages = __get_user_pages_unlocked(current, current->mm, addr, 1,
-                                                  write_fault, 0, page,
-                                                  FOLL_TOUCH|FOLL_HWPOISON);
+                                                  page, flags);
+       }
        if (npages != 1)
                return npages;