Merge tag 'v5.6-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorOlof Johansson <olof@lixom.net>
Sat, 11 Jan 2020 06:18:33 +0000 (22:18 -0800)
committerOlof Johansson <olof@lixom.net>
Sat, 11 Jan 2020 06:18:35 +0000 (22:18 -0800)
Pin-name corrections for Veyron-Fievel, bluetooth for a number of veyron boards and
additional operating points for rk3288-tinker.

* tag 'v5.6-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: Use ABI name for recovery mode pin on veyron fievel/tiger
  ARM: dts: rockchip: Use ABI name for write protect pin on veyron fievel/tiger
  ARM: dts: rockchip: Add missing cpu operating points for rk3288-tinker
  ARM: dts: rockchip: Add brcm bluetooth for rk3288-veyron

Link: https://lore.kernel.org/r/8215452.dU6eVM2tAM@phil
Signed-off-by: Olof Johansson <olof@lixom.net>
628 files changed:
.mailmap
Documentation/admin-guide/device-mapper/dm-integrity.rst
Documentation/admin-guide/device-mapper/index.rst
Documentation/devicetree/bindings/arm/sunxi.yaml
Documentation/devicetree/bindings/arm/ux500.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/bus/allwinner,sun50i-a64-de2.yaml
Documentation/devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml
Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-ccu.yaml
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml
Documentation/devicetree/bindings/display/panel/ronbo,rb070d30.yaml
Documentation/devicetree/bindings/dma/allwinner,sun4i-a10-dma.yaml
Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
Documentation/devicetree/bindings/dma/allwinner,sun6i-a31-dma.yaml
Documentation/devicetree/bindings/i2c/allwinner,sun6i-a31-p2wi.yaml
Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml
Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-a10-ic.yaml
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-ir.yaml
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml
Documentation/devicetree/bindings/mfd/allwinner,sun4i-a10-ts.yaml
Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml
Documentation/devicetree/bindings/net/allwinner,sun4i-a10-mdio.yaml
Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml
Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml
Documentation/devicetree/bindings/net/can/rcar_can.txt
Documentation/devicetree/bindings/net/can/rcar_canfd.txt
Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml
Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml
Documentation/devicetree/bindings/phy/marvell,mmp3-hsic-phy.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
Documentation/devicetree/bindings/pwm/allwinner,sun4i-a10-pwm.yaml
Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
Documentation/devicetree/bindings/rtc/allwinner,sun4i-a10-rtc.yaml
Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
Documentation/devicetree/bindings/serio/allwinner,sun4i-a10-ps2.yaml
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
Documentation/devicetree/bindings/sound/allwinner,sun50i-a64-codec-analog.yaml
Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml
Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
Documentation/devicetree/bindings/spi/allwinner,sun4i-a10-spi.yaml
Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml
Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml
Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.yaml
Documentation/devicetree/bindings/timer/renesas,tmu.txt
Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
Documentation/filesystems/erofs.txt
Documentation/filesystems/overlayfs.rst [moved from Documentation/filesystems/overlayfs.txt with 99% similarity]
Documentation/process/coding-style.rst
Documentation/scsi/smartpqi.txt
Documentation/translations/it_IT/process/coding-style.rst
Documentation/translations/zh_CN/process/coding-style.rst
MAINTAINERS
Makefile
arch/arc/kernel/unwind.c
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/am335x-evm.dts
arch/arm/boot/dts/am335x-evmsk.dts
arch/arm/boot/dts/am335x-icev2.dts
arch/arm/boot/dts/am335x-sancloud-bbe.dts
arch/arm/boot/dts/am33xx-l4.dtsi
arch/arm/boot/dts/am33xx.dtsi
arch/arm/boot/dts/am3517.dtsi
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/am437x-gp-evm.dts
arch/arm/boot/dts/am437x-l4.dtsi
arch/arm/boot/dts/am43x-epos-evm.dts
arch/arm/boot/dts/am57xx-idk-common.dtsi
arch/arm/boot/dts/bcm2711.dtsi
arch/arm/boot/dts/bcm2835-common.dtsi
arch/arm/boot/dts/bcm283x.dtsi
arch/arm/boot/dts/bcm958625hr.dts
arch/arm/boot/dts/dra7-l4.dtsi
arch/arm/boot/dts/dra7.dtsi
arch/arm/boot/dts/dra74x.dtsi
arch/arm/boot/dts/dra76-evm.dts
arch/arm/boot/dts/exynos3250.dtsi
arch/arm/boot/dts/exynos4210-universal_c210.dts
arch/arm/boot/dts/exynos4210.dtsi
arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi
arch/arm/boot/dts/exynos4412-midas.dtsi
arch/arm/boot/dts/exynos4412-n710x.dts
arch/arm/boot/dts/exynos4412.dtsi
arch/arm/boot/dts/exynos5250.dtsi
arch/arm/boot/dts/exynos5420.dtsi
arch/arm/boot/dts/exynos5422-odroid-core.dtsi
arch/arm/boot/dts/exynos54xx.dtsi
arch/arm/boot/dts/iwg20d-q7-common.dtsi
arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
arch/arm/boot/dts/mmp3-dell-ariel.dts
arch/arm/boot/dts/mmp3.dtsi
arch/arm/boot/dts/omap2.dtsi
arch/arm/boot/dts/omap2430.dtsi
arch/arm/boot/dts/omap3-n900.dts
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/omap36xx.dtsi
arch/arm/boot/dts/omap4-l4-abe.dtsi
arch/arm/boot/dts/omap4-l4.dtsi
arch/arm/boot/dts/omap4.dtsi
arch/arm/boot/dts/omap5-l4-abe.dtsi
arch/arm/boot/dts/omap5-l4.dtsi
arch/arm/boot/dts/omap5.dtsi
arch/arm/boot/dts/r7s72100.dtsi
arch/arm/boot/dts/r8a73a4.dtsi
arch/arm/boot/dts/r8a7740-armadillo800eva.dts
arch/arm/boot/dts/r8a7740.dtsi
arch/arm/boot/dts/r8a7743.dtsi
arch/arm/boot/dts/r8a7744.dtsi
arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts
arch/arm/boot/dts/r8a7745.dtsi
arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
arch/arm/boot/dts/r8a77470.dtsi
arch/arm/boot/dts/r8a7778.dtsi
arch/arm/boot/dts/r8a7779-marzen.dts
arch/arm/boot/dts/r8a7779.dtsi
arch/arm/boot/dts/r8a7790-lager.dts
arch/arm/boot/dts/r8a7790.dtsi
arch/arm/boot/dts/r8a7791-koelsch.dts
arch/arm/boot/dts/r8a7791-porter.dts
arch/arm/boot/dts/r8a7791.dtsi
arch/arm/boot/dts/r8a7792.dtsi
arch/arm/boot/dts/r8a7793-gose.dts
arch/arm/boot/dts/r8a7793.dtsi
arch/arm/boot/dts/r8a7794-alt.dts
arch/arm/boot/dts/r8a7794-silk.dts
arch/arm/boot/dts/r8a7794.dtsi
arch/arm/boot/dts/sh73a0.dtsi
arch/arm/boot/dts/ste-ab8500.dtsi
arch/arm/boot/dts/ste-ab8505.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-db8500.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-db8520.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-dbx5x0.dtsi
arch/arm/boot/dts/ste-href-ab8505.dtsi [deleted file]
arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
arch/arm/boot/dts/ste-href-tvk1281618-r2.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-href-tvk1281618-r3.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-href-tvk1281618.dtsi
arch/arm/boot/dts/ste-href.dtsi
arch/arm/boot/dts/ste-href520-tvk.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefprev60-stuib.dts
arch/arm/boot/dts/ste-hrefprev60-tvk.dts
arch/arm/boot/dts/ste-hrefprev60.dtsi
arch/arm/boot/dts/ste-hrefv60plus-stuib.dts
arch/arm/boot/dts/ste-hrefv60plus-tvk.dts
arch/arm/boot/dts/ste-hrefv60plus.dtsi
arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi
arch/arm/boot/dts/ste-snowball.dts
arch/arm/boot/dts/ste-ux500-samsung-golden.dts [new file with mode: 0644]
arch/arm/boot/dts/stm32429i-eval.dts
arch/arm/boot/dts/stm32f4-pinctrl.dtsi
arch/arm/boot/dts/stm32f429.dtsi
arch/arm/boot/dts/stm32f469-disco.dts
arch/arm/boot/dts/stm32f7-pinctrl.dtsi
arch/arm/boot/dts/stm32f746.dtsi
arch/arm/boot/dts/stm32h743.dtsi
arch/arm/boot/dts/stm32mp15-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp151.dtsi [moved from arch/arm/boot/dts/stm32mp157c.dtsi with 87% similarity]
arch/arm/boot/dts/stm32mp153.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp157-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/stm32mp157.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp157a-avenger96.dts
arch/arm/boot/dts/stm32mp157a-dk1.dts
arch/arm/boot/dts/stm32mp157c-dk2.dts
arch/arm/boot/dts/stm32mp157c-ed1.dts
arch/arm/boot/dts/stm32mp157c-ev1.dts
arch/arm/boot/dts/stm32mp157xaa-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/stm32mp157xab-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/stm32mp157xac-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/stm32mp157xad-pinctrl.dtsi [deleted file]
arch/arm/boot/dts/stm32mp15xc.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp15xx-dkx.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp15xxaa-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp15xxab-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp15xxac-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp15xxad-pinctrl.dtsi [new file with mode: 0644]
arch/arm/configs/multi_v7_defconfig
arch/arm/configs/omap2plus_defconfig
arch/arm/crypto/curve25519-glue.c
arch/arm/mach-omap2/clockdomains43xx_data.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/dma.c
arch/arm/mach-omap2/omap-iommu.c
arch/arm/mach-omap2/omap_device.c
arch/arm/mach-omap2/omap_device.h
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.h
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_43xx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_hwmod_54xx_data.c
arch/arm/mach-omap2/omap_hwmod_7xx_data.c
arch/arm/mach-omap2/omap_hwmod_common_data.h
arch/arm/mach-omap2/omap_hwmod_reset.c
arch/arm/mach-omap2/pdata-quirks.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/prcm43xx.h
arch/arm/plat-omap/dma.c
arch/arm64/boot/dts/altera/Makefile
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts [new file with mode: 0644]
arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts
arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
arch/arm64/boot/dts/intel/Makefile
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi
arch/arm64/boot/dts/intel/socfpga_agilex_socdk_nand.dts [new file with mode: 0644]
arch/arm64/boot/dts/renesas/Makefile
arch/arm64/boot/dts/renesas/hihope-common.dtsi
arch/arm64/boot/dts/renesas/r8a774a1.dtsi
arch/arm64/boot/dts/renesas/r8a774b1.dtsi
arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts [new file with mode: 0644]
arch/arm64/boot/dts/renesas/r8a774c0.dtsi
arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts [moved from arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts with 96% similarity]
arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts [moved from arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-kf.dts with 75% similarity]
arch/arm64/boot/dts/renesas/r8a77950-ulcb.dts [moved from arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb.dts with 89% similarity]
arch/arm64/boot/dts/renesas/r8a77950.dtsi [moved from arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi with 98% similarity]
arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts [moved from arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts with 96% similarity]
arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts [moved from arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts with 96% similarity]
arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dts [moved from arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-kf.dts with 75% similarity]
arch/arm64/boot/dts/renesas/r8a77951-ulcb.dts [moved from arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts with 92% similarity]
arch/arm64/boot/dts/renesas/r8a77951.dtsi [moved from arch/arm64/boot/dts/renesas/r8a7795.dtsi with 94% similarity]
arch/arm64/boot/dts/renesas/r8a77960-salvator-x.dts [moved from arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts with 94% similarity]
arch/arm64/boot/dts/renesas/r8a77960-salvator-xs.dts [moved from arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts with 94% similarity]
arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dts [moved from arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts with 77% similarity]
arch/arm64/boot/dts/renesas/r8a77960-ulcb.dts [moved from arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts with 90% similarity]
arch/arm64/boot/dts/renesas/r8a77960.dtsi [moved from arch/arm64/boot/dts/renesas/r8a7796.dtsi with 94% similarity]
arch/arm64/boot/dts/renesas/r8a77961.dtsi
arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dts [moved from arch/arm64/boot/dts/renesas/r8a77965-m3nulcb-kf.dts with 92% similarity]
arch/arm64/boot/dts/renesas/r8a77965-ulcb.dts [moved from arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts with 100% similarity]
arch/arm64/boot/dts/renesas/r8a77965.dtsi
arch/arm64/boot/dts/renesas/r8a77970.dtsi
arch/arm64/boot/dts/renesas/r8a77980.dtsi
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
arch/arm64/boot/dts/renesas/r8a77990.dtsi
arch/arm64/boot/dts/renesas/r8a77995.dtsi
arch/arm64/boot/dts/renesas/salvator-common.dtsi
arch/arm64/boot/dts/renesas/ulcb.dtsi
arch/arm64/boot/dts/sprd/Makefile
arch/arm64/boot/dts/sprd/sc9863a.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/sprd/sharkl3.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/sprd/sp9863a-1h10.dts [new file with mode: 0644]
arch/mips/cavium-octeon/executive/cvmx-bootmem.c
arch/nios2/mm/ioremap.c
arch/powerpc/net/bpf_jit32.h
arch/powerpc/net/bpf_jit_comp.c
arch/riscv/Kconfig.socs
arch/riscv/boot/Makefile
arch/s390/Kconfig
arch/s390/include/asm/setup.h
arch/s390/include/asm/uv.h
arch/s390/kernel/early.c
arch/s390/kernel/perf_cpum_sf.c
arch/s390/kernel/smp.c
arch/s390/lib/spinlock.c
arch/s390/lib/test_unwind.c
arch/s390/mm/kasan_init.c
arch/sh/drivers/platform_early.c
arch/sh/kernel/kgdb.c
arch/sparc/net/bpf_jit_comp_32.c
arch/x86/kernel/fpu/xstate.c
arch/x86/kernel/ftrace.c
block/bio.c
block/blk-cgroup.c
block/blk-core.c
crypto/adiantum.c
crypto/essiv.c
drivers/acpi/device_pm.c
drivers/android/binder.c
drivers/base/devtmpfs.c
drivers/base/platform.c
drivers/block/xen-blkback/xenbus.c
drivers/bus/ti-sysc.c
drivers/clk/mmp/clk-of-mmp2.c
drivers/cpuidle/cpuidle.c
drivers/cpuidle/driver.c
drivers/devfreq/devfreq.c
drivers/dma-buf/sync_file.c
drivers/dma/ti/omap-dma.c
drivers/firmware/efi/efi.c
drivers/gpu/drm/amd/acp/Kconfig
drivers/gpu/drm/amd/amdgpu/Kconfig
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
drivers/gpu/drm/amd/amdgpu/df_v3_6.c
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
drivers/gpu/drm/amd/amdkfd/Kconfig
drivers/gpu/drm/amd/display/Kconfig
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
drivers/gpu/drm/amd/display/dc/dcn20/Makefile
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c
drivers/gpu/drm/amd/display/dc/dcn21/Makefile
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
drivers/gpu/drm/amd/display/dc/dsc/Makefile
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h
drivers/gpu/drm/amd/display/include/i2caux_interface.h
drivers/gpu/drm/amd/display/modules/freesync/freesync.c
drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_fbc.c
drivers/gpu/drm/i915/display/intel_hdcp.c
drivers/gpu/drm/i915/display/intel_hdcp.h
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/mcde/mcde_dsi.c
drivers/gpu/drm/meson/meson_venc_cvbs.c
drivers/gpu/drm/mgag200/mgag200_drv.c
drivers/gpu/drm/nouveau/dispnv50/atom.h
drivers/gpu/drm/nouveau/dispnv50/disp.c
drivers/gpu/drm/nouveau/dispnv50/head.c
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.h
drivers/gpu/drm/panfrost/panfrost_devfreq.c
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/panfrost/panfrost_gem.c
drivers/gpu/drm/panfrost/panfrost_gem.h
drivers/gpu/drm/panfrost/panfrost_perfcnt.c
drivers/gpu/drm/panfrost/panfrost_perfcnt.h
drivers/i2c/i2c-core-base.c
drivers/iio/accel/st_accel_core.c
drivers/iio/adc/ad7124.c
drivers/iio/adc/ad7606.c
drivers/iio/adc/ad7949.c
drivers/iio/adc/intel_mrfld_adc.c
drivers/iio/adc/max1027.c
drivers/iio/adc/max9611.c
drivers/iio/humidity/hdc100x.c
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
drivers/iio/temperature/ltc2983.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/counters.c
drivers/infiniband/core/ib_core_uverbs.c
drivers/infiniband/hw/efa/efa_verbs.c
drivers/infiniband/hw/hfi1/sdma.c
drivers/infiniband/hw/hfi1/verbs.h
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/cmd.c
drivers/infiniband/hw/mlx5/cmd.h
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/sw/rxe/rxe_recv.c
drivers/infiniband/sw/rxe/rxe_req.c
drivers/infiniband/sw/rxe/rxe_resp.c
drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c
drivers/interconnect/qcom/Kconfig
drivers/interconnect/qcom/msm8974.c
drivers/interconnect/qcom/qcs404.c
drivers/interconnect/qcom/sdm845.c
drivers/md/dm-clone-metadata.c
drivers/md/dm-clone-metadata.h
drivers/md/dm-clone-target.c
drivers/md/dm-mpath.c
drivers/md/dm-thin-metadata.c
drivers/md/dm-thin-metadata.h
drivers/md/dm-thin.c
drivers/md/md.c
drivers/md/persistent-data/dm-btree-remove.c
drivers/md/raid1.c
drivers/md/raid5-ppl.c
drivers/md/raid5.c
drivers/media/platform/omap3isp/isppreview.c
drivers/media/v4l2-core/v4l2-ioctl.c
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
drivers/net/ethernet/cavium/liquidio/octeon_console.c
drivers/net/ethernet/emulex/benet/be_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igc/igc_ethtool.c
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c
drivers/net/ethernet/intel/ixgbevf/ethtool.c
drivers/net/ethernet/marvell/mv643xx_eth.c
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/main.c
drivers/net/ethernet/netronome/nfp/bpf/offload.c
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c
drivers/net/ethernet/qlogic/qede/qede.h
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
drivers/net/ethernet/realtek/r8169_firmware.c
drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/ti/cpsw_ethtool.c
drivers/net/ethernet/ti/netcp_ethss.c
drivers/net/fjes/fjes_ethtool.c
drivers/net/geneve.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/usb/sierra_net.c
drivers/net/usb/usbnet.c
drivers/net/vxlan.c
drivers/net/wireless/marvell/libertas/debugfs.c
drivers/net/wireless/marvell/mwifiex/util.h
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/target/fcloop.c
drivers/nvme/target/loop.c
drivers/of/platform.c
drivers/pci/controller/pcie-rockchip-host.c
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_core_mpc.h
drivers/scsi/aacraid/aachba.c
drivers/scsi/be2iscsi/be_cmds.h
drivers/scsi/cxgbi/libcxgbi.c
drivers/scsi/libiscsi.c
drivers/scsi/libsas/sas_discover.c
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_bsg.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_fw.h
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_iocb.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_nvme.c
drivers/scsi/qla2xxx/qla_sup.c
drivers/scsi/qla2xxx/qla_target.c
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/scsi/qla4xxx/ql4_os.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/smartpqi/smartpqi_init.c
drivers/scsi/ufs/cdns-pltfrm.c
drivers/scsi/ufs/ufs_bsg.c
drivers/staging/exfat/exfat.h
drivers/staging/exfat/exfat_core.c
drivers/staging/exfat/exfat_super.c
drivers/staging/fbtft/fb_uc1611.c
drivers/staging/fbtft/fb_watterott.c
drivers/staging/fbtft/fbtft-core.c
drivers/staging/hp/Kconfig
drivers/staging/isdn/gigaset/usb-gigaset.c
drivers/staging/octeon/Kconfig
drivers/staging/qlge/qlge_ethtool.c
drivers/staging/rtl8188eu/os_dep/usb_intf.c
drivers/staging/rtl8712/usb_intf.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
drivers/staging/wfx/data_tx.c
drivers/staging/wlan-ng/Kconfig
drivers/target/iscsi/cxgbit/cxgbit_main.c
drivers/thermal/Kconfig
drivers/usb/atm/ueagle-atm.c
drivers/usb/atm/usbatm.c
drivers/usb/common/usb-conn-gpio.c
drivers/usb/core/hcd.c
drivers/usb/core/urb.c
drivers/usb/dwc3/dwc3-pci.c
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c
drivers/usb/gadget/function/f_ecm.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/f_rndis.c
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/misc/adutux.c
drivers/usb/misc/idmouse.c
drivers/usb/mon/mon_bin.c
drivers/usb/roles/class.c
drivers/usb/serial/io_edgeport.c
drivers/usb/storage/scsiglue.c
drivers/usb/typec/class.c
drivers/virtio/virtio_balloon.c
drivers/xen/balloon.c
fs/afs/dynroot.c
fs/afs/mntpt.c
fs/afs/proc.c
fs/afs/server.c
fs/afs/super.c
fs/btrfs/Kconfig
fs/ceph/caps.c
fs/ceph/debugfs.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/mdsmap.c
fs/ceph/super.c
fs/ceph/super.h
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/smb2inode.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2proto.h
fs/crypto/keyring.c
fs/erofs/xattr.c
fs/file.c
fs/io-wq.c
fs/io-wq.h
fs/io_uring.c
fs/namespace.c
fs/overlayfs/copy_up.c
fs/overlayfs/dir.c
fs/overlayfs/export.c
fs/overlayfs/inode.c
fs/overlayfs/namei.c
fs/overlayfs/overlayfs.h
fs/overlayfs/ovl_entry.h
fs/overlayfs/super.c
fs/pipe.c
fs/verity/enable.c
include/dt-bindings/clock/marvell,mmp2.h
include/linux/blk-cgroup.h
include/linux/devfreq.h
include/linux/device.h
include/linux/filter.h
include/linux/ftrace.h
include/linux/i2c.h
include/linux/initrd.h
include/linux/kvm_host.h
include/linux/nvme-fc-driver.h
include/linux/omap-dma.h
include/linux/phy_led_triggers.h
include/linux/platform_data/ti-sysc.h
include/linux/printk.h
include/linux/syscalls.h
include/net/garp.h
include/net/ip_tunnels.h
include/net/mrp.h
include/net/netfilter/nf_conntrack_helper.h
include/net/netfilter/nf_tables_core.h
include/net/sock.h
include/rdma/ib_verbs.h
include/sound/aess.h [deleted file]
include/uapi/linux/io_uring.h
init/do_mounts.c
init/do_mounts_initrd.c
init/main.c
ipc/util.c
kernel/bpf/cgroup.c
kernel/bpf/local_storage.c
kernel/module.c
kernel/trace/fgraph.c
kernel/trace/ftrace.c
kernel/trace/ring_buffer.c
kernel/trace/trace.c
kernel/trace/trace_events_inject.c
kernel/workqueue.c
lib/raid6/unroll.awk
net/802/mrp.c
net/batman-adv/main.c
net/bpf/test_run.c
net/bridge/br.c
net/core/dev.c
net/core/filter.c
net/core/flow_dissector.c
net/core/xdp.c
net/dccp/proto.c
net/ipv4/ip_gre.c
net/ipv4/ip_vti.c
net/ipv4/tcp.c
net/ipv6/ip6_gre.c
net/iucv/af_iucv.c
net/netfilter/nf_tables_api.c
net/netfilter/nfnetlink_cthelper.c
net/netfilter/nft_ct.c
net/netfilter/nft_masq.c
net/netfilter/nft_nat.c
net/netfilter/nft_redir.c
net/netfilter/nft_tproxy.c
net/netfilter/xt_RATEEST.c
net/netlink/af_netlink.c
net/openvswitch/datapath.c
net/openvswitch/flow.h
net/rxrpc/af_rxrpc.c
net/sched/act_ct.c
net/sched/cls_flower.c
net/socket.c
net/unix/af_unix.c
scripts/checkpatch.pl
security/integrity/ima/ima_policy.c
sound/firewire/fireface/ff-pcm.c
sound/firewire/motu/motu-pcm.c
sound/firewire/oxfw/oxfw-pcm.c
sound/pci/echoaudio/echoaudio_dsp.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c
sound/soc/codecs/hdmi-codec.c

index c24773db04a7ab3ee9ddd5e8472796363f720be1..00581c1f09838af86edba1ff7abd9bedd216a428 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -276,3 +276,5 @@ Gustavo Padovan <gustavo@las.ic.unicamp.br>
 Gustavo Padovan <padovan@profusion.mobi>
 Changbin Du <changbin.du@intel.com> <changbin.du@intel.com>
 Changbin Du <changbin.du@intel.com> <changbin.du@gmail.com>
+Steve Wise <larrystevenwise@gmail.com> <swise@chelsio.com>
+Steve Wise <larrystevenwise@gmail.com> <swise@opengridcomputing.com>
index 594095b54b296567d09d1650d281b5a7e4f44c1f..c00f9f11e3f3f6133d4b741244e034ae2a3c430e 100644 (file)
@@ -144,7 +144,7 @@ journal_crypt:algorithm(:key)       (the key is optional)
        Encrypt the journal using given algorithm to make sure that the
        attacker can't read the journal. You can use a block cipher here
        (such as "cbc(aes)") or a stream cipher (for example "chacha20",
-       "salsa20", "ctr(aes)" or "ecb(arc4)").
+       "salsa20" or "ctr(aes)").
 
        The journal contains history of last writes to the block device,
        an attacker reading the journal could see the last sector nubmers
index 4872fb6d29524593849fbe68491e372d0901dfc3..ec62fcc8eeceed83a1cfd3020ff87595affc6ad0 100644 (file)
@@ -8,6 +8,7 @@ Device Mapper
     cache-policies
     cache
     delay
+    dm-clone
     dm-crypt
     dm-dust
     dm-flakey
index 8a1e38a1d7ab196debe1feb614109598a35928f0..cffe8bb0bad106b35586956649dab8476e2fa5a8 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner platforms device tree bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   $nodename:
diff --git a/Documentation/devicetree/bindings/arm/ux500.yaml b/Documentation/devicetree/bindings/arm/ux500.yaml
new file mode 100644 (file)
index 0000000..accaee9
--- /dev/null
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/ux500.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ux500 platforms device tree bindings
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+
+      - description: ST-Ericsson HREF (pre-v60)
+        items:
+          - const: st-ericsson,mop500
+          - const: st-ericsson,u8500
+
+      - description: ST-Ericsson HREF (v60+)
+        items:
+          - const: st-ericsson,hrefv60+
+          - const: st-ericsson,u8500
+
+      - description: Calao Systems Snowball
+        items:
+          - const: calaosystems,snowball-a9500
+          - const: st-ericsson,u9500
+
+      - description: Samsung Galaxy S III mini (GT-I8190)
+        items:
+          - const: samsung,golden
+          - const: st-ericsson,u8500
index d2a872286437e4c65c12f94f506283aed588bd4b..f0b3d30fbb76f7401b3f41b2d583b05de58fe278 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A64 Display Engine Bus Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   $nodename:
index be32f087c529303e02db711f4d88a5f44f33be6d..9fe11ceecdba004c5546f30711be002eaca64694 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A23 RSB Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#address-cells":
index 64938fdaea554973d960bd1c3b4f01e130747167..4d382128b711c8cace6414831a0a6ff07238a77e 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner Clock Control Unit Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#clock-cells":
index 80b3e7350a732b8e2fbe4ab39a9a99f7b539bc28..33c7842917f629c8176df1f94ad52e4fc629a271 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Security System Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index dafc0980c4fa7a241722430c6df62f4f331d1601..0f7074977c04d836a329e147847ceda0d5c46249 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A31 MIPI-DSI Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#address-cells": true
index 0e7987f1cdb799ad01257b445b25f21876ffe65f..d67617f6f74ab10eabd05a1830e9ac448c113f69 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Ronbo RB070D30 DSI Display Panel
 
 maintainers:
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 15abc0f9429fcd8b813d620d8e8a0f115b70a6de..83808199657b731544c5fd0059b9f6639bcdf92b 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 DMA Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: "dma-controller.yaml#"
index 387d599522c708eaef3a201f8afbf7382c88aab2..9e53472be1947d0dcf4aa0fc26ab32f6b6c8031f 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A64 DMA Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: "dma-controller.yaml#"
index 740b7f9b535b29267d834e35181d9782f24b5280..c1676b96daac7e13d370c7c1f32a71f4ea7df3cb 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A31 DMA Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: "dma-controller.yaml#"
index 9346ef6ba61b681e0dd303d58ade4a252a3594cb..6097e8ac46c1f5a9cfdfdb503b92380f28e2cf46 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A31 P2WI (Push/Pull 2 Wires Interface) Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: /schemas/i2c/i2c-controller.yaml#
index b68be3aaf587c94401783878d9a21fc809ef7c3b..e1f6d64bdccd188497b33b67ab744293810bfab0 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
 $id: http://devicetree.org/schemas/iio/adc/adi,ad7292.yaml#
@@ -53,7 +53,8 @@ patternProperties:
         description: |
           The channel number. It can have up to 8 channels numbered from 0 to 7.
         items:
-          maximum: 7
+          - minimum: 0
+            maximum: 7
 
       diff-channels:
         description: see Documentation/devicetree/bindings/iio/adc/adc.txt
index d74962c0f5ae367a8a023a24277b356f5e9b317e..15c514b83583b81cce8ac27bda28d5be6b65bab9 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A33 Thermal Sensor Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#io-channel-cells":
index b3bd8ef7fbd6101bc110fbd5cc101e9e865d8465..5b3b71c9c0183ccfe8eb00649de1d4ad7e5fdaf4 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 LRADC Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 23a202d24e437bc8c0c098c28a22e5f55d37ba06..953d875b5e74aab183787caf6aec267b9a9e7322 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Interrupt Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: /schemas/interrupt-controller.yaml#
index 8cd08cfb25bef7e1b1388e898bb51f97e8469086..cf09055da78b2c95a3548860e2bd04d179e33570 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A20 Non-Maskable Interrupt Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: /schemas/interrupt-controller.yaml#
index d3e423fcb6c2ee643529f67527eda8ba88c3d32c..0f6374ceaa697164fe55f58185ec0eeb99c0cc36 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 description: |-
   The Allwinner A10 and later has a CMOS Sensor Interface to retrieve
index dea36d68cdbedf312ee80ea5d7e5a50e1bb3f427..7838804700d66a2bfa7661280bd96ce65b7308fd 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Infrared Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: "rc.yaml#"
index 30d9fb193d7fce7a6d550a165b4842a24783a891..22a94b6fdbdee478366360a412dbc54ced745071 100644 (file)
@@ -60,7 +60,8 @@ patternProperties:
             maximum: 1066000000
 
           nvidia,emem-configuration:
-            $ref: /schemas/types.yaml#/definitions/uint32-array
+            allOf:
+              - $ref: /schemas/types.yaml#/definitions/uint32-array
             description: |
               Values to be written to the EMEM register block. See section
               "15.6.1 MC Registers" in the TRM.
index 7fe0ca14e324f3afe603dba11c704dc961590383..e4135bac6957344b36aa42664d6c723448b66aa8 100644 (file)
@@ -56,7 +56,8 @@ patternProperties:
             maximum: 900000000
 
           nvidia,emc-auto-cal-interval:
-            $ref: /schemas/types.yaml#/definitions/uint32
+            allOf:
+              - $ref: /schemas/types.yaml#/definitions/uint32
             description:
               Pad calibration interval in microseconds.
             minimum: 0
@@ -78,7 +79,8 @@ patternProperties:
               Mode Register 0.
 
           nvidia,emc-zcal-cnt-long:
-            $ref: /schemas/types.yaml#/definitions/uint32
+            allOf:
+              - $ref: /schemas/types.yaml#/definitions/uint32
             description:
               Number of EMC clocks to wait before issuing any commands after
               sending ZCAL_MRW_CMD.
@@ -96,7 +98,8 @@ patternProperties:
               FBIO "read" FIFO periodic resetting enabled.
 
           nvidia,emc-configuration:
-            $ref: /schemas/types.yaml#/definitions/uint32-array
+            allOf:
+              - $ref: /schemas/types.yaml#/definitions/uint32-array
             description:
               EMC timing characterization data. These are the registers
               (see section "18.13.2 EMC Registers" in the TRM) whose values
index 84fd57bcf0dcd723e73f8182f718f23c717b8804..4b9196c832915f08adde760272762b7a83f73dbc 100644 (file)
@@ -77,7 +77,8 @@ patternProperties:
             maximum: 900000000
 
           nvidia,emem-configuration:
-            $ref: /schemas/types.yaml#/definitions/uint32-array
+            allOf:
+              - $ref: /schemas/types.yaml#/definitions/uint32-array
             description: |
               Values to be written to the EMEM register block. See section
               "18.13.1 MC Registers" in the TRM.
index 4b1a09acb98b7e59c61437221d95e2e2fff3c4d1..39afacc447b208f149d8b0ef9cb2ab981be633e2 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Resistive Touchscreen Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#thermal-sensor-cells":
index 64bca41031d513d2e766fff40ded84961239d82b..e82c9a07b6fb020f773984b3b50754af2d6f2780 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#address-cells": true
index b5b3cf5b1ac236770c0a741c934f6edea65dee00..5d3fa412aabd3f91b12463af68990517e3466df5 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#address-cells": true
index ae4796ec50a0a6612bfc26e70b898d1237713971..8d8560a67abf2750787afa144c06c2e43b702a62 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index e5562c525ed94baecc2ef24f7b313b01fb1e8a76..767193ec1d3285ec0ebe71a505c543c92c876de9 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 MDIO Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: "mdio.yaml#"
index f683b7104e3eb424092324a4ea5783b1b59a15c9..703d0d8868846dde2ce14a0fafef6acd264bce28 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 11654d4b80fb7616c73c81660dec001729b9806f..db36b4d8648449927a419961e7308c2151582a76 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A83t EMAC Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 770af7c46114024880da0f5d0e137296b7546b69..a95960ee3feba1077ae7ed0aa6c4d43c8d6e5467 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 CAN Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 19e4a7d9151137fa947c6b1c3ace2b9c11dbf847..85c6551b602a6bb5023f01aa6cba9ce677258f05 100644 (file)
@@ -7,6 +7,7 @@ Required properties:
              "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC.
              "renesas,can-r8a77470" if CAN controller is a part of R8A77470 SoC.
              "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC.
+             "renesas,can-r8a774b1" if CAN controller is a part of R8A774B1 SoC.
              "renesas,can-r8a774c0" if CAN controller is a part of R8A774C0 SoC.
              "renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
              "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
@@ -36,8 +37,8 @@ Required properties:
 - pinctrl-0: pin control group to be used for this controller.
 - pinctrl-names: must be "default".
 
-Required properties for R8A774A1, R8A774C0, R8A7795, R8A7796, R8A77965,
-R8A77990, and R8A77995:
+Required properties for R8A774A1, R8A774B1, R8A774C0, R8A7795, R8A7796,
+R8A77965, R8A77990, and R8A77995:
 For the denoted SoCs, "clkp2" can be CANFD clock. This is a div6 clock and can
 be used by both CAN and CAN FD controller at the same time. It needs to be
 scaled to maximum frequency if any of these controllers use it. This is done
index a901cd9be29e9025ac43f609c8b2026607c87ad6..13a4e34c0c73aebde04f436892a38f3ff1693057 100644 (file)
@@ -5,6 +5,7 @@ Required properties:
 - compatible: Must contain one or more of the following:
   - "renesas,rcar-gen3-canfd" for R-Car Gen3 and RZ/G2 compatible controllers.
   - "renesas,r8a774a1-canfd" for R8A774A1 (RZ/G2M) compatible controller.
+  - "renesas,r8a774b1-canfd" for R8A774B1 (RZ/G2N) compatible controller.
   - "renesas,r8a774c0-canfd" for R8A774C0 (RZ/G2E) compatible controller.
   - "renesas,r8a7795-canfd" for R8A7795 (R-Car H3) compatible controller.
   - "renesas,r8a7796-canfd" for R8A7796 (R-Car M3-W) compatible controller.
@@ -31,8 +32,8 @@ The name of the child nodes are "channel0" and "channel1" respectively. Each
 child node supports the "status" property only, which is used to
 enable/disable the respective channel.
 
-Required properties for R8A774A1, R8A774C0, R8A7795, R8A7796, R8A77965,
-R8A77990, and R8A77995:
+Required properties for R8A774A1, R8A774B1, R8A774C0, R8A7795, R8A7796,
+R8A77965, R8A77990, and R8A77995:
 In the denoted SoCs, canfd clock is a div6 clock and can be used by both CAN
 and CAN FD controller at the same time. It needs to be scaled to maximum
 frequency if any of these controllers use it. This is done using the below
index 81ae8cafabc1444b584d8cfc393b433287fbe2ff..ac8c76369a867b55e37a01fa51446e611889c13f 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
 $id: http://devicetree.org/schemas/net/ti,cpsw-switch.yaml#
@@ -44,7 +44,6 @@ properties:
     description: CPSW functional clock
 
   clock-names:
-    maxItems: 1
     items:
       - const: fck
 
@@ -70,7 +69,6 @@ properties:
       Phandle to the system control device node which provides access to
       efuse IO range with MAC addresses
 
-
   ethernet-ports:
     type: object
     properties:
@@ -82,8 +80,6 @@ properties:
     patternProperties:
       "^port@[0-9]+$":
           type: object
-          minItems: 1
-          maxItems: 2
           description: CPSW external ports
 
           allOf:
@@ -91,23 +87,20 @@ properties:
 
           properties:
             reg:
-              maxItems: 1
-              enum: [1, 2]
+              items:
+                - enum: [1, 2]
               description: CPSW port number
 
             phys:
-              $ref: /schemas/types.yaml#definitions/phandle-array
               maxItems: 1
               description:  phandle on phy-gmii-sel PHY
 
             label:
-              $ref: /schemas/types.yaml#/definitions/string-array
-              maxItems: 1
               description: label associated with this port
 
             ti,dual-emac-pvid:
-              $ref: /schemas/types.yaml#/definitions/uint32
-              maxItems: 1
+              allOf:
+                - $ref: /schemas/types.yaml#/definitions/uint32
               minimum: 1
               maximum: 1024
               description:
@@ -136,7 +129,6 @@ properties:
         description: CPTS reference clock
 
       clock-names:
-        maxItems: 1
         items:
           - const: cpts
 
@@ -201,7 +193,7 @@ examples:
                         phys = <&phy_gmii_sel 1>;
                         phy-handle = <&ethphy0_sw>;
                         phy-mode = "rgmii";
-                        ti,dual_emac_pvid = <1>;
+                        ti,dual-emac-pvid = <1>;
                 };
 
                 cpsw_port2: port@2 {
@@ -211,7 +203,7 @@ examples:
                         phys = <&phy_gmii_sel 2>;
                         phy-handle = <&ethphy1_sw>;
                         phy-mode = "rgmii";
-                        ti,dual_emac_pvid = <2>;
+                        ti,dual-emac-pvid = <2>;
                 };
         };
 
index 659b02002a35c24148cad4dbdf12e43627a19143..daf1321d76ad8356bd7f636ad4c101e39a102549 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Security ID Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 allOf:
   - $ref: "nvmem.yaml#"
index fa46670de2992dd1bde4809e397a905e8f77e72f..230d74f22136c6cee6d6170627e6e982858a3e50 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A31 MIPI D-PHY Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#phy-cells":
diff --git a/Documentation/devicetree/bindings/phy/marvell,mmp3-hsic-phy.yaml b/Documentation/devicetree/bindings/phy/marvell,mmp3-hsic-phy.yaml
new file mode 100644 (file)
index 0000000..7917a95
--- /dev/null
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright 2019 Lubomir Rintel <lkundrak@v3.sk>
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/marvell,mmp3-hsic-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Marvell MMP3 HSIC PHY
+
+maintainers:
+  - Lubomir Rintel <lkundrak@v3.sk>
+
+properties:
+  compatible:
+    const: marvell,mmp3-hsic-phy
+
+  reg:
+    maxItems: 1
+    description: base address of the device
+
+  reset-gpios:
+    maxItems: 1
+    description: GPIO connected to reset
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - reset-gpios
+  - "#phy-cells"
+
+examples:
+  - |
+    hsic-phy@f0001800 {
+            compatible = "marvell,mmp3-hsic-phy";
+            reg = <0xf0001800 0x40>;
+            reset-gpios = <&gpio 63 GPIO_ACTIVE_HIGH>;
+            #phy-cells = <0>;
+    };
index cd0503b6fe36fff23f47ab53c03da3b8ab534257..bfefd09d8c1e43ab3abba75930decf004b7a95af 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Pin Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#gpio-cells":
index 0ac52f83a58cce4f222f20a266fc2d4528416284..4a21fe77ee1d34e650183704b671b74de222e23c 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 PWM Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#pwm-cells":
index acf18d170352d242812d43338974a92ff85d7c93..c0d83865e933a2cbe896c5ae847ee7640cbc5637 100644 (file)
@@ -50,6 +50,8 @@ properties:
     description: Should contain the WWDG1 watchdog reset interrupt
     maxItems: 1
 
+  wakeup-source: true
+
   mboxes:
     description:
       This property is required only if the rpmsg/virtio functionality is used.
index 46d69c32b89b89506f28a3a73dc1803fa9490a21..478b0234e8fa97416db572c50ce58fed4c5b88c7 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index d7a57ec4a6400bec0f0107fb1aeba516a1175bb1..37c2a601c3fa8ab075cbc2a7817876386a0600f3 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A31 RTC Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#clock-cells":
index ee9712f1c97d44b23bd2cf61b0cbe0c60f7b85fe..2ecab8ed702a20abfa5d1e44b89e267852df1c06 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 PS2 Host Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 description:
   A20 PS2 is dual role controller (PS2 host and PS2 device). These
index b8f89c7258ebc853a1c416a75c8dc08f634aa8aa..ea1d2efb2aaa36d79790132db1ad6a170a55220e 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Codec Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#sound-dai-cells":
index eb3992138eecce3cf0283754b9c47a9ab6f8f4ee..112ae00d63c1d6576583b1542705b6a8a7ef500b 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 I2S Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#sound-dai-cells":
index 38d4cede0860dd5aed5402e4cdb34dff5f39a677..444a432912bb4ec7970a2a61e26e33b2b09fac24 100644 (file)
@@ -10,7 +10,7 @@ maintainers:
   - Chen-Yu Tsai <wens@csie.org>
   - Liam Girdwood <lgirdwood@gmail.com>
   - Mark Brown <broonie@kernel.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#sound-dai-cells":
index f290eb72a8781e7b0f2138ac74271cd087583716..3b764415c9abf7a696c7f965cbb36abfac4264d0 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A64 Analog Codec Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 85305b4c2729b74759d319eef9ac5d9cb88234e7..9718358826abdaebd02260385519c7a5b7d34898 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A23 Analog Codec Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 5e7cc05bbff1dc5f3705b58930f3674f89e67e15..55d28268d2f4ff5c0860b02609185311b42b90ce 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A33 Codec Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#sound-dai-cells":
index 6d1329c281707fbefe0aa403b860c6105d5a4a71..8036499112f5a858e00f8edf0fa425eacf7db76f 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#address-cells": true
index f36c46d236d7a6afdf82ee2a7af704ecbf68e1a6..0565dc49e44940dc6326f2ee2c1672542df653d2 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   "#address-cells": true
index 20adc1c8e9cccb33a94f385966c02df961f0fa59..23e989e0976630382d70ab5ddaeeb3b4c3542b61 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 Timer Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index dfa0c41fd261d166b95af163f195f45358798bc8..40fc4bcb31457db7374f4266839894469cd2366f 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A13 High-Speed Timer Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 9dff7e5cae6aab56d5770fbc341fc34ffc559c75..29159f4e65abece983db90f82f128ba330a806d8 100644 (file)
@@ -11,6 +11,7 @@ Required Properties:
   - compatible: must contain one or more of the following:
     - "renesas,tmu-r8a7740" for the r8a7740 TMU
     - "renesas,tmu-r8a774a1" for the r8a774A1 TMU
+    - "renesas,tmu-r8a774b1" for the r8a774B1 TMU
     - "renesas,tmu-r8a774c0" for the r8a774C0 TMU
     - "renesas,tmu-r8a7778" for the r8a7778 TMU
     - "renesas,tmu-r8a7779" for the r8a7779 TMU
index 0af70fc8de5a764003f08e6cf940f52d4d84c86b..d9207bf9d8946e4ee9c799f1adc92ec5906d0359 100644 (file)
@@ -8,7 +8,7 @@ title: Allwinner A10 mUSB OTG Controller Device Tree Bindings
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index 3a54f58683a0ed01292c43b2554f63d295461a5d..e8f226376108178037de849d474715ce2d6d678c 100644 (file)
@@ -11,7 +11,7 @@ allOf:
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
-  - Maxime Ripard <maxime.ripard@bootlin.com>
+  - Maxime Ripard <mripard@kernel.org>
 
 properties:
   compatible:
index b0c085326e2e68f4ead9063af48beeda0b48dcf9..db6d39c3ae715ee90b876c4660346581f3b67171 100644 (file)
@@ -24,11 +24,11 @@ Here is the main features of EROFS:
  - Metadata & data could be mixed by design;
 
  - 2 inode versions for different requirements:
-                          v1            v2
+                          compact (v1)  extended (v2)
    Inode metadata size:   32 bytes      64 bytes
    Max file size:         4 GB          16 EB (also limited by max. vol size)
    Max uids/gids:         65536         4294967296
-   File creation time:    no            yes (64 + 32-bit timestamp)
+   File change time:      no            yes (64 + 32-bit timestamp)
    Max hardlinks:         65536         4294967296
    Metadata reserved:     4 bytes       14 bytes
 
@@ -39,7 +39,7 @@ Here is the main features of EROFS:
  - Support POSIX.1e ACLs by using xattrs;
 
  - Support transparent file compression as an option:
-   LZ4 algorithm with 4 KB fixed-output compression for high performance;
+   LZ4 algorithm with 4 KB fixed-sized output compression for high performance.
 
 The following git tree provides the file system user-space tools under
 development (ex, formatting tool mkfs.erofs):
@@ -85,7 +85,7 @@ All data areas should be aligned with the block size, but metadata areas
 may not. All metadatas can be now observed in two different spaces (views):
  1. Inode metadata space
     Each valid inode should be aligned with an inode slot, which is a fixed
-    value (32 bytes) and designed to be kept in line with v1 inode size.
+    value (32 bytes) and designed to be kept in line with compact inode size.
 
     Each inode can be directly found with the following formula:
          inode offset = meta_blkaddr * block_size + 32 * nid
@@ -117,10 +117,10 @@ may not. All metadatas can be now observed in two different spaces (views):
                                                        |-> aligned with 4B
 
     Inode could be 32 or 64 bytes, which can be distinguished from a common
-    field which all inode versions have -- i_advise:
+    field which all inode versions have -- i_format:
 
         __________________               __________________
-       |     i_advise     |             |     i_advise     |
+       |     i_format     |             |     i_format     |
        |__________________|             |__________________|
        |        ...       |             |        ...       |
        |                  |             |                  |
@@ -129,12 +129,13 @@ may not. All metadatas can be now observed in two different spaces (views):
                                         |__________________| 64 bytes
 
     Xattrs, extents, data inline are followed by the corresponding inode with
-    proper alignes, and they could be optional for different data mappings,
-    _currently_ there are totally 3 valid data mappings supported:
+    proper alignment, and they could be optional for different data mappings.
+    _currently_ total 4 valid data mappings are supported:
 
-     1) flat file data without data inline (no extent);
-     2) fixed-output size data compression (must have extents);
-     3) flat file data with tail-end data inline (no extent);
+     0  flat file data without data inline (no extent);
+     1  fixed-sized output data compression (with non-compacted indexes);
+     2  flat file data with tail packing data inline (no extent);
+     3  fixed-sized output data compression (with compacted indexes, v5.3+).
 
     The size of the optional xattrs is indicated by i_xattr_count in inode
     header. Large xattrs or xattrs shared by many different files can be
@@ -182,8 +183,8 @@ introduce another on-disk field at all.
 
 Compression
 -----------
-Currently, EROFS supports 4KB fixed-output clustersize transparent file
-compression, as illustrated below:
+Currently, EROFS supports 4KB fixed-sized output transparent file compression,
+as illustrated below:
 
          |---- Variant-Length Extent ----|-------- VLE --------|----- VLE -----
          clusterofs                      clusterofs            clusterofs
similarity index 99%
rename from Documentation/filesystems/overlayfs.txt
rename to Documentation/filesystems/overlayfs.rst
index 845d689e0fd711672416669e501f68757e498a8f..e443be7928db2b674ad4272d6d4adf74bacd356f 100644 (file)
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 Written by: Neil Brown
 Please see MAINTAINERS file for where to send questions.
 
@@ -181,7 +183,7 @@ Kernel config options:
     worried about backward compatibility with kernels that have the redirect_dir
     feature and follow redirects even if turned off.
 
-Module options (can also be changed through /sys/module/overlay/parameters/*):
+Module options (can also be changed through /sys/module/overlay/parameters/):
 
 - "redirect_dir=BOOL":
     See OVERLAY_FS_REDIRECT_DIR kernel config option above.
@@ -263,7 +265,7 @@ top, lower2 the middle and lower3 the bottom layer.
 
 
 Metadata only copy up
---------------------
+---------------------
 
 When metadata only copy up feature is enabled, overlayfs will only copy
 up metadata (as opposed to whole file), when a metadata specific operation
@@ -286,10 +288,10 @@ pointed by REDIRECT. This should not be possible on local system as setting
 "trusted." xattrs will require CAP_SYS_ADMIN. But it should be possible
 for untrusted layers like from a pen drive.
 
-Note: redirect_dir={off|nofollow|follow(*)} conflicts with metacopy=on, and
+Note: redirect_dir={off|nofollow|follow[*]} conflicts with metacopy=on, and
 results in an error.
 
-(*) redirect_dir=follow only conflicts with metacopy=on if upperdir=... is
+[*] redirect_dir=follow only conflicts with metacopy=on if upperdir=... is
 given.
 
 Sharing and copying layers
index ada573b7d703bca0b0ab725e2714f84f6dd2bd1f..edb296c52f61e4b6c1b7b67a30302260ffcb015c 100644 (file)
@@ -988,7 +988,7 @@ Similarly, if you need to calculate the size of some structure member, use
 
 .. code-block:: c
 
-       #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+       #define sizeof_field(t, f) (sizeof(((t*)0)->f))
 
 There are also min() and max() macros that do strict type checking if you
 need them.  Feel free to peruse that header file to see what else is already
index 201f80c7c0506e5e5772006b9f874d4081920d6f..df129f55ace5e768740312b0b60b903b76872ab6 100644 (file)
@@ -29,7 +29,7 @@ smartpqi specific entries in /sys
   smartpqi host attributes:
   -------------------------
   /sys/class/scsi_host/host*/rescan
-  /sys/class/scsi_host/host*/version
+  /sys/class/scsi_host/host*/driver_version
 
   The host rescan attribute is a write only attribute. Writing to this
   attribute will trigger the driver to scan for new, changed, or removed
index 8995d2d19f202e65d37d960705991c314a5bfcaa..8725f2b9e96032d37ac6a3c379ce254fd652e5d8 100644 (file)
@@ -1005,7 +1005,7 @@ struttura, usate
 
 .. code-block:: c
 
-       #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+       #define sizeof_field(t, f) (sizeof(((t*)0)->f))
 
 Ci sono anche le macro min() e max() che, se vi serve, effettuano un controllo
 rigido sui tipi.  Sentitevi liberi di leggere attentamente questo file
index 4f6237392e65ad33b393a337d4d898314c600290..eae10bc7f86f2a096f970e6464087c7f31b9aea8 100644 (file)
@@ -826,7 +826,7 @@ inline gcc 也可以自动使其内联。而且其他用户可能会要求移除
 
 .. code-block:: c
 
-       #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+       #define sizeof_field(t, f) (sizeof(((t*)0)->f))
 
 还有可以做严格的类型检查的 min() 和 max() 宏,如果你需要可以使用它们。你可以
 自己看看那个头文件里还定义了什么你可以拿来用的东西,如果有定义的话,你就不应
index bd5847e802defb11887f45dd17412e1e98d054e8..b8403e2d2ef26f55d4e414553e7bcc8fe1eb4cd0 100644 (file)
@@ -2058,6 +2058,7 @@ F:        drivers/rtc/rtc-pl031.c
 F:     drivers/watchdog/coh901327_wdt.c
 F:     Documentation/devicetree/bindings/arm/ste-*
 F:     Documentation/devicetree/bindings/arm/ux500/
+F:     Documentation/devicetree/bindings/arm/ux500.yaml
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
 
 ARM/NUVOTON NPCM ARCHITECTURE
@@ -4970,6 +4971,7 @@ F:        include/linux/dma-buf*
 F:     include/linux/reservation.h
 F:     include/linux/*fence.h
 F:     Documentation/driver-api/dma-buf.rst
+K:     dma_(buf|fence|resv)
 T:     git git://anongit.freedesktop.org/drm/drm-misc
 
 DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
@@ -12393,7 +12395,7 @@ L:      linux-unionfs@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git
 S:     Supported
 F:     fs/overlayfs/
-F:     Documentation/filesystems/overlayfs.txt
+F:     Documentation/filesystems/overlayfs.rst
 
 P54 WIRELESS DRIVER
 M:     Christian Lamparter <chunkeey@googlemail.com>
@@ -16314,12 +16316,10 @@ F:    drivers/media/radio/radio-raremono.c
 
 THERMAL
 M:     Zhang Rui <rui.zhang@intel.com>
-M:     Eduardo Valentin <edubezval@gmail.com>
-R:     Daniel Lezcano <daniel.lezcano@linaro.org>
+M:     Daniel Lezcano <daniel.lezcano@linaro.org>
 R:     Amit Kucheria <amit.kucheria@verdurent.com>
 L:     linux-pm@vger.kernel.org
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git
 Q:     https://patchwork.kernel.org/project/linux-pm/list/
 S:     Supported
 F:     drivers/thermal/
index 73e3c280292770ccd4b5bb1be95c2fca391bfba8..f900c23b82914f9ff8717550a4687716f4241d8a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 VERSION = 5
 PATCHLEVEL = 5
 SUBLEVEL = 0
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 NAME = Kleptomaniac Octopus
 
 # *DOCUMENTATION*
index dc05a63516f5b5a3c695578cd864b2f3886910ba..27ea64b1fa3321c3d86f2c25b419e1fd1882b269 100644 (file)
@@ -42,10 +42,10 @@ do {                                                \
 
 #define EXTRA_INFO(f) { \
                BUILD_BUG_ON_ZERO(offsetof(struct unwind_frame_info, f) \
-                               % FIELD_SIZEOF(struct unwind_frame_info, f)) \
+                               % sizeof_field(struct unwind_frame_info, f)) \
                                + offsetof(struct unwind_frame_info, f) \
-                               / FIELD_SIZEOF(struct unwind_frame_info, f), \
-                               FIELD_SIZEOF(struct unwind_frame_info, f) \
+                               / sizeof_field(struct unwind_frame_info, f), \
+                               sizeof_field(struct unwind_frame_info, f) \
        }
 #define PTREGS_INFO(f) EXTRA_INFO(regs.f)
 
index 08011dc8c7a692eea80027c4fbe21127d50608f3..59d13d643094dc28a81bdd2282016d575fd17a7d 100644 (file)
@@ -1182,7 +1182,9 @@ dtb-$(CONFIG_ARCH_U8500) += \
        ste-hrefprev60-stuib.dtb \
        ste-hrefprev60-tvk.dtb \
        ste-hrefv60plus-stuib.dtb \
-       ste-hrefv60plus-tvk.dtb
+       ste-hrefv60plus-tvk.dtb \
+       ste-href520-tvk.dtb \
+       ste-ux500-samsung-golden.dtb
 dtb-$(CONFIG_ARCH_UNIPHIER) += \
        uniphier-ld4-ref.dtb \
        uniphier-ld6b-ref.dtb \
index 6f0a6be9309818b966697219b4b97460bd143514..68252dab32c3e93f89959fb480c260f5705881fc 100644 (file)
                };
        };
 
-       backlight {
+       backlight: backlight {
                compatible = "pwm-backlight";
                pwms = <&ecap0 0 50000 0>;
                brightness-levels = <0 51 53 56 62 75 101 152 255>;
        };
 
        panel {
-               compatible = "ti,tilcdc,panel";
-               status = "okay";
+               compatible = "tfc,s9700rtwv43tr-01b";
+
                pinctrl-names = "default";
                pinctrl-0 = <&lcd_pins_s0>;
-               panel-info {
-                       ac-bias           = <255>;
-                       ac-bias-intrpt    = <0>;
-                       dma-burst-sz      = <16>;
-                       bpp               = <32>;
-                       fdd               = <0x80>;
-                       sync-edge         = <0>;
-                       sync-ctrl         = <1>;
-                       raster-order      = <0>;
-                       fifo-th           = <0>;
-               };
+               backlight = <&backlight>;
 
-               display-timings {
-                       800x480p62 {
-                               clock-frequency = <30000000>;
-                               hactive = <800>;
-                               vactive = <480>;
-                               hfront-porch = <39>;
-                               hback-porch = <39>;
-                               hsync-len = <47>;
-                               vback-porch = <29>;
-                               vfront-porch = <13>;
-                               vsync-len = <2>;
-                               hsync-active = <1>;
-                               vsync-active = <1>;
+               port {
+                       panel_0: endpoint@0 {
+                               remote-endpoint = <&lcdc_0>;
                        };
                };
        };
        status = "okay";
 
        blue-and-red-wiring = "crossed";
+
+       port {
+               lcdc_0: endpoint@0 {
+                       remote-endpoint = <&panel_0>;
+               };
+       };
 };
 
 &elm {
index a97f9df460c1c6207e409182ac7a442d64720743..32f515a295eeca19b157374391e9c3e41ba534b4 100644 (file)
        };
 
        panel {
-               compatible = "ti,tilcdc,panel";
+               compatible = "newhaven,nhd-4.3-480272ef-atxl";
+
                pinctrl-names = "default", "sleep";
                pinctrl-0 = <&lcd_pins_default>;
                pinctrl-1 = <&lcd_pins_sleep>;
                backlight = <&lcd_bl>;
-               status = "okay";
-               panel-info {
-                       ac-bias         = <255>;
-                       ac-bias-intrpt  = <0>;
-                       dma-burst-sz    = <16>;
-                       bpp             = <32>;
-                       fdd             = <0x80>;
-                       sync-edge       = <0>;
-                       sync-ctrl       = <1>;
-                       raster-order    = <0>;
-                       fifo-th         = <0>;
-               };
-               display-timings {
-                       480x272 {
-                               hactive         = <480>;
-                               vactive         = <272>;
-                               hback-porch     = <43>;
-                               hfront-porch    = <8>;
-                               hsync-len       = <4>;
-                               vback-porch     = <12>;
-                               vfront-porch    = <4>;
-                               vsync-len       = <10>;
-                               clock-frequency = <9000000>;
-                               hsync-active    = <0>;
-                               vsync-active    = <0>;
+
+               port {
+                       panel_0: endpoint@0 {
+                               remote-endpoint = <&lcdc_0>;
                        };
                };
        };
        status = "okay";
 
        blue-and-red-wiring = "crossed";
+
+       port {
+               lcdc_0: endpoint@0 {
+                       remote-endpoint = <&panel_0>;
+               };
+       };
 };
 
 &rtc {
index 204bccfcc110ab24c484941744893e3b563422db..021eb57261feb1ca6ce403ce0e78085f5704d510 100644 (file)
                gpio-controller;
                #gpio-cells = <2>;
        };
+
+       /* osd9616p0899-10 */
+       display@3c {
+               compatible = "solomon,ssd1306fb-i2c";
+               reg = <0x3c>;
+               solomon,height = <16>;
+               solomon,width = <96>;
+               solomon,com-seq;
+               solomon,com-invdir;
+               solomon,page-offset = <0>;
+               solomon,prechargep1 = <2>;
+               solomon,prechargep2 = <13>;
+       };
 };
 
 &spi0 {
index 8678e6e35493fc7b6548942ed643feec16a51407..e5fdb7abb0d54a47eceb026009d1ef1173de7e7f 100644 (file)
 
 &cpsw_emac0 {
        phy-handle = <&ethphy0>;
-       phy-mode = "rgmii-txid";
+       phy-mode = "rgmii-id";
 };
 
 &i2c0 {
index 3a8a205c27b58ff228e41ef4166831b8afe0d2f6..4e2986f0c604644f8ed54d064993ecea8ce32df9 100644 (file)
 
                target-module@d000 {                    /* 0x44e0d000, ap 20 38.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "adc_tsc";
                        reg = <0xd000 0x4>,
                              <0xd010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@30000 {                   /* 0x48030000, ap 77 08.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spi0";
                        reg = <0x30000 0x4>,
                              <0x30110 0x4>,
                              <0x30114 0x4>;
 
                target-module@42000 {                   /* 0x48042000, ap 24 1c.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer3";
                        reg = <0x42000 0x4>,
                              <0x42010 0x4>,
                              <0x42014 0x4>;
 
                target-module@44000 {                   /* 0x48044000, ap 26 26.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer4";
                        reg = <0x44000 0x4>,
                              <0x44010 0x4>,
                              <0x44014 0x4>;
 
                target-module@46000 {                   /* 0x48046000, ap 28 28.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer5";
                        reg = <0x46000 0x4>,
                              <0x46010 0x4>,
                              <0x46014 0x4>;
 
                target-module@48000 {                   /* 0x48048000, ap 30 22.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer6";
                        reg = <0x48000 0x4>,
                              <0x48010 0x4>,
                              <0x48014 0x4>;
 
                target-module@4a000 {                   /* 0x4804a000, ap 85 60.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer7";
                        reg = <0x4a000 0x4>,
                              <0x4a010 0x4>,
                              <0x4a014 0x4>;
 
                target-module@80000 {                   /* 0x48080000, ap 38 18.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "elm";
                        reg = <0x80000 0x4>,
                              <0x80010 0x4>,
                              <0x80014 0x4>;
 
                target-module@ca000 {                   /* 0x480ca000, ap 91 40.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spinlock";
                        reg = <0xca000 0x4>,
                              <0xca010 0x4>,
                              <0xca014 0x4>;
 
                target-module@a0000 {                   /* 0x481a0000, ap 79 24.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spi1";
                        reg = <0xa0000 0x4>,
                              <0xa0110 0x4>,
                              <0xa0114 0x4>;
                        compatible = "ti,sysc-omap4", "ti,sysc";
                        reg = <0xcc020 0x4>;
                        reg-names = "rev";
-                       ti,hwmods = "d_can0";
                        /* Domains (P, C): per_pwrdm, l4ls_clkdm */
                        clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN0_CLKCTRL 0>,
                                 <&dcan0_fck>;
                        compatible = "ti,sysc-omap4", "ti,sysc";
                        reg = <0xd0020 0x4>;
                        reg-names = "rev";
-                       ti,hwmods = "d_can1";
                        /* Domains (P, C): per_pwrdm, l4ls_clkdm */
                        clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN1_CLKCTRL 0>,
                                 <&dcan1_fck>;
 
                target-module@0 {                       /* 0x48300000, ap 66 48.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss0";
                        reg = <0x0 0x4>,
                              <0x4 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@2000 {                    /* 0x48302000, ap 68 52.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss1";
                        reg = <0x2000 0x4>,
                              <0x2004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@4000 {                    /* 0x48304000, ap 70 44.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss2";
                        reg = <0x4000 0x4>,
                              <0x4004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@e000 {                    /* 0x4830e000, ap 72 4a.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "lcdc";
                        reg = <0xe000 0x4>,
                              <0xe054 0x4>;
                        reg-names = "rev", "sysc";
index 646f11430dadbc2c3d70e853e4566686035ac607..e403fb765e707f4a049d9fa762dd7a9decf823b0 100644 (file)
                        status = "disabled";
                };
 
-               sham: sham@53100000 {
-                       compatible = "ti,omap4-sham";
-                       ti,hwmods = "sham";
-                       reg = <0x53100000 0x200>;
-                       interrupts = <109>;
-                       dmas = <&edma 36 0>;
-                       dma-names = "rx";
+               sham_target: target-module@53100000 {
+                       compatible = "ti,sysc-omap3-sham", "ti,sysc";
+                       reg = <0x53100100 0x4>,
+                             <0x53100110 0x4>,
+                             <0x53100114 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): per_pwrdm, l3_clkdm */
+                       clocks = <&l3_clkctrl AM3_L3_SHAM_CLKCTRL 0>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x53100000 0x1000>;
+
+                       sham: sham@0 {
+                               compatible = "ti,omap4-sham";
+                               reg = <0 0x200>;
+                               interrupts = <109>;
+                               dmas = <&edma 36 0>;
+                               dma-names = "rx";
+                       };
                };
 
-               aes: aes@53500000 {
-                       compatible = "ti,omap4-aes";
-                       ti,hwmods = "aes";
-                       reg = <0x53500000 0xa0>;
-                       interrupts = <103>;
-                       dmas = <&edma 6 0>,
-                              <&edma 5 0>;
-                       dma-names = "tx", "rx";
+               aes_target: target-module@53500000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x53500080 0x4>,
+                             <0x53500084 0x4>,
+                             <0x53500088 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): per_pwrdm, l3_clkdm */
+                       clocks = <&l3_clkctrl AM3_L3_AES_CLKCTRL 0>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x53500000 0x1000>;
+
+                       aes: aes@0 {
+                               compatible = "ti,omap4-aes";
+                               reg = <0 0xa0>;
+                               interrupts = <103>;
+                               dmas = <&edma 6 0>,
+                                      <&edma 5 0>;
+                               dma-names = "tx", "rx";
+                       };
                };
        };
 };
index 125379ecab2f76a4e56c77c931e4e6795ae75e29..e0b5a00e2078a795d41c016198c684cfff6d9a16 100644 (file)
@@ -74,7 +74,7 @@
                        clock-names = "ick";
                };
 
-               davinci_mdio: ethernet@5c030000 {
+               davinci_mdio: mdio@5c030000 {
                        compatible = "ti,davinci_mdio";
                        ti,hwmods = "davinci_mdio";
                        status = "disabled";
index ca0aa3f26c0a8d53b05db1da7e25617ccf147e82..e4072d0f871ad6ae85a475248b12100a06438e79 100644 (file)
                        };
                };
 
-               sham: sham@53100000 {
-                       compatible = "ti,omap5-sham";
-                       ti,hwmods = "sham";
-                       reg = <0x53100000 0x300>;
-                       dmas = <&edma 36 0>;
-                       dma-names = "rx";
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+               sham_target: target-module@53100000 {
+                       compatible = "ti,sysc-omap3-sham", "ti,sysc";
+                       reg = <0x53100100 0x4>,
+                             <0x53100110 0x4>,
+                             <0x53100114 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): per_pwrdm, l3_clkdm */
+                       clocks = <&l3_clkctrl AM4_L3_SHAM_CLKCTRL 0>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x53100000 0x1000>;
+
+                       sham: sham@0 {
+                               compatible = "ti,omap5-sham";
+                               reg = <0 0x300>;
+                               dmas = <&edma 36 0>;
+                               dma-names = "rx";
+                               interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       };
                };
 
-               aes: aes@53501000 {
-                       compatible = "ti,omap4-aes";
-                       ti,hwmods = "aes";
-                       reg = <0x53501000 0xa0>;
-                       interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&edma 6 0>,
-                               <&edma 5 0>;
-                       dma-names = "tx", "rx";
+               aes_target: target-module@53501000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x53501080 0x4>,
+                             <0x53501084 0x4>,
+                             <0x53501088 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): per_pwrdm, l3_clkdm */
+                       clocks = <&l3_clkctrl AM4_L3_AES_CLKCTRL 0>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x53501000 0x1000>;
+
+                       aes: aes@0 {
+                               compatible = "ti,omap4-aes";
+                               reg = <0 0xa0>;
+                               interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+                               dmas = <&edma 6 0>,
+                                     <&edma 5 0>;
+                               dma-names = "tx", "rx";
+                       };
                };
 
-               des: des@53701000 {
-                       compatible = "ti,omap4-des";
-                       ti,hwmods = "des";
-                       reg = <0x53701000 0xa0>;
-                       interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&edma 34 0>,
-                               <&edma 33 0>;
-                       dma-names = "tx", "rx";
+               des_target: target-module@53701000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x53701030 0x4>,
+                             <0x53701034 0x4>,
+                             <0x53701038 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): per_pwrdm, l3_clkdm */
+                       clocks = <&l3_clkctrl AM4_L3_DES_CLKCTRL 0>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x53701000 0x1000>;
+
+                       des: des@0 {
+                               compatible = "ti,omap4-des";
+                               reg = <0 0xa0>;
+                               interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
+                               dmas = <&edma 34 0>,
+                                      <&edma 33 0>;
+                               dma-names = "tx", "rx";
+                       };
                };
 
                gpmc: gpmc@50000000 {
                        status = "disabled";
                };
 
-               qspi: spi@47900000 {
-                       compatible = "ti,am4372-qspi";
-                       reg = <0x47900000 0x100>,
-                             <0x30000000 0x4000000>;
-                       reg-names = "qspi_base", "qspi_mmap";
+               target-module@47900000 {
+                       compatible = "ti,sysc-omap4", "ti,sysc";
+                       reg = <0x47900000 0x4>,
+                             <0x47900010 0x4>;
+                       reg-names = "rev", "sysc";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       clocks = <&l3s_clkctrl AM4_L3S_QSPI_CLKCTRL 0>;
+                       clock-names = "fck";
                        #address-cells = <1>;
-                       #size-cells = <0>;
-                       ti,hwmods = "qspi";
-                       interrupts = <0 138 0x4>;
-                       num-cs = <4>;
-                       status = "disabled";
+                       #size-cells = <1>;
+                       ranges = <0x0 0x47900000 0x1000>,
+                                <0x30000000 0x30000000 0x4000000>;
+
+                       qspi: spi@0 {
+                               compatible = "ti,am4372-qspi";
+                               reg = <0 0x100>,
+                                     <0x30000000 0x4000000>;
+                               reg-names = "qspi_base", "qspi_mmap";
+                               clocks = <&dpll_per_m2_div4_ck>;
+                               clock-names = "fck";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               interrupts = <0 138 0x4>;
+                               num-cs = <4>;
+                       };
                };
 
                dss: dss@4832a000 {
index cae4500194fecb5e9a7d5c370300fea5ff550148..811c8cae315b520f445964fc07dc00e16266b5f9 100644 (file)
@@ -86,7 +86,7 @@
                };
 
        lcd0: display {
-               compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
+               compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
                label = "lcd";
 
                backlight = <&lcd_bl>;
index 0dd59ee14585bee4ff04919b4257df6e1b0d8de7..e18e17d312726623ac903472f2c09902500a238e 100644 (file)
 
                target-module@d000 {                    /* 0x44e0d000, ap 20 38.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "adc_tsc";
                        reg = <0xd000 0x4>,
                              <0xd010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@30000 {                   /* 0x48030000, ap 65 08.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spi0";
                        reg = <0x30000 0x4>,
                              <0x30110 0x4>,
                              <0x30114 0x4>;
 
                target-module@42000 {                   /* 0x48042000, ap 20 24.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer3";
                        reg = <0x42000 0x4>,
                              <0x42010 0x4>,
                              <0x42014 0x4>;
 
                target-module@44000 {                   /* 0x48044000, ap 22 26.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer4";
                        reg = <0x44000 0x4>,
                              <0x44010 0x4>,
                              <0x44014 0x4>;
 
                target-module@46000 {                   /* 0x48046000, ap 24 28.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer5";
                        reg = <0x46000 0x4>,
                              <0x46010 0x4>,
                              <0x46014 0x4>;
 
                target-module@48000 {                   /* 0x48048000, ap 26 1a.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer6";
                        reg = <0x48000 0x4>,
                              <0x48010 0x4>,
                              <0x48014 0x4>;
 
                target-module@4a000 {                   /* 0x4804a000, ap 71 48.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer7";
                        reg = <0x4a000 0x4>,
                              <0x4a010 0x4>,
                              <0x4a014 0x4>;
 
                target-module@80000 {                   /* 0x48080000, ap 32 18.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "elm";
                        reg = <0x80000 0x4>,
                              <0x80010 0x4>,
                              <0x80014 0x4>;
 
                target-module@ca000 {                   /* 0x480ca000, ap 77 38.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spinlock";
                        reg = <0xca000 0x4>,
                              <0xca010 0x4>,
                              <0xca014 0x4>;
 
                target-module@a0000 {                   /* 0x481a0000, ap 67 2c.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spi1";
                        reg = <0xa0000 0x4>,
                              <0xa0110 0x4>,
                              <0xa0114 0x4>;
 
                target-module@a2000 {                   /* 0x481a2000, ap 69 2e.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spi2";
                        reg = <0xa2000 0x4>,
                              <0xa2110 0x4>,
                              <0xa2114 0x4>;
 
                target-module@a4000 {                   /* 0x481a4000, ap 92 62.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spi3";
                        reg = <0xa4000 0x4>,
                              <0xa4110 0x4>,
                              <0xa4114 0x4>;
 
                target-module@c1000 {                   /* 0x481c1000, ap 94 68.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer8";
                        reg = <0xc1000 0x4>,
                              <0xc1010 0x4>,
                              <0xc1014 0x4>;
                        compatible = "ti,sysc-omap4", "ti,sysc";
                        reg = <0xcc020 0x4>;
                        reg-names = "rev";
-                       ti,hwmods = "d_can0";
                        /* Domains (P, C): per_pwrdm, l4ls_clkdm */
                        clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN0_CLKCTRL 0>;
                        clock-names = "fck";
                        compatible = "ti,sysc-omap4", "ti,sysc";
                        reg = <0xd0020 0x4>;
                        reg-names = "rev";
-                       ti,hwmods = "d_can1";
                        /* Domains (P, C): per_pwrdm, l4ls_clkdm */
                        clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN1_CLKCTRL 0>;
                        clock-names = "fck";
 
                target-module@0 {                       /* 0x48300000, ap 56 40.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss0";
                        reg = <0x0 0x4>,
                              <0x4 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@2000 {                    /* 0x48302000, ap 58 4a.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss1";
                        reg = <0x2000 0x4>,
                              <0x2004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@4000 {                    /* 0x48304000, ap 60 44.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss2";
                        reg = <0x4000 0x4>,
                              <0x4004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@6000 {                    /* 0x48306000, ap 96 58.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss3";
                        reg = <0x6000 0x4>,
                              <0x6004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@8000 {                    /* 0x48308000, ap 98 54.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss4";
                        reg = <0x8000 0x4>,
                              <0x8004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@a000 {                    /* 0x4830a000, ap 100 60.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss5";
                        reg = <0xa000 0x4>,
                              <0xa004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@26000 {                   /* 0x48326000, ap 86 66.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "vpfe0";
                        reg = <0x26000 0x4>,
                              <0x26104 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@28000 {                   /* 0x48328000, ap 75 0e.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "vpfe1";
                        reg = <0x28000 0x4>,
                              <0x28104 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3d000 {                   /* 0x4833d000, ap 102 6e.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer9";
                        reg = <0x3d000 0x4>,
                              <0x3d010 0x4>,
                              <0x3d014 0x4>;
 
                target-module@3f000 {                   /* 0x4833f000, ap 104 5c.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer10";
                        reg = <0x3f000 0x4>,
                              <0x3f010 0x4>,
                              <0x3f014 0x4>;
 
                target-module@41000 {                   /* 0x48341000, ap 106 76.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer11";
                        reg = <0x41000 0x4>,
                              <0x41010 0x4>,
                              <0x41014 0x4>;
 
                target-module@45000 {                   /* 0x48345000, ap 108 6a.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spi4";
                        reg = <0x45000 0x4>,
                              <0x45110 0x4>,
                              <0x45114 0x4>;
 
                target-module@a8000 {                   /* 0x483a8000, ap 125 6c.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "ocp2scp0";
                        reg = <0xa8000 0x4>;
                        reg-names = "rev";
                        /* Domains (P, C): per_pwrdm, l4ls_clkdm */
 
                target-module@e8000 {                   /* 0x483e8000, ap 129 78.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "ocp2scp1";
                        reg = <0xe8000 0x4>;
                        reg-names = "rev";
                        /* Domains (P, C): per_pwrdm, l4ls_clkdm */
index 95314121d11153ba8b9330728bab031f40585fda..078cb473fa7dcd08f27f6a1e094c6855e825fb26 100644 (file)
@@ -42,7 +42,7 @@
        };
 
        lcd0: display {
-               compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
+               compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
                label = "lcd";
 
                backlight = <&lcd_bl>;
index 398721c7201c8558bd2419de8bb1fac576ca733a..aa5e55f981792885292dcc28cdce6f29fd3c22ea 100644 (file)
@@ -9,6 +9,7 @@
        aliases {
                rtc0 = &tps659038_rtc;
                rtc1 = &rtc;
+               display0 = &hdmi0;
        };
 
        chosen {
                        default-state = "off";
                };
        };
+
+       hdmi0: connector@0 {
+               compatible = "hdmi-connector";
+               label = "hdmi";
+
+               type = "a";
+
+               port {
+                       hdmi_connector_in: endpoint {
+                               remote-endpoint = <&tpd12s015_out>;
+                       };
+               };
+       };
+
+       tpd12s015: encoder@0 {
+               compatible = "ti,tpd12s016", "ti,tpd12s015";
+
+               gpios = <0>, /* optional CT_CP_HPD */
+                       <0>, /* optional LS_OE */
+                       <&gpio7 12 GPIO_ACTIVE_HIGH>;   /* HPD */
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+
+                               tpd12s015_in: endpoint@0 {
+                                       remote-endpoint = <&hdmi_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+
+                               tpd12s015_out: endpoint@0 {
+                                       remote-endpoint = <&hdmi_connector_in>;
+                               };
+                       };
+               };
+       };
 };
 
 &dra7_pmx_core {
 &cpu0 {
        vdd-supply = <&smps12_reg>;
 };
+
+&hdmi {
+       status = "okay";
+
+       vdda-supply = <&ldo4_reg>;
+
+       port {
+               hdmi_out: endpoint {
+                       remote-endpoint = <&tpd12s015_in>;
+               };
+       };
+};
+
+&dss {
+       status = "okay";
+};
index 961bed832755b0389b93053c7cbf2e5b4dadacbc..ccf917de5e1aec1ea2a89013dc2ab92b9fae6830 100644 (file)
                };
 
                rng@7e104000 {
-                       interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
-
-                       /* RNG is incompatible with brcm,bcm2835-rng */
-                       status = "disabled";
+                       compatible = "brcm,bcm2711-rng200";
+                       reg = <0x7e104000 0x28>;
                };
 
                uart2: serial@7e201400 {
index fe1ab40c7f224fddf0ee9051d755b0d632a4c91b..2b1d9d4c0cdea5ac3ae20ff02a8b045584db6c1d 100644 (file)
                        system-power-controller;
                };
 
+               rng@7e104000 {
+                       compatible = "brcm,bcm2835-rng";
+                       reg = <0x7e104000 0x10>;
+                       interrupts = <2 29>;
+               };
+
                pixelvalve@7e206000 {
                        compatible = "brcm,bcm2835-pixelvalve0";
                        reg = <0x7e206000 0x100>;
index 3caaa57eb6c81eb449b6ee8dbdc04101b5b32d00..5219339fc27c2626ffa4456d0d177e9f1c2120e0 100644 (file)
                                <&dsi1 0>, <&dsi1 1>, <&dsi1 2>;
                };
 
-               rng@7e104000 {
-                       compatible = "brcm,bcm2835-rng";
-                       reg = <0x7e104000 0x10>;
-                       interrupts = <2 29>;
-               };
-
                mailbox: mailbox@7e00b880 {
                        compatible = "brcm,bcm2835-mbox";
                        reg = <0x7e00b880 0x40>;
index a2c9de35ddfbd3e40b07e50ba4d003ffcbdc3cbb..536fb24f38bb742c49602e4bf16af7e7cb6427b3 100644 (file)
                priority = <200>;
        };
 
-       /* Hardware I2C block cannot do more than 63 bytes per transfer,
-        * which would prevent reading from a SFP's EEPROM (256 byte).
-        */
-       i2c1: i2c {
-               compatible = "i2c-gpio";
-               sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-               scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-       };
-
        sfp: sfp {
                compatible = "sff,sfp";
-               i2c-bus = <&i2c1>;
+               i2c-bus = <&i2c0>;
                mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
                los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
                tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
        };
 };
 
+&i2c0 {
+       status = "okay";
+};
+
 &amac0 {
        status = "okay";
 };
index 7e7aa101d8a49e0dadc5eb488935c43aadff3477..c1740868042a54c42824092a0c141a168d22ae96 100644 (file)
 
                target-module@56000 {                   /* 0x4a056000, ap 9 02.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "dma_system";
                        reg = <0x56000 0x4>,
                              <0x5602c 0x4>,
                              <0x56028 0x4>;
                        ranges = <0x0 0x56000 0x1000>;
 
                        sdma: dma-controller@0 {
-                               compatible = "ti,omap4430-sdma";
+                               compatible = "ti,omap4430-sdma", "ti,omap-sdma";
                                reg = <0x0 0x1000>;
                                interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
                                             <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
 
                target-module@80000 {                   /* 0x4a080000, ap 13 20.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "ocp2scp1";
                        reg = <0x80000 0x4>,
                              <0x80010 0x4>,
                              <0x80014 0x4>;
 
                target-module@90000 {                   /* 0x4a090000, ap 59 42.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "ocp2scp3";
                        reg = <0x90000 0x4>,
                              <0x90010 0x4>,
                              <0x90014 0x4>;
 
                target-module@d9000 {                   /* 0x4a0d9000, ap 17 72.0 */
                        compatible = "ti,sysc-omap4-sr", "ti,sysc";
-                       ti,hwmods = "smartreflex_mpu";
                        reg = <0xd9038 0x4>;
                        reg-names = "sysc";
                        ti,sysc-mask = <SYSC_OMAP3_SR_ENAWAKEUP>;
 
                target-module@dd000 {                   /* 0x4a0dd000, ap 19 18.0 */
                        compatible = "ti,sysc-omap4-sr", "ti,sysc";
-                       ti,hwmods = "smartreflex_core";
                        reg = <0xdd038 0x4>;
                        reg-names = "sysc";
                        ti,sysc-mask = <SYSC_OMAP3_SR_ENAWAKEUP>;
 
                target-module@f6000 {                   /* 0x4a0f6000, ap 25 78.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spinlock";
                        reg = <0xf6000 0x4>,
                              <0xf6010 0x4>,
                              <0xf6014 0x4>;
 
                target-module@3e000 {                   /* 0x4803e000, ap 11 56.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer9";
                        reg = <0x3e000 0x4>,
                              <0x3e010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@78000 {                   /* 0x48078000, ap 39 0a.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "elm";
                        reg = <0x78000 0x4>,
                              <0x78010 0x4>,
                              <0x78014 0x4>;
 
                target-module@86000 {                   /* 0x48086000, ap 41 5e.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer10";
                        reg = <0x86000 0x4>,
                              <0x86010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@88000 {                   /* 0x48088000, ap 43 66.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer11";
                        reg = <0x88000 0x4>,
                              <0x88010 0x4>;
                        reg-names = "rev", "sysc";
                                 <0x00001000 0x000a5000 0x00001000>;
                };
 
+               des_target: target-module@a5000 {       /* 0x480a5000 */
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0xa5030 0x4>,
+                             <0xa5034 0x4>,
+                             <0xa5038 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): l4per_pwrdm, l4sec_clkdm */
+                       clocks = <&l4sec_clkctrl DRA7_L4SEC_DES_CLKCTRL 0>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0xa5000 0x00001000>;
+
+                       des: des@0 {
+                               compatible = "ti,omap4-des";
+                               reg = <0 0xa0>;
+                               interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+                               dmas = <&sdma_xbar 117>, <&sdma_xbar 116>;
+                               dma-names = "tx", "rx";
+                               clocks = <&l3_iclk_div>;
+                               clock-names = "fck";
+                       };
+               };
+
                target-module@a8000 {                   /* 0x480a8000, ap 59 1a.0 */
                        compatible = "ti,sysc";
                        status = "disabled";
 
                target-module@3e000 {                   /* 0x4843e000, ap 25 30.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss0";
                        reg = <0x3e000 0x4>,
                              <0x3e004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@40000 {                   /* 0x48440000, ap 27 38.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss1";
                        reg = <0x40000 0x4>,
                              <0x40004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@42000 {                   /* 0x48442000, ap 29 20.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "epwmss2";
                        reg = <0x42000 0x4>,
                              <0x42004 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@20000 {                   /* 0x48820000, ap 5 08.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer5";
                        reg = <0x20000 0x4>,
                              <0x20010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@22000 {                   /* 0x48822000, ap 7 24.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer6";
                        reg = <0x22000 0x4>,
                              <0x22010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@24000 {                   /* 0x48824000, ap 9 26.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer7";
                        reg = <0x24000 0x4>,
                              <0x24010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@26000 {                   /* 0x48826000, ap 11 0c.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer8";
                        reg = <0x26000 0x4>,
                              <0x26010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@28000 {                   /* 0x48828000, ap 13 16.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer13";
                        reg = <0x28000 0x4>,
                              <0x28010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@2a000 {                   /* 0x4882a000, ap 15 10.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer14";
                        reg = <0x2a000 0x4>,
                              <0x2a010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@2c000 {                   /* 0x4882c000, ap 17 02.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer15";
                        reg = <0x2c000 0x4>,
                              <0x2c010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@2e000 {                   /* 0x4882e000, ap 19 14.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer16";
                        reg = <0x2e000 0x4>,
                              <0x2e010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@0 {                       /* 0x4ae20000, ap 19 08.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer12";
                        reg = <0x0 0x4>,
                              <0x10 0x4>;
                        reg-names = "rev", "sysc";
index 73e5011f531ab44b73346cd07f7f617598fd5625..40ac514702aca689b89421dce788bffeda47c2f6 100644 (file)
                        ti,hwmods = "dmm";
                };
 
-               mmu0_dsp1: mmu@40d01000 {
-                       compatible = "ti,dra7-dsp-iommu";
-                       reg = <0x40d01000 0x100>;
-                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu0_dsp1";
-                       #iommu-cells = <0>;
-                       ti,syscon-mmuconfig = <&dsp1_system 0x0>;
-                       status = "disabled";
+               target-module@40d01000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x40d01000 0x4>,
+                             <0x40d01010 0x4>,
+                             <0x40d01014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       clocks = <&dsp1_clkctrl DRA7_DSP1_MMU0_DSP1_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_dsp1 1>;
+                       reset-names = "rstctrl";
+                       ranges = <0x0 0x40d01000 0x1000>;
+                       #size-cells = <1>;
+                       #address-cells = <1>;
+
+                       mmu0_dsp1: mmu@0 {
+                               compatible = "ti,dra7-dsp-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,syscon-mmuconfig = <&dsp1_system 0x0>;
+                       };
                };
 
-               mmu1_dsp1: mmu@40d02000 {
-                       compatible = "ti,dra7-dsp-iommu";
-                       reg = <0x40d02000 0x100>;
-                       interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu1_dsp1";
-                       #iommu-cells = <0>;
-                       ti,syscon-mmuconfig = <&dsp1_system 0x1>;
-                       status = "disabled";
+               target-module@40d02000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x40d02000 0x4>,
+                             <0x40d02010 0x4>,
+                             <0x40d02014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       clocks = <&dsp1_clkctrl DRA7_DSP1_MMU0_DSP1_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_dsp1 1>;
+                       reset-names = "rstctrl";
+                       ranges = <0x0 0x40d02000 0x1000>;
+                       #size-cells = <1>;
+                       #address-cells = <1>;
+
+                       mmu1_dsp1: mmu@0 {
+                               compatible = "ti,dra7-dsp-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,syscon-mmuconfig = <&dsp1_system 0x1>;
+                       };
                };
 
-               mmu_ipu1: mmu@58882000 {
-                       compatible = "ti,dra7-iommu";
-                       reg = <0x58882000 0x100>;
-                       interrupts = <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu_ipu1";
-                       #iommu-cells = <0>;
-                       ti,iommu-bus-err-back;
-                       status = "disabled";
+               target-module@58882000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x58882000 0x4>,
+                             <0x58882010 0x4>,
+                             <0x58882014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       clocks = <&ipu1_clkctrl DRA7_IPU1_MMU_IPU1_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_ipu 2>;
+                       reset-names = "rstctrl";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x58882000 0x100>;
+
+                       mmu_ipu1: mmu@0 {
+                               compatible = "ti,dra7-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,iommu-bus-err-back;
+                       };
                };
 
-               mmu_ipu2: mmu@55082000 {
-                       compatible = "ti,dra7-iommu";
-                       reg = <0x55082000 0x100>;
-                       interrupts = <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu_ipu2";
-                       #iommu-cells = <0>;
-                       ti,iommu-bus-err-back;
-                       status = "disabled";
+               target-module@55082000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x55082000 0x4>,
+                             <0x55082010 0x4>,
+                             <0x55082014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       clocks = <&ipu2_clkctrl DRA7_IPU2_MMU_IPU2_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_core 2>;
+                       reset-names = "rstctrl";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x55082000 0x100>;
+
+                       mmu_ipu2: mmu@0 {
+                               compatible = "ti,dra7-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,iommu-bus-err-back;
+                       };
                };
 
                abb_mpu: regulator-abb-mpu {
                        };
                };
 
-               aes1: aes@4b500000 {
-                       compatible = "ti,omap4-aes";
-                       ti,hwmods = "aes1";
-                       reg = <0x4b500000 0xa0>;
-                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&edma_xbar 111 0>, <&edma_xbar 110 0>;
-                       dma-names = "tx", "rx";
-                       clocks = <&l3_iclk_div>;
-                       clock-names = "fck";
-               };
-
-               aes2: aes@4b700000 {
-                       compatible = "ti,omap4-aes";
-                       ti,hwmods = "aes2";
-                       reg = <0x4b700000 0xa0>;
-                       interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&edma_xbar 114 0>, <&edma_xbar 113 0>;
-                       dma-names = "tx", "rx";
-                       clocks = <&l3_iclk_div>;
+               aes1_target: target-module@4b500000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x4b500080 0x4>,
+                             <0x4b500084 0x4>,
+                             <0x4b500088 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): per_pwrdm, l4sec_clkdm */
+                       clocks = <&l4sec_clkctrl DRA7_L4SEC_AES1_CLKCTRL 0>;
                        clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x4b500000 0x1000>;
+
+                       aes1: aes@0 {
+                               compatible = "ti,omap4-aes";
+                               reg = <0 0xa0>;
+                               interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                               dmas = <&edma_xbar 111 0>, <&edma_xbar 110 0>;
+                               dma-names = "tx", "rx";
+                               clocks = <&l3_iclk_div>;
+                               clock-names = "fck";
+                       };
                };
 
-               des: des@480a5000 {
-                       compatible = "ti,omap4-des";
-                       ti,hwmods = "des";
-                       reg = <0x480a5000 0xa0>;
-                       interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&sdma_xbar 117>, <&sdma_xbar 116>;
-                       dma-names = "tx", "rx";
-                       clocks = <&l3_iclk_div>;
+               aes2_target: target-module@4b700000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x4b700080 0x4>,
+                             <0x4b700084 0x4>,
+                             <0x4b700088 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): per_pwrdm, l4sec_clkdm */
+                       clocks = <&l4sec_clkctrl DRA7_L4SEC_AES2_CLKCTRL 0>;
                        clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x4b700000 0x1000>;
+
+                       aes2: aes@0 {
+                               compatible = "ti,omap4-aes";
+                               reg = <0 0xa0>;
+                               interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
+                               dmas = <&edma_xbar 114 0>, <&edma_xbar 113 0>;
+                               dma-names = "tx", "rx";
+                               clocks = <&l3_iclk_div>;
+                               clock-names = "fck";
+                       };
                };
 
-               sham: sham@53100000 {
-                       compatible = "ti,omap5-sham";
-                       ti,hwmods = "sham";
-                       reg = <0x4b101000 0x300>;
-                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&edma_xbar 119 0>;
-                       dma-names = "rx";
-                       clocks = <&l3_iclk_div>;
+               sham_target: target-module@4b101000 {
+                       compatible = "ti,sysc-omap3-sham", "ti,sysc";
+                       reg = <0x4b101100 0x4>,
+                             <0x4b101110 0x4>,
+                             <0x4b101114 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,syss-mask = <1>;
+                       /* Domains (P, C): l4per_pwrdm, l4sec_clkdm */
+                       clocks = <&l4sec_clkctrl DRA7_L4SEC_SHAM_CLKCTRL 0>;
                        clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0x4b101000 0x1000>;
+
+                       sham: sham@0 {
+                               compatible = "ti,omap5-sham";
+                               reg = <0 0x300>;
+                               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+                               dmas = <&edma_xbar 119 0>;
+                               dma-names = "rx";
+                               clocks = <&l3_iclk_div>;
+                               clock-names = "fck";
+                       };
                };
 
                opp_supply_mpu: opp-supply@4a003b20 {
index d1b5b76bc5a82896e064d60853d5f67e0865481c..c5abc436ca1f5c171e2bbc17a3b97e2e9a296bf3 100644 (file)
                        };
                };
 
-               mmu0_dsp2: mmu@41501000 {
-                       compatible = "ti,dra7-dsp-iommu";
-                       reg = <0x41501000 0x100>;
-                       interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu0_dsp2";
-                       #iommu-cells = <0>;
-                       ti,syscon-mmuconfig = <&dsp2_system 0x0>;
-                       status = "disabled";
+               target-module@41501000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x41501000 0x4>,
+                             <0x41501010 0x4>,
+                             <0x41501014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       clocks = <&dsp2_clkctrl DRA7_DSP2_MMU0_DSP2_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_dsp2 1>;
+                       reset-names = "rstctrl";
+                       ranges = <0x0 0x41501000 0x1000>;
+                       #size-cells = <1>;
+                       #address-cells = <1>;
+
+                       mmu0_dsp2: mmu@0 {
+                               compatible = "ti,dra7-dsp-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,syscon-mmuconfig = <&dsp2_system 0x0>;
+                       };
                };
 
-               mmu1_dsp2: mmu@41502000 {
-                       compatible = "ti,dra7-dsp-iommu";
-                       reg = <0x41502000 0x100>;
-                       interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu1_dsp2";
-                       #iommu-cells = <0>;
-                       ti,syscon-mmuconfig = <&dsp2_system 0x1>;
-                       status = "disabled";
+               target-module@41502000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x41502000 0x4>,
+                             <0x41502010 0x4>,
+                             <0x41502014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+
+                       clocks = <&dsp2_clkctrl DRA7_DSP2_MMU0_DSP2_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_dsp2 1>;
+                       reset-names = "rstctrl";
+                       ranges = <0x0 0x41502000 0x1000>;
+                       #size-cells = <1>;
+                       #address-cells = <1>;
+
+                       mmu1_dsp2: mmu@0 {
+                               compatible = "ti,dra7-dsp-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,syscon-mmuconfig = <&dsp2_system 0x1>;
+                       };
                };
        };
 };
index 1fb6f13fb5e23c4fcb25174956cdba2a7fcf17e5..86a3e79909a860da39e72fd643543f64fbc7f827 100644 (file)
        model = "TI DRA762 EVM";
        compatible = "ti,dra76-evm", "ti,dra762", "ti,dra7";
 
+       aliases {
+               display0 = &hdmi0;
+
+               sound0 = &sound0;
+               sound1 = &hdmi;
+       };
+
        memory@0 {
                device_type = "memory";
                reg = <0x0 0x80000000 0x0 0x80000000>;
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
        };
+
+       hdmi0: connector {
+               compatible = "hdmi-connector";
+               label = "hdmi";
+
+               type = "a";
+
+               port {
+                       hdmi_connector_in: endpoint {
+                               remote-endpoint = <&tpd12s015_out>;
+                       };
+               };
+       };
+
+       tpd12s015: encoder {
+               compatible = "ti,tpd12s015";
+
+               gpios = <&gpio7 30 GPIO_ACTIVE_HIGH>,   /* gpio7_30, CT CP HPD */
+                       <&gpio7 31 GPIO_ACTIVE_HIGH>,   /* gpio7_31, LS OE */
+                       <&gpio7 12 GPIO_ACTIVE_HIGH>;   /* gpio7_12/sp1_cs2, HPD */
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+
+                               tpd12s015_in: endpoint {
+                                       remote-endpoint = <&hdmi_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+
+                               tpd12s015_out: endpoint {
+                                       remote-endpoint = <&hdmi_connector_in>;
+                               };
+                       };
+               };
+       };
 };
 
 &i2c1 {
        phy-supply = <&ldo3_reg>;
 };
 
+&dss {
+       status = "ok";
+       vdda_video-supply = <&ldo5_reg>;
+};
+
+&hdmi {
+       status = "ok";
+
+       vdda-supply = <&ldo1_reg>;
+
+       port {
+               hdmi_out: endpoint {
+                       remote-endpoint = <&tpd12s015_in>;
+               };
+       };
+};
+
 &qspi {
        spi-max-frequency = <96000000>;
        m25p80@0 {
index b016b0b683064bc1d51f44a7b6ca41bd13cf1ebf..044e5da64a76574a0644a12fca1ee90a69cdfe1e 100644 (file)
                        #size-cells = <1>;
                        ranges = <0 0x02020000 0x40000>;
 
-                       smp-sysram@0 {
+                       smp-sram@0 {
                                compatible = "samsung,exynos4210-sysram";
                                reg = <0x0 0x1000>;
                        };
 
-                       smp-sysram@3f000 {
+                       smp-sram@3f000 {
                                compatible = "samsung,exynos4210-sysram-ns";
                                reg = <0x3f000 0x1000>;
                        };
index 09d3d54d09ff8bf32988d49f2f223d262c799b46..a1bdf7830a8709cca2fb62269d521f5975ee44a0 100644 (file)
 };
 
 &sysram {
-       smp-sysram@0 {
+       smp-sram@0 {
                status = "disabled";
        };
 
-       smp-sysram@5000 {
+       smp-sram@5000 {
                compatible = "samsung,exynos4210-sysram";
                reg = <0x5000 0x1000>;
        };
 
-       smp-sysram@1f000 {
+       smp-sram@1f000 {
                status = "disabled";
        };
 };
index 554819ae144690e6ce57c448cf3ff1d57f43e86e..b4466232f0c1f776eee8e25b9fce85b53907d41d 100644 (file)
                        #size-cells = <1>;
                        ranges = <0 0x02020000 0x20000>;
 
-                       smp-sysram@0 {
+                       smp-sram@0 {
                                compatible = "samsung,exynos4210-sysram";
                                reg = <0x0 0x1000>;
                        };
 
-                       smp-sysram@1f000 {
+                       smp-sram@1f000 {
                                compatible = "samsung,exynos4210-sysram-ns";
                                reg = <0x1f000 0x1000>;
                        };
index ce87d2ff27aabc218a1de9fbca7b60b7c82f492f..31719c079d6729624a60a2bfc6008c4df75e9ff7 100644 (file)
        vdda-supply = <&ldo17_reg>;
        status = "okay";
 };
+
+&touchkey_reg {
+       gpio = <&gpm0 0 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
index 83be3a797411eaf82ff728cb2505ea6740b3f902..3023bc3b68cedf88b6b83553cae015fbc6e63b13 100644 (file)
@@ -13,6 +13,7 @@
 #include "exynos4412.dtsi"
 #include "exynos4412-ppmu-common.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/clock/maxim,max77686.h>
 #include <dt-bindings/pinctrl/samsung.h>
                enable-active-high;
        };
 
+       touchkey_reg: voltage-regulator-6 {
+               compatible = "regulator-fixed";
+               regulator-name = "LED_VDD_3.3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               enable-active-high;
+               status = "disabled";
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
                pinctrl-names = "default";
                };
        };
 
+       i2c-gpio-4 {
+               compatible = "i2c-gpio";
+               sda-gpios = <&gpl0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               scl-gpios = <&gpl0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               i2c-gpio,delay-us = <2>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               touchkey@20 {
+                       compatible = "cypress,midas-touchkey";
+                       reg = <0x20>;
+                       vdd-supply = <&touchkey_reg>;
+                       vcc-supply = <&ldo5_reg>;
+                       interrupt-parent = <&gpj0>;
+                       interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+                       linux,keycodes = <KEY_BACK KEY_MENU>;
+               };
+       };
+
        i2c-mhl {
                compatible = "i2c-gpio";
                gpios = <&gpf0 4 GPIO_ACTIVE_HIGH>, <&gpf0 6 GPIO_ACTIVE_HIGH>;
index fe2bfd76cc4e9dff1d9e5c3853f1f70b75e59f72..98cd1284cd90d03e353b4b8c6de5e9ec1a0c2bb5 100644 (file)
@@ -73,3 +73,8 @@
        vdda-supply = <&cam_vdda_reg>;
        status = "okay";
 };
+
+&touchkey_reg {
+       gpio = <&gpm0 5 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
index 5022aa574b2635c44173e57f0af113aea8324e35..48868947373e3c801a406c59b591c1f9d9b5c469 100644 (file)
                        #size-cells = <1>;
                        ranges = <0 0x02020000 0x40000>;
 
-                       smp-sysram@0 {
+                       smp-sram@0 {
                                compatible = "samsung,exynos4210-sysram";
                                reg = <0x0 0x1000>;
                        };
 
-                       smp-sysram@2f000 {
+                       smp-sram@2f000 {
                                compatible = "samsung,exynos4210-sysram-ns";
                                reg = <0x2f000 0x1000>;
                        };
index e1f0215e3985ea9331ddb547412f8bad264dec0c..ec983283f57327c290fd7c1cb5c77f0dcf77e9a0 100644 (file)
                        #size-cells = <1>;
                        ranges = <0 0x02020000 0x30000>;
 
-                       smp-sysram@0 {
+                       smp-sram@0 {
                                compatible = "samsung,exynos4210-sysram";
                                reg = <0x0 0x1000>;
                        };
 
-                       smp-sysram@2f000 {
+                       smp-sram@2f000 {
                                compatible = "samsung,exynos4210-sysram-ns";
                                reg = <0x2f000 0x1000>;
                        };
index d39907a41f78f28d0b8d2084229335d9ebde2f44..5863fcbe495244be58225b97b9cc128a9217dfb6 100644 (file)
                        iommus = <&sysmmu_gscl1>;
                };
 
+               gpu: gpu@11800000 {
+                       compatible = "samsung,exynos5420-mali", "arm,mali-t628";
+                       reg = <0x11800000 0x5000>;
+                       interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "job", "mmu", "gpu";
+
+                       clocks = <&clock CLK_G3D>;
+                       clock-names = "core";
+                       power-domains = <&g3d_pd>;
+                       operating-points-v2 = <&gpu_opp_table>;
+
+                       status = "disabled";
+                       #cooling-cells = <2>;
+
+                       gpu_opp_table: opp-table {
+                               compatible = "operating-points-v2";
+
+                               opp-177000000 {
+                                       opp-hz = /bits/ 64 <177000000>;
+                                       opp-microvolt = <812500>;
+                               };
+                               opp-266000000 {
+                                       opp-hz = /bits/ 64 <266000000>;
+                                       opp-microvolt = <862500>;
+                               };
+                               opp-350000000 {
+                                       opp-hz = /bits/ 64 <350000000>;
+                                       opp-microvolt = <912500>;
+                               };
+                               opp-420000000 {
+                                       opp-hz = /bits/ 64 <420000000>;
+                                       opp-microvolt = <962500>;
+                               };
+                               opp-480000000 {
+                                       opp-hz = /bits/ 64 <480000000>;
+                                       opp-microvolt = <1000000>;
+                               };
+                               opp-543000000 {
+                                       opp-hz = /bits/ 64 <543000000>;
+                                       opp-microvolt = <1037500>;
+                               };
+                               opp-600000000 {
+                                       opp-hz = /bits/ 64 <600000000>;
+                                       opp-microvolt = <1150000>;
+                               };
+                       };
+               };
+
                scaler_0: scaler@12800000 {
                        compatible = "samsung,exynos5420-scaler";
                        reg = <0x12800000 0x1294>;
index 059fa32d1a8f9a7273d71fe48a72e2b675ce6f11..477c783ea7dfea7c7aa6b53d489f99111d00f7de 100644 (file)
                                regulator-name = "vdd_g3d";
                                regulator-min-microvolt = <800000>;
                                regulator-max-microvolt = <1400000>;
-                               regulator-always-on;
                                regulator-boot-on;
 
                                regulator-state-mem {
        vtmu-supply = <&ldo7_reg>;
 };
 
+&gpu {
+       mali-supply = <&buck4_reg>;
+       status = "okay";
+};
+
 &rtc {
        status = "okay";
        clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
index f78dee801cd90392a43ed7a15ea24e835cd4b473..8aa5117e58ce906acc08a03ffabef1f3a225b0f9 100644 (file)
                        #size-cells = <1>;
                        ranges = <0 0x02020000 0x54000>;
 
-                       smp-sysram@0 {
+                       smp-sram@0 {
                                compatible = "samsung,exynos4210-sysram";
                                reg = <0x0 0x1000>;
                        };
 
-                       smp-sysram@53000 {
+                       smp-sram@53000 {
                                compatible = "samsung,exynos4210-sysram-ns";
                                reg = <0x53000 0x1000>;
                        };
index ae75a1db3d9ae25505e86dbec0b987b774e44aa9..ebbe1518ef8a6adb401ddc239c861a36ada4790d 100644 (file)
                clock-frequency = <26000000>;
        };
 
+       lcd_backlight: backlight {
+               compatible = "pwm-backlight";
+
+               pwms = <&pwm3 0 5000000 0>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <7>;
+               enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
+       };
+
+       lvds-receiver {
+               compatible = "ti,ds90cf384a", "lvds-decoder";
+               powerdown-gpios = <&gpio7 25 GPIO_ACTIVE_LOW>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               lvds_receiver_in: endpoint {
+                                       remote-endpoint = <&lvds0_out>;
+                               };
+                       };
+                       port@1 {
+                               reg = <1>;
+                               lvds_receiver_out: endpoint {
+                                       remote-endpoint = <&panel_in>;
+                               };
+                       };
+               };
+       };
+
+       panel {
+               compatible = "edt,etm0700g0dh6";
+               backlight = <&lcd_backlight>;
+
+               port {
+                       panel_in: endpoint {
+                               remote-endpoint = <&lvds_receiver_out>;
+                       };
+               };
+       };
+
        reg_1p5v: 1p5v {
                compatible = "regulator-fixed";
                regulator-name = "1P5V";
 
                gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 };
 
        status = "okay";
 };
 
+&du {
+       status = "okay";
+};
+
+&gpio2 {
+       touch-interrupt {
+               gpio-hog;
+               gpios = <12 GPIO_ACTIVE_LOW>;
+               input;
+       };
+};
+
 &hsusb {
        status = "okay";
        pinctrl-0 = <&usb0_pins>;
                VDDIO-supply = <&reg_3p3v>;
                VDDD-supply = <&reg_1p5v>;
        };
+
+       touch: touchpanel@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+       };
+};
+
+&lvds0 {
+       status = "okay";
+
+       ports {
+               port@1 {
+                       lvds0_out: endpoint {
+                               remote-endpoint = <&lvds_receiver_in>;
+                       };
+               };
+       };
 };
 
 &pci0 {
                function = "i2c2";
        };
 
+       pwm3_pins: pwm3 {
+               groups = "pwm3";
+               function = "pwm3";
+       };
+
        scif0_pins: scif0 {
                groups = "scif0_data_d";
                function = "scif0";
        };
 };
 
+&pwm3 {
+       pinctrl-0 = <&pwm3_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
 &rcar_sound {
        pinctrl-0 = <&sound_pins>;
        pinctrl-names = "default";
index 0e99df21825251b052de8da7b6bf12d4c01f4a37..ede2e0c999b1551aa3628adf1d3f1a38d2a335c0 100644 (file)
@@ -39,7 +39,6 @@
 &du {
        pinctrl-0 = <&du_pins>;
        pinctrl-names = "default";
-       status = "okay";
 
        ports {
                port@0 {
index c1947b5a688d7319b2f1bf0447813e5821bb57b5..15449c72c042b9e505cb54526f315dd392eb051f 100644 (file)
        status = "okay";
 };
 
+&hsic0 {
+       status = "okay";
+
+       usb1@1 {
+               compatible = "usb424,2640";
+               reg = <0x01>;
+               #address-cells = <0x01>;
+               #size-cells = <0x00>;
+
+               mass-storage@1 {
+                       compatible = "usb424,4040";
+                       reg = <0x01>;
+                       status = "disabled";
+               };
+       };
+};
+
+&hsic_phy0 {
+       status = "okay";
+       reset-gpios = <&gpio 63 GPIO_ACTIVE_HIGH>;
+};
+
 &mmc3 {
        status = "okay";
        max-frequency = <50000000>;
index d9762de0ed34be80c943e1bb3e237253ca6fc83a..1eba7fb6629b518a68488d98c9f909a34924dbcd 100644 (file)
                                status = "disabled";
                        };
 
+                       hsic_phy0: hsic-phy@f0001800 {
+                               compatible = "marvell,mmp3-hsic-phy",
+                                            "usb-nop-xceiv";
+                               reg = <0xf0001800 0x40>;
+                               #phy-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       hsic0: hsic@f0001000 {
+                               compatible = "marvell,pxau2o-ehci";
+                               reg = <0xf0001000 0x200>;
+                               interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&soc_clocks MMP2_CLK_USBHSIC0>;
+                               clock-names = "USBCLK";
+                               phys = <&hsic_phy0>;
+                               phy-names = "usb";
+                               phy_type = "hsic";
+                               #address-cells = <0x01>;
+                               #size-cells = <0x00>;
+                               status = "disabled";
+                       };
+
+                       hsic_phy1: hsic-phy@f0002800 {
+                               compatible = "marvell,mmp3-hsic-phy",
+                                            "usb-nop-xceiv";
+                               reg = <0xf0002800 0x40>;
+                               #phy-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       hsic1: hsic@f0002000 {
+                               compatible = "marvell,pxau2o-ehci";
+                               reg = <0xf0002000 0x200>;
+                               interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&soc_clocks MMP2_CLK_USBHSIC1>;
+                               clock-names = "USBCLK";
+                               phys = <&hsic_phy1>;
+                               phy-names = "usb";
+                               phy_type = "hsic";
+                               #address-cells = <0x01>;
+                               #size-cells = <0x00>;
+                               status = "disabled";
+                       };
+
                        mmc1: mmc@d4280000 {
                                compatible = "mrvl,pxav3-mmc";
                                reg = <0xd4280000 0x120>;
index 000bf16de6517df2ec0e3713429ca6efde32e285..0e453fec2e3a3b2d37a32f8669b81b2f62ac3be7 100644 (file)
@@ -8,6 +8,7 @@
  * kind, whether express or implied.
  */
 
+#include <dt-bindings/bus/ti-sysc.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/omap.h>
                        reg = <0x480FE000 0x1000>;
                };
 
-               sdma: dma-controller@48056000 {
-                       compatible = "ti,omap2430-sdma", "ti,omap2420-sdma";
-                       ti,hwmods = "dma";
-                       reg = <0x48056000 0x1000>;
-                       interrupts = <12>,
-                                    <13>,
-                                    <14>,
-                                    <15>;
-                       #dma-cells = <1>;
-                       dma-channels = <32>;
-                       dma-requests = <64>;
+               target-module@48056000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x48056000 0x4>,
+                             <0x4805602c 0x4>,
+                             <0x48056028 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_EMUFREE |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-midle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,syss-mask = <1>;
+                       clocks = <&core_l3_ck>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x48056000 0x1000>;
+
+                       sdma: dma-controller@0 {
+                               compatible = "ti,omap2420-sdma", "ti,omap-sdma";
+                               reg = <0 0x1000>;
+                               interrupts = <12>,
+                                            <13>,
+                                            <14>,
+                                            <15>;
+                               #dma-cells = <1>;
+                               dma-channels = <32>;
+                               dma-requests = <64>;
+                       };
                };
 
                i2c1: i2c@48070000 {
index 7f57af2f10acb6f02d42fff742d8be754101a042..15ef7593be128d5b8158be478cacbadfaf4c7b99 100644 (file)
        };
 };
 
+&sdma {
+       compatible = "ti,omap2430-sdma", "ti,omap-sdma";
+};
+
 &i2c1 {
        compatible = "ti,omap2430-i2c";
 };
index a638e059135bc67d01695c8cd60266072d2f335e..c3c6d7d04a76c2416983b97c1f8f8c788ed3fcc0 100644 (file)
        regulator-always-on;
 };
 
+/* First two dma channels are reserved on secure omap3 */
+&sdma {
+       dma-channel-mask = <0xfffffffc>;
+};
+
 &twl {
        twl_audio: audio {
                compatible = "ti,twl4030-audio";
index 5698a3e241aa0ae867784488833e045695412506..634ea16a711ec3d416f2feacd62d238360282609 100644 (file)
                        reg = <0x48200000 0x1000>;
                };
 
-               sdma: dma-controller@48056000 {
-                       compatible = "ti,omap3630-sdma", "ti,omap3430-sdma";
-                       reg = <0x48056000 0x1000>;
-                       interrupts = <12>,
-                                    <13>,
-                                    <14>,
-                                    <15>;
-                       #dma-cells = <1>;
-                       dma-channels = <32>;
-                       dma-requests = <96>;
-                       ti,hwmods = "dma";
+               target-module@48056000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x48056000 0x4>,
+                             <0x4805602c 0x4>,
+                             <0x48056028 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_EMUFREE |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       ti,sysc-midle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,syss-mask = <1>;
+                       /* Domains (V, P, C): core, core_pwrdm, core_l3_clkdm */
+                       clocks = <&core_l3_ick>;
+                       clock-names = "ick";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x48056000 0x1000>;
+
+                       sdma: dma-controller@0 {
+                               compatible = "ti,omap3430-sdma", "ti,omap-sdma";
+                               reg = <0x0 0x1000>;
+                               interrupts = <12>,
+                                            <13>,
+                                            <14>,
+                                            <15>;
+                               #dma-cells = <1>;
+                               dma-channels = <32>;
+                               dma-requests = <96>;
+                       };
                };
 
                gpio1: gpio@48310000 {
index c618cb257d00b3625bc6954c1deb1e39483ec503..71f3c8f1f9242626dca3ffb91f6bddb85d735c31 100644 (file)
        };
 };
 
+&sdma {
+       compatible = "ti,omap3630-sdma", "ti,omap-sdma";
+};
+
 /* OMAP3630 needs dss_96m_fck for VENC */
 &venc {
        clocks = <&dss_tv_fck>, <&dss_96m_fck>;
index 6c892fc9d72628f1bf057d0d189cd8304f3ea6cc..a6feb201c569426ab67ed170fa58a0eb266feaa2 100644 (file)
 
                target-module@2e000 {                   /* 0x4012e000, ap 12 0c.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "dmic";
                        reg = <0x2e000 0x4>,
                              <0x2e010 0x4>;
                        reg-names = "rev", "sysc";
 
                mcpdm_module: target-module@32000 {     /* 0x40132000, ap 16 10.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "mcpdm";
                        reg = <0x32000 0x4>,
                              <0x32010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@38000 {                   /* 0x40138000, ap 18 12.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer5";
                        reg = <0x38000 0x4>,
                              <0x38010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3a000 {                   /* 0x4013a000, ap 20 14.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer6";
                        reg = <0x3a000 0x4>,
                              <0x3a010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3c000 {                   /* 0x4013c000, ap 22 16.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer7";
                        reg = <0x3c000 0x4>,
                              <0x3c010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3e000 {                   /* 0x4013e000, ap 24 18.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer8";
                        reg = <0x3e000 0x4>,
                              <0x3e010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@f1000 {                   /* 0x401f1000, ap 32 20.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "aess";
                        reg = <0xf1000 0x4>,
                              <0xf1010 0x4>;
                        reg-names = "rev", "sysc";
index 83f803be8ee2f914cb40b49ec75002beecf93c0b..408f51cbfbb3bfc0c7d097ce6700258dbc831ddc 100644 (file)
 
                target-module@56000 {                   /* 0x4a056000, ap 7 0a.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "dma_system";
                        reg = <0x56000 0x4>,
                              <0x5602c 0x4>,
                              <0x56028 0x4>;
                        ranges = <0x0 0x56000 0x1000>;
 
                        sdma: dma-controller@0 {
-                               compatible = "ti,omap4430-sdma";
+                               compatible = "ti,omap4430-sdma", "ti,omap-sdma";
                                reg = <0x0 0x1000>;
                                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
                                             <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
 
                target-module@58000 {                   /* 0x4a058000, ap 10 0e.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "hsi";
                        reg = <0x58000 0x4>,
                              <0x58010 0x4>,
                              <0x58014 0x4>;
 
                target-module@66000 {                   /* 0x4a066000, ap 25 26.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "mmu_dsp";
                        reg = <0x66000 0x4>,
                              <0x66010 0x4>,
                              <0x66014 0x4>;
                        /* Domains (V, P, C): iva, tesla_pwrdm, tesla_clkdm */
                        clocks = <&tesla_clkctrl OMAP4_DSP_CLKCTRL 0>;
                        clock-names = "fck";
+                       resets = <&prm_tesla 1>;
+                       reset-names = "rstctrl";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges = <0x0 0x66000 0x1000>;
 
-                       /* mmu_dsp cannot be moved before reset driver */
-                       status = "disabled";
+                       mmu_dsp: mmu@0 {
+                               compatible = "ti,omap4-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                       };
                };
        };
 
 
                target-module@2d000 {                   /* 0x4a0ad000, ap 88 0c.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "ocp2scp_usb_phy";
                        reg = <0x2d000 0x4>,
                              <0x2d010 0x4>,
                              <0x2d014 0x4>;
 
                target-module@59000 {                   /* 0x4a0d9000, ap 13 1a.0 */
                        compatible = "ti,sysc-omap4-sr", "ti,sysc";
-                       ti,hwmods = "smartreflex_mpu";
                        reg = <0x59038 0x4>;
                        reg-names = "sysc";
                        ti,sysc-mask = <SYSC_OMAP3_SR_ENAWAKEUP>;
 
                target-module@5b000 {                   /* 0x4a0db000, ap 15 08.0 */
                        compatible = "ti,sysc-omap4-sr", "ti,sysc";
-                       ti,hwmods = "smartreflex_iva";
                        reg = <0x5b038 0x4>;
                        reg-names = "sysc";
                        ti,sysc-mask = <SYSC_OMAP3_SR_ENAWAKEUP>;
 
                target-module@5d000 {                   /* 0x4a0dd000, ap 17 22.0 */
                        compatible = "ti,sysc-omap4-sr", "ti,sysc";
-                       ti,hwmods = "smartreflex_core";
                        reg = <0x5d038 0x4>;
                        reg-names = "sysc";
                        ti,sysc-mask = <SYSC_OMAP3_SR_ENAWAKEUP>;
 
                target-module@76000 {                   /* 0x4a0f6000, ap 29 3a.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spinlock";
                        reg = <0x76000 0x4>,
                              <0x76010 0x4>,
                              <0x76014 0x4>;
 
                target-module@a000 {                    /* 0x4a10a000, ap 65 50.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "fdif";
                        reg = <0xa000 0x4>,
                              <0xa010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@c000 {                    /* 0x4a31c000, ap 11 20.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "kbd";
                        reg = <0xc000 0x4>,
                              <0xc010 0x4>,
                              <0xc014 0x4>;
 
                target-module@32000 {                   /* 0x48032000, ap 5 02.0 */
                        compatible = "ti,sysc-omap2-timer", "ti,sysc";
-                       ti,hwmods = "timer2";
                        reg = <0x32000 0x4>,
                              <0x32010 0x4>,
                              <0x32014 0x4>;
 
                target-module@34000 {                   /* 0x48034000, ap 7 04.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer3";
                        reg = <0x34000 0x4>,
                              <0x34010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@36000 {                   /* 0x48036000, ap 9 0e.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer4";
                        reg = <0x36000 0x4>,
                              <0x36010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3e000 {                   /* 0x4803e000, ap 11 08.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer9";
                        reg = <0x3e000 0x4>,
                              <0x3e010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@76000 {                   /* 0x48076000, ap 39 38.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "slimbus2";
                        reg = <0x76000 0x4>,
                              <0x76010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@78000 {                   /* 0x48078000, ap 41 1a.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "elm";
                        reg = <0x78000 0x4>,
                              <0x78010 0x4>,
                              <0x78014 0x4>;
 
                target-module@86000 {                   /* 0x48086000, ap 43 24.0 */
                        compatible = "ti,sysc-omap2-timer", "ti,sysc";
-                       ti,hwmods = "timer10";
                        reg = <0x86000 0x4>,
                              <0x86010 0x4>,
                              <0x86014 0x4>;
 
                target-module@88000 {                   /* 0x48088000, ap 45 2e.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer11";
                        reg = <0x88000 0x4>,
                              <0x88010 0x4>;
                        reg-names = "rev", "sysc";
index 2de8a6b53de902bdd2db2b966557bbe30d0a642c..38b4146d4d33750000635f4cdeda2ff9d09e0f33 100644 (file)
                        #gpio-cells = <2>;
                };
 
-               mmu_dsp: mmu@4a066000 {
-                       compatible = "ti,omap4-iommu";
-                       reg = <0x4a066000 0x100>;
-                       interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu_dsp";
-                       #iommu-cells = <0>;
-               };
-
                target-module@52000000 {
                        compatible = "ti,sysc-omap4", "ti,sysc";
                        ti,hwmods = "iss";
                        /* No child device binding, driver in staging */
                };
 
-               mmu_ipu: mmu@55082000 {
-                       compatible = "ti,omap4-iommu";
-                       reg = <0x55082000 0x100>;
-                       interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu_ipu";
-                       #iommu-cells = <0>;
-                       ti,iommu-bus-err-back;
+               target-module@55082000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x55082000 0x4>,
+                             <0x55082010 0x4>,
+                             <0x55082014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       clocks = <&ducati_clkctrl OMAP4_IPU_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_core 2>;
+                       reset-names = "rstctrl";
+                       ranges = <0x0 0x55082000 0x100>;
+                       #size-cells = <1>;
+                       #address-cells = <1>;
+
+                       mmu_ipu: mmu@0 {
+                               compatible = "ti,omap4-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,iommu-bus-err-back;
+                       };
                };
+
                target-module@4012c000 {
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "slimbus1";
                        reg = <0x4012c000 0x4>,
                              <0x4012c010 0x4>;
                        reg-names = "rev", "sysc";
index 23aa90716f7f2688a9644d16d43ef3b867fb5e0d..4ec7909df78b6c15abaea9c699ebdb03698e9dab 100644 (file)
 
                target-module@2e000 {                   /* 0x4012e000, ap 12 0c.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "dmic";
                        reg = <0x2e000 0x4>,
                              <0x2e010 0x4>;
                        reg-names = "rev", "sysc";
 
                mcpdm_module: target-module@32000 {     /* 0x40132000, ap 16 10.0 */
                        compatible = "ti,sysc-omap4", "ti,sysc";
-                       ti,hwmods = "mcpdm";
                        reg = <0x32000 0x4>,
                              <0x32010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@38000 {                   /* 0x40138000, ap 18 12.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer5";
                        reg = <0x38000 0x4>,
                              <0x38010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3a000 {                   /* 0x4013a000, ap 20 14.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer6";
                        reg = <0x3a000 0x4>,
                              <0x3a010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3c000 {                   /* 0x4013c000, ap 22 16.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer7";
                        reg = <0x3c000 0x4>,
                              <0x3c010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3e000 {                   /* 0x4013e000, ap 24 18.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer8";
                        reg = <0x3e000 0x4>,
                              <0x3e010 0x4>;
                        reg-names = "rev", "sysc";
index 25aacf1ba7084256dfea162f6beed43a9a0ce1bd..34410b7d77e2fd8f91a259d505af0578088f017a 100644 (file)
 
                target-module@56000 {                   /* 0x4a056000, ap 7 02.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "dma_system";
                        reg = <0x56000 0x4>,
                              <0x5602c 0x4>,
                              <0x56028 0x4>;
                        ranges = <0x0 0x56000 0x1000>;
 
                        sdma: dma-controller@0 {
-                               compatible = "ti,omap4430-sdma";
+                               compatible = "ti,omap4430-sdma", "ti,omap-sdma";
                                reg = <0x0 0x1000>;
                                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
                                             <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
 
                target-module@66000 {                   /* 0x4a066000, ap 23 0a.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "mmu_dsp";
                        reg = <0x66000 0x4>,
                              <0x66010 0x4>,
                              <0x66014 0x4>;
                        /* Domains (V, P, C): mm, dsp_pwrdm, dsp_clkdm */
                        clocks = <&dsp_clkctrl OMAP5_MMU_DSP_CLKCTRL 0>;
                        clock-names = "fck";
+                       resets = <&prm_dsp 1>;
+                       reset-names = "rstctrl";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges = <0x0 0x66000 0x1000>;
 
-                       /* mmu_dsp cannot be moved before reset driver */
-                       status = "disabled";
+                       mmu_dsp: mmu@0 {
+                               compatible = "ti,omap4-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                       };
                };
 
                target-module@70000 {                   /* 0x4a070000, ap 79 2e.0 */
 
                target-module@0 {                       /* 0x4a080000, ap 83 28.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "ocp2scp1";
                        reg = <0x0 0x4>,
                              <0x10 0x4>,
                              <0x14 0x4>;
 
                target-module@10000 {                   /* 0x4a090000, ap 89 36.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "ocp2scp3";
                        reg = <0x10000 0x4>,
                              <0x10010 0x4>,
                              <0x10014 0x4>;
 
                target-module@76000 {                   /* 0x4a0f6000, ap 27 0c.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "spinlock";
                        reg = <0x76000 0x4>,
                              <0x76010 0x4>,
                              <0x76014 0x4>;
 
                target-module@32000 {                   /* 0x48032000, ap 5 3e.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer2";
                        reg = <0x32000 0x4>,
                              <0x32010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@34000 {                   /* 0x48034000, ap 7 46.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer3";
                        reg = <0x34000 0x4>,
                              <0x34010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@36000 {                   /* 0x48036000, ap 9 4e.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer4";
                        reg = <0x36000 0x4>,
                              <0x36010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@3e000 {                   /* 0x4803e000, ap 11 56.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer9";
                        reg = <0x3e000 0x4>,
                              <0x3e010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@86000 {                   /* 0x48086000, ap 41 5e.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer10";
                        reg = <0x86000 0x4>,
                              <0x86010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@88000 {                   /* 0x48088000, ap 43 66.0 */
                        compatible = "ti,sysc-omap4-timer", "ti,sysc";
-                       ti,hwmods = "timer11";
                        reg = <0x88000 0x4>,
                              <0x88010 0x4>;
                        reg-names = "rev", "sysc";
 
                target-module@c000 {                    /* 0x4ae1c000, ap 11 1c.0 */
                        compatible = "ti,sysc-omap2", "ti,sysc";
-                       ti,hwmods = "kbd";
                        reg = <0xc000 0x4>,
                              <0xc010 0x4>;
                        reg-names = "rev", "sysc";
index 1f6ad1debc90644bb7f13ef5abe15363ce3bdc9e..d0ecf54d5a2386ec5fbc1085b606431388f4a0af 100644 (file)
                        #gpio-cells = <2>;
                };
 
-               mmu_dsp: mmu@4a066000 {
-                       compatible = "ti,omap4-iommu";
-                       reg = <0x4a066000 0x100>;
-                       interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu_dsp";
-                       #iommu-cells = <0>;
-               };
+               target-module@55082000 {
+                       compatible = "ti,sysc-omap2", "ti,sysc";
+                       reg = <0x55082000 0x4>,
+                             <0x55082010 0x4>,
+                             <0x55082014 0x4>;
+                       reg-names = "rev", "sysc", "syss";
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
+                                        SYSC_OMAP2_SOFTRESET |
+                                        SYSC_OMAP2_AUTOIDLE)>;
+                       clocks = <&ipu_clkctrl OMAP5_MMU_IPU_CLKCTRL 0>;
+                       clock-names = "fck";
+                       resets = <&prm_core 2>;
+                       reset-names = "rstctrl";
+                       ranges = <0x0 0x55082000 0x100>;
+                       #size-cells = <1>;
+                       #address-cells = <1>;
 
-               mmu_ipu: mmu@55082000 {
-                       compatible = "ti,omap4-iommu";
-                       reg = <0x55082000 0x100>;
-                       interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
-                       ti,hwmods = "mmu_ipu";
-                       #iommu-cells = <0>;
-                       ti,iommu-bus-err-back;
+                       mmu_ipu: mmu@0 {
+                               compatible = "ti,omap4-iommu";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+                               #iommu-cells = <0>;
+                               ti,iommu-bus-err-back;
+                       };
                };
 
                dmm@4e000000 {
index d03dcd919d6f5cfb17e493aa196d568e24d84cb4..75b2796ebfcaf65029d96cb70b3237ebb0838331 100644 (file)
                mmcif: mmc@e804c800 {
                        compatible = "renesas,mmcif-r7s72100", "renesas,sh-mmcif";
                        reg = <0xe804c800 0x80>;
-                       interrupts = <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&mstp8_clks R7S72100_CLK_MMCIF>;
                        power-domains = <&cpg_clocks>;
                        reg-io-width = <4>;
                sdhi0: sd@e804e000 {
                        compatible = "renesas,sdhi-r7s72100";
                        reg = <0xe804e000 0x100>;
-                       interrupts = <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
 
                        clocks = <&mstp12_clks R7S72100_CLK_SDHI00>,
                                 <&mstp12_clks R7S72100_CLK_SDHI01>;
                sdhi1: sd@e804e800 {
                        compatible = "renesas,sdhi-r7s72100";
                        reg = <0xe804e800 0x100>;
-                       interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>;
 
                        clocks = <&mstp12_clks R7S72100_CLK_SDHI10>,
                                 <&mstp12_clks R7S72100_CLK_SDHI11>;
index dd865f3c2eda76a1d6454c5194b10a0b572187b8..a5cd31229fbde835a759797c97dba449b5684ed5 100644 (file)
                dma0: dma-controller@e6700020 {
                        compatible = "renesas,shdma-r8a73a4";
                        reg = <0 0xe6700020 0 0x89e0>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                       GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
index 758360a2edc322899b6247793031b9d9efc78e00..d960c2767f61bf0b8ef2da2ce44bc73e9ad766eb 100644 (file)
@@ -60,8 +60,7 @@
 
                enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>;
                gpios = <&pfc 17 GPIO_ACTIVE_HIGH>;
-               states = <3300000 0
-                         1800000 1>;
+               states = <3300000 0>, <1800000 1>;
 
                enable-active-high;
        };
index 12ffe73bf2bc43cdee39360da63e61160bffd233..ebc1ff64f530d42c21b818fec618ccdd8b4dc6d6 100644 (file)
                        <0xe6900020 1>,
                        <0xe6900040 1>,
                        <0xe6900060 1>;
-               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp2_clks R8A7740_CLK_INTCA>;
                power-domains = <&pd_a4s>;
        };
                        <0xe6900024 1>,
                        <0xe6900044 1>,
                        <0xe6900064 1>;
-               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp2_clks R8A7740_CLK_INTCA>;
                power-domains = <&pd_a4s>;
        };
                        <0xe6900028 1>,
                        <0xe6900048 1>,
                        <0xe6900068 1>;
-               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp2_clks R8A7740_CLK_INTCA>;
                power-domains = <&pd_a4s>;
        };
                        <0xe690002c 1>,
                        <0xe690004c 1>,
                        <0xe690006c 1>;
-               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp2_clks R8A7740_CLK_INTCA>;
                power-domains = <&pd_a4s>;
        };
                #size-cells = <0>;
                compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
                reg = <0xfff20000 0x425>;
-               interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp1_clks R8A7740_CLK_IIC0>;
                power-domains = <&pd_a4r>;
                status = "disabled";
                #size-cells = <0>;
                compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
                reg = <0xe6c20000 0x425>;
-               interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks R8A7740_CLK_IIC1>;
                power-domains = <&pd_a3sp>;
                status = "disabled";
        mmcif0: mmc@e6bd0000 {
                compatible = "renesas,mmcif-r8a7740", "renesas,sh-mmcif";
                reg = <0xe6bd0000 0x100>;
-               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks R8A7740_CLK_MMC>;
                power-domains = <&pd_a3sp>;
                status = "disabled";
        sdhi0: sd@e6850000 {
                compatible = "renesas,sdhi-r8a7740";
                reg = <0xe6850000 0x100>;
-               interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks R8A7740_CLK_SDHI0>;
                power-domains = <&pd_a3sp>;
                cap-sd-highspeed;
        sdhi1: sd@e6860000 {
                compatible = "renesas,sdhi-r8a7740";
                reg = <0xe6860000 0x100>;
-               interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks R8A7740_CLK_SDHI1>;
                power-domains = <&pd_a3sp>;
                cap-sd-highspeed;
        sdhi2: sd@e6870000 {
                compatible = "renesas,sdhi-r8a7740";
                reg = <0xe6870000 0x100>;
-               interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp4_clks R8A7740_CLK_SDHI2>;
                power-domains = <&pd_a3sp>;
                cap-sd-highspeed;
index de981d629bdddec386a98d27b306cf9064e0cf4d..1cd19a569bd0fb66ccc0cf72b568682d4f53e475 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                icram2: sram@e6300000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe6300000 0 0x40000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe6300000 0x40000>;
                };
 
                /* The memory map in the User's Manual maps the cores to
                        compatible = "renesas,r8a7743-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7743-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a7743",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7743",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7743",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7743",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x800 0 0 0 0>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x10800 0 0 0 0>;
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                                 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                                 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                                 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
-                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
-                                     0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
+                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>,
+                                    <0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
index fa74a262107bce6cd9304f1adcdae51fa79d823a..1c82dd0abd76c4c90d0f5d49431612c1156b8da2 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                icram2: sram@e6300000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe6300000 0 0x40000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe6300000 0x40000>;
                };
 
                /* The memory map in the User's Manual maps the cores to
                        compatible = "renesas,r8a7744-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A7744_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7744-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A7744_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a7744",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7744",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7744",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7744",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x800 0 0 0 0>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x10800 0 0 0 0>;
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                                 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                                 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                                 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
-                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
-                                     0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
+                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>,
+                                    <0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
index ce6603b0994b7f369502f5f5104bb766ce540485..58d369ad82799f4ac74e69ad7a1c9f182d6c5129 100644 (file)
@@ -76,8 +76,7 @@
 
                gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 };
 
index c53f7ff20695f04adfff363ef378b364dbc3f6e9..3f88a7e34af2c28bebe6819c6af2f78be3ed92ca 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                icram2: sram@e6300000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe6300000 0 0x40000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe6300000 0x40000>;
                };
                i2c0: i2c@e6508000 {
                        #address-cells = <1>;
                        compatible = "renesas,r8a7745-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7745-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a7745",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7745",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7745",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x800 0 0 0 0>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x10800 0 0 0 0>;
index 450efe92300876ea40dff2f05fbf6d60360005a6..8ac61b50aec03190b119b4d1f414a6f0858833df 100644 (file)
@@ -65,8 +65,7 @@
 
                gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 };
 
index 51806c7f486a3681c17f3cea5fd13f93982891a3..6efcef1670e15a956c55a7f2b07dec561c865b7d 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                icram2: sram@e6300000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe6300000 0 0x20000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe6300000 0x20000>;
                };
 
                i2c0: i2c@e6508000 {
                        compatible = "renesas,r8a77470-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a77470-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a77470-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a8000 0 0x100>;
-                       interrupts = <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 326>;
                        power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a77470-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b8000 0 0x100>;
-                       interrupts = <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 327>;
                        power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a77470",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77470",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
index 10d996d2941fe6eaa2672ae55b5b34621b2c46e7..593c6df90303524d0ea912e2e989c8dd9280f03a 100644 (file)
                        <0xfe780024 4>,
                        <0xfe780044 4>,
                        <0xfe780064 4>;
-               interrupts =   <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>;
+               interrupts = <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>;
                sense-bitfield-width = <2>;
        };
 
                audio_clk_a: audio_clk_a {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
+                       clock-frequency = <0>;
                };
                audio_clk_b: audio_clk_b {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
+                       clock-frequency = <0>;
                };
                audio_clk_c: audio_clk_c {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
+                       clock-frequency = <0>;
                };
 
                /* Fixed ratio clocks */
index c755f0b8fd0d72dbf2df816fea537a58046041d3..d2240b89ee52929bfb5e1dead1e5c4b2131e1823 100644 (file)
@@ -48,8 +48,7 @@
 
                gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        ethernet@18000000 {
index ebf5b7cfe21599c6adb871f10a740f72cd655a24..beb9885e6ffca7a521ffb670f44ddd8be639a287 100644 (file)
                      <0xf0000100 0x100>;
        };
 
+       timer@f0000200 {
+               compatible = "arm,cortex-a9-global-timer";
+               reg = <0xf0000200 0x100>;
+               interrupts = <GIC_PPI 11
+                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
+               clocks = <&cpg_clocks R8A7779_CLK_ZS>;
+       };
+
        timer@f0000600 {
                compatible = "arm,cortex-a9-twd-timer";
                reg = <0xf0000600 0x20>;
                        <0xfe780044 4>,
                        <0xfe780064 4>,
                        <0xfe780000 4>;
-               interrupts = <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>;
+               interrupts = <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>;
                sense-bitfield-width = <2>;
        };
 
index 6ec2cf7eb35455d3ca05f1a5b8def04f00391bd6..097fd9317c6e2966eded5dfbe605651271e3ee3f 100644 (file)
 
                gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi2: regulator-vcc-sdhi2 {
 
                gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        audio_clock: audio_clock {
index 5a2747758f676a4b526231658fb728aae93d2fe9..334ba19769b998ac8968a0e08a76ef052b5cb01b 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                        compatible = "renesas,r8a7790-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7790-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a7790",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7790",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7790",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7790",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x800 0 0 0 0>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee0a0000 0 0xee0a0000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
                };
 
                pci2: pci@ee0d0000 {
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x20800 0 0 0 0>;
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                                 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                                 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                                 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
-                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
-                                     0x43000000 1 0x80000000 1 0x80000000 0 0x80000000>;
+                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>,
+                                    <0x43000000 1 0x80000000 1 0x80000000 0 0x80000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
index af6bd8fcd5a4e36425700050471c3fca97a52022..2b096d5e06fb0499b215f0912f65326d0cee8f66 100644 (file)
 
                gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi1: regulator-vcc-sdhi1 {
 
                gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi2: regulator-vcc-sdhi2 {
 
                gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        audio_clock: audio_clock {
index d6cf16aac14d80f5cc5ac4af4bf10459c9bf7aa9..f9ece7ab2010679a942b987c00c45b85775f529d 100644 (file)
@@ -63,8 +63,7 @@
 
                gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi2: regulator-vcc-sdhi2 {
@@ -85,8 +84,7 @@
 
                gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        hdmi-out {
index 6f875502453cf40a52df7337e53e4933c7a8053f..59a55e87fcc693dfc472c5e67264d0417af230b9 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                        compatible = "renesas,r8a7791-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7791-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a7791",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7791",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7791",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7791",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x800 0 0 0 0>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x10800 0 0 0 0>;
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                                 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                                 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                                 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
-                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
-                                     0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
+                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>,
+                                    <0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
index c4ea2d67603017062d1df7c50866c309872fc14d..39af16caa2aef5011791fddd3237ec93ec8967cf 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                        compatible = "renesas,dmac-r8a7792",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7792",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
index 48fbeb6340fd4daca636f2807c3d72b0e25e5b57..22ca7cd1e7d23ec936b8494d860b50ae9f6a93ad 100644 (file)
 
                gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi1: regulator-vcc-sdhi1 {
 
                gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi2: regulator-vcc-sdhi2 {
 
                gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        audio_clock: audio_clock {
index bf05110fac4e23beb7b5dff259d44b317a49c0db..eef035c4d98341b648b0c11d48bc32028486be19 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                        compatible = "renesas,dmac-r8a7793",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7793",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7793",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7793",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
index 1d22fcdc5d22358da161bccdf8c0d3d36f6c2f84..f79fce74cd9c31620e16decc6d6cb70814cf2406 100644 (file)
@@ -60,8 +60,7 @@
 
                gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi1: regulator-vcc-sdhi1 {
@@ -84,8 +83,7 @@
 
                gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        lbsc {
index b3177aea45d10252b97a84839baa47012e79f6f4..2c16ad85430020bbb984ca2d35f7d1aa0f8238a0 100644 (file)
 
                gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vga-encoder {
index 8d797d34816e3625e1c3a56aa7e6af8cadc219dc..05ef79c6ed7f6b61266a95636e9e826fddfc7936 100644 (file)
                icram0: sram@e63a0000 {
                        compatible = "mmio-sram";
                        reg = <0 0xe63a0000 0 0x12000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0xe63a0000 0x12000>;
                };
 
                icram1: sram@e63c0000 {
                        compatible = "renesas,dmac-r8a7794",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x20000>;
-                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7794",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6720000 0 0x20000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7794",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3", "ch4",
                                          "ch5", "ch6", "ch7", "ch8", "ch9",
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x800 0 0 0 0>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-                       interrupt-map-mask = <0xff00 0 0 0x7>;
-                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
-                                        0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map-mask = <0xf800 0 0 0x7>;
+                       interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
 
                        usb@1,0 {
                                reg = <0x10800 0 0 0 0>;
index 33836990b102daf3cb0cd5ffb007eecf3bb65a4c..c134154bcce83649adc13f6f3bb06aa428e59fe5 100644 (file)
                };
        };
 
+       timer@f0000200 {
+               compatible = "arm,cortex-a9-global-timer";
+               reg = <0xf0000200 0x100>;
+               interrupts = <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>;
+               clocks = <&periph_clk>;
+       };
+
        timer@f0000600 {
                compatible = "arm,cortex-a9-twd-timer";
                reg = <0xf0000600 0x20>;
                interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_EDGE_RISING)>;
-               clocks = <&twd_clk>;
+               clocks = <&periph_clk>;
        };
 
        gic: interrupt-controller@f0001000 {
                        <0xe6900020 1>,
                        <0xe6900040 1>,
                        <0xe6900060 1>;
-               interrupts = <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>;
+               interrupts = <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>;
                clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
                power-domains = <&pd_a4s>;
                control-parent;
                        <0xe6900024 1>,
                        <0xe6900044 1>,
                        <0xe6900064 1>;
-               interrupts = <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 16 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <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 16 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
                power-domains = <&pd_a4s>;
                control-parent;
                        <0xe6900028 1>,
                        <0xe6900048 1>,
                        <0xe6900068 1>;
-               interrupts = <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
-                             GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <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>,
+                            <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
                power-domains = <&pd_a4s>;
                control-parent;
                        <0xe690002c 1>,
                        <0xe690004c 1>,
                        <0xe690006c 1>;
-               interrupts = <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
-                             GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <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>,
+                            <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
                power-domains = <&pd_a4s>;
                control-parent;
                #size-cells = <0>;
                compatible = "renesas,iic-sh73a0", "renesas,rmobile-iic";
                reg = <0xe6820000 0x425>;
-               interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp1_clks SH73A0_CLK_IIC0>;
                power-domains = <&pd_a3sp>;
                status = "disabled";
                #size-cells = <0>;
                compatible = "renesas,iic-sh73a0", "renesas,rmobile-iic";
                reg = <0xe6822000 0x425>;
-               interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks SH73A0_CLK_IIC1>;
                power-domains = <&pd_a3sp>;
                status = "disabled";
                #size-cells = <0>;
                compatible = "renesas,iic-sh73a0", "renesas,rmobile-iic";
                reg = <0xe6824000 0x425>;
-               interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp0_clks SH73A0_CLK_IIC2>;
                power-domains = <&pd_a3sp>;
                status = "disabled";
                #size-cells = <0>;
                compatible = "renesas,iic-sh73a0", "renesas,rmobile-iic";
                reg = <0xe6826000 0x425>;
-               interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp4_clks SH73A0_CLK_IIC3>;
                power-domains = <&pd_a3sp>;
                status = "disabled";
                #size-cells = <0>;
                compatible = "renesas,iic-sh73a0", "renesas,rmobile-iic";
                reg = <0xe6828000 0x425>;
-               interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp4_clks SH73A0_CLK_IIC4>;
                power-domains = <&pd_c5>;
                status = "disabled";
        mmcif: mmc@e6bd0000 {
                compatible = "renesas,mmcif-sh73a0", "renesas,sh-mmcif";
                reg = <0xe6bd0000 0x100>;
-               interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks SH73A0_CLK_MMCIF0>;
                power-domains = <&pd_a3sp>;
                reg-io-width = <4>;
        sdhi0: sd@ee100000 {
                compatible = "renesas,sdhi-sh73a0";
                reg = <0xee100000 0x100>;
-               interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks SH73A0_CLK_SDHI0>;
                power-domains = <&pd_a3sp>;
                cap-sd-highspeed;
        sdhi1: sd@ee120000 {
                compatible = "renesas,sdhi-sh73a0";
                reg = <0xee120000 0x100>;
-               interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks SH73A0_CLK_SDHI1>;
                power-domains = <&pd_a3sp>;
                disable-wp;
        sdhi2: sd@ee140000 {
                compatible = "renesas,sdhi-sh73a0";
                reg = <0xee140000 0x100>;
-               interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH
-                             GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp3_clks SH73A0_CLK_SDHI2>;
                power-domains = <&pd_a3sp>;
                disable-wp;
                extal2_clk: extal2 {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
+                       /* This value must be overridden by the board. */
+                       clock-frequency = <0>;
                };
                extcki_clk: extcki {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
+                       /* This value can be overridden by the board. */
+                       clock-frequency = <0>;
                };
                fsiack_clk: fsiack {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
+                       /* This value can be overridden by the board. */
                        clock-frequency = <0>;
                };
                fsibck_clk: fsibck {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
+                       /* This value can be overridden by the board. */
                        clock-frequency = <0>;
                };
 
                        clock-div = <13>;
                        clock-mult = <1>;
                };
-               twd_clk: twd {
+               periph_clk: periph {
                        compatible = "fixed-factor-clock";
                        clocks = <&cpg_clocks SH73A0_CLK_Z>;
                        #clock-cells = <0>;
index 55fff4d442779912fe830e491468fcb0fb0aab1d..14d4d8617d759469e8a6f0e51da6ef53aadc3595 100644 (file)
@@ -6,6 +6,20 @@
 #include <dt-bindings/clock/ste-ab8500.h>
 
 / {
+       /* Essential housekeeping hardware monitors */
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&gpadc 0x02>, /* Battery temperature */
+                           <&gpadc 0x03>, /* Main charger voltage */
+                           <&gpadc 0x08>, /* Main battery voltage */
+                           <&gpadc 0x09>, /* VBUS */
+                           <&gpadc 0x0a>, /* Main charger current */
+                           <&gpadc 0x0b>, /* USB charger current */
+                           <&gpadc 0x0c>, /* Backup battery voltage */
+                           <&gpadc 0x0d>, /* Die temperature */
+                           <&gpadc 0x12>; /* Crystal temperature */
+       };
+
        soc {
                prcmu@80157000 {
                        ab8500 {
                                        interrupt-names = "60S", "ALARM";
                                };
 
-                               ab8500-gpadc {
+                               gpadc: ab8500-gpadc {
                                        compatible = "stericsson,ab8500-gpadc";
                                        interrupts = <32 IRQ_TYPE_LEVEL_HIGH
                                                      39 IRQ_TYPE_LEVEL_HIGH>;
                                        interrupt-names = "HW_CONV_END", "SW_CONV_END";
                                        vddadc-supply = <&ab8500_ldo_tvout_reg>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       #io-channel-cells = <1>;
+
+                                       /* GPADC channels */
+                                       bat_ctrl: channel@01 {
+                                               reg = <0x01>;
+                                       };
+                                       btemp_ball: channel@02 {
+                                               reg = <0x02>;
+                                       };
+                                       main_charger_v: channel@03 {
+                                               reg = <0x03>;
+                                       };
+                                       acc_detect1: channel@04 {
+                                               reg = <0x04>;
+                                       };
+                                       acc_detect2: channel@05 {
+                                               reg = <0x05>;
+                                       };
+                                       adc_aux1: channel@06 {
+                                               reg = <0x06>;
+                                       };
+                                       adc_aux2: channel@07 {
+                                               reg = <0x07>;
+                                       };
+                                       main_batt_v: channel@08 {
+                                               reg = <0x08>;
+                                       };
+                                       vbus_v: channel@09 {
+                                               reg = <0x09>;
+                                       };
+                                       main_charger_c: channel@0a {
+                                               reg = <0x0a>;
+                                       };
+                                       usb_charger_c: channel@0b {
+                                               reg = <0x0b>;
+                                       };
+                                       bk_bat_v: channel@0c {
+                                               reg = <0x0c>;
+                                       };
+                                       die_temp: channel@0d {
+                                               reg = <0x0d>;
+                                       };
+                                       usb_id: channel@0e {
+                                               reg = <0x0e>;
+                                       };
+                                       xtal_temp: channel@12 {
+                                               reg = <0x12>;
+                                       };
+                                       vbat_true_meas: channel@13 {
+                                               reg = <0x13>;
+                                       };
+                                       bat_ctrl_and_ibat: channel@1c {
+                                               reg = <0x1c>;
+                                       };
+                                       vbat_meas_and_ibat: channel@1d {
+                                               reg = <0x1d>;
+                                       };
+                                       vbat_true_meas_and_ibat: channel@1e {
+                                               reg = <0x1e>;
+                                       };
+                                       bat_temp_and_ibat: channel@1f {
+                                               reg = <0x1f>;
+                                       };
+                               };
+
+                               ab8500_temp {
+                                       compatible = "stericsson,abx500-temp";
+                                       io-channels = <&gpadc 0x06>,
+                                                     <&gpadc 0x07>;
+                                       io-channel-name = "aux1", "aux2";
                                };
 
                                ab8500_battery: ab8500_battery {
                                ab8500_fg {
                                        compatible = "stericsson,ab8500-fg";
                                        battery    = <&ab8500_battery>;
+                                       io-channels = <&gpadc 0x08>;
+                                       io-channel-name = "main_bat_v";
                                };
 
                                ab8500_btemp {
                                        compatible = "stericsson,ab8500-btemp";
                                        battery    = <&ab8500_battery>;
+                                       io-channels = <&gpadc 0x02>,
+                                                     <&gpadc 0x01>;
+                                       io-channel-name = "btemp_ball",
+                                                       "bat_ctrl";
                                };
 
                                ab8500_charger {
                                        compatible      = "stericsson,ab8500-charger";
                                        battery         = <&ab8500_battery>;
                                        vddadc-supply   = <&ab8500_ldo_tvout_reg>;
+                                       io-channels = <&gpadc 0x03>,
+                                                     <&gpadc 0x0a>,
+                                                     <&gpadc 0x09>,
+                                                     <&gpadc 0x0b>;
+                                       io-channel-name = "main_charger_v",
+                                                       "main_charger_c",
+                                                       "vbus_v",
+                                                       "usb_charger_c";
                                };
 
                                ab8500_chargalg {
diff --git a/arch/arm/boot/dts/ste-ab8505.dtsi b/arch/arm/boot/dts/ste-ab8505.dtsi
new file mode 100644 (file)
index 0000000..c72aa25
--- /dev/null
@@ -0,0 +1,275 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2012 Linaro Ltd
+ */
+
+#include <dt-bindings/clock/ste-ab8500.h>
+
+/ {
+       /* Essential housekeeping hardware monitors */
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&gpadc 0x02>, /* Battery temperature */
+                             <&gpadc 0x08>, /* Main battery voltage */
+                             <&gpadc 0x09>, /* VBUS */
+                             <&gpadc 0x0b>, /* Charger current */
+                             <&gpadc 0x0c>; /* Backup battery voltage */
+       };
+
+       soc {
+               prcmu@80157000 {
+                       ab8505 {
+                               compatible = "stericsson,ab8505";
+                               interrupt-parent = <&intc>;
+                               interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+
+                               ab8500_clock: clock-controller {
+                                       compatible = "stericsson,ab8500-clk";
+                                       #clock-cells = <1>;
+                               };
+
+                               ab8505_gpio: ab8505-gpio {
+                                       compatible = "stericsson,ab8505-gpio";
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                               };
+
+                               ab8500-rtc {
+                                       compatible = "stericsson,ab8500-rtc";
+                                       interrupts = <17 IRQ_TYPE_LEVEL_HIGH
+                                                     18 IRQ_TYPE_LEVEL_HIGH>;
+                                       interrupt-names = "60S", "ALARM";
+                               };
+
+                               gpadc: ab8500-gpadc {
+                                       compatible = "stericsson,ab8500-gpadc";
+                                       interrupts = <32 IRQ_TYPE_LEVEL_HIGH
+                                                     39 IRQ_TYPE_LEVEL_HIGH>;
+                                       interrupt-names = "HW_CONV_END", "SW_CONV_END";
+                                       vddadc-supply = <&ab8500_ldo_adc_reg>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       #io-channel-cells = <1>;
+
+                                       /* GPADC channels */
+                                       bat_ctrl: channel@01 {
+                                               reg = <0x01>;
+                                       };
+                                       btemp_ball: channel@02 {
+                                               reg = <0x02>;
+                                       };
+                                       acc_detect1: channel@04 {
+                                               reg = <0x04>;
+                                       };
+                                       acc_detect2: channel@05 {
+                                               reg = <0x05>;
+                                       };
+                                       adc_aux1: channel@06 {
+                                               reg = <0x06>;
+                                       };
+                                       adc_aux2: channel@07 {
+                                               reg = <0x07>;
+                                       };
+                                       main_batt_v: channel@08 {
+                                               reg = <0x08>;
+                                       };
+                                       vbus_v: channel@09 {
+                                               reg = <0x09>;
+                                       };
+                                       charger_c: channel@0b {
+                                               reg = <0x0b>;
+                                       };
+                                       bk_bat_v: channel@0c {
+                                               reg = <0x0c>;
+                                       };
+                                       usb_id: channel@0e {
+                                               reg = <0x0e>;
+                                       };
+                               };
+
+                               ab8500_battery: ab8500_battery {
+                                       status = "disabled";
+                                       thermistor-on-batctrl;
+                               };
+
+                               ab8500_fg {
+                                       status = "disabled";
+                                       compatible = "stericsson,ab8500-fg";
+                                       battery = <&ab8500_battery>;
+                                       io-channels = <&gpadc 0x08>;
+                                       io-channel-name = "main_bat_v";
+                               };
+
+                               ab8500_btemp {
+                                       status = "disabled";
+                                       compatible = "stericsson,ab8500-btemp";
+                                       battery = <&ab8500_battery>;
+                                       io-channels = <&gpadc 0x02>,
+                                                     <&gpadc 0x01>;
+                                       io-channel-name = "btemp_ball",
+                                                         "bat_ctrl";
+                               };
+
+                               ab8500_charger {
+                                       status = "disabled";
+                                       compatible = "stericsson,ab8500-charger";
+                                       battery = <&ab8500_battery>;
+                                       vddadc-supply = <&ab8500_ldo_adc_reg>;
+                                       io-channels = <&gpadc 0x09>,
+                                                     <&gpadc 0x0b>;
+                                       io-channel-name = "vbus_v",
+                                                         "usb_charger_c";
+                               };
+
+                               ab8500_chargalg {
+                                       status = "disabled";
+                                       compatible = "stericsson,ab8500-chargalg";
+                                       battery = <&ab8500_battery>;
+                               };
+
+                               ab8500_usb: ab8500_usb {
+                                       compatible = "stericsson,ab8500-usb";
+                                       interrupts = < 90 IRQ_TYPE_LEVEL_HIGH
+                                                      96 IRQ_TYPE_LEVEL_HIGH
+                                                      14 IRQ_TYPE_LEVEL_HIGH
+                                                      15 IRQ_TYPE_LEVEL_HIGH
+                                                      79 IRQ_TYPE_LEVEL_HIGH
+                                                      74 IRQ_TYPE_LEVEL_HIGH
+                                                      75 IRQ_TYPE_LEVEL_HIGH>;
+                                       interrupt-names = "ID_WAKEUP_R",
+                                                         "ID_WAKEUP_F",
+                                                         "VBUS_DET_F",
+                                                         "VBUS_DET_R",
+                                                         "USB_LINK_STATUS",
+                                                         "USB_ADP_PROBE_PLUG",
+                                                         "USB_ADP_PROBE_UNPLUG";
+                                       vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
+                                       v-ape-supply = <&db8500_vape_reg>;
+                                       musb_1v8-supply = <&db8500_vsmps2_reg>;
+                                       clocks = <&prcmu_clk PRCMU_SYSCLK>;
+                                       clock-names = "sysclk";
+                               };
+
+                               ab8500-ponkey {
+                                       compatible = "stericsson,ab8500-poweron-key";
+                                       interrupts = <6 IRQ_TYPE_LEVEL_HIGH
+                                                     7 IRQ_TYPE_LEVEL_HIGH>;
+                                       interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
+                               };
+
+                               ab8500-sysctrl {
+                                       compatible = "stericsson,ab8500-sysctrl";
+                               };
+
+                               ab8500-pwm {
+                                       compatible = "stericsson,ab8500-pwm";
+                                       clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
+                                       clock-names = "intclk";
+                               };
+
+                               ab8500-debugfs {
+                                       compatible = "stericsson,ab8500-debug";
+                               };
+
+                               codec: ab8500-codec {
+                                       compatible = "stericsson,ab8500-codec";
+
+                                       V-AUD-supply = <&ab8500_ldo_audio_reg>;
+                                       V-AMIC1-supply = <&ab8500_ldo_anamic1_reg>;
+                                       V-AMIC2-supply = <&ab8500_ldo_anamic2_reg>;
+
+                                       clocks = <&ab8500_clock AB8500_SYSCLK_AUDIO>;
+                                       clock-names = "audioclk";
+
+                                       stericsson,earpeice-cmv = <950>; /* Units in mV. */
+                               };
+
+                               ab8505-regulators {
+                                       compatible = "stericsson,ab8505-regulator";
+
+                                       ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
+                                               regulator-min-microvolt = <2800000>;
+                                               regulator-max-microvolt = <3300000>;
+                                       };
+
+                                       ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
+                                               regulator-min-microvolt = <1100000>;
+                                               regulator-max-microvolt = <3300000>;
+                                       };
+
+                                       ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
+                                               regulator-min-microvolt = <1100000>;
+                                               regulator-max-microvolt = <3300000>;
+                                       };
+
+                                       ab8500_ldo_aux4_reg: ab8500_ldo_aux4 {
+                                               regulator-min-microvolt = <1100000>;
+                                               regulator-max-microvolt = <3300000>;
+                                       };
+
+                                       ab8500_ldo_aux5_reg: ab8500_ldo_aux5 {
+                                               regulator-min-microvolt = <1050000>;
+                                               regulator-max-microvolt = <2790000>;
+                                       };
+
+                                       ab8500_ldo_aux6_reg: ab8500_ldo_aux6 {
+                                               regulator-min-microvolt = <1050000>;
+                                               regulator-max-microvolt = <2790000>;
+                                       };
+
+                                       // supply for v-intcore12; VINTCORE12 LDO
+                                       ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
+                                               regulator-min-microvolt = <1250000>;
+                                               regulator-max-microvolt = <1350000>;
+                                       };
+
+                                       // supply for gpadc; ADC LDO
+                                       ab8500_ldo_adc_reg: ab8500_ldo_adc {
+                                       };
+
+                                       // supply for ab8500-vaudio; VAUDIO LDO
+                                       ab8500_ldo_audio_reg: ab8500_ldo_audio {
+                                       };
+
+                                       // supply for v-anamic1 VAMIC1 LDO
+                                       ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
+                                       };
+
+                                       // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1
+                                       ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
+                                       };
+
+                                       // supply for v-aux8; VAUX8 LDO
+                                       ab8500_ldo_aux8_reg: ab8500_ldo_aux8 {
+                                       };
+
+                                       // supply for U8500 CSI/DSI; VANA LDO
+                                       ab8500_ldo_ana_reg: ab8500_ldo_ana {
+                                       };
+                               };
+                       };
+               };
+
+               sound {
+                       stericsson,audio-codec = <&codec>;
+                       clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>;
+                       clock-names = "sysclk", "ulpclk", "intclk";
+               };
+
+               mcde@a0350000 {
+                       vana-supply = <&ab8500_ldo_ana_reg>;
+
+                       dsi@a0351000 {
+                               vana-supply = <&ab8500_ldo_ana_reg>;
+                       };
+                       dsi@a0352000 {
+                               vana-supply = <&ab8500_ldo_ana_reg>;
+                       };
+                       dsi@a0353000 {
+                               vana-supply = <&ab8500_ldo_ana_reg>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-db8500.dtsi b/arch/arm/boot/dts/ste-db8500.dtsi
new file mode 100644 (file)
index 0000000..d309fad
--- /dev/null
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "ste-dbx5x0.dtsi"
+
+/ {
+       cpus {
+               cpu@300 {
+                       /* cpufreq controls */
+                       operating-points = <998400 0
+                                           800000 0
+                                           400000 0
+                                           200000 0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-db8520.dtsi b/arch/arm/boot/dts/ste-db8520.dtsi
new file mode 100644 (file)
index 0000000..48bd872
--- /dev/null
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "ste-dbx5x0.dtsi"
+
+/ {
+       cpus {
+               cpu@300 {
+                       /* cpufreq controls */
+                       operating-points = <1152000 0
+                                           800000 0
+                                           400000 0
+                                           200000 0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi b/arch/arm/boot/dts/ste-dbx5x0-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..7bf7a2d
--- /dev/null
@@ -0,0 +1,632 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2013 Linaro Ltd.
+ */
+
+#include "ste-nomadik-pinctrl.dtsi"
+
+&pinctrl {
+       /* Settings for all UART default and sleep states */
+       uart0 {
+               u0_a_1_default: u0_a_1_default {
+                       default_mux {
+                               function = "u0";
+                               groups = "u0_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
+                               ste,config = <&in_pu>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */
+                               ste,config = <&out_hi>;
+                       };
+               };
+
+               u0_a_1_sleep: u0_a_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins = "GPIO1_AJ3"; /* RTS */
+                               ste,config = <&slpm_out_hi_wkup_pdis>;
+                       };
+                       sleep_cfg3 {
+                               pins = "GPIO3_AH3"; /* TXD */
+                               ste,config = <&slpm_out_wkup_pdis>;
+                       };
+               };
+       };
+
+       uart1 {
+               u1rxtx_a_1_default: u1rxtx_a_1_default {
+                       default_mux {
+                               function = "u1";
+                               groups = "u1rxtx_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO4_AH6"; /* RXD */
+                               ste,config = <&in_pu>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO5_AG6"; /* TXD */
+                               ste,config = <&out_hi>;
+                       };
+               };
+
+               u1rxtx_a_1_sleep: u1rxtx_a_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO4_AH6"; /* RXD */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins = "GPIO5_AG6"; /* TXD */
+                               ste,config = <&slpm_out_wkup_pdis>;
+                       };
+               };
+
+               u1ctsrts_a_1_default: u1ctsrts_a_1_default {
+                       default_mux {
+                               function = "u1";
+                               groups = "u1ctsrts_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO6_AF6"; /* CTS */
+                               ste,config = <&in_pu>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO7_AG5"; /* RTS */
+                               ste,config = <&out_hi>;
+                       };
+               };
+
+               u1ctsrts_a_1_sleep: u1ctsrts_a_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO6_AF6"; /* CTS */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins = "GPIO7_AG5"; /* RTS */
+                               ste,config = <&slpm_out_hi_wkup_pdis>;
+                       };
+               };
+       };
+
+       uart2 {
+               u2rxtx_c_1_default: u2rxtx_c_1_default {
+                       default_mux {
+                               function = "u2";
+                               groups = "u2rxtx_c_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO29_W2"; /* RXD */
+                               ste,config = <&in_pu>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO30_W3"; /* TXD */
+                               ste,config = <&out_hi>;
+                       };
+               };
+
+               u2rxtx_c_1_sleep: u2rxtx_c_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO29_W2"; /* RXD */
+                               ste,config = <&in_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins = "GPIO30_W3"; /* TXD */
+                               ste,config = <&out_wkup_pdis>;
+                       };
+               };
+       };
+
+       /* Settings for all I2C default and sleep states */
+       i2c0 {
+               i2c0_a_1_default: i2c0_a_1_default {
+                       default_mux {
+                               function = "i2c0";
+                               groups = "i2c0_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */
+                               ste,config = <&in_nopull>;
+                       };
+               };
+
+               i2c0_a_1_sleep: i2c0_a_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+       };
+
+       i2c1 {
+               i2c1_b_2_default: i2c1_b_2_default {
+                       default_mux {
+                               function = "i2c1";
+                               groups = "i2c1_b_2";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */
+                               ste,config = <&in_nopull>;
+                       };
+               };
+
+               i2c1_b_2_sleep: i2c1_b_2_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+       };
+
+       i2c2 {
+               i2c2_b_2_default: i2c2_b_2_default {
+                       default_mux {
+                               function = "i2c2";
+                               groups = "i2c2_b_2";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */
+                               ste,config = <&in_nopull>;
+                       };
+               };
+
+               i2c2_b_2_sleep: i2c2_b_2_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+       };
+
+       i2c3 {
+               i2c3_c_2_default: i2c3_c_2_default {
+                       default_mux {
+                               function = "i2c3";
+                               groups = "i2c3_c_2";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */
+                               ste,config = <&in_nopull>;
+                       };
+               };
+
+               i2c3_c_2_sleep: i2c3_c_2_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+       };
+
+       /*
+        * Activating I2C4 will conflict with UART1 about the same pins so do not
+        * enable I2C4 and UART1 at the same time.
+        */
+       i2c4 {
+               i2c4_b_1_default: i2c4_b_1_default {
+                       default_mux {
+                               function = "i2c4";
+                               groups = "i2c4_b_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */
+                               ste,config = <&in_nopull>;
+                       };
+               };
+
+               i2c4_b_1_sleep: i2c4_b_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+       };
+
+       /* Settings for all MMC/SD/SDIO default and sleep states */
+       sdi0 {
+               /* This is the external SD card slot, 4 bits wide */
+               mc0_a_1_default: mc0_a_1_default {
+                       default_mux {
+                               function = "mc0";
+                               groups = "mc0_a_1";
+                       };
+                       default_cfg1 {
+                               pins =
+                               "GPIO18_AC2", /* CMDDIR */
+                               "GPIO19_AC1", /* DAT0DIR */
+                               "GPIO20_AB4"; /* DAT2DIR */
+                               ste,config = <&out_hi>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO22_AA3"; /* FBCLK */
+                               ste,config = <&in_nopull>;
+                       };
+                       default_cfg3 {
+                               pins = "GPIO23_AA4"; /* CLK */
+                               ste,config = <&out_lo>;
+                       };
+                       default_cfg4 {
+                               pins =
+                               "GPIO24_AB2", /* CMD */
+                               "GPIO25_Y4", /* DAT0 */
+                               "GPIO26_Y2", /* DAT1 */
+                               "GPIO27_AA2", /* DAT2 */
+                               "GPIO28_AA1"; /* DAT3 */
+                               ste,config = <&in_pu>;
+                       };
+               };
+
+               mc0_a_1_sleep: mc0_a_1_sleep {
+                       sleep_cfg1 {
+                               pins =
+                               "GPIO18_AC2", /* CMDDIR */
+                               "GPIO19_AC1", /* DAT0DIR */
+                               "GPIO20_AB4"; /* DAT2DIR */
+                               ste,config = <&slpm_out_hi_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins =
+                               "GPIO22_AA3", /* FBCLK */
+                               "GPIO24_AB2", /* CMD */
+                               "GPIO25_Y4", /* DAT0 */
+                               "GPIO26_Y2", /* DAT1 */
+                               "GPIO27_AA2", /* DAT2 */
+                               "GPIO28_AA1"; /* DAT3 */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+                       sleep_cfg3 {
+                               pins = "GPIO23_AA4"; /* CLK */
+                               ste,config = <&slpm_out_lo_wkup_pdis>;
+                       };
+               };
+
+               mc0_a_2_default: mc0_a_2_default {
+                       default_mux {
+                               function = "mc0";
+                               groups = "mc0_a_2";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO22_AA3"; /* FBCLK */
+                               ste,config = <&in_nopull>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO23_AA4"; /* CLK */
+                               ste,config = <&out_lo>;
+                       };
+                       default_cfg3 {
+                               pins =
+                               "GPIO24_AB2", /* CMD */
+                               "GPIO25_Y4", /* DAT0 */
+                               "GPIO26_Y2", /* DAT1 */
+                               "GPIO27_AA2", /* DAT2 */
+                               "GPIO28_AA1"; /* DAT3 */
+                               ste,config = <&in_pu>;
+                       };
+               };
+
+               mc0_a_2_sleep: mc0_a_2_sleep {
+                       sleep_cfg1 {
+                               pins =
+                               "GPIO22_AA3", /* FBCLK */
+                               "GPIO24_AB2", /* CMD */
+                               "GPIO25_Y4", /* DAT0 */
+                               "GPIO26_Y2", /* DAT1 */
+                               "GPIO27_AA2", /* DAT2 */
+                               "GPIO28_AA1"; /* DAT3 */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins = "GPIO23_AA4"; /* CLK */
+                               ste,config = <&slpm_out_lo_wkup_pdis>;
+                       };
+               };
+       };
+
+       sdi1 {
+               /* This is the WLAN SDIO 4 bits wide */
+               mc1_a_1_default: mc1_a_1_default {
+                       default_mux {
+                               function = "mc1";
+                               groups = "mc1_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO208_AH16"; /* CLK */
+                               ste,config = <&out_lo>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO209_AG15"; /* FBCLK */
+                               ste,config = <&in_nopull>;
+                       };
+                       default_cfg3 {
+                               pins =
+                               "GPIO210_AJ15", /* CMD */
+                               "GPIO211_AG14", /* DAT0 */
+                               "GPIO212_AF13", /* DAT1 */
+                               "GPIO213_AG13", /* DAT2 */
+                               "GPIO214_AH15"; /* DAT3 */
+                               ste,config = <&in_pu>;
+                       };
+               };
+
+               mc1_a_1_sleep: mc1_a_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO208_AH16"; /* CLK */
+                               ste,config = <&slpm_out_lo_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins =
+                               "GPIO209_AG15", /* FBCLK */
+                               "GPIO210_AJ15", /* CMD */
+                               "GPIO211_AG14", /* DAT0 */
+                               "GPIO212_AF13", /* DAT1 */
+                               "GPIO213_AG13", /* DAT2 */
+                               "GPIO214_AH15"; /* DAT3 */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+
+               mc1_a_2_default: mc1_a_2_default {
+                       default_mux {
+                               function = "mc1";
+                               groups = "mc1_a_2";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO208_AH16"; /* CLK */
+                               ste,config = <&out_lo>;
+                       };
+                       default_cfg2 {
+                               pins =
+                               "GPIO210_AJ15", /* CMD */
+                               "GPIO211_AG14", /* DAT0 */
+                               "GPIO212_AF13", /* DAT1 */
+                               "GPIO213_AG13", /* DAT2 */
+                               "GPIO214_AH15"; /* DAT3 */
+                               ste,config = <&in_pu>;
+                       };
+               };
+
+               mc1_a_2_sleep: mc1_a_2_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO208_AH16"; /* CLK */
+                               ste,config = <&slpm_out_lo_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins =
+                               "GPIO210_AJ15", /* CMD */
+                               "GPIO211_AG14", /* DAT0 */
+                               "GPIO212_AF13", /* DAT1 */
+                               "GPIO213_AG13", /* DAT2 */
+                               "GPIO214_AH15"; /* DAT3 */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+       };
+
+       sdi2 {
+               /* This is the eMMC 8 bits wide, usually PoP eMMC */
+               mc2_a_1_default: mc2_a_1_default {
+                       default_mux {
+                               function = "mc2";
+                               groups = "mc2_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO128_A5"; /* CLK */
+                               ste,config = <&out_lo>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO130_C8"; /* FBCLK */
+                               ste,config = <&in_nopull>;
+                       };
+                       default_cfg3 {
+                               pins =
+                               "GPIO129_B4", /* CMD */
+                               "GPIO131_A12", /* DAT0 */
+                               "GPIO132_C10", /* DAT1 */
+                               "GPIO133_B10", /* DAT2 */
+                               "GPIO134_B9", /* DAT3 */
+                               "GPIO135_A9", /* DAT4 */
+                               "GPIO136_C7", /* DAT5 */
+                               "GPIO137_A7", /* DAT6 */
+                               "GPIO138_C5"; /* DAT7 */
+                               ste,config = <&in_pu>;
+                       };
+               };
+
+               mc2_a_1_sleep: mc2_a_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO128_A5"; /* CLK */
+                               ste,config = <&out_lo_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins =
+                               "GPIO130_C8", /* FBCLK */
+                               "GPIO129_B4"; /* CMD */
+                               ste,config = <&in_wkup_pdis_en>;
+                       };
+                       sleep_cfg3 {
+                               pins =
+                               "GPIO131_A12", /* DAT0 */
+                               "GPIO132_C10", /* DAT1 */
+                               "GPIO133_B10", /* DAT2 */
+                               "GPIO134_B9", /* DAT3 */
+                               "GPIO135_A9", /* DAT4 */
+                               "GPIO136_C7", /* DAT5 */
+                               "GPIO137_A7", /* DAT6 */
+                               "GPIO138_C5"; /* DAT7 */
+                               ste,config = <&in_wkup_pdis>;
+                       };
+               };
+       };
+
+       sdi4 {
+               /* This is the eMMC 8 bits wide, usually PCB-mounted eMMC */
+               mc4_a_1_default: mc4_a_1_default {
+                       default_mux {
+                               function = "mc4";
+                               groups = "mc4_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO203_AE23"; /* CLK */
+                               ste,config = <&out_lo>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO202_AF25"; /* FBCLK */
+                               ste,config = <&in_nopull>;
+                       };
+                       default_cfg3 {
+                               pins =
+                               "GPIO201_AF24", /* CMD */
+                               "GPIO200_AH26", /* DAT0 */
+                               "GPIO199_AH23", /* DAT1 */
+                               "GPIO198_AG25", /* DAT2 */
+                               "GPIO197_AH24", /* DAT3 */
+                               "GPIO207_AJ23", /* DAT4 */
+                               "GPIO206_AG24", /* DAT5 */
+                               "GPIO205_AG23", /* DAT6 */
+                               "GPIO204_AF23"; /* DAT7 */
+                               ste,config = <&in_pu>;
+                       };
+               };
+
+               mc4_a_1_sleep: mc4_a_1_sleep {
+                       sleep_cfg1 {
+                               pins = "GPIO203_AE23"; /* CLK */
+                               ste,config = <&out_lo_wkup_pdis>;
+                       };
+                       sleep_cfg2 {
+                               pins =
+                               "GPIO202_AF25", /* FBCLK */
+                               "GPIO201_AF24", /* CMD */
+                               "GPIO200_AH26", /* DAT0 */
+                               "GPIO199_AH23", /* DAT1 */
+                               "GPIO198_AG25", /* DAT2 */
+                               "GPIO197_AH24", /* DAT3 */
+                               "GPIO207_AJ23", /* DAT4 */
+                               "GPIO206_AG24", /* DAT5 */
+                               "GPIO205_AG23", /* DAT6 */
+                               "GPIO204_AF23"; /* DAT7 */
+                               ste,config = <&slpm_in_wkup_pdis>;
+                       };
+               };
+       };
+
+       /*
+        * Multi-rate serial ports (MSPs) - MSP3 output is internal and
+        * cannot be muxed onto any pins.
+        */
+       msp0 {
+               msp0txrxtfstck_a_1_default: msp0txrxtfstck_a_1_default {
+                       default_msp0_mux {
+                               function = "msp0";
+                               groups = "msp0txrx_a_1", "msp0tfstck_a_1";
+                       };
+                       default_msp0_cfg {
+                               pins =
+                               "GPIO12_AC4", /* TXD */
+                               "GPIO15_AC3", /* RXD */
+                               "GPIO13_AF3", /* TFS */
+                               "GPIO14_AE3"; /* TCK */
+                               ste,config = <&in_nopull>;
+                       };
+               };
+       };
+
+       msp1 {
+               msp1txrx_a_1_default: msp1txrx_a_1_default {
+                       default_mux {
+                               function = "msp1";
+                               groups = "msp1txrx_a_1", "msp1_a_1";
+                       };
+                       default_cfg1 {
+                               pins = "GPIO33_AF2";
+                               ste,config = <&out_lo>;
+                       };
+                       default_cfg2 {
+                               pins =
+                               "GPIO34_AE1",
+                               "GPIO35_AE2",
+                               "GPIO36_AG2";
+                               ste,config = <&in_nopull>;
+                       };
+               };
+       };
+
+       msp2 {
+               msp2_a_1_default: msp2_a_1_default {
+                       /* MSP2 usually used for HDMI audio */
+                       default_mux {
+                               function = "msp2";
+                               groups = "msp2_a_1";
+                       };
+                       default_cfg1 {
+                               pins =
+                               "GPIO193_AH27", /* TXD */
+                               "GPIO194_AF27", /* TCK */
+                               "GPIO195_AG28"; /* TFS */
+                               ste,config = <&in_pd>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO196_AG26"; /* RXD */
+                               ste,config = <&out_lo>;
+                       };
+               };
+       };
+
+       musb {
+               usb_a_1_default: usb_a_1_default {
+                       default_mux {
+                               function = "usb";
+                               groups = "usb_a_1";
+                       };
+                       default_cfg1 {
+                               pins =
+                               "GPIO256_AF28", /* NXT */
+                               "GPIO258_AD29", /* XCLK */
+                               "GPIO259_AC29", /* DIR */
+                               "GPIO260_AD28", /* DAT7 */
+                               "GPIO261_AD26", /* DAT6 */
+                               "GPIO262_AE26", /* DAT5 */
+                               "GPIO263_AG29", /* DAT4 */
+                               "GPIO264_AE27", /* DAT3 */
+                               "GPIO265_AD27", /* DAT2 */
+                               "GPIO266_AC28", /* DAT1 */
+                               "GPIO267_AC27"; /* DAT0 */
+                               ste,config = <&in_nopull>;
+                       };
+                       default_cfg2 {
+                               pins = "GPIO257_AE29"; /* STP */
+                               ste,config = <&out_hi>;
+                       };
+               };
+
+               usb_a_1_sleep: usb_a_1_sleep {
+                       sleep_cfg1 {
+                               pins =
+                               "GPIO256_AF28", /* NXT */
+                               "GPIO258_AD29", /* XCLK */
+                               "GPIO259_AC29"; /* DIR */
+                               ste,config = <&slpm_wkup_pdis_en>;
+                       };
+                       sleep_cfg2 {
+                               pins = "GPIO257_AE29"; /* STP */
+                               ste,config = <&slpm_out_hi_wkup_pdis>;
+                       };
+                       sleep_cfg3 {
+                               pins =
+                               "GPIO260_AD28", /* DAT7 */
+                               "GPIO261_AD26", /* DAT6 */
+                               "GPIO262_AE26", /* DAT5 */
+                               "GPIO263_AG29", /* DAT4 */
+                               "GPIO264_AE27", /* DAT3 */
+                               "GPIO265_AD27", /* DAT2 */
+                               "GPIO266_AC28", /* DAT1 */
+                               "GPIO267_AC27"; /* DAT0 */
+                               ste,config = <&slpm_in_wkup_pdis_en>;
+                       };
+               };
+       };
+};
index bda454d1215078411f1e1e3898ce7d2cae6190f8..6671f74c9f03d939f8d1245a32e3429dc2ab5751 100644 (file)
        #address-cells = <1>;
        #size-cells = <1>;
 
+       /* This stablilizes the device enumeration */
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               spi0 = &spi0;
+               spi1 = &spi1;
+               spi2 = &spi2;
+               spi3 = &spi3;
+               serial0 = &serial0;
+               serial1 = &serial1;
+               serial2 = &serial2;
+       };
+
        chosen {
        };
 
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0x300>;
-                       /* cpufreq controls */
-                       operating-points = <998400 0
-                                           800000 0
-                                           400000 0
-                                           200000 0>;
                        clocks = <&prcmu_clk PRCMU_ARMSS>;
                        clock-names = "cpu";
                        clock-latency = <20000>;
        soc {
                #address-cells = <1>;
                #size-cells = <1>;
-               compatible = "stericsson,db8500";
+               compatible = "stericsson,db8500", "simple-bus";
                interrupt-parent = <&intc>;
                ranges;
 
                };
 
                rtc@80154000 {
-                       compatible = "arm,rtc-pl031", "arm,primecell";
+                       compatible = "arm,pl031", "arm,primecell";
                        reg = <0x80154000 0x1000>;
                        interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
 
                        };
                };
 
-               i2c@80004000 {
+               i2c0: i2c@80004000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80004000 0x1000>;
                        interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               i2c@80122000 {
+               i2c1: i2c@80122000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80122000 0x1000>;
                        interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&prcc_kclk 1 2>, <&prcc_pclk 1 2>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               i2c@80128000 {
+               i2c2: i2c@80128000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80128000 0x1000>;
                        interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&prcc_kclk 1 6>, <&prcc_pclk 1 6>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               i2c@80110000 {
+               i2c3: i2c@80110000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80110000 0x1000>;
                        interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&prcc_kclk 2 0>, <&prcc_pclk 2 0>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               i2c@8012a000 {
+               i2c4: i2c@8012a000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x8012a000 0x1000>;
                        interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 10>;
                        clock-names = "i2cclk", "apb_pclk";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               spi@80002000 {
+               ssp0: spi@80002000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80002000 0x1000>;
                        interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
                               <&dma 8 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               spi@80003000 {
+               ssp1: spi@80003000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80003000 0x1000>;
                        interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
                               <&dma 9 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               spi@8011a000 {
+               spi0: spi@8011a000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x8011a000 0x1000>;
                        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
                               <&dma 0 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               spi@80112000 {
+               spi1: spi@80112000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80112000 0x1000>;
                        interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
                               <&dma 35 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               spi@80111000 {
+               spi2: spi@80111000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80111000 0x1000>;
                        interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                               <&dma 33 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               spi@80129000 {
+               spi3: spi@80129000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80129000 0x1000>;
                        interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
                               <&dma 40 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
                        power-domains = <&pm_domains DOMAIN_VAPE>;
+
+                       status = "disabled";
                };
 
-               ux500_serial0: uart@80120000 {
+               serial0: uart@80120000 {
                        compatible = "arm,pl011", "arm,primecell";
                        reg = <0x80120000 0x1000>;
                        interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               ux500_serial1: uart@80121000 {
+               serial1: uart@80121000 {
                        compatible = "arm,pl011", "arm,primecell";
                        reg = <0x80121000 0x1000>;
                        interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               ux500_serial2: uart@80007000 {
+               serial2: uart@80007000 {
                        compatible = "arm,pl011", "arm,primecell";
                        reg = <0x80007000 0x1000>;
                        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/ste-href-ab8505.dtsi b/arch/arm/boot/dts/ste-href-ab8505.dtsi
deleted file mode 100644 (file)
index 95cf38a..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright 2014 Linaro Ltd.
- */
-
-/ {
-       soc {
-               prcmu@80157000 {
-                       ab8505 {
-                               ab8505-gpio {
-                                       /* Hog a few default settings */
-                                       pinctrl-names = "default";
-                                       pinctrl-0 = <&gpio2_default_mode>,
-                                                   <&gpio10_default_mode>,
-                                                   <&gpio11_default_mode>,
-                                                   <&gpio13_default_mode>,
-                                                   <&gpio34_default_mode>,
-                                                   <&gpio50_default_mode>,
-                                                   <&pwm_default_mode>,
-                                                   <&adi2_default_mode>,
-                                                   <&modsclsda_default_mode>,
-                                                   <&resethw_default_mode>,
-                                                   <&service_default_mode>;
-
-                                       /*
-                                        * Pins 2, 10, 11, 13, 34 and 50
-                                        * are muxed in as GPIO, and configured as INPUT PULL DOWN
-                                        */
-                                       gpio2 {
-                                               gpio2_default_mode: gpio2_default {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio2_a_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO2_R5";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       gpio10 {
-                                               gpio10_default_mode: gpio10_default {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio10_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO10_B16";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       gpio11 {
-                                               gpio11_default_mode: gpio11_default {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio11_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO11_B17";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       gpio13 {
-                                               gpio13_default_mode: gpio13_default {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio13_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO13_D17";
-                                                               input-enable;
-                                                               bias-disable;
-                                                       };
-                                               };
-                                       };
-                                       gpio34 {
-                                               gpio34_default_mode: gpio34_default {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio34_a_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO34_H14";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       gpio50 {
-                                               gpio50_default_mode: gpio50_default {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio50_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO50_L4";
-                                                               input-enable;
-                                                               bias-disable;
-                                                       };
-                                               };
-                                       };
-                                       /* This sets up the PWM pin 14 */
-                                       pwm {
-                                               pwm_default_mode: pwm_default {
-                                                       default_mux {
-                                                               function = "pwmout";
-                                                               groups = "pwmout1_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO14_C16";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       /* This sets up audio interface 2 */
-                                       adi2 {
-                                               adi2_default_mode: adi2_default {
-                                                       default_mux {
-                                                               function = "adi2";
-                                                               groups = "adi2_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO17_P2",
-                                                                        "GPIO18_N3",
-                                                                        "GPIO19_T1",
-                                                                        "GPIO20_P3";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       /* Modem I2C setup (SCL and SDA pins) */
-                                       modsclsda {
-                                               modsclsda_default_mode: modsclsda_default {
-                                                       default_mux {
-                                                               function = "modsclsda";
-                                                               groups = "modsclsda_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO40_J15",
-                                                                       "GPIO41_J14";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       resethw {
-                                               resethw_default_mode: resethw_default {
-                                                       default_mux {
-                                                               function = "resethw";
-                                                               groups = "resethw_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO52_D16";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       service {
-                                               service_default_mode: service_default {
-                                                       default_mux {
-                                                               function = "service";
-                                                               groups = "service_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO53_D15";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       /*
-                                        * Clock output pins associated with regulators.
-                                        */
-                                       sysclkreq2 {
-                                               sysclkreq2_default_mode: sysclkreq2_default {
-                                                       default_mux {
-                                                               function = "sysclkreq";
-                                                               groups = "sysclkreq2_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO1_N4";
-                                                               input-enable;
-                                                               bias-disable;
-                                                       };
-                                               };
-                                               sysclkreq2_sleep_mode: sysclkreq2_sleep {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio1_a_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO1_N4";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                                       sysclkreq4 {
-                                               sysclkreq4_default_mode: sysclkreq4_default {
-                                                       default_mux {
-                                                               function = "sysclkreq";
-                                                               groups = "sysclkreq4_d_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO3_P5";
-                                                               input-enable;
-                                                               bias-disable;
-                                                       };
-                                               };
-                                               sysclkreq4_sleep_mode: sysclkreq4_sleep {
-                                                       default_mux {
-                                                               function = "gpio";
-                                                               groups = "gpio3_a_1";
-                                                       };
-                                                       default_cfg {
-                                                               pins = "GPIO3_P5";
-                                                               input-enable;
-                                                               bias-pull-down;
-                                                       };
-                                               };
-                                       };
-                               };
-                       };
-               };
-       };
-};
index 2c382d274ff64c54b74c21219f9cb21bcac5b693..434fa6baf71f340b2747bfded1a40b862344f353 100644 (file)
  * Copyright 2013 Linaro Ltd.
  */
 
-#include "ste-nomadik-pinctrl.dtsi"
+#include "ste-dbx5x0-pinctrl.dtsi"
 
 / {
        soc {
                pinctrl {
-                       /* Settings for all UART default and sleep states */
-                       uart0 {
-                               uart0_default_mode: uart0_default {
-                                       default_mux {
-                                               function = "u0";
-                                               groups = "u0_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
-                                               ste,config = <&in_pu>;
-                                       };
-
-                                       default_cfg2 {
-                                               pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */
-                                               ste,config = <&out_hi>;
-                                       };
-                               };
-
-                               uart0_sleep_mode: uart0_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-
-                                       sleep_cfg2 {
-                                               pins = "GPIO1_AJ3"; /* RTS */
-                                               ste,config = <&slpm_out_hi_wkup_pdis>;
-                                       };
-
-                                       sleep_cfg3 {
-                                               pins = "GPIO3_AH3"; /* TXD */
-                                               ste,config = <&slpm_out_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       uart1 {
-                               uart1_default_mode: uart1_default {
-                                       default_mux {
-                                               function = "u1";
-                                               groups = "u1rxtx_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO4_AH6"; /* RXD */
-                                               ste,config = <&in_pu>;
-                                       };
-
-                                       default_cfg2 {
-                                               pins = "GPIO5_AG6"; /* TXD */
-                                               ste,config = <&out_hi>;
-                                       };
-                               };
-
-                               uart1_sleep_mode: uart1_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO4_AH6"; /* RXD */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-
-                                       sleep_cfg2 {
-                                               pins = "GPIO5_AG6"; /* TXD */
-                                               ste,config = <&slpm_out_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       uart2 {
-                               uart2_default_mode: uart2_default {
-                                       default_mux {
-                                               function = "u2";
-                                               groups = "u2rxtx_c_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO29_W2"; /* RXD */
-                                               ste,config = <&in_pu>;
-                                       };
-
-                                       default_cfg2 {
-                                               pins = "GPIO30_W3"; /* TXD */
-                                               ste,config = <&out_hi>;
-                                       };
-                               };
-
-                               uart2_sleep_mode: uart2_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO29_W2"; /* RXD */
-                                               ste,config = <&in_wkup_pdis>;
-                                       };
-
-                                       sleep_cfg2 {
-                                               pins = "GPIO30_W3"; /* TXD */
-                                               ste,config = <&out_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       /* Settings for all I2C default and sleep states */
-                       i2c0 {
-                               i2c0_default_mode: i2c_default {
-                                       default_mux {
-                                               function = "i2c0";
-                                               groups = "i2c0_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               i2c0_sleep_mode: i2c_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       i2c1 {
-                               i2c1_default_mode: i2c_default {
-                                       default_mux {
-                                               function = "i2c1";
-                                               groups = "i2c1_b_2";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               i2c1_sleep_mode: i2c_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       i2c2 {
-                               i2c2_default_mode: i2c_default {
-                                       default_mux {
-                                               function = "i2c2";
-                                               groups = "i2c2_b_2";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               i2c2_sleep_mode: i2c_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       i2c3 {
-                               i2c3_default_mode: i2c_default {
-                                       default_mux {
-                                               function = "i2c3";
-                                               groups = "i2c3_c_2";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               i2c3_sleep_mode: i2c_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       /*
-                        * Activating I2C4 will conflict with UART1 about the same pins so do not
-                        * enable I2C4 and UART1 at the same time.
-                        */
-                       i2c4 {
-                               i2c4_default_mode: i2c_default {
-                                       default_mux {
-                                               function = "i2c4";
-                                               groups = "i2c4_b_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               i2c4_sleep_mode: i2c_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
                        /* Settings for all SPI default and sleep states */
                        spi2 {
                                spi2_default_mode: spi_default {
                                };
                        };
 
-                       /* Settings for all MMC/SD/SDIO default and sleep states */
-                       sdi0 {
-                               /* This is the external SD card slot, 4 bits wide */
-                               sdi0_default_mode: sdi0_default {
-                                       default_mux {
-                                               function = "mc0";
-                                               groups = "mc0_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins =
-                                               "GPIO18_AC2", /* CMDDIR */
-                                               "GPIO19_AC1", /* DAT0DIR */
-                                               "GPIO20_AB4"; /* DAT2DIR */
-                                               ste,config = <&out_hi>;
-                                       };
-                                       default_cfg2 {
-                                               pins = "GPIO22_AA3"; /* FBCLK */
-                                               ste,config = <&in_nopull>;
-                                       };
-                                       default_cfg3 {
-                                               pins = "GPIO23_AA4"; /* CLK */
-                                               ste,config = <&out_lo>;
-                                       };
-                                       default_cfg4 {
-                                               pins =
-                                               "GPIO24_AB2", /* CMD */
-                                               "GPIO25_Y4", /* DAT0 */
-                                               "GPIO26_Y2", /* DAT1 */
-                                               "GPIO27_AA2", /* DAT2 */
-                                               "GPIO28_AA1"; /* DAT3 */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               sdi0_sleep_mode: sdi0_sleep {
-                                       sleep_cfg1 {
-                                               pins =
-                                               "GPIO18_AC2", /* CMDDIR */
-                                               "GPIO19_AC1", /* DAT0DIR */
-                                               "GPIO20_AB4"; /* DAT2DIR */
-                                               ste,config = <&slpm_out_hi_wkup_pdis>;
-                                       };
-                                       sleep_cfg2 {
-                                               pins =
-                                               "GPIO22_AA3", /* FBCLK */
-                                               "GPIO24_AB2", /* CMD */
-                                               "GPIO25_Y4", /* DAT0 */
-                                               "GPIO26_Y2", /* DAT1 */
-                                               "GPIO27_AA2", /* DAT2 */
-                                               "GPIO28_AA1"; /* DAT3 */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                                       sleep_cfg3 {
-                                               pins = "GPIO23_AA4"; /* CLK */
-                                               ste,config = <&slpm_out_lo_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       sdi1 {
-                               /* This is the WLAN SDIO 4 bits wide */
-                               sdi1_default_mode: sdi1_default {
-                                       default_mux {
-                                               function = "mc1";
-                                               groups = "mc1_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO208_AH16"; /* CLK */
-                                               ste,config = <&out_lo>;
-                                       };
-                                       default_cfg2 {
-                                               pins = "GPIO209_AG15"; /* FBCLK */
-                                               ste,config = <&in_nopull>;
-                                       };
-                                       default_cfg3 {
-                                               pins =
-                                               "GPIO210_AJ15", /* CMD */
-                                               "GPIO211_AG14", /* DAT0 */
-                                               "GPIO212_AF13", /* DAT1 */
-                                               "GPIO213_AG13", /* DAT2 */
-                                               "GPIO214_AH15"; /* DAT3 */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               sdi1_sleep_mode: sdi1_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO208_AH16"; /* CLK */
-                                               ste,config = <&slpm_out_lo_wkup_pdis>;
-                                       };
-                                       sleep_cfg2 {
-                                               pins =
-                                               "GPIO209_AG15", /* FBCLK */
-                                               "GPIO210_AJ15", /* CMD */
-                                               "GPIO211_AG14", /* DAT0 */
-                                               "GPIO212_AF13", /* DAT1 */
-                                               "GPIO213_AG13", /* DAT2 */
-                                               "GPIO214_AH15"; /* DAT3 */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       sdi2 {
-                               /* This is the eMMC 8 bits wide, usually PoP eMMC */
-                               sdi2_default_mode: sdi2_default {
-                                       default_mux {
-                                               function = "mc2";
-                                               groups = "mc2_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO128_A5"; /* CLK */
-                                               ste,config = <&out_lo>;
-                                       };
-                                       default_cfg2 {
-                                               pins = "GPIO130_C8"; /* FBCLK */
-                                               ste,config = <&in_nopull>;
-                                       };
-                                       default_cfg3 {
-                                               pins =
-                                               "GPIO129_B4", /* CMD */
-                                               "GPIO131_A12", /* DAT0 */
-                                               "GPIO132_C10", /* DAT1 */
-                                               "GPIO133_B10", /* DAT2 */
-                                               "GPIO134_B9", /* DAT3 */
-                                               "GPIO135_A9", /* DAT4 */
-                                               "GPIO136_C7", /* DAT5 */
-                                               "GPIO137_A7", /* DAT6 */
-                                               "GPIO138_C5"; /* DAT7 */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               sdi2_sleep_mode: sdi2_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO128_A5"; /* CLK */
-                                               ste,config = <&out_lo_wkup_pdis>;
-                                       };
-                                       sleep_cfg2 {
-                                               pins =
-                                               "GPIO130_C8", /* FBCLK */
-                                               "GPIO129_B4"; /* CMD */
-                                               ste,config = <&in_wkup_pdis_en>;
-                                       };
-                                       sleep_cfg3 {
-                                               pins =
-                                               "GPIO131_A12", /* DAT0 */
-                                               "GPIO132_C10", /* DAT1 */
-                                               "GPIO133_B10", /* DAT2 */
-                                               "GPIO134_B9", /* DAT3 */
-                                               "GPIO135_A9", /* DAT4 */
-                                               "GPIO136_C7", /* DAT5 */
-                                               "GPIO137_A7", /* DAT6 */
-                                               "GPIO138_C5"; /* DAT7 */
-                                               ste,config = <&in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       sdi4 {
-                               /* This is the eMMC 8 bits wide, usually PCB-mounted eMMC */
-                               sdi4_default_mode: sdi4_default {
-                                       default_mux {
-                                               function = "mc4";
-                                               groups = "mc4_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO203_AE23"; /* CLK */
-                                               ste,config = <&out_lo>;
-                                       };
-                                       default_cfg2 {
-                                               pins = "GPIO202_AF25"; /* FBCLK */
-                                               ste,config = <&in_nopull>;
-                                       };
-                                       default_cfg3 {
-                                               pins =
-                                               "GPIO201_AF24", /* CMD */
-                                               "GPIO200_AH26", /* DAT0 */
-                                               "GPIO199_AH23", /* DAT1 */
-                                               "GPIO198_AG25", /* DAT2 */
-                                               "GPIO197_AH24", /* DAT3 */
-                                               "GPIO207_AJ23", /* DAT4 */
-                                               "GPIO206_AG24", /* DAT5 */
-                                               "GPIO205_AG23", /* DAT6 */
-                                               "GPIO204_AF23"; /* DAT7 */
-                                               ste,config = <&in_pu>;
-                                       };
-                               };
-
-                               sdi4_sleep_mode: sdi4_sleep {
-                                       sleep_cfg1 {
-                                               pins = "GPIO203_AE23"; /* CLK */
-                                               ste,config = <&out_lo_wkup_pdis>;
-                                       };
-                                       sleep_cfg2 {
-                                               pins =
-                                               "GPIO202_AF25", /* FBCLK */
-                                               "GPIO201_AF24", /* CMD */
-                                               "GPIO200_AH26", /* DAT0 */
-                                               "GPIO199_AH23", /* DAT1 */
-                                               "GPIO198_AG25", /* DAT2 */
-                                               "GPIO197_AH24", /* DAT3 */
-                                               "GPIO207_AJ23", /* DAT4 */
-                                               "GPIO206_AG24", /* DAT5 */
-                                               "GPIO205_AG23", /* DAT6 */
-                                               "GPIO204_AF23"; /* DAT7 */
-                                               ste,config = <&slpm_in_wkup_pdis>;
-                                       };
-                               };
-                       };
-
-                       /*
-                        * Multi-rate serial ports (MSPs) - MSP3 output is internal and
-                        * cannot be muxed onto any pins.
-                        */
-                       msp0 {
-                               msp0_default_mode: msp0_default {
-                                       default_msp0_mux {
-                                               function = "msp0";
-                                               groups = "msp0txrx_a_1", "msp0tfstck_a_1";
-                                       };
-                                       default_msp0_cfg {
-                                               pins =
-                                               "GPIO12_AC4", /* TXD */
-                                               "GPIO15_AC3", /* RXD */
-                                               "GPIO13_AF3", /* TFS */
-                                               "GPIO14_AE3"; /* TCK */
-                                               ste,config = <&in_nopull>;
-                                       };
-                               };
-                       };
-
-                       msp1 {
-                               msp1_default_mode: msp1_default {
-                                       default_mux {
-                                               function = "msp1";
-                                               groups = "msp1txrx_a_1", "msp1_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins = "GPIO33_AF2";
-                                               ste,config = <&out_lo>;
-                                       };
-                                       default_cfg2 {
-                                               pins =
-                                               "GPIO34_AE1",
-                                               "GPIO35_AE2",
-                                               "GPIO36_AG2";
-                                               ste,config = <&in_nopull>;
-                                       };
-
-                               };
-                       };
-
-                       msp2 {
-                               msp2_default_mode: msp2_default {
-                                       /* MSP2 usually used for HDMI audio */
-                                       default_mux {
-                                               function = "msp2";
-                                               groups = "msp2_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins =
-                                               "GPIO193_AH27", /* TXD */
-                                               "GPIO194_AF27", /* TCK */
-                                               "GPIO195_AG28"; /* TFS */
-                                               ste,config = <&in_pd>;
-                                       };
-                                       default_cfg2 {
-                                               pins = "GPIO196_AG26"; /* RXD */
-                                               ste,config = <&out_lo>;
-                                       };
-                               };
-                       };
-
-
-                       musb {
-                               musb_default_mode: musb_default {
-                                       default_mux {
-                                               function = "usb";
-                                               groups = "usb_a_1";
-                                       };
-                                       default_cfg1 {
-                                               pins =
-                                               "GPIO256_AF28", /* NXT */
-                                               "GPIO258_AD29", /* XCLK */
-                                               "GPIO259_AC29", /* DIR */
-                                               "GPIO260_AD28", /* DAT7 */
-                                               "GPIO261_AD26", /* DAT6 */
-                                               "GPIO262_AE26", /* DAT5 */
-                                               "GPIO263_AG29", /* DAT4 */
-                                               "GPIO264_AE27", /* DAT3 */
-                                               "GPIO265_AD27", /* DAT2 */
-                                               "GPIO266_AC28", /* DAT1 */
-                                               "GPIO267_AC27"; /* DAT0 */
-                                               ste,config = <&in_nopull>;
-                                       };
-                                       default_cfg2 {
-                                               pins = "GPIO257_AE29"; /* STP */
-                                               ste,config = <&out_hi>;
-                                       };
-                               };
-
-                               musb_sleep_mode: musb_sleep {
-                                       sleep_cfg1 {
-                                               pins =
-                                               "GPIO256_AF28", /* NXT */
-                                               "GPIO258_AD29", /* XCLK */
-                                               "GPIO259_AC29"; /* DIR */
-                                               ste,config = <&slpm_wkup_pdis_en>;
-                                       };
-                                       sleep_cfg2 {
-                                               pins = "GPIO257_AE29"; /* STP */
-                                               ste,config = <&slpm_out_hi_wkup_pdis>;
-                                       };
-                                       sleep_cfg3 {
-                                               pins =
-                                               "GPIO260_AD28", /* DAT7 */
-                                               "GPIO261_AD26", /* DAT6 */
-                                               "GPIO262_AE26", /* DAT5 */
-                                               "GPIO263_AG29", /* DAT4 */
-                                               "GPIO264_AE27", /* DAT3 */
-                                               "GPIO265_AD27", /* DAT2 */
-                                               "GPIO266_AC28", /* DAT1 */
-                                               "GPIO267_AC27"; /* DAT0 */
-                                               ste,config = <&slpm_in_wkup_pdis_en>;
-                                       };
-                               };
-                       };
-
                        mcde {
                                lcd_default_mode: lcd_default {
                                        default_mux1 {
diff --git a/arch/arm/boot/dts/ste-href-tvk1281618-r2.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618-r2.dtsi
new file mode 100644 (file)
index 0000000..e024520
--- /dev/null
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Device Tree for the TVK1281618 R2 UIB
+ */
+
+#include "ste-href-tvk1281618.dtsi"
+
+/ {
+       soc {
+               i2c@80128000 {
+                       lsm303dlh@18 {
+                               /* Accelerometer */
+                               compatible = "st,lsm303dlh-accel";
+                               st,drdy-int-pin = <1>;
+                               drive-open-drain;
+                               reg = <0x18>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_tvk_mode>;
+                               /*
+                                * These interrupts cannot be used: the other component
+                                * ST-Micro L3D4200D gyro that is connected to the same lines
+                                * cannot set its DRDY line to open drain, so it cannot be
+                                * shared with other peripherals. The should be defined for
+                                * the falling edge if they could be wired together.
+                                *
+                                * interrupts-extended =
+                                * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
+                                * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
+                                */
+                       };
+                       lsm303dlh@1e {
+                               /* Magnetometer */
+                               compatible = "st,lsm303dlh-magn";
+                               reg = <0x1e>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               /*
+                                * These interrupts cannot be used: the other component
+                                * ST-Micro L3D4200D gyro that is connected to the same lines
+                                * cannot set its DRDY line to open drain, so it cannot be
+                                * shared with other peripherals. The should be defined for
+                                * the falling edge if they could be wired together.
+                                *
+                                * interrupts-extended =
+                                * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
+                                * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
+                                */
+                       };
+                       lis331dl@1c {
+                               /* Accelerometer */
+                               compatible = "st,lis331dl-accel";
+                               st,drdy-int-pin = <1>;
+                               reg = <0x1c>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_tvk_mode>;
+                               interrupt-parent = <&gpio2>;
+                               /* INT2 would need to be open drain */
+                               interrupts = <18 IRQ_TYPE_EDGE_RISING>,
+                                            <19 IRQ_TYPE_EDGE_RISING>;
+                       };
+               };
+               mcde@a0350000 {
+                       status = "okay";
+
+                       dsi@a0351000 {
+                               panel {
+                                       compatible = "samsung,s6d16d0";
+                                       reg = <0>;
+                                       vdd1-supply = <&ab8500_ldo_aux1_reg>;
+                                       reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-href-tvk1281618-r3.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618-r3.dtsi
new file mode 100644 (file)
index 0000000..cb3677f
--- /dev/null
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Device Tree for the TVK1281618 R2 UIB
+ */
+
+#include "ste-href-tvk1281618.dtsi"
+
+/ {
+       soc {
+               i2c@80128000 {
+                       /* Marked:
+                        * 129
+                        * M35
+                        * L3GD20
+                        */
+                       l3gd20@6a {
+                               /* Gyroscope */
+                               compatible = "st,l3gd20";
+                               status = "disabled";
+                               st,drdy-int-pin = <1>;
+                               drive-open-drain;
+                               reg = <0x6a>; // 0x6a or 0x6b
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+                       /*
+                        * Marked:
+                        * 2122
+                        * C3H
+                        * DQEEE
+                        * LIS3DH?
+                        */
+                       lis3dh@18 {
+                               /* Accelerometer */
+                               compatible = "st,lis3dh-accel";
+                               st,drdy-int-pin = <1>;
+                               reg = <0x18>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_tvk_mode>;
+                       };
+               };
+
+               mcde@a0350000 {
+                       status = "okay";
+
+                       dsi@a0351000 {
+                               panel {
+                                       compatible = "sony,acx424akp";
+                                       reg = <0>;
+                                       vddi-supply = <&ab8500_ldo_aux1_reg>;
+                                       reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+                               };
+                       };
+               };
+       };
+};
index 3bafd26b48240f31d8cdff490c2fd73e09ada446..e1dbfae225956220f2a5bd896e37f42f7f0f90b8 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * Copyright 2012 ST-Ericsson AB
  *
- * Device Tree for the TVK1281618 UIB
+ * Device Tree for the TVK1281618 family of UIBs
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
                                };
                        };
                };
-               /* Sensors mounted on this board variant */
+               /* Sensors mounted on all board variants */
                i2c@80128000 {
-                       lsm303dlh@18 {
-                               /* Accelerometer */
-                               compatible = "st,lsm303dlh-accel";
-                               st,drdy-int-pin = <1>;
-                               drive-open-drain;
-                               reg = <0x18>;
-                               vdd-supply = <&ab8500_ldo_aux1_reg>;
-                               vddio-supply = <&db8500_vsmps2_reg>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&accel_tvk_mode>;
-                               /*
-                                * These interrupts cannot be used: the other component
-                                * ST-Micro L3D4200D gyro that is connected to the same lines
-                                * cannot set its DRDY line to open drain, so it cannot be
-                                * shared with other peripherals. The should be defined for
-                                * the falling edge if they could be wired together.
-                                *
-                                * interrupts-extended =
-                                * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
-                                * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
-                                */
-                       };
-                       lsm303dlh@1e {
-                               /* Magnetometer */
-                               compatible = "st,lsm303dlh-magn";
-                               reg = <0x1e>;
-                               vdd-supply = <&ab8500_ldo_aux1_reg>;
-                               vddio-supply = <&db8500_vsmps2_reg>;
-                               /*
-                                * These interrupts cannot be used: the other component
-                                * ST-Micro L3D4200D gyro that is connected to the same lines
-                                * cannot set its DRDY line to open drain, so it cannot be
-                                * shared with other peripherals. The should be defined for
-                                * the falling edge if they could be wired together.
-                                *
-                                * interrupts-extended =
-                                * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
-                                * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
-                                */
-                       };
-                       lis331dl@1c {
-                               /* Accelerometer */
-                               compatible = "st,lis331dl-accel";
-                               st,drdy-int-pin = <1>;
-                               reg = <0x1c>;
-                               vdd-supply = <&ab8500_ldo_aux1_reg>;
-                               vddio-supply = <&db8500_vsmps2_reg>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&accel_tvk_mode>;
-                               interrupt-parent = <&gpio2>;
-                               /* INT2 would need to be open drain */
-                               interrupts = <18 IRQ_TYPE_EDGE_RISING>,
-                                            <19 IRQ_TYPE_EDGE_RISING>;
-                       };
                        ak8974@f {
                                /* Magnetometer */
                                compatible = "asahi-kasei,ak8974";
                                };
                        };
                };
-
-               mcde@a0350000 {
-                       status = "okay";
-
-                       dsi@a0351000 {
-                               panel {
-                                       compatible = "samsung,s6d16d0";
-                                       reg = <0>;
-                                       vdd1-supply = <&ab8500_ldo_aux1_reg>;
-                                       reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
-                               };
-                       };
-               };
        };
 };
index 4f6acbd8c040c972b399d9d26a8ae52b3c65a469..33e3b0b3c53d73ce0c2401baab454c54ce33b706 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
-#include "ste-dbx5x0.dtsi"
 #include "ste-href-family-pinctrl.dtsi"
 
 / {
        soc {
                uart@80120000 {
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&uart0_default_mode>;
-                       pinctrl-1 = <&uart0_sleep_mode>;
+                       pinctrl-0 = <&u0_a_1_default>;
+                       pinctrl-1 = <&u0_a_1_sleep>;
                        status = "okay";
                };
 
                /* This UART is unused and thus left disabled */
                uart@80121000 {
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&uart1_default_mode>;
-                       pinctrl-1 = <&uart1_sleep_mode>;
+                       pinctrl-0 = <&u1rxtx_a_1_default>;
+                       pinctrl-1 = <&u1rxtx_a_1_sleep>;
                };
 
                uart@80007000 {
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&uart2_default_mode>;
-                       pinctrl-1 = <&uart2_sleep_mode>;
+                       pinctrl-0 = <&u2rxtx_c_1_default>;
+                       pinctrl-1 = <&u2rxtx_c_1_sleep>;
                        status = "okay";
                };
 
                i2c@80004000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c0_default_mode>;
-                       pinctrl-1 = <&i2c0_sleep_mode>;
+                       pinctrl-0 = <&i2c0_a_1_default>;
+                       pinctrl-1 = <&i2c0_a_1_sleep>;
+                       status = "okay";
                };
 
                i2c@80122000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c1_default_mode>;
-                       pinctrl-1 = <&i2c1_sleep_mode>;
+                       pinctrl-0 = <&i2c1_b_2_default>;
+                       pinctrl-1 = <&i2c1_b_2_sleep>;
+                       status = "okay";
                };
 
                i2c@80128000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c2_default_mode>;
-                       pinctrl-1 = <&i2c2_sleep_mode>;
+                       pinctrl-0 = <&i2c2_b_2_default>;
+                       pinctrl-1 = <&i2c2_b_2_sleep>;
+                       status = "okay";
                        lp5521@33 {
                                compatible = "national,lp5521";
                                reg = <0x33>;
@@ -96,8 +98,9 @@
 
                i2c@80110000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c3_default_mode>;
-                       pinctrl-1 = <&i2c3_sleep_mode>;
+                       pinctrl-0 = <&i2c3_c_2_default>;
+                       pinctrl-1 = <&i2c3_c_2_sleep>;
+                       status = "okay";
                };
 
                /* ST6G3244ME level translator for 1.8/2.9 V */
                        vmmc-supply = <&ab8500_ldo_aux3_reg>;
                        vqmmc-supply = <&vmmci>;
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&sdi0_default_mode>;
-                       pinctrl-1 = <&sdi0_sleep_mode>;
+                       pinctrl-0 = <&mc0_a_1_default &sdi0_default_mode>;
+                       pinctrl-1 = <&mc0_a_1_sleep>;
 
                        status = "okay";
                };
                        bus-width = <4>;
                        non-removable;
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&sdi1_default_mode>;
-                       pinctrl-1 = <&sdi1_sleep_mode>;
+                       pinctrl-0 = <&mc1_a_1_default>;
+                       pinctrl-1 = <&mc1_a_1_sleep>;
 
                        status = "okay";
                };
                        non-removable;
                        vmmc-supply = <&db8500_vsmps2_reg>;
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&sdi2_default_mode>;
-                       pinctrl-1 = <&sdi2_sleep_mode>;
+                       pinctrl-0 = <&mc2_a_1_default>;
+                       pinctrl-1 = <&mc2_a_1_sleep>;
 
                        status = "okay";
                };
                        non-removable;
                        vmmc-supply = <&ab8500_ldo_aux2_reg>;
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&sdi4_default_mode>;
-                       pinctrl-1 = <&sdi4_sleep_mode>;
+                       pinctrl-0 = <&mc4_a_1_default>;
+                       pinctrl-1 = <&mc4_a_1_sleep>;
 
                        status = "okay";
                };
 
                msp0: msp@80123000 {
                        pinctrl-names = "default";
-                       pinctrl-0 = <&msp0_default_mode>;
+                       pinctrl-0 = <&msp0txrxtfstck_a_1_default>;
                        status = "okay";
                };
 
                msp1: msp@80124000 {
                        pinctrl-names = "default";
-                       pinctrl-0 = <&msp1_default_mode>;
+                       pinctrl-0 = <&msp1txrx_a_1_default>;
                        status = "okay";
                };
 
                msp2: msp@80117000 {
                        pinctrl-names = "default";
-                       pinctrl-0 = <&msp2_default_mode>;
+                       pinctrl-0 = <&msp2_a_1_default>;
                };
 
                msp3: msp@80125000 {
 
                                ab8500_usb {
                                        pinctrl-names = "default", "sleep";
-                                       pinctrl-0 = <&musb_default_mode>;
-                                       pinctrl-1 = <&musb_sleep_mode>;
+                                       pinctrl-0 = <&usb_a_1_default>;
+                                       pinctrl-1 = <&usb_a_1_sleep>;
                                };
 
                                ab8500-regulators {
                        };
                };
 
+               pinctrl {
+                       sdi0 {
+                               sdi0_default_mode: sdi0_default {
+                                       /* Some boards set additional settings here */
+                               };
+                       };
+               };
+
                mcde@a0350000 {
                        pinctrl-names = "default", "sleep";
                        pinctrl-0 = <&lcd_default_mode>;
diff --git a/arch/arm/boot/dts/ste-href520-tvk.dts b/arch/arm/boot/dts/ste-href520-tvk.dts
new file mode 100644 (file)
index 0000000..f8c0c1e
--- /dev/null
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Device Tree for the HREF520 version with the TVK1281618 UIB
+ */
+
+/dts-v1/;
+#include "ste-db8520.dtsi"
+#include "ste-hrefv60plus.dtsi"
+#include "ste-href-tvk1281618-r3.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF520 and TVK1281618 UIB";
+       compatible = "st-ericsson,href520", "st-ericsson,u8500";
+
+       soc {
+               vmmci: regulator-gpio {
+                       gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
+                       enable-gpio = <&gpio2 14 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+       };
+};
index b78be5f4c212efff8ab82ab2f3535225513b5d50..8ce6b723abf2480b10d2fda4d4c94ace510a738a 100644 (file)
@@ -4,8 +4,7 @@
  */
 
 /dts-v1/;
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/irq.h>
+#include "ste-db8500.dtsi"
 #include "ste-hrefprev60.dtsi"
 #include "ste-href-stuib.dtsi"
 
        model = "ST-Ericsson HREF (pre-v60) and ST UIB";
        compatible = "st-ericsson,mop500", "st-ericsson,u8500";
 
-       /* This stablilizes the serial port enumeration */
-       aliases {
-               serial0 = &ux500_serial0;
-               serial1 = &ux500_serial1;
-               serial2 = &ux500_serial2;
-       };
-
        soc {
                /* Reset line for the BU21013 touchscreen */
                i2c@80110000 {
index 60eed262d9208db24fdf1d0233fdced30f038f19..142f5475521f806742dd1fdfbbbbcd5a452f7f32 100644 (file)
@@ -4,17 +4,11 @@
  */
 
 /dts-v1/;
+#include "ste-db8500.dtsi"
 #include "ste-hrefprev60.dtsi"
-#include "ste-href-tvk1281618.dtsi"
+#include "ste-href-tvk1281618-r2.dtsi"
 
 / {
        model = "ST-Ericsson HREF (pre-v60) and TVK1281618 UIB";
        compatible = "st-ericsson,mop500", "st-ericsson,u8500";
-
-       /* This stablilizes the serial port enumeration */
-       aliases {
-               serial0 = &ux500_serial0;
-               serial1 = &ux500_serial1;
-               serial2 = &ux500_serial2;
-       };
 };
index a036defdf164b9a208491bff7cb9526d756bb51b..115495de8612810f4bfd6526a08a91bb34e3dc70 100644 (file)
@@ -5,7 +5,6 @@
  * Device Tree for the HREF+ prior to the v60 variant.
  */
 
-#include "ste-dbx5x0.dtsi"
 #include "ste-href-ab8500.dtsi"
 #include "ste-href.dtsi"
 
@@ -58,6 +57,7 @@
                         */
                        pinctrl-names = "default";
                        pinctrl-0 = <&ssp0_hrefprev60_mode>;
+                       status = "okay";
                };
 
                // External Micro SD slot
index 9be513aad549f4078a818e171399e16580fed146..1316886e6bcb65583cd0870bc4b927e03b6fcce6 100644 (file)
@@ -6,8 +6,7 @@
  */
 
 /dts-v1/;
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/irq.h>
+#include "ste-db8500.dtsi"
 #include "ste-hrefv60plus.dtsi"
 #include "ste-href-stuib.dtsi"
 
        model = "ST-Ericsson HREF (v60+) and ST UIB";
        compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
 
-       /* This stablilizes the serial port enumeration */
-       aliases {
-               serial0 = &ux500_serial0;
-               serial1 = &ux500_serial1;
-               serial2 = &ux500_serial2;
-       };
-
        soc {
                /* Reset line for the BU21013 touchscreen */
                i2c@80110000 {
index 73ea3100f18672b1c5509548316674fb0678b48a..5d4b8245f02c089ad02f0e5b3633cea366dd0e48 100644 (file)
@@ -6,17 +6,11 @@
  */
 
 /dts-v1/;
+#include "ste-db8500.dtsi"
 #include "ste-hrefv60plus.dtsi"
-#include "ste-href-tvk1281618.dtsi"
+#include "ste-href-tvk1281618-r2.dtsi"
 
 / {
        model = "ST-Ericsson HREF (v60+) and TVK1281618 UIB";
        compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
-
-       /* This stablilizes the serial port enumeration */
-       aliases {
-               serial0 = &ux500_serial0;
-               serial1 = &ux500_serial1;
-               serial2 = &ux500_serial2;
-       };
 };
index aece8eb2924f760028336872031bb9677717d3f8..05b4fbbba57f5935e4502e06d74b8480c9dc1ef3 100644 (file)
@@ -3,7 +3,6 @@
  * Copyright 2012 ST-Ericsson AB
  */
 
-#include "ste-dbx5x0.dtsi"
 #include "ste-href-ab8500.dtsi"
 #include "ste-href.dtsi"
 
index 5673a1113aef683b20d76e6e9078cfcdbcda1285..bfdb5d9a014fc8ed25d9c3b4ddfb435df367a01f 100644 (file)
                ste,output = <OUTPUT_LOW>;
        };
 
+       gpio_in_nopull: gpio_input_nopull {
+               ste,gpio = <GPIOMODE_ENABLED>;
+               ste,input = <INPUT_NOPULL>;
+       };
+
        gpio_in_pu: gpio_input_pull_up {
                ste,gpio = <GPIOMODE_ENABLED>;
                ste,input = <INPUT_PULLUP>;
index efbc4467b8b78fdb783e485727f82cb33d1de109..be90e73c923ec255e156996f1b0990f5d37886c4 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 /dts-v1/;
-#include "ste-dbx5x0.dtsi"
+#include "ste-db8500.dtsi"
 #include "ste-href-ab8500.dtsi"
 #include "ste-href-family-pinctrl.dtsi"
 
        model = "Calao Systems Snowball platform with device tree";
        compatible = "calaosystems,snowball-a9500", "st-ericsson,u9500";
 
-       /* This stablilizes the serial port enumeration */
-       aliases {
-               serial0 = &ux500_serial0;
-               serial1 = &ux500_serial1;
-               serial2 = &ux500_serial2;
-       };
-
        memory {
                device_type = "memory";
                reg = <0x00000000 0x20000000>;
 
                msp0: msp@80123000 {
                        pinctrl-names = "default";
-                       pinctrl-0 = <&msp0_default_mode>;
+                       pinctrl-0 = <&msp0txrxtfstck_a_1_default>;
                        status = "okay";
                };
 
                msp1: msp@80124000 {
                        pinctrl-names = "default";
-                       pinctrl-0 = <&msp1_default_mode>;
+                       pinctrl-0 = <&msp1txrx_a_1_default>;
                        status = "okay";
                };
 
                msp2: msp@80117000 {
                        pinctrl-names = "default";
-                       pinctrl-0 = <&msp2_default_mode>;
+                       pinctrl-0 = <&msp2_a_1_default>;
                };
 
                msp3: msp@80125000 {
                        vmmc-supply = <&ab8500_ldo_aux3_reg>;
                        vqmmc-supply = <&vmmci>;
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&sdi0_default_mode>;
-                       pinctrl-1 = <&sdi0_sleep_mode>;
+                       pinctrl-0 = <&mc0_a_1_default &sdi0_default_mode>;
+                       pinctrl-1 = <&mc0_a_1_sleep>;
 
                        /* GPIO218 MMC_CD */
                        cd-gpios  = <&gpio6 26 GPIO_ACTIVE_LOW>;
                        max-frequency = <100000000>;
                        bus-width = <4>;
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&sdi1_default_mode>;
-                       pinctrl-1 = <&sdi1_sleep_mode>;
+                       pinctrl-0 = <&mc1_a_1_default>;
+                       pinctrl-1 = <&mc1_a_1_sleep>;
 
                        status = "okay";
                };
                sdi2_per3@80005000 {
                        arm,primecell-periphid = <0x10480180>;
                        pinctrl-names = "default";
-                       pinctrl-0 = <&sdi2_sleep_mode>;
+                       pinctrl-0 = <&mc2_a_1_sleep>;
 
                        status = "okay";
                };
                        cap-mmc-highspeed;
                        vmmc-supply = <&ab8500_ldo_aux2_reg>;
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&sdi4_default_mode>;
-                       pinctrl-1 = <&sdi4_sleep_mode>;
+                       pinctrl-0 = <&mc4_a_1_default>;
+                       pinctrl-1 = <&mc4_a_1_sleep>;
 
                        status = "okay";
                };
 
                uart@80120000 {
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&uart0_default_mode>;
-                       pinctrl-1 = <&uart0_sleep_mode>;
+                       pinctrl-0 = <&u0_a_1_default>;
+                       pinctrl-1 = <&u0_a_1_sleep>;
                        status = "okay";
                };
 
                /* This UART is unused and thus left disabled */
                uart@80121000 {
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&uart1_default_mode>;
-                       pinctrl-1 = <&uart1_sleep_mode>;
+                       pinctrl-0 = <&u1rxtx_a_1_default>;
+                       pinctrl-1 = <&u1rxtx_a_1_sleep>;
                };
 
                uart@80007000 {
                        pinctrl-names = "default", "sleep";
-                       pinctrl-0 = <&uart2_default_mode>;
-                       pinctrl-1 = <&uart2_sleep_mode>;
+                       pinctrl-0 = <&u2rxtx_c_1_default>;
+                       pinctrl-1 = <&u2rxtx_c_1_sleep>;
                        status = "okay";
                };
 
                i2c@80004000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c0_default_mode>;
-                       pinctrl-1 = <&i2c0_sleep_mode>;
+                       pinctrl-0 = <&i2c0_a_1_default>;
+                       pinctrl-1 = <&i2c0_a_1_sleep>;
+                       status = "okay";
                };
 
                i2c@80122000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c1_default_mode>;
-                       pinctrl-1 = <&i2c1_sleep_mode>;
+                       pinctrl-0 = <&i2c1_b_2_default>;
+                       pinctrl-1 = <&i2c1_b_2_sleep>;
+                       status = "okay";
                };
 
                i2c@80128000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c2_default_mode>;
-                       pinctrl-1 = <&i2c2_sleep_mode>;
+                       pinctrl-0 = <&i2c2_b_2_default>;
+                       pinctrl-1 = <&i2c2_b_2_sleep>;
+                       status = "okay";
                        lsm303dlh@18 {
                                /* Accelerometer */
                                compatible = "st,lsm303dlh-accel";
 
                i2c@80110000 {
                        pinctrl-names = "default","sleep";
-                       pinctrl-0 = <&i2c3_default_mode>;
-                       pinctrl-1 = <&i2c3_sleep_mode>;
+                       pinctrl-0 = <&i2c3_c_2_default>;
+                       pinctrl-1 = <&i2c3_c_2_sleep>;
+                       status = "okay";
                };
 
                spi@80002000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&ssp0_snowball_mode>;
+                       status = "okay";
                };
 
                prcmu@80157000 {
-                       cpufreq {
-                               status = "okay";
-                       };
-
                        ab8500 {
                                ab8500-gpio {
                                        /*
 
                                ab8500_usb {
                                        pinctrl-names = "default", "sleep";
-                                       pinctrl-0 = <&musb_default_mode>;
-                                       pinctrl-1 = <&musb_sleep_mode>;
+                                       pinctrl-0 = <&usb_a_1_default>;
+                                       pinctrl-1 = <&usb_a_1_sleep>;
                                };
 
                                ext_regulators: ab8500-ext-regulators {
diff --git a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts
new file mode 100644 (file)
index 0000000..313f0ab
--- /dev/null
@@ -0,0 +1,455 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/dts-v1/;
+
+#include "ste-db8500.dtsi"
+#include "ste-ab8505.dtsi"
+#include "ste-dbx5x0-pinctrl.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/*
+ * Note: This device tree cannot be booted directly with the Samsung bootloader.
+ * You need an intermediate, device-tree compatible bootloader
+ * that locks the L2 cache. Otherwise the kernel will crash after decompression.
+ *
+ * There is a port of (mainline) U-Boot, see
+ * https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500#U-Boot
+ */
+/ {
+       model = "Samsung Galaxy S III mini (GT-I8190)";
+       compatible = "samsung,golden", "st-ericsson,u8500";
+
+       chosen {
+               stdout-path = &serial2;
+       };
+
+       soc {
+               /* External Micro SD card slot */
+               sdi0_per1@80126000 {
+                       status = "okay";
+
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <4>;
+
+                       non-removable;
+                       /*
+                        * Unfortunately, there is no way to enable the UHS
+                        * modes due to a limitation of the SD level translator:
+                        * It will either translate to 2.9V or disconnect the
+                        * DATA lines, so switching to 1.8V signal voltage fails.
+                        */
+                       cap-sd-highspeed;
+                       cap-mmc-highspeed;
+                       st,sig-pin-fbclk;
+                       full-pwr-cycle;
+
+                       vmmc-supply = <&ab8500_ldo_aux3_reg>;
+                       vqmmc-supply = <&sd_level_translator>;
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&mc0_a_2_default>;
+                       pinctrl-1 = <&mc0_a_2_sleep>;
+               };
+
+               /* WLAN SDIO */
+               sdi1_per2@80118000 {
+                       status = "okay";
+
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <50000000>;
+                       bus-width = <4>;
+
+                       non-removable;
+                       cap-sd-highspeed;
+
+                       vmmc-supply = <&wl_reg_on>;
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&mc1_a_2_default>;
+                       pinctrl-1 = <&mc1_a_2_sleep>;
+
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       wifi@1 {
+                               compatible = "brcm,bcm4329-fmac";
+                               reg = <1>;
+
+                               /* GPIO216 (WLAN_HOST_WAKE) */
+                               interrupt-parent = <&gpio6>;
+                               interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
+                               interrupt-names = "host-wake";
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&wlan_default>;
+                       };
+               };
+
+               /* eMMC */
+               sdi2_per3@80005000 {
+                       status = "okay";
+
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <8>;
+
+                       non-removable;
+                       cap-mmc-highspeed;
+                       mmc-ddr-1_8v;
+
+                       vmmc-supply = <&vmem_3v3>;
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&mc2_a_1_default>;
+                       pinctrl-1 = <&mc2_a_1_sleep>;
+               };
+
+               /* BT UART */
+               uart@80120000 {
+                       status = "okay";
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&u0_a_1_default>;
+                       pinctrl-1 = <&u0_a_1_sleep>;
+
+                       bluetooth {
+                               compatible = "brcm,bcm4330-bt";
+                               /* GPIO222 (BT_VREG_ON) */
+                               shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
+                               /* GPIO199 (BT_WAKE) */
+                               device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+                               /* GPIO97 (BT_HOST_WAKE) */
+                               host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&bluetooth_default>;
+                       };
+               };
+
+               /* GPF UART */
+               uart@80121000 {
+                       status = "okay";
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
+                       pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
+               };
+
+               /* Debugging console UART */
+               uart@80007000 {
+                       status = "okay";
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&u2rxtx_c_1_default>;
+                       pinctrl-1 = <&u2rxtx_c_1_sleep>;
+               };
+
+               i2c@80128000 {
+                       status = "okay";
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&i2c2_b_2_default>;
+                       pinctrl-1 = <&i2c2_b_2_sleep>;
+
+                       imu@68 {
+                               compatible = "invensense,mpu6050";
+                               reg = <0x68>;
+
+                               /* GPIO206 (ACC_INT) */
+                               interrupt-parent = <&gpio6>;
+                               interrupts = <14 IRQ_TYPE_EDGE_RISING>;
+
+                               mount-matrix = "0", "1", "0",
+                                             "-1", "0", "0",
+                                              "0", "0", "1";
+
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&ab8500_ldo_aux8_reg>;
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&imu_default>;
+                       };
+               };
+
+               i2c@80110000 {
+                       status = "okay";
+
+                       pinctrl-names = "default", "sleep";
+                       pinctrl-0 = <&i2c3_c_2_default>;
+                       pinctrl-1 = <&i2c3_c_2_sleep>;
+
+                       touchscreen@4a {
+                               compatible = "atmel,maxtouch";
+                               reg = <0x4a>;
+
+                               /* GPIO218 (TSP_INT_1V8) */
+                               interrupt-parent = <&gpio6>;
+                               interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&tsp_default>;
+                       };
+               };
+
+               prcmu@80157000 {
+                       ab8505 {
+                               ab8500_usb {
+                                       pinctrl-names = "default", "sleep";
+                                       pinctrl-0 = <&usb_a_1_default>;
+                                       pinctrl-1 = <&usb_a_1_sleep>;
+                               };
+
+                               ab8505-regulators {
+                                       ab8500_ldo_aux1 {
+                                               regulator-name = "sensor_3v";
+                                               regulator-min-microvolt = <3000000>;
+                                               regulator-max-microvolt = <3000000>;
+                                       };
+
+                                       ab8500_ldo_aux2 {
+                                               regulator-name = "vreg_tsp_a3v3";
+                                               regulator-min-microvolt = <3300000>;
+                                               regulator-max-microvolt = <3300000>;
+                                               regulator-always-on; /* FIXME */
+                                       };
+
+                                       ab8500_ldo_aux3 {
+                                               regulator-name = "vdd_tf_2v91";
+                                       };
+
+                                       ab8500_ldo_aux4 {
+                                               regulator-name = "key_led_3.3v";
+                                               regulator-min-microvolt = <3300000>;
+                                               regulator-max-microvolt = <3300000>;
+                                       };
+
+                                       ab8500_ldo_aux5 {
+                                               regulator-name = "vreg_tsp_1v8";
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+                                               regulator-always-on; /* FIXME */
+                                       };
+
+                                       ab8500_ldo_aux6 {
+                                               regulator-name = "touch_key_2.2v";
+                                               regulator-min-microvolt = <2200000>;
+                                               regulator-max-microvolt = <2200000>;
+                                       };
+
+                                       ab8500_ldo_aux8 {
+                                               regulator-name = "sensor_1v8";
+                                       };
+                               };
+                       };
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_keys_default>;
+
+               label = "GPIO Buttons";
+
+               volume-up {
+                       label = "Volume Up";
+                       /* GPIO67 (VOL_UP) */
+                       gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+
+               volume-down {
+                       label = "Volume Down";
+                       /* GPIO92 (VOL_DOWN) */
+                       gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+
+               home {
+                       label = "Home";
+                       /* GPIO91 (HOME_KEY) */
+                       gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_HOMEPAGE>;
+               };
+       };
+
+       vibrator {
+               compatible = "gpio-vibrator";
+               /* GPIO195 (MOT_EN) */
+               enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&vibrator_default>;
+       };
+
+       /* External LDO for eMMC */
+       vmem_3v3: regulator-vmem {
+               compatible = "regulator-fixed";
+
+               regulator-name = "vmem_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+
+               startup-delay-us = <200>;
+
+               /* GPIO223 (MEM_LDO_EN) */
+               gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&mem_ldo_default>;
+       };
+
+       /* TI TXS0206-29 level translator for 2.9 V */
+       sd_level_translator: regulator-sd-level-translator {
+               compatible = "regulator-fixed";
+
+               regulator-name = "sd-level-translator";
+               regulator-min-microvolt = <2900000>;
+               regulator-max-microvolt = <2900000>;
+
+               startup-delay-us = <200>;
+
+               /* GPIO87 (TXS0206-29_EN) */
+               gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&sd_level_translator_default>;
+       };
+
+       /*
+        * WL_REG_ON takes WLAN out of reset and enables the internal regulators.
+        * The voltage specified here is only used to determine the OCR mask,
+        * the BCM chip is actually connected directly to VBAT.
+        */
+       wl_reg_on: regulator-wl-reg-on {
+               compatible = "regulator-fixed";
+
+               regulator-name = "wl-reg-on";
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+
+               startup-delay-us = <100000>;
+
+               /* GPIO215 (WLAN_EN) */
+               gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&wlan_en_default>;
+       };
+};
+
+&pinctrl {
+       gpio-keys {
+               gpio_keys_default: gpio_keys_default {
+                       golden_cfg1 {
+                               pins = "GPIO67",        /* VOL_UP */
+                                      "GPIO91",        /* HOME_KEY */
+                                      "GPIO92";        /* VOL_DOWN */
+                               ste,config = <&gpio_in_pu>;
+                       };
+               };
+       };
+
+       sdi0 {
+               sd_level_translator_default: sd_level_translator_default {
+                       golden_cfg1 {
+                               pins = "GPIO87_B3";     /* TXS0206-29_EN */
+                               ste,config = <&gpio_out_lo>;
+                       };
+               };
+       };
+
+       sdi2 {
+               mem_ldo_default: mem_ldo_default {
+                       golden_cfg1 {
+                               pins = "GPIO223_AH9";   /* MEM_LDO_EN */
+                               ste,config = <&gpio_out_hi>;
+                       };
+               };
+       };
+
+       imu {
+               imu_default: imu_default {
+                       golden_cfg1 {
+                               pins = "GPIO206_AG24";  /* ACC_INT */
+                               ste,config = <&gpio_in_pd>;
+                       };
+               };
+       };
+
+       tsp {
+               tsp_default: tsp_default {
+                       golden_cfg1 {
+                               pins = "GPIO218_AH11";  /* TSP_INT_1V8 */
+                               ste,config = <&gpio_in_nopull>;
+                       };
+               };
+       };
+
+       wlan {
+               wlan_default: wlan_default {
+                       golden_cfg1 {
+                               pins = "GPIO216_AG12";  /* WLAN_HOST_WAKE */
+                               ste,config = <&gpio_in_pd>;
+                       };
+               };
+
+               wlan_en_default: wlan_en_default {
+                       golden_cfg1 {
+                               pins = "GPIO215_AH13";  /* WLAN_EN */
+                               ste,config = <&gpio_out_lo>;
+                       };
+               };
+       };
+
+       bluetooth {
+               bluetooth_default: bluetooth_default {
+                       golden_cfg1 {
+                               pins = "GPIO199_AH23",  /* BT_WAKE */
+                                      "GPIO222_AJ9";   /* BT_VREG_ON */
+                               ste,config = <&gpio_out_lo>;
+                       };
+                       golden_cfg2 {
+                               pins = "GPIO97_D9";     /* BT_HOST_WAKE */
+                               ste,config = <&gpio_in_nopull>;
+                       };
+               };
+       };
+
+       vibrator {
+               vibrator_default: vibrator_default {
+                       golden_cfg1 {
+                               pins = "GPIO195_AG28";  /* MOT_EN */
+                               ste,config = <&gpio_out_lo>;
+                       };
+               };
+       };
+};
+
+&ab8505_gpio {
+       /* Hog a few default settings */
+       pinctrl-names = "default";
+       pinctrl-0 = <&gpio_default>;
+
+       gpio {
+               gpio_default: gpio_default {
+                       golden_mux {
+                               /* Change unused pins to GPIO mode */
+                               function = "gpio";
+                               groups = "gpio3_a_1",   /* default: SysClkReq4 */
+                                        "gpio14_a_1";  /* default: PWMOut1 */
+                       };
+                       golden_cfg1 {
+                               pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";
+                               bias-disable;
+                       };
+               };
+       };
+};
index 58288aa53feee94b4053d50cf87f6a22426ad15b..c27fa355e5ab6e8748301892dcd3b8052b86480f 100644 (file)
                regulator-max-microvolt = <3300000>;
        };
 
+       vdd_panel: vdd-panel {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_panel";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
        leds {
                compatible = "gpio-leds";
                green {
 
        panel_rgb: panel-rgb {
                compatible = "ampire,am-480272h3tmqw-t01h";
+               power-supply = <&vdd_panel>;
                status = "okay";
                port {
                        panel_in_rgb: endpoint {
index 35202896c09350c3717f6507ca63f7d6e635aab1..392fa143ce07b67a3844bf20dcc171f48f7e2647 100644 (file)
                                st,bank-name = "GPIOK";
                        };
 
-                       usart1_pins_a: usart1@0 {
+                       usart1_pins_a: usart1-0 {
                                pins1 {
                                        pinmux = <STM32_PINMUX('A', 9, AF7)>; /* USART1_TX */
                                        bias-disable;
                                };
                        };
 
-                       usart3_pins_a: usart3@0 {
+                       usart3_pins_a: usart3-0 {
                                pins1 {
                                        pinmux = <STM32_PINMUX('B', 10, AF7)>; /* USART3_TX */
                                        bias-disable;
                                };
                        };
 
-                       usbotg_fs_pins_a: usbotg_fs@0 {
+                       usbotg_fs_pins_a: usbotg-fs-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('A', 10, AF10)>, /* OTG_FS_ID */
                                                 <STM32_PINMUX('A', 11, AF10)>, /* OTG_FS_DM */
                                };
                        };
 
-                       usbotg_fs_pins_b: usbotg_fs@1 {
+                       usbotg_fs_pins_b: usbotg-fs-1 {
                                pins {
                                        pinmux = <STM32_PINMUX('B', 12, AF12)>, /* OTG_HS_ID */
                                                 <STM32_PINMUX('B', 14, AF12)>, /* OTG_HS_DM */
                                };
                        };
 
-                       usbotg_hs_pins_a: usbotg_hs@0 {
+                       usbotg_hs_pins_a: usbotg-hs-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('H', 4, AF10)>, /* OTG_HS_ULPI_NXT*/
                                                 <STM32_PINMUX('I', 11, AF10)>, /* OTG_HS_ULPI_DIR */
                                };
                        };
 
-                       ethernet_mii: mii@0 {
+                       ethernet_mii: mii-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH_MII_TXD0_ETH_RMII_TXD0 */
                                                 <STM32_PINMUX('G', 14, AF11)>, /* ETH_MII_TXD1_ETH_RMII_TXD1 */
                                };
                        };
 
-                       adc3_in8_pin: adc@200 {
+                       adc3_in8_pin: adc-200 {
                                pins {
                                        pinmux = <STM32_PINMUX('F', 10, ANALOG)>;
                                };
                        };
 
-                       pwm1_pins: pwm@1 {
+                       pwm1_pins: pwm-1 {
                                pins {
                                        pinmux = <STM32_PINMUX('A', 8, AF1)>, /* TIM1_CH1 */
                                                 <STM32_PINMUX('B', 13, AF1)>, /* TIM1_CH1N */
                                };
                        };
 
-                       pwm3_pins: pwm@3 {
+                       pwm3_pins: pwm-3 {
                                pins {
                                        pinmux = <STM32_PINMUX('B', 4, AF2)>, /* TIM3_CH1 */
                                                 <STM32_PINMUX('B', 5, AF2)>; /* TIM3_CH2 */
                                };
                        };
 
-                       i2c1_pins: i2c1@0 {
+                       i2c1_pins: i2c1-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('B', 9, AF4)>, /* I2C1_SDA */
                                                 <STM32_PINMUX('B', 6, AF4)>; /* I2C1_SCL */
                                };
                        };
 
-                       ltdc_pins: ltdc@0 {
+                       ltdc_pins: ltdc-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('I', 12, AF14)>, /* LCD_HSYNC */
                                                 <STM32_PINMUX('I', 13, AF14)>, /* LCD_VSYNC */
                                };
                        };
 
-                       dcmi_pins: dcmi@0 {
+                       dcmi_pins: dcmi-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('A', 4, AF13)>, /* DCMI_HSYNC */
                                                 <STM32_PINMUX('B', 7, AF13)>, /* DCMI_VSYNC */
                                };
                        };
 
-                       sdio_pins: sdio_pins@0 {
+                       sdio_pins: sdio-pins-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDIO_D0 */
                                                 <STM32_PINMUX('C', 9, AF12)>, /* SDIO_D1 */
                                };
                        };
 
-                       sdio_pins_od: sdio_pins_od@0 {
+                       sdio_pins_od: sdio-pins-od-0 {
                                pins1 {
                                        pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDIO_D0 */
                                                 <STM32_PINMUX('C', 9, AF12)>, /* SDIO_D1 */
index 5c8a826b3195868ffbd204bcdc419279dacc0313..d7770699feb52b17c602e73ef336521d78b026a2 100644 (file)
@@ -80,7 +80,7 @@
        };
 
        soc {
-               romem: nvmem@1fff7800 {
+               romem: efuse@1fff7800 {
                        compatible = "st,stm32f4-otp";
                        reg = <0x1fff7800 0x400>;
                        #address-cells = <1>;
                        compatible = "st,stm32-rtc";
                        reg = <0x40002800 0x400>;
                        clocks = <&rcc 1 CLK_RTC>;
-                       clock-names = "ck_rtc";
                        assigned-clocks = <&rcc 1 CLK_RTC>;
                        assigned-clock-parents = <&rcc 1 CLK_LSE>;
                        interrupt-parent = <&exti>;
                rng: rng@50060800 {
                        compatible = "st,stm32-rng";
                        reg = <0x50060800 0x400>;
-                       interrupts = <80>;
                        clocks = <&rcc 0 STM32F4_AHB2_CLOCK(RNG)>;
 
                };
index f3ce477b7bae6f9932c16cf1040f90f107ee97e6..9397db0c43de261f9fd056f53704a186fcce3b4a 100644 (file)
                regulator-max-microvolt = <3300000>;
        };
 
+       vdd_dsi: vdd-dsi {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_dsi";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
        soc {
                dma-ranges = <0xc0000000 0x0 0x10000000>;
        };
                compatible = "orisetech,otm8009a";
                reg = <0>; /* dsi virtual channel (0..3) */
                reset-gpios = <&gpioh 7 GPIO_ACTIVE_LOW>;
+               power-supply = <&vdd_dsi>;
                status = "okay";
 
                port {
index 9314128df185919a737b7b74eb45322bd97284c1..fe4cfda72a4766735b3a3c99b47e3646e2a3290c 100644 (file)
                                st,bank-name = "GPIOK";
                        };
 
-                       cec_pins_a: cec@0 {
+                       cec_pins_a: cec-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('A', 15, AF4)>; /* HDMI CEC */
                                        slew-rate = <0>;
                                };
                        };
 
-                       usart1_pins_a: usart1@0 {
+                       usart1_pins_a: usart1-0 {
                                pins1 {
                                        pinmux = <STM32_PINMUX('A', 9, AF7)>; /* USART1_TX */
                                        bias-disable;
                                };
                        };
 
-                       usart1_pins_b: usart1@1 {
+                       usart1_pins_b: usart1-1 {
                                pins1 {
                                        pinmux = <STM32_PINMUX('A', 9, AF7)>; /* USART1_TX */
                                        bias-disable;
                                };
                        };
 
-                       i2c1_pins_b: i2c1@0 {
+                       i2c1_pins_b: i2c1-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('B', 9, AF4)>, /* I2C1 SDA */
                                                 <STM32_PINMUX('B', 8, AF4)>; /* I2C1 SCL */
                                };
                        };
 
-                       usbotg_hs_pins_a: usbotg-hs@0 {
+                       usbotg_hs_pins_a: usbotg-hs-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('H', 4, AF10)>, /* OTG_HS_ULPI_NXT */
                                                 <STM32_PINMUX('I', 11, AF10)>, /* OTG_HS_ULPI_DIR */
                                };
                        };
 
-                       usbotg_hs_pins_b: usbotg-hs@1 {
+                       usbotg_hs_pins_b: usbotg-hs-1 {
                                pins {
                                        pinmux = <STM32_PINMUX('H', 4, AF10)>, /* OTG_HS_ULPI_NXT */
                                                 <STM32_PINMUX('C', 2, AF10)>, /* OTG_HS_ULPI_DIR */
                                };
                        };
 
-                       usbotg_fs_pins_a: usbotg-fs@0 {
+                       usbotg_fs_pins_a: usbotg-fs-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('A', 10, AF10)>, /* OTG_FS_ID */
                                                 <STM32_PINMUX('A', 11, AF10)>, /* OTG_FS_DM */
                                };
                        };
 
-                       sdio_pins_a: sdio_pins_a@0 {
+                       sdio_pins_a: sdio-pins-a-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1 D0 */
                                                 <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1 D1 */
                                };
                        };
 
-                       sdio_pins_od_a: sdio_pins_od_a@0 {
+                       sdio_pins_od_a: sdio-pins-od-a-0 {
                                pins1 {
                                        pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1 D0 */
                                                 <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1 D1 */
                                };
                        };
 
-                       sdio_pins_b: sdio_pins_b@0 {
+                       sdio_pins_b: sdio-pins-b-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('G', 9, AF11)>, /* SDMMC2 D0 */
                                                 <STM32_PINMUX('G', 10, AF11)>, /* SDMMC2 D1 */
                                };
                        };
 
-                       sdio_pins_od_b: sdio_pins_od_b@0 {
+                       sdio_pins_od_b: sdio-pins-od-b-0 {
                                pins1 {
                                        pinmux = <STM32_PINMUX('G', 9, AF11)>, /* SDMMC2 D0 */
                                                 <STM32_PINMUX('G', 10, AF11)>, /* SDMMC2 D1 */
index d26f93f8b9c2a869dea44f305d39258c1eafd93d..93c063796780306cd1ea9fcbf8c51a639b9ad93d 100644 (file)
                        compatible = "st,stm32-rtc";
                        reg = <0x40002800 0x400>;
                        clocks = <&rcc 1 CLK_RTC>;
-                       clock-names = "ck_rtc";
                        assigned-clocks = <&rcc 1 CLK_RTC>;
                        assigned-clock-parents = <&rcc 1 CLK_LSE>;
                        interrupt-parent = <&exti>;
                        assigned-clock-rates = <1000000>;
                };
 
-               dma1: dma@40026000 {
+               dma1: dma-controller@40026000 {
                        compatible = "st,stm32-dma";
                        reg = <0x40026000 0x400>;
                        interrupts = <11>,
                        status = "disabled";
                };
 
-               dma2: dma@40026400 {
+               dma2: dma-controller@40026400 {
                        compatible = "st,stm32-dma";
                        reg = <0x40026400 0x400>;
                        interrupts = <56>,
index c065266ee37760940671e77ee1c04787e252eeab..05eb02e6d08300f9c4e67be28ceb185b8a9666a8 100644 (file)
                        status = "disabled";
                };
 
-               dma1: dma@40020000 {
+               dma1: dma-controller@40020000 {
                        compatible = "st,stm32-dma";
                        reg = <0x40020000 0x400>;
                        interrupts = <11>,
                        status = "disabled";
                };
 
-               dma2: dma@40020400 {
+               dma2: dma-controller@40020400 {
                        compatible = "st,stm32-dma";
                        reg = <0x40020400 0x400>;
                        interrupts = <56>,
                        status = "disabled";
                };
 
-               mdma1: dma@52000000 {
+               mdma1: dma-controller@52000000 {
                        compatible = "st,stm32h7-mdma";
                        reg = <0x52000000 0x1000>;
                        interrupts = <122>;
diff --git a/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..0237d4d
--- /dev/null
@@ -0,0 +1,1092 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
+ * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
+ */
+#include <dt-bindings/pinctrl/stm32-pinfunc.h>
+
+&pinctrl {
+       adc1_in6_pins_a: adc1-in6 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 12, ANALOG)>;
+               };
+       };
+
+       adc12_ain_pins_a: adc12-ain-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('C', 3, ANALOG)>, /* ADC1 in13 */
+                                <STM32_PINMUX('F', 12, ANALOG)>, /* ADC1 in6 */
+                                <STM32_PINMUX('F', 13, ANALOG)>, /* ADC2 in2 */
+                                <STM32_PINMUX('F', 14, ANALOG)>; /* ADC2 in6 */
+               };
+       };
+
+       adc12_usb_cc_pins_a: adc12-usb-cc-pins-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 4, ANALOG)>, /* ADC12 in18 */
+                                <STM32_PINMUX('A', 5, ANALOG)>; /* ADC12 in19 */
+               };
+       };
+
+       cec_pins_a: cec-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 15, AF4)>;
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       cec_pins_sleep_a: cec-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 15, ANALOG)>; /* HDMI_CEC */
+               };
+       };
+
+       cec_pins_b: cec-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('B', 6, AF5)>;
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       cec_pins_sleep_b: cec-sleep-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('B', 6, ANALOG)>; /* HDMI_CEC */
+               };
+       };
+
+       dac_ch1_pins_a: dac-ch1 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 4, ANALOG)>;
+               };
+       };
+
+       dac_ch2_pins_a: dac-ch2 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 5, ANALOG)>;
+               };
+       };
+
+       dcmi_pins_a: dcmi-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 8,  AF13)>,/* DCMI_HSYNC */
+                                <STM32_PINMUX('B', 7,  AF13)>,/* DCMI_VSYNC */
+                                <STM32_PINMUX('A', 6,  AF13)>,/* DCMI_PIXCLK */
+                                <STM32_PINMUX('H', 9,  AF13)>,/* DCMI_D0 */
+                                <STM32_PINMUX('H', 10, AF13)>,/* DCMI_D1 */
+                                <STM32_PINMUX('H', 11, AF13)>,/* DCMI_D2 */
+                                <STM32_PINMUX('H', 12, AF13)>,/* DCMI_D3 */
+                                <STM32_PINMUX('H', 14, AF13)>,/* DCMI_D4 */
+                                <STM32_PINMUX('I', 4,  AF13)>,/* DCMI_D5 */
+                                <STM32_PINMUX('B', 8,  AF13)>,/* DCMI_D6 */
+                                <STM32_PINMUX('E', 6,  AF13)>,/* DCMI_D7 */
+                                <STM32_PINMUX('I', 1,  AF13)>,/* DCMI_D8 */
+                                <STM32_PINMUX('H', 7,  AF13)>,/* DCMI_D9 */
+                                <STM32_PINMUX('I', 3,  AF13)>,/* DCMI_D10 */
+                                <STM32_PINMUX('H', 15, AF13)>;/* DCMI_D11 */
+                       bias-disable;
+               };
+       };
+
+       dcmi_sleep_pins_a: dcmi-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 8,  ANALOG)>,/* DCMI_HSYNC */
+                                <STM32_PINMUX('B', 7,  ANALOG)>,/* DCMI_VSYNC */
+                                <STM32_PINMUX('A', 6,  ANALOG)>,/* DCMI_PIXCLK */
+                                <STM32_PINMUX('H', 9,  ANALOG)>,/* DCMI_D0 */
+                                <STM32_PINMUX('H', 10, ANALOG)>,/* DCMI_D1 */
+                                <STM32_PINMUX('H', 11, ANALOG)>,/* DCMI_D2 */
+                                <STM32_PINMUX('H', 12, ANALOG)>,/* DCMI_D3 */
+                                <STM32_PINMUX('H', 14, ANALOG)>,/* DCMI_D4 */
+                                <STM32_PINMUX('I', 4,  ANALOG)>,/* DCMI_D5 */
+                                <STM32_PINMUX('B', 8,  ANALOG)>,/* DCMI_D6 */
+                                <STM32_PINMUX('E', 6,  ANALOG)>,/* DCMI_D7 */
+                                <STM32_PINMUX('I', 1,  ANALOG)>,/* DCMI_D8 */
+                                <STM32_PINMUX('H', 7,  ANALOG)>,/* DCMI_D9 */
+                                <STM32_PINMUX('I', 3,  ANALOG)>,/* DCMI_D10 */
+                                <STM32_PINMUX('H', 15, ANALOG)>;/* DCMI_D11 */
+               };
+       };
+
+       ethernet0_rgmii_pins_a: rgmii-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
+                                <STM32_PINMUX('G', 4, AF11)>, /* ETH_RGMII_GTX_CLK */
+                                <STM32_PINMUX('G', 13, AF11)>, /* ETH_RGMII_TXD0 */
+                                <STM32_PINMUX('G', 14, AF11)>, /* ETH_RGMII_TXD1 */
+                                <STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
+                                <STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
+                                <STM32_PINMUX('B', 11, AF11)>, /* ETH_RGMII_TX_CTL */
+                                <STM32_PINMUX('C', 1, AF11)>; /* ETH_MDC */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <2>;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('A', 2, AF11)>; /* ETH_MDIO */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+               pins3 {
+                       pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH_RGMII_RXD0 */
+                                <STM32_PINMUX('C', 5, AF11)>, /* ETH_RGMII_RXD1 */
+                                <STM32_PINMUX('B', 0, AF11)>, /* ETH_RGMII_RXD2 */
+                                <STM32_PINMUX('B', 1, AF11)>, /* ETH_RGMII_RXD3 */
+                                <STM32_PINMUX('A', 1, AF11)>, /* ETH_RGMII_RX_CLK */
+                                <STM32_PINMUX('A', 7, AF11)>; /* ETH_RGMII_RX_CTL */
+                       bias-disable;
+               };
+       };
+
+       ethernet0_rgmii_pins_sleep_a: rgmii-sleep-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
+                                <STM32_PINMUX('G', 4, ANALOG)>, /* ETH_RGMII_GTX_CLK */
+                                <STM32_PINMUX('G', 13, ANALOG)>, /* ETH_RGMII_TXD0 */
+                                <STM32_PINMUX('G', 14, ANALOG)>, /* ETH_RGMII_TXD1 */
+                                <STM32_PINMUX('C', 2, ANALOG)>, /* ETH_RGMII_TXD2 */
+                                <STM32_PINMUX('E', 2, ANALOG)>, /* ETH_RGMII_TXD3 */
+                                <STM32_PINMUX('B', 11, ANALOG)>, /* ETH_RGMII_TX_CTL */
+                                <STM32_PINMUX('A', 2, ANALOG)>, /* ETH_MDIO */
+                                <STM32_PINMUX('C', 1, ANALOG)>, /* ETH_MDC */
+                                <STM32_PINMUX('C', 4, ANALOG)>, /* ETH_RGMII_RXD0 */
+                                <STM32_PINMUX('C', 5, ANALOG)>, /* ETH_RGMII_RXD1 */
+                                <STM32_PINMUX('B', 0, ANALOG)>, /* ETH_RGMII_RXD2 */
+                                <STM32_PINMUX('B', 1, ANALOG)>, /* ETH_RGMII_RXD3 */
+                                <STM32_PINMUX('A', 1, ANALOG)>, /* ETH_RGMII_RX_CLK */
+                                <STM32_PINMUX('A', 7, ANALOG)>; /* ETH_RGMII_RX_CTL */
+               };
+       };
+
+       fmc_pins_a: fmc-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('D', 4, AF12)>, /* FMC_NOE */
+                                <STM32_PINMUX('D', 5, AF12)>, /* FMC_NWE */
+                                <STM32_PINMUX('D', 11, AF12)>, /* FMC_A16_FMC_CLE */
+                                <STM32_PINMUX('D', 12, AF12)>, /* FMC_A17_FMC_ALE */
+                                <STM32_PINMUX('D', 14, AF12)>, /* FMC_D0 */
+                                <STM32_PINMUX('D', 15, AF12)>, /* FMC_D1 */
+                                <STM32_PINMUX('D', 0, AF12)>, /* FMC_D2 */
+                                <STM32_PINMUX('D', 1, AF12)>, /* FMC_D3 */
+                                <STM32_PINMUX('E', 7, AF12)>, /* FMC_D4 */
+                                <STM32_PINMUX('E', 8, AF12)>, /* FMC_D5 */
+                                <STM32_PINMUX('E', 9, AF12)>, /* FMC_D6 */
+                                <STM32_PINMUX('E', 10, AF12)>, /* FMC_D7 */
+                                <STM32_PINMUX('G', 9, AF12)>; /* FMC_NE2_FMC_NCE */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('D', 6, AF12)>; /* FMC_NWAIT */
+                       bias-pull-up;
+               };
+       };
+
+       fmc_sleep_pins_a: fmc-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 4, ANALOG)>, /* FMC_NOE */
+                                <STM32_PINMUX('D', 5, ANALOG)>, /* FMC_NWE */
+                                <STM32_PINMUX('D', 11, ANALOG)>, /* FMC_A16_FMC_CLE */
+                                <STM32_PINMUX('D', 12, ANALOG)>, /* FMC_A17_FMC_ALE */
+                                <STM32_PINMUX('D', 14, ANALOG)>, /* FMC_D0 */
+                                <STM32_PINMUX('D', 15, ANALOG)>, /* FMC_D1 */
+                                <STM32_PINMUX('D', 0, ANALOG)>, /* FMC_D2 */
+                                <STM32_PINMUX('D', 1, ANALOG)>, /* FMC_D3 */
+                                <STM32_PINMUX('E', 7, ANALOG)>, /* FMC_D4 */
+                                <STM32_PINMUX('E', 8, ANALOG)>, /* FMC_D5 */
+                                <STM32_PINMUX('E', 9, ANALOG)>, /* FMC_D6 */
+                                <STM32_PINMUX('E', 10, ANALOG)>, /* FMC_D7 */
+                                <STM32_PINMUX('D', 6, ANALOG)>, /* FMC_NWAIT */
+                                <STM32_PINMUX('G', 9, ANALOG)>; /* FMC_NE2_FMC_NCE */
+               };
+       };
+
+       i2c1_pins_a: i2c1-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 12, AF5)>, /* I2C1_SCL */
+                                <STM32_PINMUX('F', 15, AF5)>; /* I2C1_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c1_pins_sleep_a: i2c1-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 12, ANALOG)>, /* I2C1_SCL */
+                                <STM32_PINMUX('F', 15, ANALOG)>; /* I2C1_SDA */
+               };
+       };
+
+       i2c1_pins_b: i2c1-2 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 14, AF5)>, /* I2C1_SCL */
+                                <STM32_PINMUX('F', 15, AF5)>; /* I2C1_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c1_pins_sleep_b: i2c1-3 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 14, ANALOG)>, /* I2C1_SCL */
+                                <STM32_PINMUX('F', 15, ANALOG)>; /* I2C1_SDA */
+               };
+       };
+
+       i2c2_pins_a: i2c2-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 4, AF4)>, /* I2C2_SCL */
+                                <STM32_PINMUX('H', 5, AF4)>; /* I2C2_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c2_pins_sleep_a: i2c2-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 4, ANALOG)>, /* I2C2_SCL */
+                                <STM32_PINMUX('H', 5, ANALOG)>; /* I2C2_SDA */
+               };
+       };
+
+       i2c2_pins_b1: i2c2-2 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 5, AF4)>; /* I2C2_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c2_pins_sleep_b1: i2c2-3 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 5, ANALOG)>; /* I2C2_SDA */
+               };
+       };
+
+       i2c5_pins_a: i2c5-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 11, AF4)>, /* I2C5_SCL */
+                                <STM32_PINMUX('A', 12, AF4)>; /* I2C5_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c5_pins_sleep_a: i2c5-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 11, ANALOG)>, /* I2C5_SCL */
+                                <STM32_PINMUX('A', 12, ANALOG)>; /* I2C5_SDA */
+
+               };
+       };
+
+       i2s2_pins_a: i2s2-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 3, AF5)>, /* I2S2_SDO */
+                                <STM32_PINMUX('B', 9, AF5)>, /* I2S2_WS */
+                                <STM32_PINMUX('A', 9, AF5)>; /* I2S2_CK */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+       };
+
+       i2s2_pins_sleep_a: i2s2-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 3, ANALOG)>, /* I2S2_SDO */
+                                <STM32_PINMUX('B', 9, ANALOG)>, /* I2S2_WS */
+                                <STM32_PINMUX('A', 9, ANALOG)>; /* I2S2_CK */
+               };
+       };
+
+       ltdc_pins_a: ltdc-a-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('G',  7, AF14)>, /* LCD_CLK */
+                                <STM32_PINMUX('I', 10, AF14)>, /* LCD_HSYNC */
+                                <STM32_PINMUX('I',  9, AF14)>, /* LCD_VSYNC */
+                                <STM32_PINMUX('F', 10, AF14)>, /* LCD_DE */
+                                <STM32_PINMUX('H',  2, AF14)>, /* LCD_R0 */
+                                <STM32_PINMUX('H',  3, AF14)>, /* LCD_R1 */
+                                <STM32_PINMUX('H',  8, AF14)>, /* LCD_R2 */
+                                <STM32_PINMUX('H',  9, AF14)>, /* LCD_R3 */
+                                <STM32_PINMUX('H', 10, AF14)>, /* LCD_R4 */
+                                <STM32_PINMUX('C',  0, AF14)>, /* LCD_R5 */
+                                <STM32_PINMUX('H', 12, AF14)>, /* LCD_R6 */
+                                <STM32_PINMUX('E', 15, AF14)>, /* LCD_R7 */
+                                <STM32_PINMUX('E',  5, AF14)>, /* LCD_G0 */
+                                <STM32_PINMUX('E',  6, AF14)>, /* LCD_G1 */
+                                <STM32_PINMUX('H', 13, AF14)>, /* LCD_G2 */
+                                <STM32_PINMUX('H', 14, AF14)>, /* LCD_G3 */
+                                <STM32_PINMUX('H', 15, AF14)>, /* LCD_G4 */
+                                <STM32_PINMUX('I',  0, AF14)>, /* LCD_G5 */
+                                <STM32_PINMUX('I',  1, AF14)>, /* LCD_G6 */
+                                <STM32_PINMUX('I',  2, AF14)>, /* LCD_G7 */
+                                <STM32_PINMUX('D',  9, AF14)>, /* LCD_B0 */
+                                <STM32_PINMUX('G', 12, AF14)>, /* LCD_B1 */
+                                <STM32_PINMUX('G', 10, AF14)>, /* LCD_B2 */
+                                <STM32_PINMUX('D', 10, AF14)>, /* LCD_B3 */
+                                <STM32_PINMUX('I',  4, AF14)>, /* LCD_B4 */
+                                <STM32_PINMUX('A',  3, AF14)>, /* LCD_B5 */
+                                <STM32_PINMUX('B',  8, AF14)>, /* LCD_B6 */
+                                <STM32_PINMUX('D',  8, AF14)>; /* LCD_B7 */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+       };
+
+       ltdc_pins_sleep_a: ltdc-a-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('G',  7, ANALOG)>, /* LCD_CLK */
+                                <STM32_PINMUX('I', 10, ANALOG)>, /* LCD_HSYNC */
+                                <STM32_PINMUX('I',  9, ANALOG)>, /* LCD_VSYNC */
+                                <STM32_PINMUX('F', 10, ANALOG)>, /* LCD_DE */
+                                <STM32_PINMUX('H',  2, ANALOG)>, /* LCD_R0 */
+                                <STM32_PINMUX('H',  3, ANALOG)>, /* LCD_R1 */
+                                <STM32_PINMUX('H',  8, ANALOG)>, /* LCD_R2 */
+                                <STM32_PINMUX('H',  9, ANALOG)>, /* LCD_R3 */
+                                <STM32_PINMUX('H', 10, ANALOG)>, /* LCD_R4 */
+                                <STM32_PINMUX('C',  0, ANALOG)>, /* LCD_R5 */
+                                <STM32_PINMUX('H', 12, ANALOG)>, /* LCD_R6 */
+                                <STM32_PINMUX('E', 15, ANALOG)>, /* LCD_R7 */
+                                <STM32_PINMUX('E',  5, ANALOG)>, /* LCD_G0 */
+                                <STM32_PINMUX('E',  6, ANALOG)>, /* LCD_G1 */
+                                <STM32_PINMUX('H', 13, ANALOG)>, /* LCD_G2 */
+                                <STM32_PINMUX('H', 14, ANALOG)>, /* LCD_G3 */
+                                <STM32_PINMUX('H', 15, ANALOG)>, /* LCD_G4 */
+                                <STM32_PINMUX('I',  0, ANALOG)>, /* LCD_G5 */
+                                <STM32_PINMUX('I',  1, ANALOG)>, /* LCD_G6 */
+                                <STM32_PINMUX('I',  2, ANALOG)>, /* LCD_G7 */
+                                <STM32_PINMUX('D',  9, ANALOG)>, /* LCD_B0 */
+                                <STM32_PINMUX('G', 12, ANALOG)>, /* LCD_B1 */
+                                <STM32_PINMUX('G', 10, ANALOG)>, /* LCD_B2 */
+                                <STM32_PINMUX('D', 10, ANALOG)>, /* LCD_B3 */
+                                <STM32_PINMUX('I',  4, ANALOG)>, /* LCD_B4 */
+                                <STM32_PINMUX('A',  3, ANALOG)>, /* LCD_B5 */
+                                <STM32_PINMUX('B',  8, ANALOG)>, /* LCD_B6 */
+                                <STM32_PINMUX('D',  8, ANALOG)>; /* LCD_B7 */
+               };
+       };
+
+       ltdc_pins_b: ltdc-b-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 14, AF14)>, /* LCD_CLK */
+                                <STM32_PINMUX('I', 12, AF14)>, /* LCD_HSYNC */
+                                <STM32_PINMUX('I', 13, AF14)>, /* LCD_VSYNC */
+                                <STM32_PINMUX('K',  7, AF14)>, /* LCD_DE */
+                                <STM32_PINMUX('I', 15, AF14)>, /* LCD_R0 */
+                                <STM32_PINMUX('J',  0, AF14)>, /* LCD_R1 */
+                                <STM32_PINMUX('J',  1, AF14)>, /* LCD_R2 */
+                                <STM32_PINMUX('J',  2, AF14)>, /* LCD_R3 */
+                                <STM32_PINMUX('J',  3, AF14)>, /* LCD_R4 */
+                                <STM32_PINMUX('J',  4, AF14)>, /* LCD_R5 */
+                                <STM32_PINMUX('J',  5, AF14)>, /* LCD_R6 */
+                                <STM32_PINMUX('J',  6, AF14)>, /* LCD_R7 */
+                                <STM32_PINMUX('J',  7, AF14)>, /* LCD_G0 */
+                                <STM32_PINMUX('J',  8, AF14)>, /* LCD_G1 */
+                                <STM32_PINMUX('J',  9, AF14)>, /* LCD_G2 */
+                                <STM32_PINMUX('J', 10, AF14)>, /* LCD_G3 */
+                                <STM32_PINMUX('J', 11, AF14)>, /* LCD_G4 */
+                                <STM32_PINMUX('K',  0, AF14)>, /* LCD_G5 */
+                                <STM32_PINMUX('K',  1, AF14)>, /* LCD_G6 */
+                                <STM32_PINMUX('K',  2, AF14)>, /* LCD_G7 */
+                                <STM32_PINMUX('J', 12, AF14)>, /* LCD_B0 */
+                                <STM32_PINMUX('J', 13, AF14)>, /* LCD_B1 */
+                                <STM32_PINMUX('J', 14, AF14)>, /* LCD_B2 */
+                                <STM32_PINMUX('J', 15, AF14)>, /* LCD_B3 */
+                                <STM32_PINMUX('K',  3, AF14)>, /* LCD_B4 */
+                                <STM32_PINMUX('K',  4, AF14)>, /* LCD_B5 */
+                                <STM32_PINMUX('K',  5, AF14)>, /* LCD_B6 */
+                                <STM32_PINMUX('K',  6, AF14)>; /* LCD_B7 */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+       };
+
+       ltdc_pins_sleep_b: ltdc-b-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 14, ANALOG)>, /* LCD_CLK */
+                                <STM32_PINMUX('I', 12, ANALOG)>, /* LCD_HSYNC */
+                                <STM32_PINMUX('I', 13, ANALOG)>, /* LCD_VSYNC */
+                                <STM32_PINMUX('K',  7, ANALOG)>, /* LCD_DE */
+                                <STM32_PINMUX('I', 15, ANALOG)>, /* LCD_R0 */
+                                <STM32_PINMUX('J',  0, ANALOG)>, /* LCD_R1 */
+                                <STM32_PINMUX('J',  1, ANALOG)>, /* LCD_R2 */
+                                <STM32_PINMUX('J',  2, ANALOG)>, /* LCD_R3 */
+                                <STM32_PINMUX('J',  3, ANALOG)>, /* LCD_R4 */
+                                <STM32_PINMUX('J',  4, ANALOG)>, /* LCD_R5 */
+                                <STM32_PINMUX('J',  5, ANALOG)>, /* LCD_R6 */
+                                <STM32_PINMUX('J',  6, ANALOG)>, /* LCD_R7 */
+                                <STM32_PINMUX('J',  7, ANALOG)>, /* LCD_G0 */
+                                <STM32_PINMUX('J',  8, ANALOG)>, /* LCD_G1 */
+                                <STM32_PINMUX('J',  9, ANALOG)>, /* LCD_G2 */
+                                <STM32_PINMUX('J', 10, ANALOG)>, /* LCD_G3 */
+                                <STM32_PINMUX('J', 11, ANALOG)>, /* LCD_G4 */
+                                <STM32_PINMUX('K',  0, ANALOG)>, /* LCD_G5 */
+                                <STM32_PINMUX('K',  1, ANALOG)>, /* LCD_G6 */
+                                <STM32_PINMUX('K',  2, ANALOG)>, /* LCD_G7 */
+                                <STM32_PINMUX('J', 12, ANALOG)>, /* LCD_B0 */
+                                <STM32_PINMUX('J', 13, ANALOG)>, /* LCD_B1 */
+                                <STM32_PINMUX('J', 14, ANALOG)>, /* LCD_B2 */
+                                <STM32_PINMUX('J', 15, ANALOG)>, /* LCD_B3 */
+                                <STM32_PINMUX('K',  3, ANALOG)>, /* LCD_B4 */
+                                <STM32_PINMUX('K',  4, ANALOG)>, /* LCD_B5 */
+                                <STM32_PINMUX('K',  5, ANALOG)>, /* LCD_B6 */
+                                <STM32_PINMUX('K',  6, ANALOG)>; /* LCD_B7 */
+               };
+       };
+
+       m_can1_pins_a: m-can1-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('H', 13, AF9)>; /* CAN1_TX */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('I', 9, AF9)>; /* CAN1_RX */
+                       bias-disable;
+               };
+       };
+
+       m_can1_sleep_pins_a: m_can1-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 13, ANALOG)>, /* CAN1_TX */
+                                <STM32_PINMUX('I', 9, ANALOG)>; /* CAN1_RX */
+               };
+       };
+
+       pwm1_pins_a: pwm1-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('E', 9, AF1)>, /* TIM1_CH1 */
+                                <STM32_PINMUX('E', 11, AF1)>, /* TIM1_CH2 */
+                                <STM32_PINMUX('E', 14, AF1)>; /* TIM1_CH4 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm1_sleep_pins_a: pwm1-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('E', 9, ANALOG)>, /* TIM1_CH1 */
+                                <STM32_PINMUX('E', 11, ANALOG)>, /* TIM1_CH2 */
+                                <STM32_PINMUX('E', 14, ANALOG)>; /* TIM1_CH4 */
+               };
+       };
+
+       pwm2_pins_a: pwm2-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 3, AF1)>; /* TIM2_CH4 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm2_sleep_pins_a: pwm2-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 3, ANALOG)>; /* TIM2_CH4 */
+               };
+       };
+
+       pwm3_pins_a: pwm3-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('C', 7, AF2)>; /* TIM3_CH2 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm3_sleep_pins_a: pwm3-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('C', 7, ANALOG)>; /* TIM3_CH2 */
+               };
+       };
+
+       pwm4_pins_a: pwm4-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 14, AF2)>, /* TIM4_CH3 */
+                                <STM32_PINMUX('D', 15, AF2)>; /* TIM4_CH4 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm4_sleep_pins_a: pwm4-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 14, ANALOG)>, /* TIM4_CH3 */
+                                <STM32_PINMUX('D', 15, ANALOG)>; /* TIM4_CH4 */
+               };
+       };
+
+       pwm4_pins_b: pwm4-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 13, AF2)>; /* TIM4_CH2 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm4_sleep_pins_b: pwm4-sleep-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 13, ANALOG)>; /* TIM4_CH2 */
+               };
+       };
+
+       pwm5_pins_a: pwm5-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 11, AF2)>; /* TIM5_CH2 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm5_sleep_pins_a: pwm5-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 11, ANALOG)>; /* TIM5_CH2 */
+               };
+       };
+
+       pwm8_pins_a: pwm8-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 2, AF3)>; /* TIM8_CH4 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm8_sleep_pins_a: pwm8-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 2, ANALOG)>; /* TIM8_CH4 */
+               };
+       };
+
+       pwm12_pins_a: pwm12-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 6, AF2)>; /* TIM12_CH1 */
+                       bias-pull-down;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+       };
+
+       pwm12_sleep_pins_a: pwm12-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 6, ANALOG)>; /* TIM12_CH1 */
+               };
+       };
+
+       qspi_clk_pins_a: qspi-clk-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 10, AF9)>; /* QSPI_CLK */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <3>;
+               };
+       };
+
+       qspi_clk_sleep_pins_a: qspi-clk-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 10, ANALOG)>; /* QSPI_CLK */
+               };
+       };
+
+       qspi_bk1_pins_a: qspi-bk1-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('F', 8, AF10)>, /* QSPI_BK1_IO0 */
+                                <STM32_PINMUX('F', 9, AF10)>, /* QSPI_BK1_IO1 */
+                                <STM32_PINMUX('F', 7, AF9)>, /* QSPI_BK1_IO2 */
+                                <STM32_PINMUX('F', 6, AF9)>; /* QSPI_BK1_IO3 */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('B', 6, AF10)>; /* QSPI_BK1_NCS */
+                       bias-pull-up;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+       };
+
+       qspi_bk1_sleep_pins_a: qspi-bk1-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 8, ANALOG)>, /* QSPI_BK1_IO0 */
+                                <STM32_PINMUX('F', 9, ANALOG)>, /* QSPI_BK1_IO1 */
+                                <STM32_PINMUX('F', 7, ANALOG)>, /* QSPI_BK1_IO2 */
+                                <STM32_PINMUX('F', 6, ANALOG)>, /* QSPI_BK1_IO3 */
+                                <STM32_PINMUX('B', 6, ANALOG)>; /* QSPI_BK1_NCS */
+               };
+       };
+
+       qspi_bk2_pins_a: qspi-bk2-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('H', 2, AF9)>, /* QSPI_BK2_IO0 */
+                                <STM32_PINMUX('H', 3, AF9)>, /* QSPI_BK2_IO1 */
+                                <STM32_PINMUX('G', 10, AF11)>, /* QSPI_BK2_IO2 */
+                                <STM32_PINMUX('G', 7, AF11)>; /* QSPI_BK2_IO3 */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('C', 0, AF10)>; /* QSPI_BK2_NCS */
+                       bias-pull-up;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+       };
+
+       qspi_bk2_sleep_pins_a: qspi-bk2-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('H', 2, ANALOG)>, /* QSPI_BK2_IO0 */
+                                <STM32_PINMUX('H', 3, ANALOG)>, /* QSPI_BK2_IO1 */
+                                <STM32_PINMUX('G', 10, ANALOG)>, /* QSPI_BK2_IO2 */
+                                <STM32_PINMUX('G', 7, ANALOG)>, /* QSPI_BK2_IO3 */
+                                <STM32_PINMUX('C', 0, ANALOG)>; /* QSPI_BK2_NCS */
+               };
+       };
+
+       sai2a_pins_a: sai2a-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 5, AF10)>, /* SAI2_SCK_A */
+                                <STM32_PINMUX('I', 6, AF10)>, /* SAI2_SD_A */
+                                <STM32_PINMUX('I', 7, AF10)>, /* SAI2_FS_A */
+                                <STM32_PINMUX('E', 0, AF10)>; /* SAI2_MCLK_A */
+                       slew-rate = <0>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+       };
+
+       sai2a_sleep_pins_a: sai2a-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('I', 5, ANALOG)>, /* SAI2_SCK_A */
+                                <STM32_PINMUX('I', 6, ANALOG)>, /* SAI2_SD_A */
+                                <STM32_PINMUX('I', 7, ANALOG)>, /* SAI2_FS_A */
+                                <STM32_PINMUX('E', 0, ANALOG)>; /* SAI2_MCLK_A */
+               };
+       };
+
+       sai2b_pins_a: sai2b-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('E', 12, AF10)>, /* SAI2_SCK_B */
+                                <STM32_PINMUX('E', 13, AF10)>, /* SAI2_FS_B */
+                                <STM32_PINMUX('E', 14, AF10)>; /* SAI2_MCLK_B */
+                       slew-rate = <0>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('F', 11, AF10)>; /* SAI2_SD_B */
+                       bias-disable;
+               };
+       };
+
+       sai2b_sleep_pins_a: sai2b-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 11, ANALOG)>, /* SAI2_SD_B */
+                                <STM32_PINMUX('E', 12, ANALOG)>, /* SAI2_SCK_B */
+                                <STM32_PINMUX('E', 13, ANALOG)>, /* SAI2_FS_B */
+                                <STM32_PINMUX('E', 14, ANALOG)>; /* SAI2_MCLK_B */
+               };
+       };
+
+       sai2b_pins_b: sai2b-2 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 11, AF10)>; /* SAI2_SD_B */
+                       bias-disable;
+               };
+       };
+
+       sai2b_sleep_pins_b: sai2b-3 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 11, ANALOG)>; /* SAI2_SD_B */
+               };
+       };
+
+       sai4a_pins_a: sai4a-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('B', 5, AF10)>; /* SAI4_SD_A */
+                       slew-rate = <0>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+       };
+
+       sai4a_sleep_pins_a: sai4a-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('B', 5, ANALOG)>; /* SAI4_SD_A */
+               };
+       };
+
+       sdmmc1_b4_pins_a: sdmmc1-b4-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
+                                <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
+                                <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
+                                <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
+                                <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+       };
+
+       sdmmc1_b4_od_pins_a: sdmmc1-b4-od-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
+                                <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
+                                <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
+                                <STM32_PINMUX('C', 11, AF12)>; /* SDMMC1_D3 */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins3 {
+                       pinmux = <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
+                       slew-rate = <1>;
+                       drive-open-drain;
+                       bias-disable;
+               };
+       };
+
+       sdmmc1_b4_sleep_pins_a: sdmmc1-b4-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1_D0 */
+                                <STM32_PINMUX('C', 9, ANALOG)>, /* SDMMC1_D1 */
+                                <STM32_PINMUX('C', 10, ANALOG)>, /* SDMMC1_D2 */
+                                <STM32_PINMUX('C', 11, ANALOG)>, /* SDMMC1_D3 */
+                                <STM32_PINMUX('C', 12, ANALOG)>, /* SDMMC1_CK */
+                                <STM32_PINMUX('D', 2, ANALOG)>; /* SDMMC1_CMD */
+               };
+       };
+
+       sdmmc1_dir_pins_a: sdmmc1-dir-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('F', 2, AF11)>, /* SDMMC1_D0DIR */
+                                <STM32_PINMUX('C', 7, AF8)>, /* SDMMC1_D123DIR */
+                                <STM32_PINMUX('B', 9, AF11)>; /* SDMMC1_CDIR */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+               pins2{
+                       pinmux = <STM32_PINMUX('E', 4, AF8)>; /* SDMMC1_CKIN */
+                       bias-pull-up;
+               };
+       };
+
+       sdmmc1_dir_sleep_pins_a: sdmmc1-dir-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 2, ANALOG)>, /* SDMMC1_D0DIR */
+                                <STM32_PINMUX('C', 7, ANALOG)>, /* SDMMC1_D123DIR */
+                                <STM32_PINMUX('B', 9, ANALOG)>, /* SDMMC1_CDIR */
+                                <STM32_PINMUX('E', 4, ANALOG)>; /* SDMMC1_CKIN */
+               };
+       };
+
+       sdmmc2_b4_pins_a: sdmmc2-b4-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
+                                <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
+                                <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
+                                <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
+                                <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+       };
+
+       sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
+                                <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
+                                <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
+                                <STM32_PINMUX('B', 4, AF9)>; /* SDMMC2_D3 */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+               pins3 {
+                       pinmux = <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
+                       slew-rate = <1>;
+                       drive-open-drain;
+                       bias-pull-up;
+               };
+       };
+
+       sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('B', 14, ANALOG)>, /* SDMMC2_D0 */
+                                <STM32_PINMUX('B', 15, ANALOG)>, /* SDMMC2_D1 */
+                                <STM32_PINMUX('B', 3, ANALOG)>, /* SDMMC2_D2 */
+                                <STM32_PINMUX('B', 4, ANALOG)>, /* SDMMC2_D3 */
+                                <STM32_PINMUX('E', 3, ANALOG)>, /* SDMMC2_CK */
+                                <STM32_PINMUX('G', 6, ANALOG)>; /* SDMMC2_CMD */
+               };
+       };
+
+       sdmmc2_b4_pins_b: sdmmc2-b4-1 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
+                                <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
+                                <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
+                                <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
+                                <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+       };
+
+       sdmmc2_b4_od_pins_b: sdmmc2-b4-od-1 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
+                                <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
+                                <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
+                                <STM32_PINMUX('B', 4, AF9)>; /* SDMMC2_D3 */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-disable;
+               };
+               pins3 {
+                       pinmux = <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
+                       slew-rate = <1>;
+                       drive-open-drain;
+                       bias-disable;
+               };
+       };
+
+       sdmmc2_d47_pins_a: sdmmc2-d47-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
+                                <STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
+                                <STM32_PINMUX('E', 5, AF9)>, /* SDMMC2_D6 */
+                                <STM32_PINMUX('D', 3, AF9)>; /* SDMMC2_D7 */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+       };
+
+       sdmmc2_d47_sleep_pins_a: sdmmc2-d47-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
+                                <STM32_PINMUX('A', 9, ANALOG)>, /* SDMMC2_D5 */
+                                <STM32_PINMUX('E', 5, ANALOG)>, /* SDMMC2_D6 */
+                                <STM32_PINMUX('D', 3, ANALOG)>; /* SDMMC2_D7 */
+               };
+       };
+
+       sdmmc3_b4_pins_a: sdmmc3-b4-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
+                                <STM32_PINMUX('F', 4, AF9)>, /* SDMMC3_D1 */
+                                <STM32_PINMUX('F', 5, AF9)>, /* SDMMC3_D2 */
+                                <STM32_PINMUX('D', 7, AF10)>, /* SDMMC3_D3 */
+                                <STM32_PINMUX('F', 1, AF9)>; /* SDMMC3_CMD */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('G', 15, AF10)>; /* SDMMC3_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+       };
+
+       sdmmc3_b4_od_pins_a: sdmmc3-b4-od-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
+                                <STM32_PINMUX('F', 4, AF9)>, /* SDMMC3_D1 */
+                                <STM32_PINMUX('F', 5, AF9)>, /* SDMMC3_D2 */
+                                <STM32_PINMUX('D', 7, AF10)>; /* SDMMC3_D3 */
+                       slew-rate = <1>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('G', 15, AF10)>; /* SDMMC3_CK */
+                       slew-rate = <2>;
+                       drive-push-pull;
+                       bias-pull-up;
+               };
+               pins3 {
+                       pinmux = <STM32_PINMUX('F', 1, AF9)>; /* SDMMC2_CMD */
+                       slew-rate = <1>;
+                       drive-open-drain;
+                       bias-pull-up;
+               };
+       };
+
+       sdmmc3_b4_sleep_pins_a: sdmmc3-b4-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('F', 0, ANALOG)>, /* SDMMC3_D0 */
+                                <STM32_PINMUX('F', 4, ANALOG)>, /* SDMMC3_D1 */
+                                <STM32_PINMUX('F', 5, ANALOG)>, /* SDMMC3_D2 */
+                                <STM32_PINMUX('D', 7, ANALOG)>, /* SDMMC3_D3 */
+                                <STM32_PINMUX('G', 15, ANALOG)>, /* SDMMC3_CK */
+                                <STM32_PINMUX('F', 1, ANALOG)>; /* SDMMC3_CMD */
+               };
+       };
+
+       spdifrx_pins_a: spdifrx-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('G', 12, AF8)>; /* SPDIF_IN1 */
+                       bias-disable;
+               };
+       };
+
+       spdifrx_sleep_pins_a: spdifrx-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('G', 12, ANALOG)>; /* SPDIF_IN1 */
+               };
+       };
+
+       uart4_pins_a: uart4-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
+                       bias-disable;
+               };
+       };
+
+       uart4_pins_b: uart4-1 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('D', 1, AF8)>; /* UART4_TX */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
+                       bias-disable;
+               };
+       };
+
+       uart7_pins_a: uart7-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART4_TX */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <0>;
+               };
+               pins2 {
+                       pinmux = <STM32_PINMUX('E', 7, AF7)>, /* UART4_RX */
+                                <STM32_PINMUX('E', 10, AF7)>, /* UART4_CTS */
+                                <STM32_PINMUX('E', 9, AF7)>; /* UART4_RTS */
+                       bias-disable;
+               };
+       };
+};
+
+&pinctrl_z {
+       i2c2_pins_b2: i2c2-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('Z', 0, AF3)>; /* I2C2_SCL */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c2_pins_sleep_b2: i2c2-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('Z', 0, ANALOG)>; /* I2C2_SCL */
+               };
+       };
+
+       i2c4_pins_a: i2c4-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('Z', 4, AF6)>, /* I2C4_SCL */
+                                <STM32_PINMUX('Z', 5, AF6)>; /* I2C4_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c4_pins_sleep_a: i2c4-1 {
+               pins {
+                       pinmux = <STM32_PINMUX('Z', 4, ANALOG)>, /* I2C4_SCL */
+                                <STM32_PINMUX('Z', 5, ANALOG)>; /* I2C4_SDA */
+               };
+       };
+
+       spi1_pins_a: spi1-0 {
+               pins1 {
+                       pinmux = <STM32_PINMUX('Z', 0, AF5)>, /* SPI1_SCK */
+                                <STM32_PINMUX('Z', 2, AF5)>; /* SPI1_MOSI */
+                       bias-disable;
+                       drive-push-pull;
+                       slew-rate = <1>;
+               };
+
+               pins2 {
+                       pinmux = <STM32_PINMUX('Z', 1, AF5)>; /* SPI1_MISO */
+                       bias-disable;
+               };
+       };
+};
similarity index 87%
rename from arch/arm/boot/dts/stm32mp157c.dtsi
rename to arch/arm/boot/dts/stm32mp151.dtsi
index ed8b258256d789b8c9ff2f647b06ebfe10074509..fb41d0778b005dd155505a0a92e4c82a4284b504 100644 (file)
                        device_type = "cpu";
                        reg = <0>;
                };
-
-               cpu1: cpu@1 {
-                       compatible = "arm,cortex-a7";
-                       device_type = "cpu";
-                       reg = <1>;
-               };
        };
 
        psci {
                                reg = <1>;
                                status = "disabled";
                        };
+
+                       counter {
+                               compatible = "st,stm32-timer-counter";
+                               status = "disabled";
+                       };
                };
 
                timers3: timer@40001000 {
                                reg = <2>;
                                status = "disabled";
                        };
+
+                       counter {
+                               compatible = "st,stm32-timer-counter";
+                               status = "disabled";
+                       };
                };
 
                timers4: timer@40002000 {
                                reg = <3>;
                                status = "disabled";
                        };
+
+                       counter {
+                               compatible = "st,stm32-timer-counter";
+                               status = "disabled";
+                       };
                };
 
                timers5: timer@40003000 {
                                reg = <4>;
                                status = "disabled";
                        };
+
+                       counter {
+                               compatible = "st,stm32-timer-counter";
+                               status = "disabled";
+                       };
                };
 
                timers6: timer@40004000 {
                                reg = <0>;
                                status = "disabled";
                        };
+
+                       counter {
+                               compatible = "st,stm32-timer-counter";
+                               status = "disabled";
+                       };
                };
 
                timers8: timer@44001000 {
                                reg = <7>;
                                status = "disabled";
                        };
+
+                       counter {
+                               compatible = "st,stm32-timer-counter";
+                               status = "disabled";
+                       };
                };
 
                usart6: serial@44003000 {
                        };
                };
 
-               m_can1: can@4400e000 {
-                       compatible = "bosch,m_can";
-                       reg = <0x4400e000 0x400>, <0x44011000 0x1400>;
-                       reg-names = "m_can", "message_ram";
-                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "int0", "int1";
-                       clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
-                       clock-names = "hclk", "cclk";
-                       bosch,mram-cfg = <0x0 0 0 32 0 0 2 2>;
-                       status = "disabled";
-               };
-
-               m_can2: can@4400f000 {
-                       compatible = "bosch,m_can";
-                       reg = <0x4400f000 0x400>, <0x44011000 0x2800>;
-                       reg-names = "m_can", "message_ram";
-                       interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "int0", "int1";
-                       clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
-                       clock-names = "hclk", "cclk";
-                       bosch,mram-cfg = <0x1400 0 0 32 0 0 2 2>;
-                       status = "disabled";
-               };
-
-               dma1: dma@48000000 {
+               dma1: dma-controller@48000000 {
                        compatible = "st,stm32-dma";
                        reg = <0x48000000 0x400>;
                        interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
                        dma-requests = <8>;
                };
 
-               dma2: dma@48001000 {
+               dma2: dma-controller@48001000 {
                        compatible = "st,stm32-dma";
                        reg = <0x48001000 0x400>;
                        interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
                        };
                };
 
+               sdmmc3: sdmmc@48004000 {
+                       compatible = "arm,pl18x", "arm,primecell";
+                       arm,primecell-periphid = <0x10153180>;
+                       reg = <0x48004000 0x400>;
+                       interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "cmd_irq";
+                       clocks = <&rcc SDMMC3_K>;
+                       clock-names = "apb_pclk";
+                       resets = <&rcc SDMMC3_R>;
+                       cap-sd-highspeed;
+                       cap-mmc-highspeed;
+                       max-frequency = <120000000>;
+                       status = "disabled";
+               };
+
                usbotg_hs: usb-otg@49000000 {
                        compatible = "snps,dwc2";
                        reg = <0x49000000 0x10000>;
                        status = "disabled";
                };
 
-               cryp1: cryp@54001000 {
-                       compatible = "st,stm32mp1-cryp";
-                       reg = <0x54001000 0x400>;
-                       interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&rcc CRYP1>;
-                       resets = <&rcc CRYP1_R>;
-                       status = "disabled";
-               };
-
                hash1: hash@54002000 {
                        compatible = "st,stm32f756-hash";
                        reg = <0x54002000 0x400>;
                        status = "disabled";
                };
 
-               mdma1: dma@58000000 {
+               mdma1: dma-controller@58000000 {
                        compatible = "st,stm32h7-mdma";
                        reg = <0x58000000 0x1000>;
                        interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
                        arm,primecell-periphid = <0x10153180>;
                        reg = <0x58005000 0x1000>;
                        interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "cmd_irq";
+                       interrupt-names = "cmd_irq";
                        clocks = <&rcc SDMMC1_K>;
                        clock-names = "apb_pclk";
                        resets = <&rcc SDMMC1_R>;
                        cap-sd-highspeed;
                        cap-mmc-highspeed;
                        max-frequency = <120000000>;
+                       status = "disabled";
+               };
+
+               sdmmc2: sdmmc@58007000 {
+                       compatible = "arm,pl18x", "arm,primecell";
+                       arm,primecell-periphid = <0x10153180>;
+                       reg = <0x58007000 0x1000>;
+                       interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "cmd_irq";
+                       clocks = <&rcc SDMMC2_K>;
+                       clock-names = "apb_pclk";
+                       resets = <&rcc SDMMC2_R>;
+                       cap-sd-highspeed;
+                       cap-mmc-highspeed;
+                       max-frequency = <120000000>;
+                       status = "disabled";
                };
 
                crc1: crc@58009000 {
                        clock-names = "stmmaceth",
                                      "mac-clk-tx",
                                      "mac-clk-rx",
-                                     "ethstp",
-                                     "syscfg-clk";
+                                     "ethstp";
                        clocks = <&rcc ETHMAC>,
                                 <&rcc ETHTX>,
                                 <&rcc ETHRX>,
-                                <&rcc ETHSTP>,
-                                <&rcc SYSCFG>;
+                                <&rcc ETHSTP>;
                        st,syscon = <&syscfg 0x4>;
                        snps,mixed-burst;
                        snps,pbl = <2>;
+                       snps,en-tx-lpi-clockgating;
                        snps,axi-config = <&stmmac_axi_config_0>;
                        snps,tso;
                        status = "disabled";
                        status = "disabled";
                };
 
-               gpu: gpu@59000000 {
-                       compatible = "vivante,gc";
-                       reg = <0x59000000 0x800>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&rcc GPU>, <&rcc GPU_K>;
-                       clock-names = "bus" ,"core";
-                       resets = <&rcc GPU_R>;
-                       status = "disabled";
-               };
-
-               dsi: dsi@5a000000 {
-                       compatible = "st,stm32-dsi";
-                       reg = <0x5a000000 0x800>;
-                       clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>;
-                       clock-names = "pclk", "ref", "px_clk";
-                       resets = <&rcc DSI_R>;
-                       reset-names = "apb";
-                       status = "disabled";
-               };
-
                ltdc: display-controller@5a001000 {
                        compatible = "st,stm32-ltdc";
                        reg = <0x5a001000 0x400>;
                        status = "disabled";
                };
 
-               bsec: nvmem@5c005000 {
+               bsec: efuse@5c005000 {
                        compatible = "st,stm32mp15-bsec";
                        reg = <0x5c005000 0x400>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
                };
+
+               /*
+                * Break node order to solve dependency probe issue between
+                * pinctrl and exti.
+                */
+               pinctrl: pin-controller@50002000 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "st,stm32mp157-pinctrl";
+                       ranges = <0 0x50002000 0xa400>;
+                       interrupt-parent = <&exti>;
+                       st,syscfg = <&exti 0x60 0xff>;
+                       pins-are-numbered;
+
+                       gpioa: gpio@50002000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x0 0x400>;
+                               clocks = <&rcc GPIOA>;
+                               st,bank-name = "GPIOA";
+                               status = "disabled";
+                       };
+
+                       gpiob: gpio@50003000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x1000 0x400>;
+                               clocks = <&rcc GPIOB>;
+                               st,bank-name = "GPIOB";
+                               status = "disabled";
+                       };
+
+                       gpioc: gpio@50004000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x2000 0x400>;
+                               clocks = <&rcc GPIOC>;
+                               st,bank-name = "GPIOC";
+                               status = "disabled";
+                       };
+
+                       gpiod: gpio@50005000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x3000 0x400>;
+                               clocks = <&rcc GPIOD>;
+                               st,bank-name = "GPIOD";
+                               status = "disabled";
+                       };
+
+                       gpioe: gpio@50006000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x4000 0x400>;
+                               clocks = <&rcc GPIOE>;
+                               st,bank-name = "GPIOE";
+                               status = "disabled";
+                       };
+
+                       gpiof: gpio@50007000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x5000 0x400>;
+                               clocks = <&rcc GPIOF>;
+                               st,bank-name = "GPIOF";
+                               status = "disabled";
+                       };
+
+                       gpiog: gpio@50008000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x6000 0x400>;
+                               clocks = <&rcc GPIOG>;
+                               st,bank-name = "GPIOG";
+                               status = "disabled";
+                       };
+
+                       gpioh: gpio@50009000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x7000 0x400>;
+                               clocks = <&rcc GPIOH>;
+                               st,bank-name = "GPIOH";
+                               status = "disabled";
+                       };
+
+                       gpioi: gpio@5000a000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x8000 0x400>;
+                               clocks = <&rcc GPIOI>;
+                               st,bank-name = "GPIOI";
+                               status = "disabled";
+                       };
+
+                       gpioj: gpio@5000b000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x9000 0x400>;
+                               clocks = <&rcc GPIOJ>;
+                               st,bank-name = "GPIOJ";
+                               status = "disabled";
+                       };
+
+                       gpiok: gpio@5000c000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0xa000 0x400>;
+                               clocks = <&rcc GPIOK>;
+                               st,bank-name = "GPIOK";
+                               status = "disabled";
+                       };
+               };
+
+               pinctrl_z: pin-controller-z@54004000 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "st,stm32mp157-z-pinctrl";
+                       ranges = <0 0x54004000 0x400>;
+                       pins-are-numbered;
+                       interrupt-parent = <&exti>;
+                       st,syscfg = <&exti 0x60 0xff>;
+
+                       gpioz: gpio@54004000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0 0x400>;
+                               clocks = <&rcc GPIOZ>;
+                               st,bank-name = "GPIOZ";
+                               st,bank-ioport = <11>;
+                               status = "disabled";
+                       };
+               };
        };
 
-       mlahb {
-               compatible = "simple-bus";
+       mlahb: ahb {
+               compatible = "st,mlahb", "simple-bus";
                #address-cells = <1>;
                #size-cells = <1>;
+               ranges;
                dma-ranges = <0x00000000 0x38000000 0x10000>,
                             <0x10000000 0x10000000 0x60000>,
                             <0x30000000 0x30000000 0x60000>;
diff --git a/arch/arm/boot/dts/stm32mp153.dtsi b/arch/arm/boot/dts/stm32mp153.dtsi
new file mode 100644 (file)
index 0000000..2d759fc
--- /dev/null
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+#include "stm32mp151.dtsi"
+
+/ {
+       cpus {
+               cpu1: cpu@1 {
+                       compatible = "arm,cortex-a7";
+                       device_type = "cpu";
+                       reg = <1>;
+               };
+       };
+
+       soc {
+               m_can1: can@4400e000 {
+                       compatible = "bosch,m_can";
+                       reg = <0x4400e000 0x400>, <0x44011000 0x1400>;
+                       reg-names = "m_can", "message_ram";
+                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "int0", "int1";
+                       clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
+                       clock-names = "hclk", "cclk";
+                       bosch,mram-cfg = <0x0 0 0 32 0 0 2 2>;
+                       status = "disabled";
+               };
+
+               m_can2: can@4400f000 {
+                       compatible = "bosch,m_can";
+                       reg = <0x4400f000 0x400>, <0x44011000 0x2800>;
+                       reg-names = "m_can", "message_ram";
+                       interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "int0", "int1";
+                       clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
+                       clock-names = "hclk", "cclk";
+                       bosch,mram-cfg = <0x1400 0 0 32 0 0 2 2>;
+                       status = "disabled";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi
deleted file mode 100644 (file)
index 3d1ecb4..0000000
+++ /dev/null
@@ -1,953 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
-/*
- * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
- * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
- */
-#include <dt-bindings/pinctrl/stm32-pinfunc.h>
-
-/ {
-       soc {
-               pinctrl: pin-controller@50002000 {
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       compatible = "st,stm32mp157-pinctrl";
-                       ranges = <0 0x50002000 0xa400>;
-                       interrupt-parent = <&exti>;
-                       st,syscfg = <&exti 0x60 0xff>;
-                       pins-are-numbered;
-
-                       gpioa: gpio@50002000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x0 0x400>;
-                               clocks = <&rcc GPIOA>;
-                               st,bank-name = "GPIOA";
-                               status = "disabled";
-                       };
-
-                       gpiob: gpio@50003000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x1000 0x400>;
-                               clocks = <&rcc GPIOB>;
-                               st,bank-name = "GPIOB";
-                               status = "disabled";
-                       };
-
-                       gpioc: gpio@50004000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x2000 0x400>;
-                               clocks = <&rcc GPIOC>;
-                               st,bank-name = "GPIOC";
-                               status = "disabled";
-                       };
-
-                       gpiod: gpio@50005000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x3000 0x400>;
-                               clocks = <&rcc GPIOD>;
-                               st,bank-name = "GPIOD";
-                               status = "disabled";
-                       };
-
-                       gpioe: gpio@50006000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x4000 0x400>;
-                               clocks = <&rcc GPIOE>;
-                               st,bank-name = "GPIOE";
-                               status = "disabled";
-                       };
-
-                       gpiof: gpio@50007000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x5000 0x400>;
-                               clocks = <&rcc GPIOF>;
-                               st,bank-name = "GPIOF";
-                               status = "disabled";
-                       };
-
-                       gpiog: gpio@50008000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x6000 0x400>;
-                               clocks = <&rcc GPIOG>;
-                               st,bank-name = "GPIOG";
-                               status = "disabled";
-                       };
-
-                       gpioh: gpio@50009000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x7000 0x400>;
-                               clocks = <&rcc GPIOH>;
-                               st,bank-name = "GPIOH";
-                               status = "disabled";
-                       };
-
-                       gpioi: gpio@5000a000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x8000 0x400>;
-                               clocks = <&rcc GPIOI>;
-                               st,bank-name = "GPIOI";
-                               status = "disabled";
-                       };
-
-                       gpioj: gpio@5000b000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x9000 0x400>;
-                               clocks = <&rcc GPIOJ>;
-                               st,bank-name = "GPIOJ";
-                               status = "disabled";
-                       };
-
-                       gpiok: gpio@5000c000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0xa000 0x400>;
-                               clocks = <&rcc GPIOK>;
-                               st,bank-name = "GPIOK";
-                               status = "disabled";
-                       };
-
-                       adc12_ain_pins_a: adc12-ain-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('C', 3, ANALOG)>, /* ADC1 in13 */
-                                                <STM32_PINMUX('F', 12, ANALOG)>, /* ADC1 in6 */
-                                                <STM32_PINMUX('F', 13, ANALOG)>, /* ADC2 in2 */
-                                                <STM32_PINMUX('F', 14, ANALOG)>; /* ADC2 in6 */
-                               };
-                       };
-
-                       adc12_usb_cc_pins_a: adc12-usb-cc-pins-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 4, ANALOG)>, /* ADC12 in18 */
-                                                <STM32_PINMUX('A', 5, ANALOG)>; /* ADC12 in19 */
-                               };
-                       };
-
-                       cec_pins_a: cec-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 15, AF4)>;
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       cec_pins_sleep_a: cec-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 15, ANALOG)>; /* HDMI_CEC */
-                               };
-                       };
-
-                       cec_pins_b: cec-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('B', 6, AF5)>;
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       cec_pins_sleep_b: cec-sleep-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('B', 6, ANALOG)>; /* HDMI_CEC */
-                               };
-                       };
-
-                       dac_ch1_pins_a: dac-ch1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 4, ANALOG)>;
-                               };
-                       };
-
-                       dac_ch2_pins_a: dac-ch2 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 5, ANALOG)>;
-                               };
-                       };
-
-                       dcmi_pins_a: dcmi-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 8,  AF13)>,/* DCMI_HSYNC */
-                                                <STM32_PINMUX('B', 7,  AF13)>,/* DCMI_VSYNC */
-                                                <STM32_PINMUX('A', 6,  AF13)>,/* DCMI_PIXCLK */
-                                                <STM32_PINMUX('H', 9,  AF13)>,/* DCMI_D0 */
-                                                <STM32_PINMUX('H', 10, AF13)>,/* DCMI_D1 */
-                                                <STM32_PINMUX('H', 11, AF13)>,/* DCMI_D2 */
-                                                <STM32_PINMUX('H', 12, AF13)>,/* DCMI_D3 */
-                                                <STM32_PINMUX('H', 14, AF13)>,/* DCMI_D4 */
-                                                <STM32_PINMUX('I', 4,  AF13)>,/* DCMI_D5 */
-                                                <STM32_PINMUX('B', 8,  AF13)>,/* DCMI_D6 */
-                                                <STM32_PINMUX('E', 6,  AF13)>,/* DCMI_D7 */
-                                                <STM32_PINMUX('I', 1,  AF13)>,/* DCMI_D8 */
-                                                <STM32_PINMUX('H', 7,  AF13)>,/* DCMI_D9 */
-                                                <STM32_PINMUX('I', 3,  AF13)>,/* DCMI_D10 */
-                                                <STM32_PINMUX('H', 15, AF13)>;/* DCMI_D11 */
-                                       bias-disable;
-                               };
-                       };
-
-                       dcmi_sleep_pins_a: dcmi-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 8,  ANALOG)>,/* DCMI_HSYNC */
-                                                <STM32_PINMUX('B', 7,  ANALOG)>,/* DCMI_VSYNC */
-                                                <STM32_PINMUX('A', 6,  ANALOG)>,/* DCMI_PIXCLK */
-                                                <STM32_PINMUX('H', 9,  ANALOG)>,/* DCMI_D0 */
-                                                <STM32_PINMUX('H', 10, ANALOG)>,/* DCMI_D1 */
-                                                <STM32_PINMUX('H', 11, ANALOG)>,/* DCMI_D2 */
-                                                <STM32_PINMUX('H', 12, ANALOG)>,/* DCMI_D3 */
-                                                <STM32_PINMUX('H', 14, ANALOG)>,/* DCMI_D4 */
-                                                <STM32_PINMUX('I', 4,  ANALOG)>,/* DCMI_D5 */
-                                                <STM32_PINMUX('B', 8,  ANALOG)>,/* DCMI_D6 */
-                                                <STM32_PINMUX('E', 6,  ANALOG)>,/* DCMI_D7 */
-                                                <STM32_PINMUX('I', 1,  ANALOG)>,/* DCMI_D8 */
-                                                <STM32_PINMUX('H', 7,  ANALOG)>,/* DCMI_D9 */
-                                                <STM32_PINMUX('I', 3,  ANALOG)>,/* DCMI_D10 */
-                                                <STM32_PINMUX('H', 15, ANALOG)>;/* DCMI_D11 */
-                               };
-                       };
-
-                       ethernet0_rgmii_pins_a: rgmii-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
-                                                <STM32_PINMUX('G', 4, AF11)>, /* ETH_RGMII_GTX_CLK */
-                                                <STM32_PINMUX('G', 13, AF11)>, /* ETH_RGMII_TXD0 */
-                                                <STM32_PINMUX('G', 14, AF11)>, /* ETH_RGMII_TXD1 */
-                                                <STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
-                                                <STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
-                                                <STM32_PINMUX('B', 11, AF11)>, /* ETH_RGMII_TX_CTL */
-                                                <STM32_PINMUX('A', 2, AF11)>, /* ETH_MDIO */
-                                                <STM32_PINMUX('C', 1, AF11)>; /* ETH_MDC */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <3>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH_RGMII_RXD0 */
-                                                <STM32_PINMUX('C', 5, AF11)>, /* ETH_RGMII_RXD1 */
-                                                <STM32_PINMUX('B', 0, AF11)>, /* ETH_RGMII_RXD2 */
-                                                <STM32_PINMUX('B', 1, AF11)>, /* ETH_RGMII_RXD3 */
-                                                <STM32_PINMUX('A', 1, AF11)>, /* ETH_RGMII_RX_CLK */
-                                                <STM32_PINMUX('A', 7, AF11)>; /* ETH_RGMII_RX_CTL */
-                                       bias-disable;
-                               };
-                       };
-
-                       ethernet0_rgmii_pins_sleep_a: rgmii-sleep-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
-                                                <STM32_PINMUX('G', 4, ANALOG)>, /* ETH_RGMII_GTX_CLK */
-                                                <STM32_PINMUX('G', 13, ANALOG)>, /* ETH_RGMII_TXD0 */
-                                                <STM32_PINMUX('G', 14, ANALOG)>, /* ETH_RGMII_TXD1 */
-                                                <STM32_PINMUX('C', 2, ANALOG)>, /* ETH_RGMII_TXD2 */
-                                                <STM32_PINMUX('E', 2, ANALOG)>, /* ETH_RGMII_TXD3 */
-                                                <STM32_PINMUX('B', 11, ANALOG)>, /* ETH_RGMII_TX_CTL */
-                                                <STM32_PINMUX('A', 2, ANALOG)>, /* ETH_MDIO */
-                                                <STM32_PINMUX('C', 1, ANALOG)>, /* ETH_MDC */
-                                                <STM32_PINMUX('C', 4, ANALOG)>, /* ETH_RGMII_RXD0 */
-                                                <STM32_PINMUX('C', 5, ANALOG)>, /* ETH_RGMII_RXD1 */
-                                                <STM32_PINMUX('B', 0, ANALOG)>, /* ETH_RGMII_RXD2 */
-                                                <STM32_PINMUX('B', 1, ANALOG)>, /* ETH_RGMII_RXD3 */
-                                                <STM32_PINMUX('A', 1, ANALOG)>, /* ETH_RGMII_RX_CLK */
-                                                <STM32_PINMUX('A', 7, ANALOG)>; /* ETH_RGMII_RX_CTL */
-                               };
-                       };
-
-                       fmc_pins_a: fmc-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('D', 4, AF12)>, /* FMC_NOE */
-                                                <STM32_PINMUX('D', 5, AF12)>, /* FMC_NWE */
-                                                <STM32_PINMUX('D', 11, AF12)>, /* FMC_A16_FMC_CLE */
-                                                <STM32_PINMUX('D', 12, AF12)>, /* FMC_A17_FMC_ALE */
-                                                <STM32_PINMUX('D', 14, AF12)>, /* FMC_D0 */
-                                                <STM32_PINMUX('D', 15, AF12)>, /* FMC_D1 */
-                                                <STM32_PINMUX('D', 0, AF12)>, /* FMC_D2 */
-                                                <STM32_PINMUX('D', 1, AF12)>, /* FMC_D3 */
-                                                <STM32_PINMUX('E', 7, AF12)>, /* FMC_D4 */
-                                                <STM32_PINMUX('E', 8, AF12)>, /* FMC_D5 */
-                                                <STM32_PINMUX('E', 9, AF12)>, /* FMC_D6 */
-                                                <STM32_PINMUX('E', 10, AF12)>, /* FMC_D7 */
-                                                <STM32_PINMUX('G', 9, AF12)>; /* FMC_NE2_FMC_NCE */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('D', 6, AF12)>; /* FMC_NWAIT */
-                                       bias-pull-up;
-                               };
-                       };
-
-                       fmc_sleep_pins_a: fmc-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('D', 4, ANALOG)>, /* FMC_NOE */
-                                                <STM32_PINMUX('D', 5, ANALOG)>, /* FMC_NWE */
-                                                <STM32_PINMUX('D', 11, ANALOG)>, /* FMC_A16_FMC_CLE */
-                                                <STM32_PINMUX('D', 12, ANALOG)>, /* FMC_A17_FMC_ALE */
-                                                <STM32_PINMUX('D', 14, ANALOG)>, /* FMC_D0 */
-                                                <STM32_PINMUX('D', 15, ANALOG)>, /* FMC_D1 */
-                                                <STM32_PINMUX('D', 0, ANALOG)>, /* FMC_D2 */
-                                                <STM32_PINMUX('D', 1, ANALOG)>, /* FMC_D3 */
-                                                <STM32_PINMUX('E', 7, ANALOG)>, /* FMC_D4 */
-                                                <STM32_PINMUX('E', 8, ANALOG)>, /* FMC_D5 */
-                                                <STM32_PINMUX('E', 9, ANALOG)>, /* FMC_D6 */
-                                                <STM32_PINMUX('E', 10, ANALOG)>, /* FMC_D7 */
-                                                <STM32_PINMUX('D', 6, ANALOG)>, /* FMC_NWAIT */
-                                                <STM32_PINMUX('G', 9, ANALOG)>; /* FMC_NE2_FMC_NCE */
-                               };
-                       };
-
-                       i2c1_pins_a: i2c1-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('D', 12, AF5)>, /* I2C1_SCL */
-                                                <STM32_PINMUX('F', 15, AF5)>; /* I2C1_SDA */
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       i2c1_pins_sleep_a: i2c1-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('D', 12, ANALOG)>, /* I2C1_SCL */
-                                                <STM32_PINMUX('F', 15, ANALOG)>; /* I2C1_SDA */
-                               };
-                       };
-
-                       i2c1_pins_b: i2c1-2 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 14, AF5)>, /* I2C1_SCL */
-                                                <STM32_PINMUX('F', 15, AF5)>; /* I2C1_SDA */
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       i2c1_pins_sleep_b: i2c1-3 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 14, ANALOG)>, /* I2C1_SCL */
-                                                <STM32_PINMUX('F', 15, ANALOG)>; /* I2C1_SDA */
-                               };
-                       };
-
-                       i2c2_pins_a: i2c2-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 4, AF4)>, /* I2C2_SCL */
-                                                <STM32_PINMUX('H', 5, AF4)>; /* I2C2_SDA */
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       i2c2_pins_sleep_a: i2c2-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 4, ANALOG)>, /* I2C2_SCL */
-                                                <STM32_PINMUX('H', 5, ANALOG)>; /* I2C2_SDA */
-                               };
-                       };
-
-                       i2c2_pins_b1: i2c2-2 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 5, AF4)>; /* I2C2_SDA */
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       i2c2_pins_sleep_b1: i2c2-3 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 5, ANALOG)>; /* I2C2_SDA */
-                               };
-                       };
-
-                       i2c5_pins_a: i2c5-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 11, AF4)>, /* I2C5_SCL */
-                                                <STM32_PINMUX('A', 12, AF4)>; /* I2C5_SDA */
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       i2c5_pins_sleep_a: i2c5-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 11, ANALOG)>, /* I2C5_SCL */
-                                                <STM32_PINMUX('A', 12, ANALOG)>; /* I2C5_SDA */
-
-                               };
-                       };
-
-                       i2s2_pins_a: i2s2-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('I', 3, AF5)>, /* I2S2_SDO */
-                                                <STM32_PINMUX('B', 9, AF5)>, /* I2S2_WS */
-                                                <STM32_PINMUX('A', 9, AF5)>; /* I2S2_CK */
-                                       slew-rate = <1>;
-                                       drive-push-pull;
-                                       bias-disable;
-                               };
-                       };
-
-                       i2s2_pins_sleep_a: i2s2-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('I', 3, ANALOG)>, /* I2S2_SDO */
-                                                <STM32_PINMUX('B', 9, ANALOG)>, /* I2S2_WS */
-                                                <STM32_PINMUX('A', 9, ANALOG)>; /* I2S2_CK */
-                               };
-                       };
-
-                       ltdc_pins_a: ltdc-a-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('G',  7, AF14)>, /* LCD_CLK */
-                                                <STM32_PINMUX('I', 10, AF14)>, /* LCD_HSYNC */
-                                                <STM32_PINMUX('I',  9, AF14)>, /* LCD_VSYNC */
-                                                <STM32_PINMUX('F', 10, AF14)>, /* LCD_DE */
-                                                <STM32_PINMUX('H',  2, AF14)>, /* LCD_R0 */
-                                                <STM32_PINMUX('H',  3, AF14)>, /* LCD_R1 */
-                                                <STM32_PINMUX('H',  8, AF14)>, /* LCD_R2 */
-                                                <STM32_PINMUX('H',  9, AF14)>, /* LCD_R3 */
-                                                <STM32_PINMUX('H', 10, AF14)>, /* LCD_R4 */
-                                                <STM32_PINMUX('C',  0, AF14)>, /* LCD_R5 */
-                                                <STM32_PINMUX('H', 12, AF14)>, /* LCD_R6 */
-                                                <STM32_PINMUX('E', 15, AF14)>, /* LCD_R7 */
-                                                <STM32_PINMUX('E',  5, AF14)>, /* LCD_G0 */
-                                                <STM32_PINMUX('E',  6, AF14)>, /* LCD_G1 */
-                                                <STM32_PINMUX('H', 13, AF14)>, /* LCD_G2 */
-                                                <STM32_PINMUX('H', 14, AF14)>, /* LCD_G3 */
-                                                <STM32_PINMUX('H', 15, AF14)>, /* LCD_G4 */
-                                                <STM32_PINMUX('I',  0, AF14)>, /* LCD_G5 */
-                                                <STM32_PINMUX('I',  1, AF14)>, /* LCD_G6 */
-                                                <STM32_PINMUX('I',  2, AF14)>, /* LCD_G7 */
-                                                <STM32_PINMUX('D',  9, AF14)>, /* LCD_B0 */
-                                                <STM32_PINMUX('G', 12, AF14)>, /* LCD_B1 */
-                                                <STM32_PINMUX('G', 10, AF14)>, /* LCD_B2 */
-                                                <STM32_PINMUX('D', 10, AF14)>, /* LCD_B3 */
-                                                <STM32_PINMUX('I',  4, AF14)>, /* LCD_B4 */
-                                                <STM32_PINMUX('A',  3, AF14)>, /* LCD_B5 */
-                                                <STM32_PINMUX('B',  8, AF14)>, /* LCD_B6 */
-                                                <STM32_PINMUX('D',  8, AF14)>; /* LCD_B7 */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-                       };
-
-                       ltdc_pins_sleep_a: ltdc-a-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('G',  7, ANALOG)>, /* LCD_CLK */
-                                                <STM32_PINMUX('I', 10, ANALOG)>, /* LCD_HSYNC */
-                                                <STM32_PINMUX('I',  9, ANALOG)>, /* LCD_VSYNC */
-                                                <STM32_PINMUX('F', 10, ANALOG)>, /* LCD_DE */
-                                                <STM32_PINMUX('H',  2, ANALOG)>, /* LCD_R0 */
-                                                <STM32_PINMUX('H',  3, ANALOG)>, /* LCD_R1 */
-                                                <STM32_PINMUX('H',  8, ANALOG)>, /* LCD_R2 */
-                                                <STM32_PINMUX('H',  9, ANALOG)>, /* LCD_R3 */
-                                                <STM32_PINMUX('H', 10, ANALOG)>, /* LCD_R4 */
-                                                <STM32_PINMUX('C',  0, ANALOG)>, /* LCD_R5 */
-                                                <STM32_PINMUX('H', 12, ANALOG)>, /* LCD_R6 */
-                                                <STM32_PINMUX('E', 15, ANALOG)>, /* LCD_R7 */
-                                                <STM32_PINMUX('E',  5, ANALOG)>, /* LCD_G0 */
-                                                <STM32_PINMUX('E',  6, ANALOG)>, /* LCD_G1 */
-                                                <STM32_PINMUX('H', 13, ANALOG)>, /* LCD_G2 */
-                                                <STM32_PINMUX('H', 14, ANALOG)>, /* LCD_G3 */
-                                                <STM32_PINMUX('H', 15, ANALOG)>, /* LCD_G4 */
-                                                <STM32_PINMUX('I',  0, ANALOG)>, /* LCD_G5 */
-                                                <STM32_PINMUX('I',  1, ANALOG)>, /* LCD_G6 */
-                                                <STM32_PINMUX('I',  2, ANALOG)>, /* LCD_G7 */
-                                                <STM32_PINMUX('D',  9, ANALOG)>, /* LCD_B0 */
-                                                <STM32_PINMUX('G', 12, ANALOG)>, /* LCD_B1 */
-                                                <STM32_PINMUX('G', 10, ANALOG)>, /* LCD_B2 */
-                                                <STM32_PINMUX('D', 10, ANALOG)>, /* LCD_B3 */
-                                                <STM32_PINMUX('I',  4, ANALOG)>, /* LCD_B4 */
-                                                <STM32_PINMUX('A',  3, ANALOG)>, /* LCD_B5 */
-                                                <STM32_PINMUX('B',  8, ANALOG)>, /* LCD_B6 */
-                                                <STM32_PINMUX('D',  8, ANALOG)>; /* LCD_B7 */
-                               };
-                       };
-
-                       ltdc_pins_b: ltdc-b-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('I', 14, AF14)>, /* LCD_CLK */
-                                                <STM32_PINMUX('I', 12, AF14)>, /* LCD_HSYNC */
-                                                <STM32_PINMUX('I', 13, AF14)>, /* LCD_VSYNC */
-                                                <STM32_PINMUX('K',  7, AF14)>, /* LCD_DE */
-                                                <STM32_PINMUX('I', 15, AF14)>, /* LCD_R0 */
-                                                <STM32_PINMUX('J',  0, AF14)>, /* LCD_R1 */
-                                                <STM32_PINMUX('J',  1, AF14)>, /* LCD_R2 */
-                                                <STM32_PINMUX('J',  2, AF14)>, /* LCD_R3 */
-                                                <STM32_PINMUX('J',  3, AF14)>, /* LCD_R4 */
-                                                <STM32_PINMUX('J',  4, AF14)>, /* LCD_R5 */
-                                                <STM32_PINMUX('J',  5, AF14)>, /* LCD_R6 */
-                                                <STM32_PINMUX('J',  6, AF14)>, /* LCD_R7 */
-                                                <STM32_PINMUX('J',  7, AF14)>, /* LCD_G0 */
-                                                <STM32_PINMUX('J',  8, AF14)>, /* LCD_G1 */
-                                                <STM32_PINMUX('J',  9, AF14)>, /* LCD_G2 */
-                                                <STM32_PINMUX('J', 10, AF14)>, /* LCD_G3 */
-                                                <STM32_PINMUX('J', 11, AF14)>, /* LCD_G4 */
-                                                <STM32_PINMUX('K',  0, AF14)>, /* LCD_G5 */
-                                                <STM32_PINMUX('K',  1, AF14)>, /* LCD_G6 */
-                                                <STM32_PINMUX('K',  2, AF14)>, /* LCD_G7 */
-                                                <STM32_PINMUX('J', 12, AF14)>, /* LCD_B0 */
-                                                <STM32_PINMUX('J', 13, AF14)>, /* LCD_B1 */
-                                                <STM32_PINMUX('J', 14, AF14)>, /* LCD_B2 */
-                                                <STM32_PINMUX('J', 15, AF14)>, /* LCD_B3 */
-                                                <STM32_PINMUX('K',  3, AF14)>, /* LCD_B4 */
-                                                <STM32_PINMUX('K',  4, AF14)>, /* LCD_B5 */
-                                                <STM32_PINMUX('K',  5, AF14)>, /* LCD_B6 */
-                                                <STM32_PINMUX('K',  6, AF14)>; /* LCD_B7 */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-                       };
-
-                       ltdc_pins_sleep_b: ltdc-b-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('I', 14, ANALOG)>, /* LCD_CLK */
-                                                <STM32_PINMUX('I', 12, ANALOG)>, /* LCD_HSYNC */
-                                                <STM32_PINMUX('I', 13, ANALOG)>, /* LCD_VSYNC */
-                                                <STM32_PINMUX('K',  7, ANALOG)>, /* LCD_DE */
-                                                <STM32_PINMUX('I', 15, ANALOG)>, /* LCD_R0 */
-                                                <STM32_PINMUX('J',  0, ANALOG)>, /* LCD_R1 */
-                                                <STM32_PINMUX('J',  1, ANALOG)>, /* LCD_R2 */
-                                                <STM32_PINMUX('J',  2, ANALOG)>, /* LCD_R3 */
-                                                <STM32_PINMUX('J',  3, ANALOG)>, /* LCD_R4 */
-                                                <STM32_PINMUX('J',  4, ANALOG)>, /* LCD_R5 */
-                                                <STM32_PINMUX('J',  5, ANALOG)>, /* LCD_R6 */
-                                                <STM32_PINMUX('J',  6, ANALOG)>, /* LCD_R7 */
-                                                <STM32_PINMUX('J',  7, ANALOG)>, /* LCD_G0 */
-                                                <STM32_PINMUX('J',  8, ANALOG)>, /* LCD_G1 */
-                                                <STM32_PINMUX('J',  9, ANALOG)>, /* LCD_G2 */
-                                                <STM32_PINMUX('J', 10, ANALOG)>, /* LCD_G3 */
-                                                <STM32_PINMUX('J', 11, ANALOG)>, /* LCD_G4 */
-                                                <STM32_PINMUX('K',  0, ANALOG)>, /* LCD_G5 */
-                                                <STM32_PINMUX('K',  1, ANALOG)>, /* LCD_G6 */
-                                                <STM32_PINMUX('K',  2, ANALOG)>, /* LCD_G7 */
-                                                <STM32_PINMUX('J', 12, ANALOG)>, /* LCD_B0 */
-                                                <STM32_PINMUX('J', 13, ANALOG)>, /* LCD_B1 */
-                                                <STM32_PINMUX('J', 14, ANALOG)>, /* LCD_B2 */
-                                                <STM32_PINMUX('J', 15, ANALOG)>, /* LCD_B3 */
-                                                <STM32_PINMUX('K',  3, ANALOG)>, /* LCD_B4 */
-                                                <STM32_PINMUX('K',  4, ANALOG)>, /* LCD_B5 */
-                                                <STM32_PINMUX('K',  5, ANALOG)>, /* LCD_B6 */
-                                                <STM32_PINMUX('K',  6, ANALOG)>; /* LCD_B7 */
-                               };
-                       };
-
-                       m_can1_pins_a: m-can1-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('H', 13, AF9)>; /* CAN1_TX */
-                                       slew-rate = <1>;
-                                       drive-push-pull;
-                                       bias-disable;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('I', 9, AF9)>; /* CAN1_RX */
-                                       bias-disable;
-                               };
-                       };
-
-                       m_can1_sleep_pins_a: m_can1-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 13, ANALOG)>, /* CAN1_TX */
-                                                <STM32_PINMUX('I', 9, ANALOG)>; /* CAN1_RX */
-                               };
-                       };
-
-                       pwm2_pins_a: pwm2-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('A', 3, AF1)>; /* TIM2_CH4 */
-                                       bias-pull-down;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       pwm8_pins_a: pwm8-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('I', 2, AF3)>; /* TIM8_CH4 */
-                                       bias-pull-down;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       pwm12_pins_a: pwm12-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 6, AF2)>; /* TIM12_CH1 */
-                                       bias-pull-down;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       qspi_clk_pins_a: qspi-clk-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 10, AF9)>; /* QSPI_CLK */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <3>;
-                               };
-                       };
-
-                       qspi_clk_sleep_pins_a: qspi-clk-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 10, ANALOG)>; /* QSPI_CLK */
-                               };
-                       };
-
-                       qspi_bk1_pins_a: qspi-bk1-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('F', 8, AF10)>, /* QSPI_BK1_IO0 */
-                                                <STM32_PINMUX('F', 9, AF10)>, /* QSPI_BK1_IO1 */
-                                                <STM32_PINMUX('F', 7, AF9)>, /* QSPI_BK1_IO2 */
-                                                <STM32_PINMUX('F', 6, AF9)>; /* QSPI_BK1_IO3 */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('B', 6, AF10)>; /* QSPI_BK1_NCS */
-                                       bias-pull-up;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-                       };
-
-                       qspi_bk1_sleep_pins_a: qspi-bk1-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 8, ANALOG)>, /* QSPI_BK1_IO0 */
-                                                <STM32_PINMUX('F', 9, ANALOG)>, /* QSPI_BK1_IO1 */
-                                                <STM32_PINMUX('F', 7, ANALOG)>, /* QSPI_BK1_IO2 */
-                                                <STM32_PINMUX('F', 6, ANALOG)>, /* QSPI_BK1_IO3 */
-                                                <STM32_PINMUX('B', 6, ANALOG)>; /* QSPI_BK1_NCS */
-                               };
-                       };
-
-                       qspi_bk2_pins_a: qspi-bk2-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('H', 2, AF9)>, /* QSPI_BK2_IO0 */
-                                                <STM32_PINMUX('H', 3, AF9)>, /* QSPI_BK2_IO1 */
-                                                <STM32_PINMUX('G', 10, AF11)>, /* QSPI_BK2_IO2 */
-                                                <STM32_PINMUX('G', 7, AF11)>; /* QSPI_BK2_IO3 */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('C', 0, AF10)>; /* QSPI_BK2_NCS */
-                                       bias-pull-up;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-                       };
-
-                       qspi_bk2_sleep_pins_a: qspi-bk2-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('H', 2, ANALOG)>, /* QSPI_BK2_IO0 */
-                                                <STM32_PINMUX('H', 3, ANALOG)>, /* QSPI_BK2_IO1 */
-                                                <STM32_PINMUX('G', 10, ANALOG)>, /* QSPI_BK2_IO2 */
-                                                <STM32_PINMUX('G', 7, ANALOG)>, /* QSPI_BK2_IO3 */
-                                                <STM32_PINMUX('C', 0, ANALOG)>; /* QSPI_BK2_NCS */
-                               };
-                       };
-
-                       sai2a_pins_a: sai2a-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('I', 5, AF10)>, /* SAI2_SCK_A */
-                                                <STM32_PINMUX('I', 6, AF10)>, /* SAI2_SD_A */
-                                                <STM32_PINMUX('I', 7, AF10)>, /* SAI2_FS_A */
-                                                <STM32_PINMUX('E', 0, AF10)>; /* SAI2_MCLK_A */
-                                       slew-rate = <0>;
-                                       drive-push-pull;
-                                       bias-disable;
-                               };
-                       };
-
-                       sai2a_sleep_pins_a: sai2a-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('I', 5, ANALOG)>, /* SAI2_SCK_A */
-                                                <STM32_PINMUX('I', 6, ANALOG)>, /* SAI2_SD_A */
-                                                <STM32_PINMUX('I', 7, ANALOG)>, /* SAI2_FS_A */
-                                                <STM32_PINMUX('E', 0, ANALOG)>; /* SAI2_MCLK_A */
-                               };
-                       };
-
-                       sai2b_pins_a: sai2b-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('E', 12, AF10)>, /* SAI2_SCK_B */
-                                                <STM32_PINMUX('E', 13, AF10)>, /* SAI2_FS_B */
-                                                <STM32_PINMUX('E', 14, AF10)>; /* SAI2_MCLK_B */
-                                       slew-rate = <0>;
-                                       drive-push-pull;
-                                       bias-disable;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('F', 11, AF10)>; /* SAI2_SD_B */
-                                       bias-disable;
-                               };
-                       };
-
-                       sai2b_sleep_pins_a: sai2b-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 11, ANALOG)>, /* SAI2_SD_B */
-                                                <STM32_PINMUX('E', 12, ANALOG)>, /* SAI2_SCK_B */
-                                                <STM32_PINMUX('E', 13, ANALOG)>, /* SAI2_FS_B */
-                                                <STM32_PINMUX('E', 14, ANALOG)>; /* SAI2_MCLK_B */
-                               };
-                       };
-
-                       sai2b_pins_b: sai2b-2 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 11, AF10)>; /* SAI2_SD_B */
-                                       bias-disable;
-                               };
-                       };
-
-                       sai2b_sleep_pins_b: sai2b-3 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 11, ANALOG)>; /* SAI2_SD_B */
-                               };
-                       };
-
-                       sai4a_pins_a: sai4a-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('B', 5, AF10)>; /* SAI4_SD_A */
-                                       slew-rate = <0>;
-                                       drive-push-pull;
-                                       bias-disable;
-                               };
-                       };
-
-                       sai4a_sleep_pins_a: sai4a-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('B', 5, ANALOG)>; /* SAI4_SD_A */
-                               };
-                       };
-
-                       sdmmc1_b4_pins_a: sdmmc1-b4-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
-                                                <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
-                                                <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
-                                                <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
-                                                <STM32_PINMUX('C', 12, AF12)>, /* SDMMC1_CK */
-                                                <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
-                                       slew-rate = <3>;
-                                       drive-push-pull;
-                                       bias-disable;
-                               };
-                       };
-
-                       sdmmc1_b4_od_pins_a: sdmmc1-b4-od-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
-                                                <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
-                                                <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
-                                                <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
-                                                <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
-                                       slew-rate = <3>;
-                                       drive-push-pull;
-                                       bias-disable;
-                               };
-                               pins2{
-                                       pinmux = <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
-                                       slew-rate = <3>;
-                                       drive-open-drain;
-                                       bias-disable;
-                               };
-                       };
-
-                       sdmmc1_b4_sleep_pins_a: sdmmc1-b4-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1_D0 */
-                                                <STM32_PINMUX('C', 9, ANALOG)>, /* SDMMC1_D1 */
-                                                <STM32_PINMUX('C', 10, ANALOG)>, /* SDMMC1_D2 */
-                                                <STM32_PINMUX('C', 11, ANALOG)>, /* SDMMC1_D3 */
-                                                <STM32_PINMUX('C', 12, ANALOG)>, /* SDMMC1_CK */
-                                                <STM32_PINMUX('D', 2, ANALOG)>; /* SDMMC1_CMD */
-                               };
-                       };
-
-                       sdmmc1_dir_pins_a: sdmmc1-dir-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('F', 2, AF11)>, /* SDMMC1_D0DIR */
-                                                <STM32_PINMUX('C', 7, AF8)>, /* SDMMC1_D123DIR */
-                                                <STM32_PINMUX('B', 9, AF11)>; /* SDMMC1_CDIR */
-                                       slew-rate = <3>;
-                                       drive-push-pull;
-                                       bias-pull-up;
-                               };
-                               pins2{
-                                       pinmux = <STM32_PINMUX('E', 4, AF8)>; /* SDMMC1_CKIN */
-                                       bias-pull-up;
-                               };
-                       };
-
-                       sdmmc1_dir_sleep_pins_a: sdmmc1-dir-sleep-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('F', 2, ANALOG)>, /* SDMMC1_D0DIR */
-                                                <STM32_PINMUX('C', 7, ANALOG)>, /* SDMMC1_D123DIR */
-                                                <STM32_PINMUX('B', 9, ANALOG)>, /* SDMMC1_CDIR */
-                                                <STM32_PINMUX('E', 4, ANALOG)>; /* SDMMC1_CKIN */
-                               };
-                       };
-
-                       spdifrx_pins_a: spdifrx-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('G', 12, AF8)>; /* SPDIF_IN1 */
-                                       bias-disable;
-                               };
-                       };
-
-                       spdifrx_sleep_pins_a: spdifrx-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('G', 12, ANALOG)>; /* SPDIF_IN1 */
-                               };
-                       };
-
-                       uart4_pins_a: uart4-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
-                                       bias-disable;
-                               };
-                       };
-
-                       uart4_pins_b: uart4-1 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('D', 1, AF8)>; /* UART4_TX */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
-                                       bias-disable;
-                               };
-                       };
-
-                       uart7_pins_a: uart7-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART4_TX */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('E', 7, AF7)>, /* UART4_RX */
-                                                <STM32_PINMUX('E', 10, AF7)>, /* UART4_CTS */
-                                                <STM32_PINMUX('E', 9, AF7)>; /* UART4_RTS */
-                                       bias-disable;
-                               };
-                       };
-               };
-
-               pinctrl_z: pin-controller-z@54004000 {
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       compatible = "st,stm32mp157-z-pinctrl";
-                       ranges = <0 0x54004000 0x400>;
-                       pins-are-numbered;
-                       interrupt-parent = <&exti>;
-                       st,syscfg = <&exti 0x60 0xff>;
-
-                       gpioz: gpio@54004000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0 0x400>;
-                               clocks = <&rcc GPIOZ>;
-                               st,bank-name = "GPIOZ";
-                               st,bank-ioport = <11>;
-                               status = "disabled";
-                       };
-
-                       i2c2_pins_b2: i2c2-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('Z', 0, AF3)>; /* I2C2_SCL */
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       i2c2_pins_sleep_b2: i2c2-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('Z', 0, ANALOG)>; /* I2C2_SCL */
-                               };
-                       };
-
-                       i2c4_pins_a: i2c4-0 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('Z', 4, AF6)>, /* I2C4_SCL */
-                                                <STM32_PINMUX('Z', 5, AF6)>; /* I2C4_SDA */
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <0>;
-                               };
-                       };
-
-                       i2c4_pins_sleep_a: i2c4-1 {
-                               pins {
-                                       pinmux = <STM32_PINMUX('Z', 4, ANALOG)>, /* I2C4_SCL */
-                                                <STM32_PINMUX('Z', 5, ANALOG)>; /* I2C4_SDA */
-                               };
-                       };
-
-                       spi1_pins_a: spi1-0 {
-                               pins1 {
-                                       pinmux = <STM32_PINMUX('Z', 0, AF5)>, /* SPI1_SCK */
-                                                <STM32_PINMUX('Z', 2, AF5)>; /* SPI1_MOSI */
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <1>;
-                               };
-
-                               pins2 {
-                                       pinmux = <STM32_PINMUX('Z', 1, AF5)>; /* SPI1_MISO */
-                                       bias-disable;
-                               };
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stm32mp157.dtsi b/arch/arm/boot/dts/stm32mp157.dtsi
new file mode 100644 (file)
index 0000000..3f0a4a9
--- /dev/null
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+#include "stm32mp153.dtsi"
+
+/ {
+       soc {
+               gpu: gpu@59000000 {
+                       compatible = "vivante,gc";
+                       reg = <0x59000000 0x800>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&rcc GPU>, <&rcc GPU_K>;
+                       clock-names = "bus" ,"core";
+                       resets = <&rcc GPU_R>;
+                       status = "disabled";
+               };
+
+               dsi: dsi@5a000000 {
+                       compatible = "st,stm32-dsi";
+                       reg = <0x5a000000 0x800>;
+                       clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>;
+                       clock-names = "pclk", "ref", "px_clk";
+                       resets = <&rcc DSI_R>;
+                       reset-names = "apb";
+                       status = "disabled";
+               };
+       };
+};
index 628c74a45a25f00846dfc47d9613fce77449d3d0..cbfa4075907ee934f94209550018d24cd197201f 100644 (file)
@@ -6,8 +6,9 @@
 
 /dts-v1/;
 
-#include "stm32mp157c.dtsi"
-#include "stm32mp157xac-pinctrl.dtsi"
+#include "stm32mp157.dtsi"
+#include "stm32mp15-pinctrl.dtsi"
+#include "stm32mp15xxac-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/mfd/st,stpmic1.h>
 
index 984a47cbd13dfe73360baef0c1cf658fb8a15f84..d03d4cd2606ab63457ce136ef8f83e6cf0378268 100644 (file)
@@ -6,10 +6,10 @@
 
 /dts-v1/;
 
-#include "stm32mp157c.dtsi"
-#include "stm32mp157xac-pinctrl.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/mfd/st,stpmic1.h>
+#include "stm32mp157.dtsi"
+#include "stm32mp15-pinctrl.dtsi"
+#include "stm32mp15xxac-pinctrl.dtsi"
+#include "stm32mp15xx-dkx.dtsi"
 
 / {
        model = "STMicroelectronics STM32MP157A-DK1 Discovery Board";
        chosen {
                stdout-path = "serial0:115200n8";
        };
-
-       memory@c0000000 {
-               device_type = "memory";
-               reg = <0xc0000000 0x20000000>;
-       };
-
-       reserved-memory {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               mcuram2: mcuram2@10000000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x10000000 0x40000>;
-                       no-map;
-               };
-
-               vdev0vring0: vdev0vring0@10040000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x10040000 0x1000>;
-                       no-map;
-               };
-
-               vdev0vring1: vdev0vring1@10041000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x10041000 0x1000>;
-                       no-map;
-               };
-
-               vdev0buffer: vdev0buffer@10042000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x10042000 0x4000>;
-                       no-map;
-               };
-
-               mcuram: mcuram@30000000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x30000000 0x40000>;
-                       no-map;
-               };
-
-               retram: retram@38000000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x38000000 0x10000>;
-                       no-map;
-               };
-
-               gpu_reserved: gpu@d4000000 {
-                       reg = <0xd4000000 0x4000000>;
-                       no-map;
-               };
-       };
-
-       led {
-               compatible = "gpio-leds";
-               blue {
-                       label = "heartbeat";
-                       gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "heartbeat";
-                       default-state = "off";
-               };
-       };
-
-       sound {
-               compatible = "audio-graph-card";
-               label = "STM32MP1-DK";
-               routing =
-                       "Playback" , "MCLK",
-                       "Capture" , "MCLK",
-                       "MICL" , "Mic Bias";
-               dais = <&sai2a_port &sai2b_port &i2s2_port>;
-               status = "okay";
-       };
-};
-
-&adc {
-       pinctrl-names = "default";
-       pinctrl-0 = <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>;
-       vdd-supply = <&vdd>;
-       vdda-supply = <&vdd>;
-       vref-supply = <&vrefbuf>;
-       status = "disabled";
-       adc1: adc@0 {
-               /*
-                * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19.
-                * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
-                * 5 * (56 + 47kOhms) * 5pF => 2.5us.
-                * Use arbitrary margin here (e.g. 5us).
-                */
-               st,min-sample-time-nsecs = <5000>;
-               /* AIN connector, USB Type-C CC1 & CC2 */
-               st,adc-channels = <0 1 6 13 18 19>;
-               status = "okay";
-       };
-       adc2: adc@100 {
-               /* AIN connector, USB Type-C CC1 & CC2 */
-               st,adc-channels = <0 1 2 6 18 19>;
-               st,min-sample-time-nsecs = <5000>;
-               status = "okay";
-       };
-};
-
-&cec {
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&cec_pins_b>;
-       pinctrl-1 = <&cec_pins_sleep_b>;
-       status = "okay";
-};
-
-&ethernet0 {
-       status = "okay";
-       pinctrl-0 = <&ethernet0_rgmii_pins_a>;
-       pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
-       pinctrl-names = "default", "sleep";
-       phy-mode = "rgmii-id";
-       max-speed = <1000>;
-       phy-handle = <&phy0>;
-
-       mdio0 {
-               #address-cells = <1>;
-               #size-cells = <0>;
-               compatible = "snps,dwmac-mdio";
-               phy0: ethernet-phy@0 {
-                       reg = <0>;
-               };
-       };
-};
-
-&gpu {
-       contiguous-area = <&gpu_reserved>;
-       status = "okay";
-};
-
-&i2c1 {
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&i2c1_pins_a>;
-       pinctrl-1 = <&i2c1_pins_sleep_a>;
-       i2c-scl-rising-time-ns = <100>;
-       i2c-scl-falling-time-ns = <7>;
-       status = "okay";
-       /delete-property/dmas;
-       /delete-property/dma-names;
-
-       hdmi-transmitter@39 {
-               compatible = "sil,sii9022";
-               reg = <0x39>;
-               iovcc-supply = <&v3v3_hdmi>;
-               cvcc12-supply = <&v1v2_hdmi>;
-               reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>;
-               interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
-               interrupt-parent = <&gpiog>;
-               #sound-dai-cells = <0>;
-               status = "okay";
-
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       port@0 {
-                               reg = <0>;
-                               sii9022_in: endpoint {
-                                       remote-endpoint = <&ltdc_ep0_out>;
-                               };
-                       };
-
-                       port@3 {
-                               reg = <3>;
-                               sii9022_tx_endpoint: endpoint {
-                                       remote-endpoint = <&i2s2_endpoint>;
-                               };
-                       };
-               };
-       };
-
-       cs42l51: cs42l51@4a {
-               compatible = "cirrus,cs42l51";
-               reg = <0x4a>;
-               #sound-dai-cells = <0>;
-               VL-supply = <&v3v3>;
-               VD-supply = <&v1v8_audio>;
-               VA-supply = <&v1v8_audio>;
-               VAHP-supply = <&v1v8_audio>;
-               reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>;
-               clocks = <&sai2a>;
-               clock-names = "MCLK";
-               status = "okay";
-
-               cs42l51_port: port {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       cs42l51_tx_endpoint: endpoint@0 {
-                               reg = <0>;
-                               remote-endpoint = <&sai2a_endpoint>;
-                               frame-master;
-                               bitclock-master;
-                       };
-
-                       cs42l51_rx_endpoint: endpoint@1 {
-                               reg = <1>;
-                               remote-endpoint = <&sai2b_endpoint>;
-                               frame-master;
-                               bitclock-master;
-                       };
-               };
-       };
-};
-
-&i2c4 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c4_pins_a>;
-       i2c-scl-rising-time-ns = <185>;
-       i2c-scl-falling-time-ns = <20>;
-       status = "okay";
-       /* spare dmas for other usage */
-       /delete-property/dmas;
-       /delete-property/dma-names;
-
-       pmic: stpmic@33 {
-               compatible = "st,stpmic1";
-               reg = <0x33>;
-               interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
-               interrupt-controller;
-               #interrupt-cells = <2>;
-               status = "okay";
-
-               regulators {
-                       compatible = "st,stpmic1-regulators";
-                       ldo1-supply = <&v3v3>;
-                       ldo3-supply = <&vdd_ddr>;
-                       ldo6-supply = <&v3v3>;
-                       pwr_sw1-supply = <&bst_out>;
-                       pwr_sw2-supply = <&bst_out>;
-
-                       vddcore: buck1 {
-                               regulator-name = "vddcore";
-                               regulator-min-microvolt = <1200000>;
-                               regulator-max-microvolt = <1350000>;
-                               regulator-always-on;
-                               regulator-initial-mode = <0>;
-                               regulator-over-current-protection;
-                       };
-
-                       vdd_ddr: buck2 {
-                               regulator-name = "vdd_ddr";
-                               regulator-min-microvolt = <1350000>;
-                               regulator-max-microvolt = <1350000>;
-                               regulator-always-on;
-                               regulator-initial-mode = <0>;
-                               regulator-over-current-protection;
-                       };
-
-                       vdd: buck3 {
-                               regulator-name = "vdd";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-always-on;
-                               st,mask-reset;
-                               regulator-initial-mode = <0>;
-                               regulator-over-current-protection;
-                       };
-
-                       v3v3: buck4 {
-                               regulator-name = "v3v3";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-always-on;
-                               regulator-over-current-protection;
-                               regulator-initial-mode = <0>;
-                       };
-
-                       v1v8_audio: ldo1 {
-                               regulator-name = "v1v8_audio";
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-always-on;
-                               interrupts = <IT_CURLIM_LDO1 0>;
-                       };
-
-                       v3v3_hdmi: ldo2 {
-                               regulator-name = "v3v3_hdmi";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-always-on;
-                               interrupts = <IT_CURLIM_LDO2 0>;
-                       };
-
-                       vtt_ddr: ldo3 {
-                               regulator-name = "vtt_ddr";
-                               regulator-min-microvolt = <500000>;
-                               regulator-max-microvolt = <750000>;
-                               regulator-always-on;
-                               regulator-over-current-protection;
-                       };
-
-                       vdd_usb: ldo4 {
-                               regulator-name = "vdd_usb";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                               interrupts = <IT_CURLIM_LDO4 0>;
-                       };
-
-                       vdda: ldo5 {
-                               regulator-name = "vdda";
-                               regulator-min-microvolt = <2900000>;
-                               regulator-max-microvolt = <2900000>;
-                               interrupts = <IT_CURLIM_LDO5 0>;
-                               regulator-boot-on;
-                       };
-
-                       v1v2_hdmi: ldo6 {
-                               regulator-name = "v1v2_hdmi";
-                               regulator-min-microvolt = <1200000>;
-                               regulator-max-microvolt = <1200000>;
-                               regulator-always-on;
-                               interrupts = <IT_CURLIM_LDO6 0>;
-                       };
-
-                       vref_ddr: vref_ddr {
-                               regulator-name = "vref_ddr";
-                               regulator-always-on;
-                               regulator-over-current-protection;
-                       };
-
-                        bst_out: boost {
-                               regulator-name = "bst_out";
-                               interrupts = <IT_OCP_BOOST 0>;
-                        };
-
-                       vbus_otg: pwr_sw1 {
-                               regulator-name = "vbus_otg";
-                               interrupts = <IT_OCP_OTG 0>;
-                        };
-
-                        vbus_sw: pwr_sw2 {
-                               regulator-name = "vbus_sw";
-                               interrupts = <IT_OCP_SWOUT 0>;
-                               regulator-active-discharge = <1>;
-                        };
-               };
-
-               onkey {
-                       compatible = "st,stpmic1-onkey";
-                       interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
-                       interrupt-names = "onkey-falling", "onkey-rising";
-                       power-off-time-sec = <10>;
-                       status = "okay";
-               };
-
-               watchdog {
-                       compatible = "st,stpmic1-wdt";
-                       status = "disabled";
-               };
-       };
-};
-
-&i2s2 {
-       clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
-       clock-names = "pclk", "i2sclk", "x8k", "x11k";
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&i2s2_pins_a>;
-       pinctrl-1 = <&i2s2_pins_sleep_a>;
-       status = "okay";
-
-       i2s2_port: port {
-               i2s2_endpoint: endpoint {
-                       remote-endpoint = <&sii9022_tx_endpoint>;
-                       format = "i2s";
-                       mclk-fs = <256>;
-               };
-       };
-};
-
-&ipcc {
-       status = "okay";
-};
-
-&iwdg2 {
-       timeout-sec = <32>;
-       status = "okay";
-};
-
-&ltdc {
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&ltdc_pins_a>;
-       pinctrl-1 = <&ltdc_pins_sleep_a>;
-       status = "okay";
-
-       port {
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               ltdc_ep0_out: endpoint@0 {
-                       reg = <0>;
-                       remote-endpoint = <&sii9022_in>;
-               };
-       };
-};
-
-&m4_rproc {
-       memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
-                       <&vdev0vring1>, <&vdev0buffer>;
-       mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
-       mbox-names = "vq0", "vq1", "shutdown";
-       interrupt-parent = <&exti>;
-       interrupts = <68 1>;
-       status = "okay";
-};
-
-&pwr_regulators {
-       vdd-supply = <&vdd>;
-       vdd_3v3_usbfs-supply = <&vdd_usb>;
-};
-
-&rng1 {
-       status = "okay";
-};
-
-&rtc {
-       status = "okay";
-};
-
-&sai2 {
-       clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
-       clock-names = "pclk", "x8k", "x11k";
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
-       pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
-       status = "okay";
-
-       sai2a: audio-controller@4400b004 {
-               #clock-cells = <0>;
-               dma-names = "tx";
-               clocks = <&rcc SAI2_K>;
-               clock-names = "sai_ck";
-               status = "okay";
-
-               sai2a_port: port {
-                       sai2a_endpoint: endpoint {
-                               remote-endpoint = <&cs42l51_tx_endpoint>;
-                               format = "i2s";
-                               mclk-fs = <256>;
-                               dai-tdm-slot-num = <2>;
-                               dai-tdm-slot-width = <32>;
-                       };
-               };
-       };
-
-       sai2b: audio-controller@4400b024 {
-               dma-names = "rx";
-               st,sync = <&sai2a 2>;
-               clocks = <&rcc SAI2_K>, <&sai2a>;
-               clock-names = "sai_ck", "MCLK";
-               status = "okay";
-
-               sai2b_port: port {
-                       sai2b_endpoint: endpoint {
-                               remote-endpoint = <&cs42l51_rx_endpoint>;
-                               format = "i2s";
-                               mclk-fs = <256>;
-                               dai-tdm-slot-num = <2>;
-                               dai-tdm-slot-width = <32>;
-                       };
-               };
-       };
-};
-
-&sdmmc1 {
-       pinctrl-names = "default", "opendrain", "sleep";
-       pinctrl-0 = <&sdmmc1_b4_pins_a>;
-       pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
-       pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
-       broken-cd;
-       st,neg-edge;
-       bus-width = <4>;
-       vmmc-supply = <&v3v3>;
-       status = "okay";
-};
-
-&uart4 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart4_pins_a>;
-       status = "okay";
-};
-
-&vrefbuf {
-       regulator-min-microvolt = <2500000>;
-       regulator-max-microvolt = <2500000>;
-       vdda-supply = <&vdd>;
-       status = "okay";
 };
index d26adcbeba33ea235495eefab6e72abf1cb9d82d..7985b80967cadbd25a7f293bad91fe42804b4add 100644 (file)
@@ -6,11 +6,24 @@
 
 /dts-v1/;
 
-#include "stm32mp157a-dk1.dts"
+#include "stm32mp157.dtsi"
+#include "stm32mp15xc.dtsi"
+#include "stm32mp15-pinctrl.dtsi"
+#include "stm32mp15xxac-pinctrl.dtsi"
+#include "stm32mp15xx-dkx.dtsi"
 
 / {
        model = "STMicroelectronics STM32MP157C-DK2 Discovery Board";
        compatible = "st,stm32mp157c-dk2", "st,stm32mp157";
+
+       aliases {
+               ethernet0 = &ethernet0;
+               serial0 = &uart4;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
 };
 
 &dsi {
index b8cc0fb0ec484d70c0620287d5be82c0ffba63f2..1fc43251d697e6e09ce937c7a3168f168915ce58 100644 (file)
@@ -5,8 +5,10 @@
  */
 /dts-v1/;
 
-#include "stm32mp157c.dtsi"
-#include "stm32mp157xaa-pinctrl.dtsi"
+#include "stm32mp157.dtsi"
+#include "stm32mp15xc.dtsi"
+#include "stm32mp15-pinctrl.dtsi"
+#include "stm32mp15xxaa-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/mfd/st,stpmic1.h>
 
        };
 };
 
+&adc {
+       /* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
+       pinctrl-0 = <&adc1_in6_pins_a>;
+       pinctrl-names = "default";
+       vdd-supply = <&vdd>;
+       vdda-supply = <&vdda>;
+       vref-supply = <&vdda>;
+       status = "disabled";
+       adc1: adc@0 {
+               st,adc-channels = <0 1 6>;
+               /* 16.5 ck_cycles sampling time */
+               st,min-sample-time-nsecs = <400>;
+               status = "okay";
+       };
+};
+
 &dac {
        pinctrl-names = "default";
        pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
        status = "okay";
 };
 
+&sdmmc2 {
+       pinctrl-names = "default", "opendrain", "sleep";
+       pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
+       pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
+       pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
+       non-removable;
+       no-sd;
+       no-sdio;
+       st,neg-edge;
+       bus-width = <8>;
+       vmmc-supply = <&v3v3>;
+       vqmmc-supply = <&v3v3>;
+       mmc-ddr-3_3v;
+       status = "okay";
+};
+
 &timers6 {
        status = "okay";
        /* spare dmas for other usage */
index 3789312c8539ffbb0cf442dcb27a6cfbcba68863..228e35e1688458b0f3433c80a47473e9afb331da 100644 (file)
        };
 };
 
+&sdmmc3 {
+       pinctrl-names = "default", "opendrain", "sleep";
+       pinctrl-0 = <&sdmmc3_b4_pins_a>;
+       pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
+       pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
+       broken-cd;
+       st,neg-edge;
+       bus-width = <4>;
+       vmmc-supply = <&v3v3>;
+       status = "disabled";
+};
+
 &spi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi1_pins_a>;
        status = "disabled";
        pwm {
                pinctrl-0 = <&pwm2_pins_a>;
-               pinctrl-names = "default";
+               pinctrl-1 = <&pwm2_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
                status = "okay";
        };
        timer@1 {
        status = "disabled";
        pwm {
                pinctrl-0 = <&pwm8_pins_a>;
-               pinctrl-names = "default";
+               pinctrl-1 = <&pwm8_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
                status = "okay";
        };
        timer@7 {
        status = "disabled";
        pwm {
                pinctrl-0 = <&pwm12_pins_a>;
-               pinctrl-names = "default";
+               pinctrl-1 = <&pwm12_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
                status = "okay";
        };
        timer@11 {
 &usbotg_hs {
        dr_mode = "peripheral";
        phys = <&usbphyc_port1 0>;
+       phy-names = "usb2-phy";
        status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/stm32mp157xaa-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xaa-pinctrl.dtsi
deleted file mode 100644 (file)
index 875adf5..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
-/*
- * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
- * Author: Alexandre Torgue <alexandre.torgue@st.com>
- */
-
-#include "stm32mp157-pinctrl.dtsi"
-/ {
-       soc {
-               pinctrl: pin-controller@50002000 {
-                       st,package = <STM32MP_PKG_AA>;
-
-                       gpioa: gpio@50002000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 0 16>;
-                       };
-
-                       gpiob: gpio@50003000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 16 16>;
-                       };
-
-                       gpioc: gpio@50004000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 32 16>;
-                       };
-
-                       gpiod: gpio@50005000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 48 16>;
-                       };
-
-                       gpioe: gpio@50006000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 64 16>;
-                       };
-
-                       gpiof: gpio@50007000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 80 16>;
-                       };
-
-                       gpiog: gpio@50008000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 96 16>;
-                       };
-
-                       gpioh: gpio@50009000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 112 16>;
-                       };
-
-                       gpioi: gpio@5000a000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 128 16>;
-                       };
-
-                       gpioj: gpio@5000b000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 144 16>;
-                       };
-
-                       gpiok: gpio@5000c000 {
-                               status = "okay";
-                               ngpios = <8>;
-                               gpio-ranges = <&pinctrl 0 160 8>;
-                       };
-               };
-
-               pinctrl_z: pin-controller-z@54004000 {
-                       st,package = <STM32MP_PKG_AA>;
-
-                       gpioz: gpio@54004000 {
-                               status = "okay";
-                               ngpios = <8>;
-                               gpio-ranges = <&pinctrl_z 0 400 8>;
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stm32mp157xab-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xab-pinctrl.dtsi
deleted file mode 100644 (file)
index 961fa12..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
-/*
- * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
- * Author: Alexandre Torgue <alexandre.torgue@st.com>
- */
-
-#include "stm32mp157-pinctrl.dtsi"
-/ {
-       soc {
-               pinctrl: pin-controller@50002000 {
-                       st,package = <STM32MP_PKG_AB>;
-
-                       gpioa: gpio@50002000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 0 16>;
-                       };
-
-                       gpiob: gpio@50003000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 16 16>;
-                       };
-
-                       gpioc: gpio@50004000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 32 16>;
-                       };
-
-                       gpiod: gpio@50005000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 48 16>;
-                       };
-
-                       gpioe: gpio@50006000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 64 16>;
-                       };
-
-                       gpiof: gpio@50007000 {
-                               status = "okay";
-                               ngpios = <6>;
-                               gpio-ranges = <&pinctrl 6 86 6>;
-                       };
-
-                       gpiog: gpio@50008000 {
-                               status = "okay";
-                               ngpios = <10>;
-                               gpio-ranges = <&pinctrl 6 102 10>;
-                       };
-
-                       gpioh: gpio@50009000 {
-                               status = "okay";
-                               ngpios = <2>;
-                               gpio-ranges = <&pinctrl 0 112 2>;
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stm32mp157xac-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xac-pinctrl.dtsi
deleted file mode 100644 (file)
index 26600f1..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
-/*
- * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
- * Author: Alexandre Torgue <alexandre.torgue@st.com>
- */
-
-#include "stm32mp157-pinctrl.dtsi"
-/ {
-       soc {
-               pinctrl: pin-controller@50002000 {
-                       st,package = <STM32MP_PKG_AC>;
-
-                       gpioa: gpio@50002000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 0 16>;
-                       };
-
-                       gpiob: gpio@50003000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 16 16>;
-                       };
-
-                       gpioc: gpio@50004000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 32 16>;
-                       };
-
-                       gpiod: gpio@50005000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 48 16>;
-                       };
-
-                       gpioe: gpio@50006000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 64 16>;
-                       };
-
-                       gpiof: gpio@50007000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 80 16>;
-                       };
-
-                       gpiog: gpio@50008000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 96 16>;
-                       };
-
-                       gpioh: gpio@50009000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 112 16>;
-                       };
-
-                       gpioi: gpio@5000a000 {
-                               status = "okay";
-                               ngpios = <12>;
-                               gpio-ranges = <&pinctrl 0 128 12>;
-                       };
-               };
-
-               pinctrl_z: pin-controller-z@54004000 {
-                       st,package = <STM32MP_PKG_AC>;
-
-                       gpioz: gpio@54004000 {
-                               status = "okay";
-                               ngpios = <8>;
-                               gpio-ranges = <&pinctrl_z 0 400 8>;
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stm32mp157xad-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xad-pinctrl.dtsi
deleted file mode 100644 (file)
index 910113f..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
-/*
- * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
- * Author: Alexandre Torgue <alexandre.torgue@st.com>
- */
-
-#include "stm32mp157-pinctrl.dtsi"
-/ {
-       soc {
-               pinctrl: pin-controller@50002000 {
-                       st,package = <STM32MP_PKG_AD>;
-
-                       gpioa: gpio@50002000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 0 16>;
-                       };
-
-                       gpiob: gpio@50003000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 16 16>;
-                       };
-
-                       gpioc: gpio@50004000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 32 16>;
-                       };
-
-                       gpiod: gpio@50005000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 48 16>;
-                       };
-
-                       gpioe: gpio@50006000 {
-                               status = "okay";
-                               ngpios = <16>;
-                               gpio-ranges = <&pinctrl 0 64 16>;
-                       };
-
-                       gpiof: gpio@50007000 {
-                               status = "okay";
-                               ngpios = <6>;
-                               gpio-ranges = <&pinctrl 6 86 6>;
-                       };
-
-                       gpiog: gpio@50008000 {
-                               status = "okay";
-                               ngpios = <10>;
-                               gpio-ranges = <&pinctrl 6 102 10>;
-                       };
-
-                       gpioh: gpio@50009000 {
-                               status = "okay";
-                               ngpios = <2>;
-                               gpio-ranges = <&pinctrl 0 112 2>;
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/stm32mp15xc.dtsi b/arch/arm/boot/dts/stm32mp15xc.dtsi
new file mode 100644 (file)
index 0000000..b06a55a
--- /dev/null
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+/ {
+       soc {
+               cryp1: cryp@54001000 {
+                       compatible = "st,stm32mp1-cryp";
+                       reg = <0x54001000 0x400>;
+                       interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&rcc CRYP1>;
+                       resets = <&rcc CRYP1_R>;
+                       status = "disabled";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
new file mode 100644 (file)
index 0000000..f6672e8
--- /dev/null
@@ -0,0 +1,625 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/mfd/st,stpmic1.h>
+
+/ {
+       memory@c0000000 {
+               device_type = "memory";
+               reg = <0xc0000000 0x20000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               mcuram2: mcuram2@10000000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x10000000 0x40000>;
+                       no-map;
+               };
+
+               vdev0vring0: vdev0vring0@10040000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x10040000 0x1000>;
+                       no-map;
+               };
+
+               vdev0vring1: vdev0vring1@10041000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x10041000 0x1000>;
+                       no-map;
+               };
+
+               vdev0buffer: vdev0buffer@10042000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x10042000 0x4000>;
+                       no-map;
+               };
+
+               mcuram: mcuram@30000000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x30000000 0x40000>;
+                       no-map;
+               };
+
+               retram: retram@38000000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x38000000 0x10000>;
+                       no-map;
+               };
+
+               gpu_reserved: gpu@d4000000 {
+                       reg = <0xd4000000 0x4000000>;
+                       no-map;
+               };
+       };
+
+       led {
+               compatible = "gpio-leds";
+               blue {
+                       label = "heartbeat";
+                       gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+                       default-state = "off";
+               };
+       };
+
+       sound {
+               compatible = "audio-graph-card";
+               label = "STM32MP1-DK";
+               routing =
+                       "Playback" , "MCLK",
+                       "Capture" , "MCLK",
+                       "MICL" , "Mic Bias";
+               dais = <&sai2a_port &sai2b_port &i2s2_port>;
+               status = "okay";
+       };
+};
+
+&adc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>;
+       vdd-supply = <&vdd>;
+       vdda-supply = <&vdd>;
+       vref-supply = <&vrefbuf>;
+       status = "disabled";
+       adc1: adc@0 {
+               /*
+                * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19.
+                * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
+                * 5 * (56 + 47kOhms) * 5pF => 2.5us.
+                * Use arbitrary margin here (e.g. 5us).
+                */
+               st,min-sample-time-nsecs = <5000>;
+               /* AIN connector, USB Type-C CC1 & CC2 */
+               st,adc-channels = <0 1 6 13 18 19>;
+               status = "okay";
+       };
+       adc2: adc@100 {
+               /* AIN connector, USB Type-C CC1 & CC2 */
+               st,adc-channels = <0 1 2 6 18 19>;
+               st,min-sample-time-nsecs = <5000>;
+               status = "okay";
+       };
+};
+
+&cec {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&cec_pins_b>;
+       pinctrl-1 = <&cec_pins_sleep_b>;
+       status = "okay";
+};
+
+&ethernet0 {
+       status = "okay";
+       pinctrl-0 = <&ethernet0_rgmii_pins_a>;
+       pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
+       pinctrl-names = "default", "sleep";
+       phy-mode = "rgmii-id";
+       max-speed = <1000>;
+       phy-handle = <&phy0>;
+
+       mdio0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "snps,dwmac-mdio";
+               phy0: ethernet-phy@0 {
+                       reg = <0>;
+               };
+       };
+};
+
+&gpu {
+       contiguous-area = <&gpu_reserved>;
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&i2c1_pins_a>;
+       pinctrl-1 = <&i2c1_pins_sleep_a>;
+       i2c-scl-rising-time-ns = <100>;
+       i2c-scl-falling-time-ns = <7>;
+       status = "okay";
+       /delete-property/dmas;
+       /delete-property/dma-names;
+
+       hdmi-transmitter@39 {
+               compatible = "sil,sii9022";
+               reg = <0x39>;
+               iovcc-supply = <&v3v3_hdmi>;
+               cvcc12-supply = <&v1v2_hdmi>;
+               reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>;
+               interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+               interrupt-parent = <&gpiog>;
+               #sound-dai-cells = <0>;
+               status = "okay";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               sii9022_in: endpoint {
+                                       remote-endpoint = <&ltdc_ep0_out>;
+                               };
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               sii9022_tx_endpoint: endpoint {
+                                       remote-endpoint = <&i2s2_endpoint>;
+                               };
+                       };
+               };
+       };
+
+       cs42l51: cs42l51@4a {
+               compatible = "cirrus,cs42l51";
+               reg = <0x4a>;
+               #sound-dai-cells = <0>;
+               VL-supply = <&v3v3>;
+               VD-supply = <&v1v8_audio>;
+               VA-supply = <&v1v8_audio>;
+               VAHP-supply = <&v1v8_audio>;
+               reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>;
+               clocks = <&sai2a>;
+               clock-names = "MCLK";
+               status = "okay";
+
+               cs42l51_port: port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       cs42l51_tx_endpoint: endpoint@0 {
+                               reg = <0>;
+                               remote-endpoint = <&sai2a_endpoint>;
+                               frame-master;
+                               bitclock-master;
+                       };
+
+                       cs42l51_rx_endpoint: endpoint@1 {
+                               reg = <1>;
+                               remote-endpoint = <&sai2b_endpoint>;
+                               frame-master;
+                               bitclock-master;
+                       };
+               };
+       };
+};
+
+&i2c4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c4_pins_a>;
+       i2c-scl-rising-time-ns = <185>;
+       i2c-scl-falling-time-ns = <20>;
+       status = "okay";
+       /* spare dmas for other usage */
+       /delete-property/dmas;
+       /delete-property/dma-names;
+
+       pmic: stpmic@33 {
+               compatible = "st,stpmic1";
+               reg = <0x33>;
+               interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+               status = "okay";
+
+               regulators {
+                       compatible = "st,stpmic1-regulators";
+                       ldo1-supply = <&v3v3>;
+                       ldo3-supply = <&vdd_ddr>;
+                       ldo6-supply = <&v3v3>;
+                       pwr_sw1-supply = <&bst_out>;
+                       pwr_sw2-supply = <&bst_out>;
+
+                       vddcore: buck1 {
+                               regulator-name = "vddcore";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-always-on;
+                               regulator-initial-mode = <0>;
+                               regulator-over-current-protection;
+                       };
+
+                       vdd_ddr: buck2 {
+                               regulator-name = "vdd_ddr";
+                               regulator-min-microvolt = <1350000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-always-on;
+                               regulator-initial-mode = <0>;
+                               regulator-over-current-protection;
+                       };
+
+                       vdd: buck3 {
+                               regulator-name = "vdd";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                               st,mask-reset;
+                               regulator-initial-mode = <0>;
+                               regulator-over-current-protection;
+                       };
+
+                       v3v3: buck4 {
+                               regulator-name = "v3v3";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                               regulator-over-current-protection;
+                               regulator-initial-mode = <0>;
+                       };
+
+                       v1v8_audio: ldo1 {
+                               regulator-name = "v1v8_audio";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               interrupts = <IT_CURLIM_LDO1 0>;
+                       };
+
+                       v3v3_hdmi: ldo2 {
+                               regulator-name = "v3v3_hdmi";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                               interrupts = <IT_CURLIM_LDO2 0>;
+                       };
+
+                       vtt_ddr: ldo3 {
+                               regulator-name = "vtt_ddr";
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <750000>;
+                               regulator-always-on;
+                               regulator-over-current-protection;
+                       };
+
+                       vdd_usb: ldo4 {
+                               regulator-name = "vdd_usb";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               interrupts = <IT_CURLIM_LDO4 0>;
+                       };
+
+                       vdda: ldo5 {
+                               regulator-name = "vdda";
+                               regulator-min-microvolt = <2900000>;
+                               regulator-max-microvolt = <2900000>;
+                               interrupts = <IT_CURLIM_LDO5 0>;
+                               regulator-boot-on;
+                       };
+
+                       v1v2_hdmi: ldo6 {
+                               regulator-name = "v1v2_hdmi";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-always-on;
+                               interrupts = <IT_CURLIM_LDO6 0>;
+                       };
+
+                       vref_ddr: vref_ddr {
+                               regulator-name = "vref_ddr";
+                               regulator-always-on;
+                               regulator-over-current-protection;
+                       };
+
+                        bst_out: boost {
+                               regulator-name = "bst_out";
+                               interrupts = <IT_OCP_BOOST 0>;
+                        };
+
+                       vbus_otg: pwr_sw1 {
+                               regulator-name = "vbus_otg";
+                               interrupts = <IT_OCP_OTG 0>;
+                        };
+
+                        vbus_sw: pwr_sw2 {
+                               regulator-name = "vbus_sw";
+                               interrupts = <IT_OCP_SWOUT 0>;
+                               regulator-active-discharge = <1>;
+                        };
+               };
+
+               onkey {
+                       compatible = "st,stpmic1-onkey";
+                       interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
+                       interrupt-names = "onkey-falling", "onkey-rising";
+                       power-off-time-sec = <10>;
+                       status = "okay";
+               };
+
+               watchdog {
+                       compatible = "st,stpmic1-wdt";
+                       status = "disabled";
+               };
+       };
+};
+
+&i2s2 {
+       clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
+       clock-names = "pclk", "i2sclk", "x8k", "x11k";
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&i2s2_pins_a>;
+       pinctrl-1 = <&i2s2_pins_sleep_a>;
+       status = "okay";
+
+       i2s2_port: port {
+               i2s2_endpoint: endpoint {
+                       remote-endpoint = <&sii9022_tx_endpoint>;
+                       format = "i2s";
+                       mclk-fs = <256>;
+               };
+       };
+};
+
+&ipcc {
+       status = "okay";
+};
+
+&iwdg2 {
+       timeout-sec = <32>;
+       status = "okay";
+};
+
+&ltdc {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&ltdc_pins_a>;
+       pinctrl-1 = <&ltdc_pins_sleep_a>;
+       status = "okay";
+
+       port {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ltdc_ep0_out: endpoint@0 {
+                       reg = <0>;
+                       remote-endpoint = <&sii9022_in>;
+               };
+       };
+};
+
+&m4_rproc {
+       memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
+                       <&vdev0vring1>, <&vdev0buffer>;
+       mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
+       mbox-names = "vq0", "vq1", "shutdown";
+       interrupt-parent = <&exti>;
+       interrupts = <68 1>;
+       status = "okay";
+};
+
+&pwr_regulators {
+       vdd-supply = <&vdd>;
+       vdd_3v3_usbfs-supply = <&vdd_usb>;
+};
+
+&rng1 {
+       status = "okay";
+};
+
+&rtc {
+       status = "okay";
+};
+
+&sai2 {
+       clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
+       clock-names = "pclk", "x8k", "x11k";
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
+       pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
+       status = "okay";
+
+       sai2a: audio-controller@4400b004 {
+               #clock-cells = <0>;
+               dma-names = "tx";
+               clocks = <&rcc SAI2_K>;
+               clock-names = "sai_ck";
+               status = "okay";
+
+               sai2a_port: port {
+                       sai2a_endpoint: endpoint {
+                               remote-endpoint = <&cs42l51_tx_endpoint>;
+                               format = "i2s";
+                               mclk-fs = <256>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                       };
+               };
+       };
+
+       sai2b: audio-controller@4400b024 {
+               dma-names = "rx";
+               st,sync = <&sai2a 2>;
+               clocks = <&rcc SAI2_K>, <&sai2a>;
+               clock-names = "sai_ck", "MCLK";
+               status = "okay";
+
+               sai2b_port: port {
+                       sai2b_endpoint: endpoint {
+                               remote-endpoint = <&cs42l51_rx_endpoint>;
+                               format = "i2s";
+                               mclk-fs = <256>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                       };
+               };
+       };
+};
+
+&sdmmc1 {
+       pinctrl-names = "default", "opendrain", "sleep";
+       pinctrl-0 = <&sdmmc1_b4_pins_a>;
+       pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
+       pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
+       broken-cd;
+       st,neg-edge;
+       bus-width = <4>;
+       vmmc-supply = <&v3v3>;
+       status = "okay";
+};
+
+&sdmmc3 {
+       pinctrl-names = "default", "opendrain", "sleep";
+       pinctrl-0 = <&sdmmc3_b4_pins_a>;
+       pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
+       pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
+       broken-cd;
+       st,neg-edge;
+       bus-width = <4>;
+       vmmc-supply = <&v3v3>;
+       status = "disabled";
+};
+
+&timers1 {
+       /* spare dmas for other usage */
+       /delete-property/dmas;
+       /delete-property/dma-names;
+       status = "disabled";
+       pwm {
+               pinctrl-0 = <&pwm1_pins_a>;
+               pinctrl-1 = <&pwm1_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
+               status = "okay";
+       };
+       timer@0 {
+               status = "okay";
+       };
+};
+
+&timers3 {
+       /delete-property/dmas;
+       /delete-property/dma-names;
+       status = "disabled";
+       pwm {
+               pinctrl-0 = <&pwm3_pins_a>;
+               pinctrl-1 = <&pwm3_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
+               status = "okay";
+       };
+       timer@2 {
+               status = "okay";
+       };
+};
+
+&timers4 {
+       /delete-property/dmas;
+       /delete-property/dma-names;
+       status = "disabled";
+       pwm {
+               pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>;
+               pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>;
+               pinctrl-names = "default", "sleep";
+               status = "okay";
+       };
+       timer@3 {
+               status = "okay";
+       };
+};
+
+&timers5 {
+       /delete-property/dmas;
+       /delete-property/dma-names;
+       status = "disabled";
+       pwm {
+               pinctrl-0 = <&pwm5_pins_a>;
+               pinctrl-1 = <&pwm5_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
+               status = "okay";
+       };
+       timer@4 {
+               status = "okay";
+       };
+};
+
+&timers6 {
+       /delete-property/dmas;
+       /delete-property/dma-names;
+       status = "disabled";
+       timer@5 {
+               status = "okay";
+       };
+};
+
+&timers12 {
+       /delete-property/dmas;
+       /delete-property/dma-names;
+       status = "disabled";
+       pwm {
+               pinctrl-0 = <&pwm12_pins_a>;
+               pinctrl-1 = <&pwm12_sleep_pins_a>;
+               pinctrl-names = "default", "sleep";
+               status = "okay";
+       };
+       timer@11 {
+               status = "okay";
+       };
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart4_pins_a>;
+       status = "okay";
+};
+
+&usbh_ehci {
+       phys = <&usbphyc_port0>;
+       status = "okay";
+};
+
+&usbotg_hs {
+       dr_mode = "peripheral";
+       phys = <&usbphyc_port1 0>;
+       phy-names = "usb2-phy";
+       status = "okay";
+};
+
+&usbphyc {
+       status = "okay";
+};
+
+&usbphyc_port0 {
+       phy-supply = <&vdd_usb>;
+       vdda1v1-supply = <&reg11>;
+       vdda1v8-supply = <&reg18>;
+};
+
+&usbphyc_port1 {
+       phy-supply = <&vdd_usb>;
+       vdda1v1-supply = <&reg11>;
+       vdda1v8-supply = <&reg18>;
+};
+
+&vrefbuf {
+       regulator-min-microvolt = <2500000>;
+       regulator-max-microvolt = <2500000>;
+       vdda-supply = <&vdd>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/stm32mp15xxaa-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp15xxaa-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..04f7a43
--- /dev/null
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+&pinctrl {
+       st,package = <STM32MP_PKG_AA>;
+
+       gpioa: gpio@50002000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 0 16>;
+       };
+
+       gpiob: gpio@50003000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 16 16>;
+       };
+
+       gpioc: gpio@50004000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 32 16>;
+       };
+
+       gpiod: gpio@50005000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 48 16>;
+       };
+
+       gpioe: gpio@50006000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 64 16>;
+       };
+
+       gpiof: gpio@50007000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 80 16>;
+       };
+
+       gpiog: gpio@50008000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 96 16>;
+       };
+
+       gpioh: gpio@50009000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 112 16>;
+       };
+
+       gpioi: gpio@5000a000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 128 16>;
+       };
+
+       gpioj: gpio@5000b000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 144 16>;
+       };
+
+       gpiok: gpio@5000c000 {
+               status = "okay";
+               ngpios = <8>;
+               gpio-ranges = <&pinctrl 0 160 8>;
+       };
+};
+
+&pinctrl_z {
+       st,package = <STM32MP_PKG_AA>;
+
+       gpioz: gpio@54004000 {
+               status = "okay";
+               ngpios = <8>;
+               gpio-ranges = <&pinctrl_z 0 400 8>;
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp15xxab-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp15xxab-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..328dad1
--- /dev/null
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+&pinctrl {
+       st,package = <STM32MP_PKG_AB>;
+
+       gpioa: gpio@50002000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 0 16>;
+       };
+
+       gpiob: gpio@50003000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 16 16>;
+       };
+
+       gpioc: gpio@50004000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 32 16>;
+       };
+
+       gpiod: gpio@50005000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 48 16>;
+       };
+
+       gpioe: gpio@50006000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 64 16>;
+       };
+
+       gpiof: gpio@50007000 {
+               status = "okay";
+               ngpios = <6>;
+               gpio-ranges = <&pinctrl 6 86 6>;
+       };
+
+       gpiog: gpio@50008000 {
+               status = "okay";
+               ngpios = <10>;
+               gpio-ranges = <&pinctrl 6 102 10>;
+       };
+
+       gpioh: gpio@50009000 {
+               status = "okay";
+               ngpios = <2>;
+               gpio-ranges = <&pinctrl 0 112 2>;
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp15xxac-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp15xxac-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..7eaa245
--- /dev/null
@@ -0,0 +1,73 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+&pinctrl {
+       st,package = <STM32MP_PKG_AC>;
+
+       gpioa: gpio@50002000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 0 16>;
+       };
+
+       gpiob: gpio@50003000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 16 16>;
+       };
+
+       gpioc: gpio@50004000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 32 16>;
+       };
+
+       gpiod: gpio@50005000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 48 16>;
+       };
+
+       gpioe: gpio@50006000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 64 16>;
+       };
+
+       gpiof: gpio@50007000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 80 16>;
+       };
+
+       gpiog: gpio@50008000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 96 16>;
+       };
+
+       gpioh: gpio@50009000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 112 16>;
+       };
+
+       gpioi: gpio@5000a000 {
+               status = "okay";
+               ngpios = <12>;
+               gpio-ranges = <&pinctrl 0 128 12>;
+       };
+};
+
+&pinctrl_z {
+       st,package = <STM32MP_PKG_AC>;
+
+       gpioz: gpio@54004000 {
+               status = "okay";
+               ngpios = <8>;
+               gpio-ranges = <&pinctrl_z 0 400 8>;
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp15xxad-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp15xxad-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..b63e207
--- /dev/null
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
+ */
+
+&pinctrl {
+       st,package = <STM32MP_PKG_AD>;
+
+       gpioa: gpio@50002000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 0 16>;
+       };
+
+       gpiob: gpio@50003000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 16 16>;
+       };
+
+       gpioc: gpio@50004000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 32 16>;
+       };
+
+       gpiod: gpio@50005000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 48 16>;
+       };
+
+       gpioe: gpio@50006000 {
+               status = "okay";
+               ngpios = <16>;
+               gpio-ranges = <&pinctrl 0 64 16>;
+       };
+
+       gpiof: gpio@50007000 {
+               status = "okay";
+               ngpios = <6>;
+               gpio-ranges = <&pinctrl 6 86 6>;
+       };
+
+       gpiog: gpio@50008000 {
+               status = "okay";
+               ngpios = <10>;
+               gpio-ranges = <&pinctrl 6 102 10>;
+       };
+
+       gpioh: gpio@50009000 {
+               status = "okay";
+               ngpios = <2>;
+               gpio-ranges = <&pinctrl 0 112 2>;
+       };
+};
index 3f1b96dc7faace27825f4e327d770c89d6ddcd4a..8539da92f60a01e8061055b825ffa205febdd584 100644 (file)
@@ -591,6 +591,7 @@ CONFIG_REGULATOR_S2MPS11=y
 CONFIG_REGULATOR_S5M8767=y
 CONFIG_REGULATOR_STM32_BOOSTER=m
 CONFIG_REGULATOR_STM32_VREFBUF=m
+CONFIG_REGULATOR_STM32_PWR=y
 CONFIG_REGULATOR_STPMIC1=y
 CONFIG_REGULATOR_TI_ABB=y
 CONFIG_REGULATOR_TPS51632=y
index 8c37cc8ab6f2bb938f7fca8bd239054c286883ec..c32c338f770426bcb6c97e7a36ca2bd34b241b00 100644 (file)
@@ -92,6 +92,7 @@ CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 CONFIG_NETFILTER=y
 CONFIG_PHONET=m
+CONFIG_NET_SWITCHDEV=y
 CONFIG_CAN=m
 CONFIG_CAN_C_CAN=m
 CONFIG_CAN_C_CAN_PLATFORM=m
@@ -181,6 +182,7 @@ CONFIG_SMSC911X=y
 # CONFIG_NET_VENDOR_STMICRO is not set
 CONFIG_TI_DAVINCI_EMAC=y
 CONFIG_TI_CPSW=y
+CONFIG_TI_CPSW_SWITCHDEV=y
 CONFIG_TI_CPTS=y
 # CONFIG_NET_VENDOR_VIA is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
@@ -554,6 +556,6 @@ CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_INFO_SPLIT=y
 CONFIG_DEBUG_INFO_DWARF4=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_FS=y
 CONFIG_SCHEDSTATS=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_TI_CPSW_SWITCHDEV=y
index f3f42cf3b8937e3e28fd01a6e2ab4890335f0dd3..776ae07e04697527754a463647e34ed882faa1ee 100644 (file)
@@ -38,6 +38,13 @@ void curve25519_arch(u8 out[CURVE25519_KEY_SIZE],
 }
 EXPORT_SYMBOL(curve25519_arch);
 
+void curve25519_base_arch(u8 pub[CURVE25519_KEY_SIZE],
+                         const u8 secret[CURVE25519_KEY_SIZE])
+{
+       return curve25519_arch(pub, secret, curve25519_base_point);
+}
+EXPORT_SYMBOL(curve25519_base_arch);
+
 static int curve25519_set_secret(struct crypto_kpp *tfm, const void *buf,
                                 unsigned int len)
 {
index 751708d727af97e9deee36eefdb6985ce7c8de1b..c96a2b1efbad6d90120322d40dc36349dedf1177 100644 (file)
@@ -84,6 +84,15 @@ static struct clockdomain l3s_tsc_43xx_clkdm = {
        .flags            = CLKDM_CAN_SWSUP,
 };
 
+static struct clockdomain lcdc_43xx_clkdm = {
+       .name             = "lcdc_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_LCDC_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
 static struct clockdomain dss_43xx_clkdm = {
        .name             = "dss_clkdm",
        .pwrdm            = { .name = "per_pwrdm" },
@@ -173,6 +182,7 @@ static struct clockdomain *clockdomains_am43xx[] __initdata = {
        &pruss_ocp_43xx_clkdm,
        &ocpwp_l3_43xx_clkdm,
        &l3s_tsc_43xx_clkdm,
+       &lcdc_43xx_clkdm,
        &dss_43xx_clkdm,
        &l3_aon_43xx_clkdm,
        &emif_43xx_clkdm,
index 223b37c4838934e033080f387ed324bdec8bbd37..480387a831e1c6d3477dbec9ce73680fa89885ce 100644 (file)
@@ -345,9 +345,12 @@ static inline int dra7xx_pciess_reset(struct omap_hwmod *oh)
 }
 #endif
 
+struct omap_system_dma_plat_info;
+
 void pdata_quirks_init(const struct of_device_id *);
 void omap_auxdata_legacy_init(struct device *dev);
 void omap_pcs_legacy_init(int irq, void (*rearm)(void));
+extern struct omap_system_dma_plat_info dma_plat_info;
 
 struct omap_sdrc_params;
 extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
index 0c105baa5e885c95efb096c833de55f8dded2559..8cc109cc242ad1af1ceb675704b15065c8e3432a 100644 (file)
 #include <linux/omap-dma.h>
 
 #include "soc.h"
-#include "omap_hwmod.h"
-#include "omap_device.h"
-
-static enum omap_reg_offsets dma_common_ch_end;
 
 static const struct omap_dma_reg reg_map[] = {
        [REVISION]      = { 0x0000, 0x00, OMAP_DMA_REG_32BIT },
@@ -81,42 +77,6 @@ static const struct omap_dma_reg reg_map[] = {
        [CCDN]          = { 0x00d8, 0x60, OMAP_DMA_REG_32BIT },
 };
 
-static void __iomem *dma_base;
-static inline void dma_write(u32 val, int reg, int lch)
-{
-       void __iomem *addr = dma_base;
-
-       addr += reg_map[reg].offset;
-       addr += reg_map[reg].stride * lch;
-
-       writel_relaxed(val, addr);
-}
-
-static inline u32 dma_read(int reg, int lch)
-{
-       void __iomem *addr = dma_base;
-
-       addr += reg_map[reg].offset;
-       addr += reg_map[reg].stride * lch;
-
-       return readl_relaxed(addr);
-}
-
-static void omap2_clear_dma(int lch)
-{
-       int i;
-
-       for (i = CSDP; i <= dma_common_ch_end; i += 1)
-               dma_write(0, i, lch);
-}
-
-static void omap2_show_dma_caps(void)
-{
-       u8 revision = dma_read(REVISION, 0) & 0xff;
-       printk(KERN_INFO "OMAP DMA hardware revision %d.%d\n",
-                               revision >> 4, revision & 0xf);
-}
-
 static unsigned configure_dma_errata(void)
 {
        unsigned errata = 0;
@@ -211,82 +171,35 @@ static const struct dma_slave_map omap24xx_sdma_dt_map[] = {
        { "musb-hdrc.1.auto", "dmareq5", SDMA_FILTER_PARAM(64) }, /* OMAP2420 only */
 };
 
-static struct omap_system_dma_plat_info dma_plat_info __initdata = {
-       .reg_map        = reg_map,
-       .channel_stride = 0x60,
-       .show_dma_caps  = omap2_show_dma_caps,
-       .clear_dma      = omap2_clear_dma,
-       .dma_write      = dma_write,
-       .dma_read       = dma_read,
+static struct omap_dma_dev_attr dma_attr = {
+       .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
+                   IS_CSSA_32 | IS_CDSA_32,
+       .lch_count = 32,
 };
 
-static struct platform_device_info omap_dma_dev_info __initdata = {
-       .name = "omap-dma-engine",
-       .id = -1,
-       .dma_mask = DMA_BIT_MASK(32),
+struct omap_system_dma_plat_info dma_plat_info = {
+       .reg_map        = reg_map,
+       .channel_stride = 0x60,
+       .dma_attr       = &dma_attr,
 };
 
 /* One time initializations */
-static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
+static int __init omap2_system_dma_init(void)
 {
-       struct platform_device                  *pdev;
-       struct omap_system_dma_plat_info        p;
-       struct omap_dma_dev_attr                *d;
-       struct resource                         *mem;
-       char                                    *name = "omap_dma_system";
-
-       p = dma_plat_info;
-       p.dma_attr = (struct omap_dma_dev_attr *)oh->dev_attr;
-       p.errata = configure_dma_errata();
+       dma_plat_info.errata = configure_dma_errata();
 
        if (soc_is_omap24xx()) {
                /* DMA slave map for drivers not yet converted to DT */
-               p.slave_map = omap24xx_sdma_dt_map;
-               p.slavecnt = ARRAY_SIZE(omap24xx_sdma_dt_map);
+               dma_plat_info.slave_map = omap24xx_sdma_dt_map;
+               dma_plat_info.slavecnt = ARRAY_SIZE(omap24xx_sdma_dt_map);
        }
 
-       pdev = omap_device_build(name, 0, oh, &p, sizeof(p));
-       if (IS_ERR(pdev)) {
-               pr_err("%s: Can't build omap_device for %s:%s.\n",
-                       __func__, name, oh->name);
-               return PTR_ERR(pdev);
-       }
-
-       omap_dma_dev_info.res = pdev->resource;
-       omap_dma_dev_info.num_res = pdev->num_resources;
+       if (!soc_is_omap242x())
+               dma_attr.dev_caps |= IS_RW_PRIORITY;
 
-       mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!mem) {
-               dev_err(&pdev->dev, "%s: no mem resource\n", __func__);
-               return -EINVAL;
-       }
-
-       dma_base = ioremap(mem->start, resource_size(mem));
-       if (!dma_base) {
-               dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
-               return -ENOMEM;
-       }
-
-       d = oh->dev_attr;
-
-       if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
-               d->dev_caps |= HS_CHANNELS_RESERVED;
-
-       if (platform_get_irq_byname(pdev, "0") < 0)
-               d->dev_caps |= DMA_ENGINE_HANDLE_IRQ;
-
-       /* Check the capabilities register for descriptor loading feature */
-       if (dma_read(CAPS_0, 0) & DMA_HAS_DESCRIPTOR_CAPS)
-               dma_common_ch_end = CCDN;
-       else
-               dma_common_ch_end = CCFN;
+       if (soc_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
+               dma_attr.dev_caps |= HS_CHANNELS_RESERVED;
 
        return 0;
 }
-
-static int __init omap2_system_dma_init(void)
-{
-       return omap_hwmod_for_each_by_class("dma",
-                       omap2_system_dma_init_dev, NULL);
-}
 omap_arch_initcall(omap2_system_dma_init);
index f1a6ece8108e47ad049416e682a730fe319dcab1..54aff33e55e6efac5de04ce915967ee77c9c412b 100644 (file)
 
 #include <linux/platform_device.h>
 #include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/list.h>
 
-#include "omap_hwmod.h"
-#include "omap_device.h"
+#include "clockdomain.h"
 #include "powerdomain.h"
 
+struct pwrdm_link {
+       struct device *dev;
+       struct powerdomain *pwrdm;
+       struct list_head node;
+};
+
+static DEFINE_SPINLOCK(iommu_lock);
+static struct clockdomain *emu_clkdm;
+static atomic_t emu_count;
+
+static void omap_iommu_dra7_emu_swsup_config(struct platform_device *pdev,
+                                            bool enable)
+{
+       struct device_node *np = pdev->dev.of_node;
+       unsigned long flags;
+
+       if (!of_device_is_compatible(np, "ti,dra7-dsp-iommu"))
+               return;
+
+       if (!emu_clkdm) {
+               emu_clkdm = clkdm_lookup("emu_clkdm");
+               if (WARN_ON_ONCE(!emu_clkdm))
+                       return;
+       }
+
+       spin_lock_irqsave(&iommu_lock, flags);
+
+       if (enable && (atomic_inc_return(&emu_count) == 1))
+               clkdm_deny_idle(emu_clkdm);
+       else if (!enable && (atomic_dec_return(&emu_count) == 0))
+               clkdm_allow_idle(emu_clkdm);
+
+       spin_unlock_irqrestore(&iommu_lock, flags);
+}
+
+static struct powerdomain *_get_pwrdm(struct device *dev)
+{
+       struct clk *clk;
+       struct clk_hw_omap *hwclk;
+       struct clockdomain *clkdm;
+       struct powerdomain *pwrdm = NULL;
+       struct pwrdm_link *entry;
+       unsigned long flags;
+       static LIST_HEAD(cache);
+
+       spin_lock_irqsave(&iommu_lock, flags);
+
+       list_for_each_entry(entry, &cache, node) {
+               if (entry->dev == dev) {
+                       pwrdm = entry->pwrdm;
+                       break;
+               }
+       }
+
+       spin_unlock_irqrestore(&iommu_lock, flags);
+
+       if (pwrdm)
+               return pwrdm;
+
+       clk = of_clk_get(dev->of_node->parent, 0);
+       if (!clk) {
+               dev_err(dev, "no fck found\n");
+               return NULL;
+       }
+
+       hwclk = to_clk_hw_omap(__clk_get_hw(clk));
+       clk_put(clk);
+       if (!hwclk || !hwclk->clkdm_name) {
+               dev_err(dev, "no hwclk data\n");
+               return NULL;
+       }
+
+       clkdm = clkdm_lookup(hwclk->clkdm_name);
+       if (!clkdm) {
+               dev_err(dev, "clkdm not found: %s\n", hwclk->clkdm_name);
+               return NULL;
+       }
+
+       pwrdm = clkdm_get_pwrdm(clkdm);
+       if (!pwrdm) {
+               dev_err(dev, "pwrdm not found: %s\n", clkdm->name);
+               return NULL;
+       }
+
+       entry = kmalloc(sizeof(*entry), GFP_KERNEL);
+       if (entry) {
+               entry->dev = dev;
+               entry->pwrdm = pwrdm;
+               spin_lock_irqsave(&iommu_lock, flags);
+               list_add(&entry->node, &cache);
+               spin_unlock_irqrestore(&iommu_lock, flags);
+       }
+
+       return pwrdm;
+}
+
 int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
                                    u8 *pwrst)
 {
        struct powerdomain *pwrdm;
-       struct omap_device *od;
        u8 next_pwrst;
+       int ret = 0;
 
-       od = to_omap_device(pdev);
-       if (!od)
-               return -ENODEV;
-
-       if (od->hwmods_cnt != 1)
-               return -EINVAL;
-
-       pwrdm = omap_hwmod_get_pwrdm(od->hwmods[0]);
+       pwrdm = _get_pwrdm(&pdev->dev);
        if (!pwrdm)
-               return -EINVAL;
+               return -ENODEV;
 
-       if (request)
+       if (request) {
                *pwrst = pwrdm_read_next_pwrst(pwrdm);
+               omap_iommu_dra7_emu_swsup_config(pdev, true);
+       }
 
        if (*pwrst > PWRDM_POWER_RET)
-               return 0;
+               goto out;
 
        next_pwrst = request ? PWRDM_POWER_ON : *pwrst;
 
-       return pwrdm_set_next_pwrst(pwrdm, next_pwrst);
+       ret = pwrdm_set_next_pwrst(pwrdm, next_pwrst);
+
+out:
+       if (!request)
+               omap_iommu_dra7_emu_swsup_config(pdev, false);
+
+       return ret;
 }
index 1d55602b3f8f1d864c21b7f267f2a6d404043f2f..6b4548f3b57f08e26939099189b589d931da70c4 100644 (file)
@@ -373,176 +373,6 @@ void omap_device_delete(struct omap_device *od)
        kfree(od);
 }
 
-/**
- * omap_device_copy_resources - Add legacy IO and IRQ resources
- * @oh: interconnect target module
- * @pdev: platform device to copy resources to
- *
- * We still have legacy DMA and smartreflex needing resources.
- * Let's populate what they need until we can eventually just
- * remove this function. Note that there should be no need to
- * call this from omap_device_build_from_dt(), nor should there
- * be any need to call it for other devices.
- */
-static int
-omap_device_copy_resources(struct omap_hwmod *oh,
-                          struct platform_device *pdev)
-{
-       struct device_node *np, *child;
-       struct property *prop;
-       struct resource *res;
-       const char *name;
-       int error, irq = 0;
-
-       if (!oh || !oh->od || !oh->od->pdev)
-               return -EINVAL;
-
-       np = oh->od->pdev->dev.of_node;
-       if (!np) {
-               error = -ENODEV;
-               goto error;
-       }
-
-       res = kcalloc(2, sizeof(*res), GFP_KERNEL);
-       if (!res)
-               return -ENOMEM;
-
-       /* Do we have a dts range for the interconnect target module? */
-       error = omap_hwmod_parse_module_range(oh, np, res);
-
-       /* No ranges, rely on device reg entry */
-       if (error)
-               error = of_address_to_resource(np, 0, res);
-       if (error)
-               goto free;
-
-       /* SmartReflex needs first IO resource name to be "mpu" */
-       res[0].name = "mpu";
-
-       /*
-        * We may have a configured "ti,sysc" interconnect target with a
-        * dts child with the interrupt. If so use the first child's
-        * first interrupt for "ti-hwmods" legacy support.
-        */
-       of_property_for_each_string(np, "compatible", prop, name)
-               if (!strncmp("ti,sysc-", name, 8))
-                       break;
-
-       child = of_get_next_available_child(np, NULL);
-
-       if (name)
-               irq = irq_of_parse_and_map(child, 0);
-       if (!irq)
-               irq = irq_of_parse_and_map(np, 0);
-       if (!irq) {
-               error = -EINVAL;
-               goto free;
-       }
-
-       /* Legacy DMA code needs interrupt name to be "0" */
-       res[1].start = irq;
-       res[1].end = irq;
-       res[1].flags = IORESOURCE_IRQ;
-       res[1].name = "0";
-
-       error = platform_device_add_resources(pdev, res, 2);
-
-free:
-       kfree(res);
-
-error:
-       WARN(error, "%s: %s device %s failed: %i\n",
-            __func__, oh->name, dev_name(&pdev->dev),
-            error);
-
-       return error;
-}
-
-/**
- * omap_device_build - build and register an omap_device with one omap_hwmod
- * @pdev_name: name of the platform_device driver to use
- * @pdev_id: this platform_device's connection ID
- * @oh: ptr to the single omap_hwmod that backs this omap_device
- * @pdata: platform_data ptr to associate with the platform_device
- * @pdata_len: amount of memory pointed to by @pdata
- *
- * Convenience function for building and registering a single
- * omap_device record, which in turn builds and registers a
- * platform_device record.  See omap_device_build_ss() for more
- * information.  Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
- * passes along the return value of omap_device_build_ss().
- */
-struct platform_device __init *omap_device_build(const char *pdev_name,
-                                                int pdev_id,
-                                                struct omap_hwmod *oh,
-                                                void *pdata, int pdata_len)
-{
-       int ret = -ENOMEM;
-       struct platform_device *pdev;
-       struct omap_device *od;
-
-       if (!oh || !pdev_name)
-               return ERR_PTR(-EINVAL);
-
-       if (!pdata && pdata_len > 0)
-               return ERR_PTR(-EINVAL);
-
-       if (strncmp(oh->name, "smartreflex", 11) &&
-           strncmp(oh->name, "dma", 3)) {
-               pr_warn("%s need to update %s to probe with dt\na",
-                       __func__, pdev_name);
-               ret = -ENODEV;
-               goto odbs_exit;
-       }
-
-       pdev = platform_device_alloc(pdev_name, pdev_id);
-       if (!pdev) {
-               ret = -ENOMEM;
-               goto odbs_exit;
-       }
-
-       /* Set the dev_name early to allow dev_xxx in omap_device_alloc */
-       if (pdev->id != -1)
-               dev_set_name(&pdev->dev, "%s.%d", pdev->name,  pdev->id);
-       else
-               dev_set_name(&pdev->dev, "%s", pdev->name);
-
-       /*
-        * Must be called before omap_device_alloc() as oh->od
-        * only contains the currently registered omap_device
-        * and will get overwritten by omap_device_alloc().
-        */
-       ret = omap_device_copy_resources(oh, pdev);
-       if (ret)
-               goto odbs_exit1;
-
-       od = omap_device_alloc(pdev, &oh, 1);
-       if (IS_ERR(od)) {
-               ret = PTR_ERR(od);
-               goto odbs_exit1;
-       }
-
-       ret = platform_device_add_data(pdev, pdata, pdata_len);
-       if (ret)
-               goto odbs_exit2;
-
-       ret = omap_device_register(pdev);
-       if (ret)
-               goto odbs_exit2;
-
-       return pdev;
-
-odbs_exit2:
-       omap_device_delete(od);
-odbs_exit1:
-       platform_device_put(pdev);
-odbs_exit:
-
-       pr_err("omap_device: %s: build failed (%d)\n", pdev_name, ret);
-
-       return ERR_PTR(ret);
-}
-
 #ifdef CONFIG_PM
 static int _od_runtime_suspend(struct device *dev)
 {
index ced775e401cfec70811db7b6b6c73bfb3243cdf2..f77e76a7841ac0522ef566dea21f9fc9ab2a6c3b 100644 (file)
@@ -68,10 +68,6 @@ int omap_device_idle(struct platform_device *pdev);
 
 /* Core code interface */
 
-struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
-                                         struct omap_hwmod *oh, void *pdata,
-                                         int pdata_len);
-
 struct omap_device *omap_device_alloc(struct platform_device *pdev,
                                      struct omap_hwmod **ohs, int oh_cnt);
 void omap_device_delete(struct omap_device *od);
index a136788db839c2fa78837ca792d89eb58066b71d..17d337ed18be7b55b0fc35f8d7d3ef05a87eafeb 100644 (file)
@@ -1852,23 +1852,6 @@ static int _omap4_get_context_lost(struct omap_hwmod *oh)
        return oh->prcm.omap4.context_lost_counter;
 }
 
-/**
- * _enable_preprogram - Pre-program an IP block during the _enable() process
- * @oh: struct omap_hwmod *
- *
- * Some IP blocks (such as AESS) require some additional programming
- * after enable before they can enter idle.  If a function pointer to
- * do so is present in the hwmod data, then call it and pass along the
- * return value; otherwise, return 0.
- */
-static int _enable_preprogram(struct omap_hwmod *oh)
-{
-       if (!oh->class->enable_preprogram)
-               return 0;
-
-       return oh->class->enable_preprogram(oh);
-}
-
 /**
  * _enable - enable an omap_hwmod
  * @oh: struct omap_hwmod *
@@ -1952,7 +1935,6 @@ static int _enable(struct omap_hwmod *oh)
                                _update_sysc_cache(oh);
                        _enable_sysc(oh);
                }
-               r = _enable_preprogram(oh);
        } else {
                if (soc_ops.disable_module)
                        soc_ops.disable_module(oh);
index 2d0fd99d47133e5113ec37ef142396f3dd741bd1..eebf2fdf434cde54b738ef6aa70e1fac14be4e37 100644 (file)
@@ -501,7 +501,6 @@ struct omap_hwmod_omap4_prcm {
  * @sysc: device SYSCONFIG/SYSSTATUS register data
  * @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown
  * @reset: ptr to fn to be executed in place of the standard hwmod reset fn
- * @enable_preprogram:  ptr to fn to be executed during device enable
  * @lock: ptr to fn to be executed to lock IP registers
  * @unlock: ptr to fn to be executed to unlock IP registers
  *
@@ -526,7 +525,6 @@ struct omap_hwmod_class {
        struct omap_hwmod_class_sysconfig       *sysc;
        int                                     (*pre_shutdown)(struct omap_hwmod *oh);
        int                                     (*reset)(struct omap_hwmod *oh);
-       int                                     (*enable_preprogram)(struct omap_hwmod *oh);
        void                                    (*lock)(struct omap_hwmod *oh);
        void                                    (*unlock)(struct omap_hwmod *oh);
 };
@@ -662,7 +660,6 @@ const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
  *
  */
 
-extern int omap_hwmod_aess_preprogram(struct omap_hwmod *oh);
 void omap_hwmod_rtc_unlock(struct omap_hwmod *oh);
 void omap_hwmod_rtc_lock(struct omap_hwmod *oh);
 
index d49df96b4052ae6693163ff8e7e2f5c6091c90c9..b14442cf617957d79a49938b8c601dcaf1d9fb6f 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include <linux/platform_data/i2c-omap.h>
-#include <linux/omap-dma.h>
 
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
@@ -126,21 +125,6 @@ static struct omap_hwmod omap2420_i2c2_hwmod = {
        .flags          = HWMOD_16BIT_REG,
 };
 
-/* dma attributes */
-static struct omap_dma_dev_attr dma_dev_attr = {
-       .dev_caps  = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
-                                               IS_CSSA_32 | IS_CDSA_32,
-       .lch_count = 32,
-};
-
-static struct omap_hwmod omap2420_dma_system_hwmod = {
-       .name           = "dma",
-       .class          = &omap2xxx_dma_hwmod_class,
-       .main_clk       = "core_l3_ck",
-       .dev_attr       = &dma_dev_attr,
-       .flags          = HWMOD_NO_IDLEST,
-};
-
 /* mailbox */
 static struct omap_hwmod omap2420_mailbox_hwmod = {
        .name           = "mailbox",
@@ -328,22 +312,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* dma_system -> L3 */
-static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
-       .master         = &omap2420_dma_system_hwmod,
-       .slave          = &omap2xxx_l3_main_hwmod,
-       .clk            = "core_l3_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_core -> dma_system */
-static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
-       .master         = &omap2xxx_l4_core_hwmod,
-       .slave          = &omap2420_dma_system_hwmod,
-       .clk            = "sdma_ick",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_core -> mailbox */
 static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
        .master         = &omap2xxx_l4_core_hwmod,
@@ -435,8 +403,6 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
        &omap2420_l4_wkup__gpio2,
        &omap2420_l4_wkup__gpio3,
        &omap2420_l4_wkup__gpio4,
-       &omap2420_dma_system__l3,
-       &omap2420_l4_core__dma_system,
        &omap2420_l4_core__mailbox,
        &omap2420_l4_core__mcbsp1,
        &omap2420_l4_core__mcbsp2,
index c51ef84ff64dc5b573672441ec9ecebc9b120fe4..41a37c74f9a684a0a602e52a6507ace9af6d0f95 100644 (file)
@@ -12,7 +12,6 @@
 
 #include <linux/platform_data/i2c-omap.h>
 #include <linux/platform_data/hsmmc-omap.h>
-#include <linux/omap-dma.h>
 
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
@@ -121,21 +120,6 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
        .class          = &omap2xxx_gpio_hwmod_class,
 };
 
-/* dma attributes */
-static struct omap_dma_dev_attr dma_dev_attr = {
-       .dev_caps  = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
-                               IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
-       .lch_count = 32,
-};
-
-static struct omap_hwmod omap2430_dma_system_hwmod = {
-       .name           = "dma",
-       .class          = &omap2xxx_dma_hwmod_class,
-       .main_clk       = "core_l3_ck",
-       .dev_attr       = &dma_dev_attr,
-       .flags          = HWMOD_NO_IDLEST,
-};
-
 /* mailbox */
 static struct omap_hwmod omap2430_mailbox_hwmod = {
        .name           = "mailbox",
@@ -508,22 +492,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* dma_system -> L3 */
-static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
-       .master         = &omap2430_dma_system_hwmod,
-       .slave          = &omap2xxx_l3_main_hwmod,
-       .clk            = "core_l3_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_core -> dma_system */
-static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
-       .master         = &omap2xxx_l4_core_hwmod,
-       .slave          = &omap2430_dma_system_hwmod,
-       .clk            = "sdma_ick",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_core -> mailbox */
 static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
        .master         = &omap2xxx_l4_core_hwmod,
@@ -635,8 +603,6 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
        &omap2430_l4_wkup__gpio3,
        &omap2430_l4_wkup__gpio4,
        &omap2430_l4_core__gpio5,
-       &omap2430_dma_system__l3,
-       &omap2430_l4_core__dma_system,
        &omap2430_l4_core__mailbox,
        &omap2430_l4_core__mcbsp1,
        &omap2430_l4_core__mcbsp2,
index f767524d06b53ce17847f73981a9de3c8f0736f3..a445704d43d905a2cb130c7caeb4a05a3dd954b2 100644 (file)
@@ -7,7 +7,6 @@
  */
 
 #include <linux/types.h>
-#include <linux/omap-dma.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
@@ -95,23 +94,6 @@ struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
        .sysc = &omap2xxx_gpio_sysc,
 };
 
-/* system dma */
-static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x002c,
-       .syss_offs      = 0x0028,
-       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-struct omap_hwmod_class omap2xxx_dma_hwmod_class = {
-       .name   = "dma",
-       .sysc   = &omap2xxx_dma_sysc,
-};
-
 /*
  * 'mailbox' class
  * mailbox module allowing communication between the on-chip processors
index 26e13d4fa19ce1e3957a63647f11dc21d5d36797..5ef76fe3f33de9b50c69711e41badd8eee1fa7f3 100644 (file)
@@ -28,29 +28,13 @@ extern struct omap_hwmod_ocp_if am33xx_pruss__l3_main;
 extern struct omap_hwmod_ocp_if am33xx_gfx__l3_main;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__gfx;
 extern struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc;
-extern struct omap_hwmod_ocp_if am33xx_l4_per__dcan0;
-extern struct omap_hwmod_ocp_if am33xx_l4_per__dcan1;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__elm;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2;
 extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1;
 extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer2;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer3;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer4;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer5;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer6;
-extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer7;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__tpcc;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc0;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc1;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc2;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc;
-extern struct omap_hwmod_ocp_if am33xx_l3_main__sha0;
-extern struct omap_hwmod_ocp_if am33xx_l3_main__aes0;
 
 extern struct omap_hwmod am33xx_l3_main_hwmod;
 extern struct omap_hwmod am33xx_l3_s_hwmod;
@@ -61,29 +45,13 @@ extern struct omap_hwmod am33xx_mpu_hwmod;
 extern struct omap_hwmod am33xx_pruss_hwmod;
 extern struct omap_hwmod am33xx_gfx_hwmod;
 extern struct omap_hwmod am33xx_prcm_hwmod;
-extern struct omap_hwmod am33xx_aes0_hwmod;
-extern struct omap_hwmod am33xx_sha0_hwmod;
 extern struct omap_hwmod am33xx_ocmcram_hwmod;
 extern struct omap_hwmod am33xx_smartreflex0_hwmod;
 extern struct omap_hwmod am33xx_smartreflex1_hwmod;
-extern struct omap_hwmod am33xx_dcan0_hwmod;
-extern struct omap_hwmod am33xx_dcan1_hwmod;
-extern struct omap_hwmod am33xx_elm_hwmod;
-extern struct omap_hwmod am33xx_epwmss0_hwmod;
-extern struct omap_hwmod am33xx_epwmss1_hwmod;
-extern struct omap_hwmod am33xx_epwmss2_hwmod;
 extern struct omap_hwmod am33xx_gpmc_hwmod;
 extern struct omap_hwmod am33xx_rtc_hwmod;
-extern struct omap_hwmod am33xx_spi0_hwmod;
-extern struct omap_hwmod am33xx_spi1_hwmod;
-extern struct omap_hwmod am33xx_spinlock_hwmod;
 extern struct omap_hwmod am33xx_timer1_hwmod;
 extern struct omap_hwmod am33xx_timer2_hwmod;
-extern struct omap_hwmod am33xx_timer3_hwmod;
-extern struct omap_hwmod am33xx_timer4_hwmod;
-extern struct omap_hwmod am33xx_timer5_hwmod;
-extern struct omap_hwmod am33xx_timer6_hwmod;
-extern struct omap_hwmod am33xx_timer7_hwmod;
 extern struct omap_hwmod am33xx_tpcc_hwmod;
 extern struct omap_hwmod am33xx_tptc0_hwmod;
 extern struct omap_hwmod am33xx_tptc1_hwmod;
@@ -94,7 +62,6 @@ extern struct omap_hwmod_class am33xx_l4_hwmod_class;
 extern struct omap_hwmod_class am33xx_wkup_m3_hwmod_class;
 extern struct omap_hwmod_class am33xx_control_hwmod_class;
 extern struct omap_hwmod_class am33xx_timer_hwmod_class;
-extern struct omap_hwmod_class am33xx_epwmss_hwmod_class;
 extern struct omap_hwmod_class am33xx_ehrpwm_hwmod_class;
 extern struct omap_hwmod_class am33xx_spi_hwmod_class;
 
index 7123c455aaa9d9dd4467db429e81c8d415344913..ac7d5bb1a02fd5925bdb08e3086ace16c9255a60 100644 (file)
@@ -106,50 +106,6 @@ struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
        .user           = OCP_USER_MPU,
 };
 
-/* l4 per/ls -> DCAN0 */
-struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_dcan0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4 per/ls -> DCAN1 */
-struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_dcan1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_elm_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_epwmss0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_epwmss1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_epwmss2_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
 /* l3s cfg -> gpmc */
 struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
        .master         = &am33xx_l3_s_hwmod,
@@ -158,30 +114,6 @@ struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
        .user           = OCP_USER_MPU,
 };
 
-/* l4 ls -> spinlock */
-struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_spinlock_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mcspi0 */
-struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_spi0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mcspi1 */
-struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_spi1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
 /* l4 per -> timer2 */
 struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
        .master         = &am33xx_l4_ls_hwmod,
@@ -190,46 +122,6 @@ struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
        .user           = OCP_USER_MPU,
 };
 
-/* l4 per -> timer3 */
-struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer3_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer4 */
-struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer4_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer5 */
-struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer5_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer6 */
-struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer6_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer7 */
-struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer7_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
 /* l3 main -> tpcc */
 struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
        .master         = &am33xx_l3_main_hwmod,
@@ -268,19 +160,3 @@ struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
        .slave          = &am33xx_ocmcram_hwmod,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
-
-/* l3 main -> sha0 HIB2 */
-struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_sha0_hwmod,
-       .clk            = "sha0_fck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 main -> AES0 HIB2 */
-struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_aes0_hwmod,
-       .clk            = "aes0_fck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
index 2df8659612ef0ffec73c216a39bb7ea754d3aa4f..78ec1bc8e3a1ff13d5200f79fc6b1a71c764b9d7 100644 (file)
@@ -213,57 +213,7 @@ struct omap_hwmod_class am33xx_emif_hwmod_class = {
        .sysc           = &am33xx_emif_sysc,
 };
 
-/*
- * 'aes0' class
- */
-static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
-       .rev_offs       = 0x80,
-       .sysc_offs      = 0x84,
-       .syss_offs      = 0x88,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
-
-static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
-       .name           = "aes0",
-       .sysc           = &am33xx_aes0_sysc,
-};
-
-struct omap_hwmod am33xx_aes0_hwmod = {
-       .name           = "aes",
-       .class          = &am33xx_aes0_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .main_clk       = "aes0_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* sha0 HIB2 (the 'P' (public) device) */
-static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
-       .rev_offs       = 0x100,
-       .sysc_offs      = 0x110,
-       .syss_offs      = 0x114,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
 
-static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
-       .name           = "sha0",
-       .sysc           = &am33xx_sha0_sysc,
-};
-
-struct omap_hwmod am33xx_sha0_hwmod = {
-       .name           = "sham",
-       .class          = &am33xx_sha0_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
 
 /* ocmcram */
 static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
@@ -321,122 +271,6 @@ struct omap_hwmod_class am33xx_control_hwmod_class = {
        .name           = "control",
 };
 
-/*
- * dcan class
- */
-static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
-       .name = "d_can",
-};
-
-/* dcan0 */
-struct omap_hwmod am33xx_dcan0_hwmod = {
-       .name           = "d_can0",
-       .class          = &am33xx_dcan_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dcan0_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* dcan1 */
-struct omap_hwmod am33xx_dcan1_hwmod = {
-       .name           = "d_can1",
-       .class          = &am33xx_dcan_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dcan1_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* elm */
-static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                       SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                       SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_elm_hwmod_class = {
-       .name           = "elm",
-       .sysc           = &am33xx_elm_sysc,
-};
-
-struct omap_hwmod am33xx_elm_hwmod = {
-       .name           = "elm",
-       .class          = &am33xx_elm_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* pwmss  */
-static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x4,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                       SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
-                       MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
-       .name           = "epwmss",
-       .sysc           = &am33xx_epwmss_sysc,
-};
-
-/* epwmss0 */
-struct omap_hwmod am33xx_epwmss0_hwmod = {
-       .name           = "epwmss0",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* epwmss1 */
-struct omap_hwmod am33xx_epwmss1_hwmod = {
-       .name           = "epwmss1",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* epwmss2 */
-struct omap_hwmod am33xx_epwmss2_hwmod = {
-       .name           = "epwmss2",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
 
 /* gpmc */
 static struct omap_hwmod_class_sysconfig gpmc_sysc = {
@@ -501,83 +335,6 @@ struct omap_hwmod am33xx_rtc_hwmod = {
        },
 };
 
-/* 'spi' class */
-static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0110,
-       .syss_offs      = 0x0114,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                         SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                         SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-struct omap_hwmod_class am33xx_spi_hwmod_class = {
-       .name           = "mcspi",
-       .sysc           = &am33xx_mcspi_sysc,
-};
-
-/* spi0 */
-struct omap_hwmod am33xx_spi0_hwmod = {
-       .name           = "spi0",
-       .class          = &am33xx_spi_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* spi1 */
-struct omap_hwmod am33xx_spi1_hwmod = {
-       .name           = "spi1",
-       .class          = &am33xx_spi_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'spinlock' class
- * spinlock provides hardware assistance for synchronizing the
- * processes running on multiple processors
- */
-
-static struct omap_hwmod_class_sysconfig am33xx_spinlock_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
-       .name           = "spinlock",
-       .sysc           = &am33xx_spinlock_sysc,
-};
-
-struct omap_hwmod am33xx_spinlock_hwmod = {
-       .name           = "spinlock",
-       .class          = &am33xx_spinlock_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /* 'timer 2-7' class */
 static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
        .rev_offs       = 0x0000,
@@ -636,66 +393,6 @@ struct omap_hwmod am33xx_timer2_hwmod = {
        },
 };
 
-struct omap_hwmod am33xx_timer3_hwmod = {
-       .name           = "timer3",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer3_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-struct omap_hwmod am33xx_timer4_hwmod = {
-       .name           = "timer4",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer4_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-struct omap_hwmod am33xx_timer5_hwmod = {
-       .name           = "timer5",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer5_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-struct omap_hwmod am33xx_timer6_hwmod = {
-       .name           = "timer6",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer6_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-struct omap_hwmod am33xx_timer7_hwmod = {
-       .name           = "timer7",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer7_fck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /* tpcc */
 static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
        .name           = "tpcc",
@@ -772,21 +469,7 @@ struct omap_hwmod am33xx_tptc2_hwmod = {
 
 static void omap_hwmod_am33xx_clkctrl(void)
 {
-       CLKCTRL(am33xx_dcan0_hwmod, AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_dcan1_hwmod, AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_elm_hwmod, AM33XX_CM_PER_ELM_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_epwmss0_hwmod, AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_epwmss1_hwmod, AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_epwmss2_hwmod, AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_spi0_hwmod, AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_spi1_hwmod, AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_spinlock_hwmod, AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_timer2_hwmod, AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer3_hwmod, AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer4_hwmod, AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer5_hwmod, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer6_hwmod, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer7_hwmod, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_smartreflex0_hwmod,
                AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_smartreflex1_hwmod,
@@ -807,8 +490,6 @@ static void omap_hwmod_am33xx_clkctrl(void)
        CLKCTRL(am33xx_mpu_hwmod , AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_l3_instr_hwmod , AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_ocmcram_hwmod , AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_sha0_hwmod , AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET);
 }
 
 static void omap_hwmod_am33xx_rst(void)
@@ -826,21 +507,7 @@ void omap_hwmod_am33xx_reg(void)
 
 static void omap_hwmod_am43xx_clkctrl(void)
 {
-       CLKCTRL(am33xx_dcan0_hwmod, AM43XX_CM_PER_DCAN0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_dcan1_hwmod, AM43XX_CM_PER_DCAN1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_elm_hwmod, AM43XX_CM_PER_ELM_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_epwmss0_hwmod, AM43XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_epwmss1_hwmod, AM43XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_epwmss2_hwmod, AM43XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_spi0_hwmod, AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_spi1_hwmod, AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_spinlock_hwmod, AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_timer2_hwmod, AM43XX_CM_PER_TIMER2_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer3_hwmod, AM43XX_CM_PER_TIMER3_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer4_hwmod, AM43XX_CM_PER_TIMER4_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer5_hwmod, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer6_hwmod, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_timer7_hwmod, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_smartreflex0_hwmod,
                AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_smartreflex1_hwmod,
@@ -860,8 +527,6 @@ static void omap_hwmod_am43xx_clkctrl(void)
        CLKCTRL(am33xx_mpu_hwmod , AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_l3_instr_hwmod , AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_ocmcram_hwmod , AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_sha0_hwmod , AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_aes0_hwmod , AM43XX_CM_PER_AES0_CLKCTRL_OFFSET);
 }
 
 static void omap_hwmod_am43xx_rst(void)
index c63f66427e463de1c947e5c50d7df277793dad70..f1ea8c604595ec225f8ef603c0fe2378b6a407f4 100644 (file)
@@ -81,36 +81,6 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = {
        .rst_lines_cnt  = ARRAY_SIZE(am33xx_wkup_m3_resets),
 };
 
-/*
- * 'adc/tsc' class
- * TouchScreen Controller (Anolog-To-Digital Converter)
- */
-static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
-       .rev_offs       = 0x00,
-       .sysc_offs      = 0x10,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                       SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
-       .name           = "adc_tsc",
-       .sysc           = &am33xx_adc_tsc_sysc,
-};
-
-static struct omap_hwmod am33xx_adc_tsc_hwmod = {
-       .name           = "adc_tsc",
-       .class          = &am33xx_adc_tsc_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .main_clk       = "adc_tsc_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
 
 /*
  * Modules omap_hwmod structures
@@ -226,34 +196,6 @@ static struct omap_hwmod am33xx_control_hwmod = {
        },
 };
 
-/* lcdc */
-static struct omap_hwmod_class_sysconfig lcdc_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x54,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE,
-       .idlemodes      = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                         MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART,
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
-       .name           = "lcdc",
-       .sysc           = &lcdc_sysc,
-};
-
-static struct omap_hwmod am33xx_lcdc_hwmod = {
-       .name           = "lcdc",
-       .class          = &am33xx_lcdc_hwmod_class,
-       .clkdm_name     = "lcdc_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
-       .main_clk       = "lcd_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
 
 /*
  * Interfaces
@@ -331,21 +273,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
        .user           = OCP_USER_MPU,
 };
 
-/* L4 WKUP -> ADC_TSC */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_adc_tsc_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_lcdc_hwmod,
-       .clk            = "dpll_core_m4_ck",
-       .user           = OCP_USER_MPU,
-};
-
 /* l4 wkup -> timer1 */
 static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
        .master         = &am33xx_l4_wkup_hwmod,
@@ -375,32 +302,14 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
        &am33xx_l4_wkup__smartreflex1,
        &am33xx_l4_wkup__timer1,
        &am33xx_l4_wkup__rtc,
-       &am33xx_l4_wkup__adc_tsc,
        &am33xx_l4_hs__pruss,
-       &am33xx_l4_per__dcan0,
-       &am33xx_l4_per__dcan1,
        &am33xx_l4_ls__timer2,
-       &am33xx_l4_ls__timer3,
-       &am33xx_l4_ls__timer4,
-       &am33xx_l4_ls__timer5,
-       &am33xx_l4_ls__timer6,
-       &am33xx_l4_ls__timer7,
        &am33xx_l3_main__tpcc,
-       &am33xx_l4_ls__spinlock,
-       &am33xx_l4_ls__elm,
-       &am33xx_l4_ls__epwmss0,
-       &am33xx_l4_ls__epwmss1,
-       &am33xx_l4_ls__epwmss2,
        &am33xx_l3_s__gpmc,
-       &am33xx_l3_main__lcdc,
-       &am33xx_l4_ls__mcspi0,
-       &am33xx_l4_ls__mcspi1,
        &am33xx_l3_main__tptc0,
        &am33xx_l3_main__tptc1,
        &am33xx_l3_main__tptc2,
        &am33xx_l3_main__ocmc,
-       &am33xx_l3_main__sha0,
-       &am33xx_l3_main__aes0,
        NULL,
 };
 
index f52438bdfc141dc83b00de3e4a37f3f560da5587..3c8d2b6e887af4461f882ca7aacb6ce699b446c9 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/power/smartreflex.h>
 #include <linux/platform_data/hsmmc-omap.h>
 
-#include <linux/omap-dma.h>
 #include "l3_3xxx.h"
 #include "l4_3xxx.h"
 
@@ -833,47 +832,6 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = {
        .class          = &omap3xxx_gpio_hwmod_class,
 };
 
-/* dma attributes */
-static struct omap_dma_dev_attr dma_dev_attr = {
-       .dev_caps  = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
-                               IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
-       .lch_count = 32,
-};
-
-static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x002c,
-       .syss_offs      = 0x0028,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
-       .name = "dma",
-       .sysc = &omap3xxx_dma_sysc,
-};
-
-/* dma_system */
-static struct omap_hwmod omap3xxx_dma_system_hwmod = {
-       .name           = "dma",
-       .class          = &omap3xxx_dma_hwmod_class,
-       .main_clk       = "core_l3_ick",
-       .prcm = {
-               .omap2 = {
-                       .module_offs            = CORE_MOD,
-                       .idlest_reg_id          = 1,
-                       .idlest_idle_bit        = OMAP3430_ST_SDMA_SHIFT,
-               },
-       },
-       .dev_attr       = &dma_dev_attr,
-       .flags          = HWMOD_NO_IDLEST,
-};
-
 /*
  * 'mcbsp' class
  * multi channel buffered serial port controller
@@ -2233,23 +2191,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* dma_system -> L3 */
-static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
-       .master         = &omap3xxx_dma_system_hwmod,
-       .slave          = &omap3xxx_l3_main_hwmod,
-       .clk            = "core_l3_ick",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> dma_system */
-static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
-       .master         = &omap3xxx_l4_core_hwmod,
-       .slave          = &omap3xxx_dma_system_hwmod,
-       .clk            = "core_l4_ick",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-
 /* l4_core -> mcbsp1 */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
        .master         = &omap3xxx_l4_core_hwmod,
@@ -2628,8 +2569,6 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
        &omap3xxx_l4_per__gpio4,
        &omap3xxx_l4_per__gpio5,
        &omap3xxx_l4_per__gpio6,
-       &omap3xxx_dma_system__l3,
-       &omap3xxx_l4_core__dma_system,
        &omap3xxx_l4_core__mcbsp1,
        &omap3xxx_l4_per__mcbsp2,
        &omap3xxx_l4_per__mcbsp3,
index b81f83466c94eb6472bc64bbdd3be2d0b5b88241..d0867dbd788e24e1c2ab24004edfcf4960209ee4 100644 (file)
@@ -112,165 +112,6 @@ static struct omap_hwmod am43xx_synctimer_hwmod = {
        },
 };
 
-static struct omap_hwmod am43xx_timer8_hwmod = {
-       .name           = "timer8",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer8_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM43XX_CM_PER_TIMER8_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_timer9_hwmod = {
-       .name           = "timer9",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer9_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM43XX_CM_PER_TIMER9_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_timer10_hwmod = {
-       .name           = "timer10",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer10_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM43XX_CM_PER_TIMER10_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_timer11_hwmod = {
-       .name           = "timer11",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer11_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM43XX_CM_PER_TIMER11_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_epwmss3_hwmod = {
-       .name           = "epwmss3",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs = AM43XX_CM_PER_EPWMSS3_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_epwmss4_hwmod = {
-       .name           = "epwmss4",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs = AM43XX_CM_PER_EPWMSS4_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_epwmss5_hwmod = {
-       .name           = "epwmss5",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs = AM43XX_CM_PER_EPWMSS5_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_spi2_hwmod = {
-       .name           = "spi2",
-       .class          = &am33xx_spi_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs = AM43XX_CM_PER_SPI2_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_spi3_hwmod = {
-       .name           = "spi3",
-       .class          = &am33xx_spi_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs = AM43XX_CM_PER_SPI3_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_spi4_hwmod = {
-       .name           = "spi4",
-       .class          = &am33xx_spi_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs = AM43XX_CM_PER_SPI4_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod_class am43xx_ocp2scp_hwmod_class = {
-       .name   = "ocp2scp",
-};
-
-static struct omap_hwmod am43xx_ocp2scp0_hwmod = {
-       .name           = "ocp2scp0",
-       .class          = &am43xx_ocp2scp_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_ocp2scp1_hwmod = {
-       .name           = "ocp2scp1",
-       .class          = &am43xx_ocp2scp_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs   = AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
 
 static struct omap_hwmod_class_sysconfig am43xx_usb_otg_ss_sysc = {
        .rev_offs       = 0x0000,
@@ -315,89 +156,6 @@ static struct omap_hwmod am43xx_usb_otg_ss1_hwmod = {
        },
 };
 
-static struct omap_hwmod_class_sysconfig am43xx_qspi_sysc = {
-       .rev_offs       = 0,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                               SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am43xx_qspi_hwmod_class = {
-       .name   = "qspi",
-       .sysc   = &am43xx_qspi_sysc,
-};
-
-static struct omap_hwmod am43xx_qspi_hwmod = {
-       .name           = "qspi",
-       .class          = &am43xx_qspi_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-       .main_clk       = "l3s_gclk",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = AM43XX_CM_PER_QSPI_CLKCTRL_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'adc/tsc' class
- * TouchScreen Controller (Analog-To-Digital Converter)
- */
-static struct omap_hwmod_class_sysconfig am43xx_adc_tsc_sysc = {
-       .rev_offs       = 0x00,
-       .sysc_offs      = 0x10,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                         SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am43xx_adc_tsc_hwmod_class = {
-       .name           = "adc_tsc",
-       .sysc           = &am43xx_adc_tsc_sysc,
-};
-
-static struct omap_hwmod am43xx_adc_tsc_hwmod = {
-       .name           = "adc_tsc",
-       .class          = &am43xx_adc_tsc_hwmod_class,
-       .clkdm_name     = "l3s_tsc_clkdm",
-       .main_clk       = "adc_tsc_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM43XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod_class_sysconfig am43xx_des_sysc = {
-       .rev_offs       = 0x30,
-       .sysc_offs      = 0x34,
-       .syss_offs      = 0x38,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
-
-static struct omap_hwmod_class am43xx_des_hwmod_class = {
-       .name           = "des",
-       .sysc           = &am43xx_des_sysc,
-};
-
-static struct omap_hwmod am43xx_des_hwmod = {
-       .name           = "des",
-       .class          = &am43xx_des_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM43XX_CM_PER_DES_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /* dss */
 
 static struct omap_hwmod am43xx_dss_core_hwmod = {
@@ -467,44 +225,6 @@ static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
 };
 
 
-static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x104,
-       .sysc_flags     = SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                               MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am43xx_vpfe_hwmod_class = {
-       .name           = "vpfe",
-       .sysc           = &am43xx_vpfe_sysc,
-};
-
-static struct omap_hwmod am43xx_vpfe0_hwmod = {
-       .name           = "vpfe0",
-       .class          = &am43xx_vpfe_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-                       .clkctrl_offs   = AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET,
-               },
-       },
-};
-
-static struct omap_hwmod am43xx_vpfe1_hwmod = {
-       .name           = "vpfe1",
-       .class          = &am43xx_vpfe_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-                       .clkctrl_offs   = AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET,
-               },
-       },
-};
-
 /* Interfaces */
 static struct omap_hwmod_ocp_if am43xx_l3_main__emif = {
        .master         = &am33xx_l3_main_hwmod,
@@ -562,13 +282,6 @@ static struct omap_hwmod_ocp_if am43xx_l4_wkup__control = {
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_ocp_if am43xx_l4_wkup__adc_tsc = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am43xx_adc_tsc_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU,
-};
-
 static struct omap_hwmod_ocp_if am43xx_l4_wkup__timer1 = {
        .master         = &am33xx_l4_wkup_hwmod,
        .slave          = &am33xx_timer1_hwmod,
@@ -583,90 +296,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__synctimer = {
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_ocp_if am43xx_l4_ls__timer8 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_timer8_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__timer9 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_timer9_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__timer10 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_timer10_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__timer11 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_timer11_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss3 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_epwmss3_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss4 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_epwmss4_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss5 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_epwmss5_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi2 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_spi2_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi3 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_spi3_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi4 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_spi4_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__ocp2scp0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_ocp2scp0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__ocp2scp1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_ocp2scp1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
 static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss0 = {
        .master         = &am33xx_l3_s_hwmod,
        .slave          = &am43xx_usb_otg_ss0_hwmod,
@@ -681,13 +310,6 @@ static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss1 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = {
-       .master         = &am33xx_l3_s_hwmod,
-       .slave          = &am43xx_qspi_hwmod,
-       .clk            = "l3s_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 static struct omap_hwmod_ocp_if am43xx_dss__l3_main = {
        .master         = &am43xx_dss_core_hwmod,
        .slave          = &am33xx_l3_main_hwmod,
@@ -716,53 +338,8 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = {
-       .master         = &am43xx_vpfe0_hwmod,
-       .slave          = &am33xx_l3_main_hwmod,
-       .clk            = "l3_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = {
-       .master         = &am43xx_vpfe1_hwmod,
-       .slave          = &am33xx_l3_main_hwmod,
-       .clk            = "l3_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_vpfe0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am43xx_vpfe1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-static struct omap_hwmod_ocp_if am43xx_l3_main__des = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am43xx_des_hwmod,
-       .clk            = "l3_gclk",
-       .user           = OCP_USER_MPU,
-};
-
 static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
        &am33xx_l4_wkup__synctimer,
-       &am43xx_l4_ls__timer8,
-       &am43xx_l4_ls__timer9,
-       &am43xx_l4_ls__timer10,
-       &am43xx_l4_ls__timer11,
-       &am43xx_l4_ls__epwmss3,
-       &am43xx_l4_ls__epwmss4,
-       &am43xx_l4_ls__epwmss5,
-       &am43xx_l4_ls__mcspi2,
-       &am43xx_l4_ls__mcspi3,
-       &am43xx_l4_ls__mcspi4,
        &am43xx_l3_main__pruss,
        &am33xx_mpu__l3_main,
        &am33xx_mpu__prcm,
@@ -782,44 +359,19 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
        &am43xx_l4_wkup__smartreflex0,
        &am43xx_l4_wkup__smartreflex1,
        &am43xx_l4_wkup__timer1,
-       &am43xx_l4_wkup__adc_tsc,
-       &am43xx_l3_s__qspi,
-       &am33xx_l4_per__dcan0,
-       &am33xx_l4_per__dcan1,
        &am33xx_l4_ls__timer2,
-       &am33xx_l4_ls__timer3,
-       &am33xx_l4_ls__timer4,
-       &am33xx_l4_ls__timer5,
-       &am33xx_l4_ls__timer6,
-       &am33xx_l4_ls__timer7,
        &am33xx_l3_main__tpcc,
-       &am33xx_l4_ls__spinlock,
-       &am33xx_l4_ls__elm,
-       &am33xx_l4_ls__epwmss0,
-       &am33xx_l4_ls__epwmss1,
-       &am33xx_l4_ls__epwmss2,
        &am33xx_l3_s__gpmc,
-       &am33xx_l4_ls__mcspi0,
-       &am33xx_l4_ls__mcspi1,
        &am33xx_l3_main__tptc0,
        &am33xx_l3_main__tptc1,
        &am33xx_l3_main__tptc2,
        &am33xx_l3_main__ocmc,
-       &am33xx_l3_main__sha0,
-       &am33xx_l3_main__aes0,
-       &am43xx_l3_main__des,
-       &am43xx_l4_ls__ocp2scp0,
-       &am43xx_l4_ls__ocp2scp1,
        &am43xx_l3_s__usbotgss0,
        &am43xx_l3_s__usbotgss1,
        &am43xx_dss__l3_main,
        &am43xx_l4_ls__dss,
        &am43xx_l4_ls__dss_dispc,
        &am43xx_l4_ls__dss_rfbi,
-       &am43xx_l3__vpfe0,
-       &am43xx_l3__vpfe1,
-       &am43xx_l4_ls__vpfe0,
-       &am43xx_l4_ls__vpfe1,
        NULL,
 };
 
index 292f544bd62dedce49bed8577766dc2ba3b9fa69..722c641895baa060b68012e378afe98a930a1495 100644 (file)
@@ -18,9 +18,6 @@
  */
 
 #include <linux/io.h>
-#include <linux/power/smartreflex.h>
-
-#include <linux/omap-dma.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
@@ -32,9 +29,6 @@
 /* Base offset for all OMAP4 interrupts external to MPUSS */
 #define OMAP44XX_IRQ_GIC_START 32
 
-/* Base offset for all OMAP4 dma requests */
-#define OMAP44XX_DMA_REQ_START 1
-
 /*
  * IP blocks
  */
@@ -237,43 +231,6 @@ static struct omap_hwmod omap44xx_ocp_wp_noc_hwmod = {
  * usim
  */
 
-/*
- * 'aess' class
- * audio engine sub system
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
-                          MSTANDBY_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
-       .name   = "aess",
-       .sysc   = &omap44xx_aess_sysc,
-       .enable_preprogram = omap_hwmod_aess_preprogram,
-};
-
-/* aess */
-static struct omap_hwmod omap44xx_aess_hwmod = {
-       .name           = "aess",
-       .class          = &omap44xx_aess_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "aess_fclk",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
-                       .lostcontext_mask = OMAP4430_LOSTCONTEXT_DFF_MASK,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /*
  * 'counter' class
  * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
@@ -398,87 +355,6 @@ static struct omap_hwmod omap44xx_debugss_hwmod = {
        },
 };
 
-/*
- * 'dma' class
- * dma controller for data exchange between memory to memory (i.e. internal or
- * external memory) and gp peripherals to memory or memory to gp peripherals
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x002c,
-       .syss_offs      = 0x0028,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
-       .name   = "dma",
-       .sysc   = &omap44xx_dma_sysc,
-};
-
-/* dma dev_attr */
-static struct omap_dma_dev_attr dma_dev_attr = {
-       .dev_caps       = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
-                         IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
-       .lch_count      = 32,
-};
-
-/* dma_system */
-static struct omap_hwmod omap44xx_dma_system_hwmod = {
-       .name           = "dma_system",
-       .class          = &omap44xx_dma_hwmod_class,
-       .clkdm_name     = "l3_dma_clkdm",
-       .main_clk       = "l3_div_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
-               },
-       },
-       .dev_attr       = &dma_dev_attr,
-};
-
-/*
- * 'dmic' class
- * digital microphone controller
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
-       .name   = "dmic",
-       .sysc   = &omap44xx_dmic_sysc,
-};
-
-/* dmic */
-static struct omap_hwmod omap44xx_dmic_hwmod = {
-       .name           = "dmic",
-       .class          = &omap44xx_dmic_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "func_dmic_abe_gfclk",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /*
  * 'dsp' class
  * dsp sub-system
@@ -804,39 +680,6 @@ static struct omap_hwmod omap44xx_sha0_hwmod = {
        },
 };
 
-/*
- * 'elm' class
- * bch error location module
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_elm_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap44xx_elm_hwmod_class = {
-       .name   = "elm",
-       .sysc   = &omap44xx_elm_sysc,
-};
-
-/* elm */
-static struct omap_hwmod omap44xx_elm_hwmod = {
-       .name           = "elm",
-       .class          = &omap44xx_elm_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_ELM_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_ELM_CONTEXT_OFFSET,
-               },
-       },
-};
 
 /*
  * 'emif' class
@@ -981,50 +824,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__des = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/*
- * 'fdif' class
- * face detection hw accelerator module
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_fdif_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       /*
-        * FDIF needs 100 OCP clk cycles delay after a softreset before
-        * accessing sysconfig again.
-        * The lowest frequency at the moment for L3 bus is 100 MHz, so
-        * 1usec delay is needed. Add an x2 margin to be safe (2 usecs).
-        *
-        * TODO: Indicate errata when available.
-        */
-       .srst_udelay    = 2,
-       .sysc_flags     = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap44xx_fdif_hwmod_class = {
-       .name   = "fdif",
-       .sysc   = &omap44xx_fdif_sysc,
-};
-
-/* fdif */
-static struct omap_hwmod omap44xx_fdif_hwmod = {
-       .name           = "fdif",
-       .class          = &omap44xx_fdif_hwmod_class,
-       .clkdm_name     = "iss_clkdm",
-       .main_clk       = "fdif_fck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_CAM_FDIF_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_CAM_FDIF_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /*
  * 'gpmc' class
  * general purpose memory controller
@@ -1062,45 +861,6 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
 };
 
 
-/*
- * 'hsi' class
- * mipi high-speed synchronous serial interface (multichannel and full-duplex
- * serial if)
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
-                          SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
-                          MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
-       .name   = "hsi",
-       .sysc   = &omap44xx_hsi_sysc,
-};
-
-/* hsi */
-static struct omap_hwmod omap44xx_hsi_hwmod = {
-       .name           = "hsi",
-       .class          = &omap44xx_hsi_hwmod_class,
-       .clkdm_name     = "l3_init_clkdm",
-       .main_clk       = "hsi_fck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
 /*
  * 'ipu' class
  * imaging processor unit
@@ -1217,177 +977,6 @@ static struct omap_hwmod omap44xx_iva_hwmod = {
        },
 };
 
-/*
- * 'kbd' class
- * keyboard controller
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
-       .name   = "kbd",
-       .sysc   = &omap44xx_kbd_sysc,
-};
-
-/* kbd */
-static struct omap_hwmod omap44xx_kbd_hwmod = {
-       .name           = "kbd",
-       .class          = &omap44xx_kbd_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .main_clk       = "sys_32k_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-
-/*
- * 'mcpdm' class
- * multi channel pdm controller (proprietary interface with phoenix power
- * ic)
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
-       .name   = "mcpdm",
-       .sysc   = &omap44xx_mcpdm_sysc,
-};
-
-/* mcpdm */
-static struct omap_hwmod omap44xx_mcpdm_hwmod = {
-       .name           = "mcpdm",
-       .class          = &omap44xx_mcpdm_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       /*
-        * It's suspected that the McPDM requires an off-chip main
-        * functional clock, controlled via I2C.  This IP block is
-        * currently reset very early during boot, before I2C is
-        * available, so it doesn't seem that we have any choice in
-        * the kernel other than to avoid resetting it.
-        *
-        * Also, McPDM needs to be configured to NO_IDLE mode when it
-        * is in used otherwise vital clocks will be gated which
-        * results 'slow motion' audio playback.
-        */
-       .flags          = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE,
-       .main_clk       = "pad_clks_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'mmu' class
- * The memory management unit performs virtual to physical address translation
- * for its requestors.
- */
-
-static struct omap_hwmod_class_sysconfig mmu_sysc = {
-       .rev_offs       = 0x000,
-       .sysc_offs      = 0x010,
-       .syss_offs      = 0x014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap44xx_mmu_hwmod_class = {
-       .name = "mmu",
-       .sysc = &mmu_sysc,
-};
-
-/* mmu ipu */
-
-static struct omap_hwmod omap44xx_mmu_ipu_hwmod;
-static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = {
-       { .name = "mmu_cache", .rst_shift = 2 },
-};
-
-/* l3_main_2 -> mmu_ipu */
-static struct omap_hwmod_ocp_if omap44xx_l3_main_2__mmu_ipu = {
-       .master         = &omap44xx_l3_main_2_hwmod,
-       .slave          = &omap44xx_mmu_ipu_hwmod,
-       .clk            = "l3_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-static struct omap_hwmod omap44xx_mmu_ipu_hwmod = {
-       .name           = "mmu_ipu",
-       .class          = &omap44xx_mmu_hwmod_class,
-       .clkdm_name     = "ducati_clkdm",
-       .rst_lines      = omap44xx_mmu_ipu_resets,
-       .rst_lines_cnt  = ARRAY_SIZE(omap44xx_mmu_ipu_resets),
-       .main_clk       = "ducati_clk_mux_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
-                       .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
-/* mmu dsp */
-
-static struct omap_hwmod omap44xx_mmu_dsp_hwmod;
-static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = {
-       { .name = "mmu_cache", .rst_shift = 1 },
-};
-
-/* l4_cfg -> dsp */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mmu_dsp = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_mmu_dsp_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-static struct omap_hwmod omap44xx_mmu_dsp_hwmod = {
-       .name           = "mmu_dsp",
-       .class          = &omap44xx_mmu_hwmod_class,
-       .clkdm_name     = "tesla_clkdm",
-       .rst_lines      = omap44xx_mmu_dsp_resets,
-       .rst_lines_cnt  = ARRAY_SIZE(omap44xx_mmu_dsp_resets),
-       .main_clk       = "dpll_iva_m4x2_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
-                       .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
 /*
  * 'mpu' class
  * mpu sub-system
@@ -1434,60 +1023,15 @@ static struct omap_hwmod omap44xx_ocmc_ram_hwmod = {
        },
 };
 
+
 /*
- * 'ocp2scp' class
- * bridge to transform ocp interface protocol to scp (serial control port)
- * protocol
+ * 'prcm' class
+ * power and reset manager (part of the prcm infrastructure) + clock manager 2
+ * + clock manager 1 (in always on power domain) + local prm in mpu
  */
 
-static struct omap_hwmod_class_sysconfig omap44xx_ocp2scp_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = {
-       .name   = "ocp2scp",
-       .sysc   = &omap44xx_ocp2scp_sysc,
-};
-
-/* ocp2scp_usb_phy */
-static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
-       .name           = "ocp2scp_usb_phy",
-       .class          = &omap44xx_ocp2scp_hwmod_class,
-       .clkdm_name     = "l3_init_clkdm",
-       /*
-        * ocp2scp_usb_phy_phy_48m is provided by the OMAP4 PRCM IP
-        * block as an "optional clock," and normally should never be
-        * specified as the main_clk for an OMAP IP block.  However it
-        * turns out that this clock is actually the main clock for
-        * the ocp2scp_usb_phy IP block:
-        * http://lists.infradead.org/pipermail/linux-arm-kernel/2012-September/119943.html
-        * So listing ocp2scp_usb_phy_phy_48m as a main_clk here seems
-        * to be the best workaround.
-        */
-       .main_clk       = "ocp2scp_usb_phy_phy_48m",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L3INIT_USBPHYOCP2SCP_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
-/*
- * 'prcm' class
- * power and reset manager (part of the prcm infrastructure) + clock manager 2
- * + clock manager 1 (in always on power domain) + local prm in mpu
- */
-
-static struct omap_hwmod_class omap44xx_prcm_hwmod_class = {
-       .name   = "prcm",
+static struct omap_hwmod_class omap44xx_prcm_hwmod_class = {
+       .name   = "prcm",
 };
 
 /* prcm_mpu */
@@ -1584,189 +1128,6 @@ static struct omap_hwmod omap44xx_sl2if_hwmod = {
        },
 };
 
-/*
- * 'slimbus' class
- * bidirectional, multi-drop, multi-channel two-line serial interface between
- * the device and external components
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_slimbus_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap44xx_slimbus_hwmod_class = {
-       .name   = "slimbus",
-       .sysc   = &omap44xx_slimbus_sysc,
-};
-
-/* slimbus1 */
-static struct omap_hwmod_opt_clk slimbus1_opt_clks[] = {
-       { .role = "fclk_1", .clk = "slimbus1_fclk_1" },
-       { .role = "fclk_0", .clk = "slimbus1_fclk_0" },
-       { .role = "fclk_2", .clk = "slimbus1_fclk_2" },
-       { .role = "slimbus_clk", .clk = "slimbus1_slimbus_clk" },
-};
-
-static struct omap_hwmod omap44xx_slimbus1_hwmod = {
-       .name           = "slimbus1",
-       .class          = &omap44xx_slimbus_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_SLIMBUS_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_SLIMBUS_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-       .opt_clks       = slimbus1_opt_clks,
-       .opt_clks_cnt   = ARRAY_SIZE(slimbus1_opt_clks),
-};
-
-/* slimbus2 */
-static struct omap_hwmod_opt_clk slimbus2_opt_clks[] = {
-       { .role = "fclk_1", .clk = "slimbus2_fclk_1" },
-       { .role = "fclk_0", .clk = "slimbus2_fclk_0" },
-       { .role = "slimbus_clk", .clk = "slimbus2_slimbus_clk" },
-};
-
-static struct omap_hwmod omap44xx_slimbus2_hwmod = {
-       .name           = "slimbus2",
-       .class          = &omap44xx_slimbus_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_SLIMBUS2_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_SLIMBUS2_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-       .opt_clks       = slimbus2_opt_clks,
-       .opt_clks_cnt   = ARRAY_SIZE(slimbus2_opt_clks),
-};
-
-/*
- * 'smartreflex' class
- * smartreflex module (monitor silicon performance and outputs a measure of
- * performance error)
- */
-
-/* The IP is not compliant to type1 / type2 scheme */
-static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
-       .rev_offs       = -ENODEV,
-       .sysc_offs      = 0x0038,
-       .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap36xx_sr_sysc_fields,
-};
-
-static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
-       .name   = "smartreflex",
-       .sysc   = &omap44xx_smartreflex_sysc,
-};
-
-/* smartreflex_core */
-static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
-       .sensor_voltdm_name   = "core",
-};
-
-static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
-       .name           = "smartreflex_core",
-       .class          = &omap44xx_smartreflex_hwmod_class,
-       .clkdm_name     = "l4_ao_clkdm",
-
-       .main_clk       = "smartreflex_core_fck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &smartreflex_core_dev_attr,
-};
-
-/* smartreflex_iva */
-static struct omap_smartreflex_dev_attr smartreflex_iva_dev_attr = {
-       .sensor_voltdm_name     = "iva",
-};
-
-static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
-       .name           = "smartreflex_iva",
-       .class          = &omap44xx_smartreflex_hwmod_class,
-       .clkdm_name     = "l4_ao_clkdm",
-       .main_clk       = "smartreflex_iva_fck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &smartreflex_iva_dev_attr,
-};
-
-/* smartreflex_mpu */
-static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
-       .sensor_voltdm_name     = "mpu",
-};
-
-static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
-       .name           = "smartreflex_mpu",
-       .class          = &omap44xx_smartreflex_hwmod_class,
-       .clkdm_name     = "l4_ao_clkdm",
-       .main_clk       = "smartreflex_mpu_fck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &smartreflex_mpu_dev_attr,
-};
-
-/*
- * 'spinlock' class
- * spinlock provides hardware assistance for synchronizing the processes
- * running on multiple processors
- */
-
-static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
-       .name   = "spinlock",
-       .sysc   = &omap44xx_spinlock_sysc,
-};
-
-/* spinlock */
-static struct omap_hwmod omap44xx_spinlock_hwmod = {
-       .name           = "spinlock",
-       .class          = &omap44xx_spinlock_hwmod_class,
-       .clkdm_name     = "l4_cfg_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
-               },
-       },
-};
-
 /*
  * 'timer' class
  * general purpose timer module with accurate 1ms tick
@@ -1790,21 +1151,6 @@ static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
        .sysc   = &omap44xx_timer_1ms_sysc,
 };
 
-static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
-       .name   = "timer",
-       .sysc   = &omap44xx_timer_sysc,
-};
-
 /* timer1 */
 static struct omap_hwmod omap44xx_timer1_hwmod = {
        .name           = "timer1",
@@ -1821,158 +1167,6 @@ static struct omap_hwmod omap44xx_timer1_hwmod = {
        },
 };
 
-/* timer2 */
-static struct omap_hwmod omap44xx_timer2_hwmod = {
-       .name           = "timer2",
-       .class          = &omap44xx_timer_1ms_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .flags          = HWMOD_SET_DEFAULT_CLOCKACT,
-       .main_clk       = "cm2_dm2_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer3 */
-static struct omap_hwmod omap44xx_timer3_hwmod = {
-       .name           = "timer3",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .main_clk       = "cm2_dm3_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_DMTIMER3_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer4 */
-static struct omap_hwmod omap44xx_timer4_hwmod = {
-       .name           = "timer4",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .main_clk       = "cm2_dm4_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_DMTIMER4_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer5 */
-static struct omap_hwmod omap44xx_timer5_hwmod = {
-       .name           = "timer5",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer5_sync_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer6 */
-static struct omap_hwmod omap44xx_timer6_hwmod = {
-       .name           = "timer6",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer6_sync_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer7 */
-static struct omap_hwmod omap44xx_timer7_hwmod = {
-       .name           = "timer7",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer7_sync_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer8 */
-static struct omap_hwmod omap44xx_timer8_hwmod = {
-       .name           = "timer8",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer8_sync_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer9 */
-static struct omap_hwmod omap44xx_timer9_hwmod = {
-       .name           = "timer9",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .main_clk       = "cm2_dm9_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer10 */
-static struct omap_hwmod omap44xx_timer10_hwmod = {
-       .name           = "timer10",
-       .class          = &omap44xx_timer_1ms_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .flags          = HWMOD_SET_DEFAULT_CLOCKACT,
-       .main_clk       = "cm2_dm10_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_DMTIMER10_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer11 */
-static struct omap_hwmod omap44xx_timer11_hwmod = {
-       .name           = "timer11",
-       .class          = &omap44xx_timer_hwmod_class,
-       .clkdm_name     = "l4_per_clkdm",
-       .main_clk       = "cm2_dm11_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_L4PER_DMTIMER11_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /*
  * 'usb_host_fs' class
  * full-speed usb host controller
@@ -2213,30 +1407,6 @@ static struct omap_hwmod_ocp_if omap44xx_debugss__l3_main_2 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* dma_system -> l3_main_2 */
-static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
-       .master         = &omap44xx_dma_system_hwmod,
-       .slave          = &omap44xx_l3_main_2_hwmod,
-       .clk            = "l3_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* fdif -> l3_main_2 */
-static struct omap_hwmod_ocp_if omap44xx_fdif__l3_main_2 = {
-       .master         = &omap44xx_fdif_hwmod,
-       .slave          = &omap44xx_l3_main_2_hwmod,
-       .clk            = "l3_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* hsi -> l3_main_2 */
-static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
-       .master         = &omap44xx_hsi_hwmod,
-       .slave          = &omap44xx_l3_main_2_hwmod,
-       .clk            = "l3_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* ipu -> l3_main_2 */
 static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
        .master         = &omap44xx_ipu_hwmod,
@@ -2317,14 +1487,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* aess -> l4_abe */
-static struct omap_hwmod_ocp_if __maybe_unused omap44xx_aess__l4_abe = {
-       .master         = &omap44xx_aess_hwmod,
-       .slave          = &omap44xx_l4_abe_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* dsp -> l4_abe */
 static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
        .master         = &omap44xx_dsp_hwmod,
@@ -2389,22 +1551,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp_wp_noc = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_abe -> aess */
-static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_abe__aess = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_aess_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_abe -> aess (dma) */
-static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_abe__aess_dma = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_aess_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_SDMA,
-};
-
 /* l4_wkup -> counter_32k */
 static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
        .master         = &omap44xx_l4_wkup_hwmod,
@@ -2453,22 +1599,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_instr__debugss = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> dma_system */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_dma_system_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> dmic */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_dmic_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* dsp -> iva */
 static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
        .master         = &omap44xx_dsp_hwmod,
@@ -2613,22 +1743,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__sha0 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_per -> elm */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_elm_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> fdif */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__fdif = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_fdif_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_2 -> gpmc */
 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpmc = {
        .master         = &omap44xx_l3_main_2_hwmod,
@@ -2637,14 +1751,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpmc = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> hsi */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_hsi_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_2 -> ipu */
 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
        .master         = &omap44xx_l3_main_2_hwmod,
@@ -2677,22 +1783,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
        .user           = OCP_USER_MPU,
 };
 
-/* l4_wkup -> kbd */
-static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
-       .master         = &omap44xx_l4_wkup_hwmod,
-       .slave          = &omap44xx_kbd_hwmod,
-       .clk            = "l4_wkup_clk_mux_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> mcpdm */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_mcpdm_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_2 -> ocmc_ram */
 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = {
        .master         = &omap44xx_l3_main_2_hwmod,
@@ -2701,14 +1791,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> ocp2scp_usb_phy */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_ocp2scp_usb_phy_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* mpu_private -> prcm_mpu */
 static struct omap_hwmod_ocp_if omap44xx_mpu_private__prcm_mpu = {
        .master         = &omap44xx_mpu_private_hwmod,
@@ -2757,62 +1839,6 @@ static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l3_main_2__sl2if = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_abe -> slimbus1 */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__slimbus1 = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_slimbus1_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_abe -> slimbus1 (dma) */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__slimbus1_dma = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_slimbus1_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_SDMA,
-};
-
-/* l4_per -> slimbus2 */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__slimbus2 = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_slimbus2_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> smartreflex_core */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_smartreflex_core_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> smartreflex_iva */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_smartreflex_iva_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> smartreflex_mpu */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_smartreflex_mpu_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> spinlock */
-static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
-       .master         = &omap44xx_l4_cfg_hwmod,
-       .slave          = &omap44xx_spinlock_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_wkup -> timer1 */
 static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
        .master         = &omap44xx_l4_wkup_hwmod,
@@ -2821,86 +1847,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_per -> timer2 */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_timer2_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer3 */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_timer3_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer4 */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_timer4_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> timer5 */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_timer5_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> timer6 */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_timer6_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> timer7 */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_timer7_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> timer8 */
-static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
-       .master         = &omap44xx_l4_abe_hwmod,
-       .slave          = &omap44xx_timer8_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer9 */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_timer9_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer10 */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_timer10_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer11 */
-static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
-       .master         = &omap44xx_l4_per_hwmod,
-       .slave          = &omap44xx_timer11_hwmod,
-       .clk            = "l4_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_cfg -> usb_host_fs */
 static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_cfg__usb_host_fs = {
        .master         = &omap44xx_l4_cfg_hwmod,
@@ -2953,9 +1899,6 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
        &omap44xx_l4_cfg__l3_main_1,
        &omap44xx_mpu__l3_main_1,
        &omap44xx_debugss__l3_main_2,
-       &omap44xx_dma_system__l3_main_2,
-       &omap44xx_fdif__l3_main_2,
-       &omap44xx_hsi__l3_main_2,
        &omap44xx_ipu__l3_main_2,
        &omap44xx_iss__l3_main_2,
        &omap44xx_iva__l3_main_2,
@@ -2966,7 +1909,6 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
        &omap44xx_l3_main_1__l3_main_3,
        &omap44xx_l3_main_2__l3_main_3,
        &omap44xx_l4_cfg__l3_main_3,
-       &omap44xx_aess__l4_abe,
        &omap44xx_dsp__l4_abe,
        &omap44xx_l3_main_1__l4_abe,
        &omap44xx_mpu__l4_abe,
@@ -2975,16 +1917,12 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
        &omap44xx_l4_cfg__l4_wkup,
        &omap44xx_mpu__mpu_private,
        &omap44xx_l4_cfg__ocp_wp_noc,
-       &omap44xx_l4_abe__aess,
-       &omap44xx_l4_abe__aess_dma,
        &omap44xx_l4_wkup__counter_32k,
        &omap44xx_l4_cfg__ctrl_module_core,
        &omap44xx_l4_cfg__ctrl_module_pad_core,
        &omap44xx_l4_wkup__ctrl_module_wkup,
        &omap44xx_l4_wkup__ctrl_module_pad_wkup,
        &omap44xx_l3_instr__debugss,
-       &omap44xx_l4_cfg__dma_system,
-       &omap44xx_l4_abe__dmic,
        &omap44xx_dsp__iva,
        /* &omap44xx_dsp__sl2if, */
        &omap44xx_l4_cfg__dsp,
@@ -3002,44 +1940,19 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
        &omap44xx_l4_per__dss_rfbi,
        &omap44xx_l3_main_2__dss_venc,
        &omap44xx_l4_per__dss_venc,
-       &omap44xx_l4_per__elm,
-       &omap44xx_l4_cfg__fdif,
        &omap44xx_l3_main_2__gpmc,
-       &omap44xx_l4_cfg__hsi,
        &omap44xx_l3_main_2__ipu,
        &omap44xx_l3_main_2__iss,
        /* &omap44xx_iva__sl2if, */
        &omap44xx_l3_main_2__iva,
-       &omap44xx_l4_wkup__kbd,
-       &omap44xx_l4_abe__mcpdm,
-       &omap44xx_l3_main_2__mmu_ipu,
-       &omap44xx_l4_cfg__mmu_dsp,
        &omap44xx_l3_main_2__ocmc_ram,
-       &omap44xx_l4_cfg__ocp2scp_usb_phy,
        &omap44xx_mpu_private__prcm_mpu,
        &omap44xx_l4_wkup__cm_core_aon,
        &omap44xx_l4_cfg__cm_core,
        &omap44xx_l4_wkup__prm,
        &omap44xx_l4_wkup__scrm,
        /* &omap44xx_l3_main_2__sl2if, */
-       &omap44xx_l4_abe__slimbus1,
-       &omap44xx_l4_abe__slimbus1_dma,
-       &omap44xx_l4_per__slimbus2,
-       &omap44xx_l4_cfg__smartreflex_core,
-       &omap44xx_l4_cfg__smartreflex_iva,
-       &omap44xx_l4_cfg__smartreflex_mpu,
-       &omap44xx_l4_cfg__spinlock,
        &omap44xx_l4_wkup__timer1,
-       &omap44xx_l4_per__timer2,
-       &omap44xx_l4_per__timer3,
-       &omap44xx_l4_per__timer4,
-       &omap44xx_l4_abe__timer5,
-       &omap44xx_l4_abe__timer6,
-       &omap44xx_l4_abe__timer7,
-       &omap44xx_l4_abe__timer8,
-       &omap44xx_l4_per__timer9,
-       &omap44xx_l4_per__timer10,
-       &omap44xx_l4_per__timer11,
        /* &omap44xx_l4_cfg__usb_host_fs, */
        &omap44xx_l4_cfg__usb_host_hs,
        &omap44xx_l4_cfg__usb_tll_hs,
index cc5ad6acab1d9524c14041c9fefb74b5f56b3be7..ad398f6bc011b866fca2ba0f33b970f6539c34ad 100644 (file)
@@ -17,8 +17,6 @@
 #include <linux/io.h>
 #include <linux/power/smartreflex.h>
 
-#include <linux/omap-dma.h>
-
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
 #include "cm1_54xx.h"
 /* Base offset for all OMAP5 interrupts external to MPUSS */
 #define OMAP54XX_IRQ_GIC_START 32
 
-/* Base offset for all OMAP5 dma requests */
-#define OMAP54XX_DMA_REQ_START 1
-
-
 /*
  * IP blocks
  */
@@ -232,87 +226,6 @@ static struct omap_hwmod omap54xx_counter_32k_hwmod = {
        },
 };
 
-/*
- * 'dma' class
- * dma controller for data exchange between memory to memory (i.e. internal or
- * external memory) and gp peripherals to memory or memory to gp peripherals
- */
-
-static struct omap_hwmod_class_sysconfig omap54xx_dma_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x002c,
-       .syss_offs      = 0x0028,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap54xx_dma_hwmod_class = {
-       .name   = "dma",
-       .sysc   = &omap54xx_dma_sysc,
-};
-
-/* dma dev_attr */
-static struct omap_dma_dev_attr dma_dev_attr = {
-       .dev_caps       = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
-                         IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
-       .lch_count      = 32,
-};
-
-/* dma_system */
-static struct omap_hwmod omap54xx_dma_system_hwmod = {
-       .name           = "dma_system",
-       .class          = &omap54xx_dma_hwmod_class,
-       .clkdm_name     = "dma_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
-               },
-       },
-       .dev_attr       = &dma_dev_attr,
-};
-
-/*
- * 'dmic' class
- * digital microphone controller
- */
-
-static struct omap_hwmod_class_sysconfig omap54xx_dmic_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap54xx_dmic_hwmod_class = {
-       .name   = "dmic",
-       .sysc   = &omap54xx_dmic_sysc,
-};
-
-/* dmic */
-static struct omap_hwmod omap54xx_dmic_hwmod = {
-       .name           = "dmic",
-       .class          = &omap54xx_dmic_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "dmic_gfclk",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_ABE_DMIC_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_ABE_DMIC_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /*
  * 'dss' class
  * display sub-system
@@ -593,154 +506,8 @@ static struct omap_hwmod omap54xx_emif2_hwmod = {
        },
 };
 
-/*
- * 'kbd' class
- * keyboard controller
- */
-
-static struct omap_hwmod_class_sysconfig omap54xx_kbd_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap54xx_kbd_hwmod_class = {
-       .name   = "kbd",
-       .sysc   = &omap54xx_kbd_sysc,
-};
-
-/* kbd */
-static struct omap_hwmod omap54xx_kbd_hwmod = {
-       .name           = "kbd",
-       .class          = &omap54xx_kbd_hwmod_class,
-       .clkdm_name     = "wkupaon_clkdm",
-       .main_clk       = "sys_32k_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_WKUPAON_KBD_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_WKUPAON_KBD_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'mcpdm' class
- * multi channel pdm controller (proprietary interface with phoenix power
- * ic)
- */
-
-static struct omap_hwmod_class_sysconfig omap54xx_mcpdm_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap54xx_mcpdm_hwmod_class = {
-       .name   = "mcpdm",
-       .sysc   = &omap54xx_mcpdm_sysc,
-};
-
-/* mcpdm */
-static struct omap_hwmod omap54xx_mcpdm_hwmod = {
-       .name           = "mcpdm",
-       .class          = &omap54xx_mcpdm_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       /*
-        * It's suspected that the McPDM requires an off-chip main
-        * functional clock, controlled via I2C.  This IP block is
-        * currently reset very early during boot, before I2C is
-        * available, so it doesn't seem that we have any choice in
-        * the kernel other than to avoid resetting it.  XXX This is
-        * really a hardware issue workaround: every IP block should
-        * be able to source its main functional clock from either
-        * on-chip or off-chip sources.  McPDM seems to be the only
-        * current exception.
-        */
-
-       .flags          = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE,
-       .main_clk       = "pad_clks_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_ABE_MCPDM_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_ABE_MCPDM_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 
-/*
- * 'mmu' class
- * The memory management unit performs virtual to physical address translation
- * for its requestors.
- */
 
-static struct omap_hwmod_class_sysconfig omap54xx_mmu_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap54xx_mmu_hwmod_class = {
-       .name = "mmu",
-       .sysc = &omap54xx_mmu_sysc,
-};
-
-static struct omap_hwmod_rst_info omap54xx_mmu_dsp_resets[] = {
-       { .name = "mmu_cache", .rst_shift = 1 },
-};
-
-static struct omap_hwmod omap54xx_mmu_dsp_hwmod = {
-       .name           = "mmu_dsp",
-       .class          = &omap54xx_mmu_hwmod_class,
-       .clkdm_name     = "dsp_clkdm",
-       .rst_lines      = omap54xx_mmu_dsp_resets,
-       .rst_lines_cnt  = ARRAY_SIZE(omap54xx_mmu_dsp_resets),
-       .main_clk       = "dpll_iva_h11x2_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_DSP_DSP_CLKCTRL_OFFSET,
-                       .rstctrl_offs = OMAP54XX_RM_DSP_RSTCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_DSP_DSP_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
-/* mmu ipu */
-static struct omap_hwmod_rst_info omap54xx_mmu_ipu_resets[] = {
-       { .name = "mmu_cache", .rst_shift = 2 },
-};
-
-static struct omap_hwmod omap54xx_mmu_ipu_hwmod = {
-       .name           = "mmu_ipu",
-       .class          = &omap54xx_mmu_hwmod_class,
-       .clkdm_name     = "ipu_clkdm",
-       .rst_lines      = omap54xx_mmu_ipu_resets,
-       .rst_lines_cnt  = ARRAY_SIZE(omap54xx_mmu_ipu_resets),
-       .main_clk       = "dpll_core_h22x2_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_IPU_IPU_CLKCTRL_OFFSET,
-                       .rstctrl_offs = OMAP54XX_RM_IPU_RSTCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_IPU_IPU_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
 
 /*
  * 'mpu' class
@@ -766,76 +533,6 @@ static struct omap_hwmod omap54xx_mpu_hwmod = {
        },
 };
 
-/*
- * 'spinlock' class
- * spinlock provides hardware assistance for synchronizing the processes
- * running on multiple processors
- */
-
-static struct omap_hwmod_class_sysconfig omap54xx_spinlock_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap54xx_spinlock_hwmod_class = {
-       .name   = "spinlock",
-       .sysc   = &omap54xx_spinlock_sysc,
-};
-
-/* spinlock */
-static struct omap_hwmod omap54xx_spinlock_hwmod = {
-       .name           = "spinlock",
-       .class          = &omap54xx_spinlock_hwmod_class,
-       .clkdm_name     = "l4cfg_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
-               },
-       },
-};
-
-/*
- * 'ocp2scp' class
- * bridge to transform ocp interface protocol to scp (serial control port)
- * protocol
- */
-
-static struct omap_hwmod_class_sysconfig omap54xx_ocp2scp_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
-                       SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap54xx_ocp2scp_hwmod_class = {
-       .name   = "ocp2scp",
-       .sysc   = &omap54xx_ocp2scp_sysc,
-};
-
-/* ocp2scp1 */
-static struct omap_hwmod omap54xx_ocp2scp1_hwmod = {
-       .name           = "ocp2scp1",
-       .class          = &omap54xx_ocp2scp_hwmod_class,
-       .clkdm_name     = "l3init_clkdm",
-       .main_clk       = "l4_root_clk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
 
 /*
  * 'timer' class
@@ -858,21 +555,6 @@ static struct omap_hwmod_class omap54xx_timer_1ms_hwmod_class = {
        .sysc   = &omap54xx_timer_1ms_sysc,
 };
 
-static struct omap_hwmod_class_sysconfig omap54xx_timer_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class omap54xx_timer_hwmod_class = {
-       .name   = "timer",
-       .sysc   = &omap54xx_timer_sysc,
-};
-
 /* timer1 */
 static struct omap_hwmod omap54xx_timer1_hwmod = {
        .name           = "timer1",
@@ -889,158 +571,6 @@ static struct omap_hwmod omap54xx_timer1_hwmod = {
        },
 };
 
-/* timer2 */
-static struct omap_hwmod omap54xx_timer2_hwmod = {
-       .name           = "timer2",
-       .class          = &omap54xx_timer_1ms_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer2_gfclk_mux",
-       .flags          = HWMOD_SET_DEFAULT_CLOCKACT,
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer3 */
-static struct omap_hwmod omap54xx_timer3_hwmod = {
-       .name           = "timer3",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer3_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer4 */
-static struct omap_hwmod omap54xx_timer4_hwmod = {
-       .name           = "timer4",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer4_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer5 */
-static struct omap_hwmod omap54xx_timer5_hwmod = {
-       .name           = "timer5",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer5_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_ABE_TIMER5_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_ABE_TIMER5_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer6 */
-static struct omap_hwmod omap54xx_timer6_hwmod = {
-       .name           = "timer6",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer6_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_ABE_TIMER6_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_ABE_TIMER6_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer7 */
-static struct omap_hwmod omap54xx_timer7_hwmod = {
-       .name           = "timer7",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer7_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_ABE_TIMER7_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_ABE_TIMER7_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer8 */
-static struct omap_hwmod omap54xx_timer8_hwmod = {
-       .name           = "timer8",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .main_clk       = "timer8_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_ABE_TIMER8_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_ABE_TIMER8_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer9 */
-static struct omap_hwmod omap54xx_timer9_hwmod = {
-       .name           = "timer9",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer9_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer10 */
-static struct omap_hwmod omap54xx_timer10_hwmod = {
-       .name           = "timer10",
-       .class          = &omap54xx_timer_1ms_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer10_gfclk_mux",
-       .flags          = HWMOD_SET_DEFAULT_CLOCKACT,
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer11 */
-static struct omap_hwmod omap54xx_timer11_hwmod = {
-       .name           = "timer11",
-       .class          = &omap54xx_timer_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer11_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /*
  * 'usb_host_hs' class
  * high-speed multi-port usb host controller
@@ -1193,35 +723,6 @@ static struct omap_hwmod omap54xx_usb_otg_ss_hwmod = {
        .opt_clks_cnt   = ARRAY_SIZE(usb_otg_ss_opt_clks),
 };
 
-
-/*
- * 'ocp2scp' class
- * bridge to transform ocp interface protocol to scp (serial control port)
- * protocol
- */
-/* ocp2scp3 */
-static struct omap_hwmod omap54xx_ocp2scp3_hwmod;
-/* l4_cfg -> ocp2scp3 */
-static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp3 = {
-       .master         = &omap54xx_l4_cfg_hwmod,
-       .slave          = &omap54xx_ocp2scp3_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-static struct omap_hwmod omap54xx_ocp2scp3_hwmod = {
-       .name           = "ocp2scp3",
-       .class          = &omap54xx_ocp2scp_hwmod_class,
-       .clkdm_name     = "l3init_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
-                       .context_offs = OMAP54XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
 /*
  * 'sata' class
  * sata:  serial ata interface  gen2 compliant   ( 1 rx/ 1 tx)
@@ -1303,14 +804,6 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_1 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> mmu_dsp */
-static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mmu_dsp = {
-       .master         = &omap54xx_l4_cfg_hwmod,
-       .slave          = &omap54xx_mmu_dsp_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* mpu -> l3_main_1 */
 static struct omap_hwmod_ocp_if omap54xx_mpu__l3_main_1 = {
        .master         = &omap54xx_mpu_hwmod,
@@ -1335,14 +828,6 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_2 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l3_main_2 -> mmu_ipu */
-static struct omap_hwmod_ocp_if omap54xx_l3_main_2__mmu_ipu = {
-       .master         = &omap54xx_l3_main_2_hwmod,
-       .slave          = &omap54xx_mmu_ipu_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_1 -> l3_main_3 */
 static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l3_main_3 = {
        .master         = &omap54xx_l3_main_1_hwmod,
@@ -1423,22 +908,6 @@ static struct omap_hwmod_ocp_if omap54xx_l4_wkup__counter_32k = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> dma_system */
-static struct omap_hwmod_ocp_if omap54xx_l4_cfg__dma_system = {
-       .master         = &omap54xx_l4_cfg_hwmod,
-       .slave          = &omap54xx_dma_system_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> dmic */
-static struct omap_hwmod_ocp_if omap54xx_l4_abe__dmic = {
-       .master         = &omap54xx_l4_abe_hwmod,
-       .slave          = &omap54xx_dmic_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
 /* l3_main_2 -> dss */
 static struct omap_hwmod_ocp_if omap54xx_l3_main_2__dss = {
        .master         = &omap54xx_l3_main_2_hwmod,
@@ -1503,22 +972,6 @@ static struct omap_hwmod_ocp_if omap54xx_mpu__emif2 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_wkup -> kbd */
-static struct omap_hwmod_ocp_if omap54xx_l4_wkup__kbd = {
-       .master         = &omap54xx_l4_wkup_hwmod,
-       .slave          = &omap54xx_kbd_hwmod,
-       .clk            = "wkupaon_iclk_mux",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> mcpdm */
-static struct omap_hwmod_ocp_if omap54xx_l4_abe__mcpdm = {
-       .master         = &omap54xx_l4_abe_hwmod,
-       .slave          = &omap54xx_mcpdm_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
 /* l4_cfg -> mpu */
 static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mpu = {
        .master         = &omap54xx_l4_cfg_hwmod,
@@ -1527,22 +980,6 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mpu = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> spinlock */
-static struct omap_hwmod_ocp_if omap54xx_l4_cfg__spinlock = {
-       .master         = &omap54xx_l4_cfg_hwmod,
-       .slave          = &omap54xx_spinlock_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> ocp2scp1 */
-static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp1 = {
-       .master         = &omap54xx_l4_cfg_hwmod,
-       .slave          = &omap54xx_ocp2scp1_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_wkup -> timer1 */
 static struct omap_hwmod_ocp_if omap54xx_l4_wkup__timer1 = {
        .master         = &omap54xx_l4_wkup_hwmod,
@@ -1551,86 +988,6 @@ static struct omap_hwmod_ocp_if omap54xx_l4_wkup__timer1 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_per -> timer2 */
-static struct omap_hwmod_ocp_if omap54xx_l4_per__timer2 = {
-       .master         = &omap54xx_l4_per_hwmod,
-       .slave          = &omap54xx_timer2_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer3 */
-static struct omap_hwmod_ocp_if omap54xx_l4_per__timer3 = {
-       .master         = &omap54xx_l4_per_hwmod,
-       .slave          = &omap54xx_timer3_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer4 */
-static struct omap_hwmod_ocp_if omap54xx_l4_per__timer4 = {
-       .master         = &omap54xx_l4_per_hwmod,
-       .slave          = &omap54xx_timer4_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_abe -> timer5 */
-static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer5 = {
-       .master         = &omap54xx_l4_abe_hwmod,
-       .slave          = &omap54xx_timer5_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_abe -> timer6 */
-static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer6 = {
-       .master         = &omap54xx_l4_abe_hwmod,
-       .slave          = &omap54xx_timer6_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_abe -> timer7 */
-static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer7 = {
-       .master         = &omap54xx_l4_abe_hwmod,
-       .slave          = &omap54xx_timer7_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_abe -> timer8 */
-static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer8 = {
-       .master         = &omap54xx_l4_abe_hwmod,
-       .slave          = &omap54xx_timer8_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_per -> timer9 */
-static struct omap_hwmod_ocp_if omap54xx_l4_per__timer9 = {
-       .master         = &omap54xx_l4_per_hwmod,
-       .slave          = &omap54xx_timer9_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer10 */
-static struct omap_hwmod_ocp_if omap54xx_l4_per__timer10 = {
-       .master         = &omap54xx_l4_per_hwmod,
-       .slave          = &omap54xx_timer10_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per -> timer11 */
-static struct omap_hwmod_ocp_if omap54xx_l4_per__timer11 = {
-       .master         = &omap54xx_l4_per_hwmod,
-       .slave          = &omap54xx_timer11_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_cfg -> usb_host_hs */
 static struct omap_hwmod_ocp_if omap54xx_l4_cfg__usb_host_hs = {
        .master         = &omap54xx_l4_cfg_hwmod,
@@ -1673,9 +1030,6 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
        &omap54xx_l3_main_1__l4_wkup,
        &omap54xx_mpu__mpu_private,
        &omap54xx_l4_wkup__counter_32k,
-       &omap54xx_l4_cfg__dma_system,
-       &omap54xx_l4_abe__dmic,
-       &omap54xx_l4_cfg__mmu_dsp,
        &omap54xx_l3_main_2__dss,
        &omap54xx_l3_main_2__dss_dispc,
        &omap54xx_l3_main_2__dss_dsi1_a,
@@ -1684,27 +1038,11 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
        &omap54xx_l3_main_2__dss_rfbi,
        &omap54xx_mpu__emif1,
        &omap54xx_mpu__emif2,
-       &omap54xx_l3_main_2__mmu_ipu,
-       &omap54xx_l4_wkup__kbd,
-       &omap54xx_l4_abe__mcpdm,
        &omap54xx_l4_cfg__mpu,
-       &omap54xx_l4_cfg__spinlock,
-       &omap54xx_l4_cfg__ocp2scp1,
        &omap54xx_l4_wkup__timer1,
-       &omap54xx_l4_per__timer2,
-       &omap54xx_l4_per__timer3,
-       &omap54xx_l4_per__timer4,
-       &omap54xx_l4_abe__timer5,
-       &omap54xx_l4_abe__timer6,
-       &omap54xx_l4_abe__timer7,
-       &omap54xx_l4_abe__timer8,
-       &omap54xx_l4_per__timer9,
-       &omap54xx_l4_per__timer10,
-       &omap54xx_l4_per__timer11,
        &omap54xx_l4_cfg__usb_host_hs,
        &omap54xx_l4_cfg__usb_tll_hs,
        &omap54xx_l4_cfg__usb_otg_ss,
-       &omap54xx_l4_cfg__ocp2scp3,
        &omap54xx_l4_cfg__sata,
        NULL,
 };
index f8715bd9668706c94f2dadcd47de30000a4c97ef..acef3733db4c6b6c677db8456755e350d961c91b 100644 (file)
@@ -15,9 +15,6 @@
  */
 
 #include <linux/io.h>
-#include <linux/power/smartreflex.h>
-
-#include <linux/omap-dma.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
 /* Base offset for all DRA7XX interrupts external to MPUSS */
 #define DRA7XX_IRQ_GIC_START   32
 
-/* Base offset for all DRA7XX dma requests */
-#define DRA7XX_DMA_REQ_START   1
-
-
 /*
  * IP blocks
  */
@@ -283,156 +276,6 @@ static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
        },
 };
 
-/*
- * 'dcan' class
- *
- */
-
-static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
-       .name   = "dcan",
-};
-
-/* dcan1 */
-static struct omap_hwmod dra7xx_dcan1_hwmod = {
-       .name           = "dcan1",
-       .class          = &dra7xx_dcan_hwmod_class,
-       .clkdm_name     = "wkupaon_clkdm",
-       .main_clk       = "dcan1_sys_clk_mux",
-       .flags          = HWMOD_CLKDM_NOAUTO,
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* dcan2 */
-static struct omap_hwmod dra7xx_dcan2_hwmod = {
-       .name           = "dcan2",
-       .class          = &dra7xx_dcan_hwmod_class,
-       .clkdm_name     = "l4per2_clkdm",
-       .main_clk       = "sys_clkin1",
-       .flags          = HWMOD_CLKDM_NOAUTO,
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* pwmss  */
-static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x4,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                         SYSC_HAS_RESET_STATUS,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-/*
- * epwmss class
- */
-static struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
-       .name           = "epwmss",
-       .sysc           = &dra7xx_epwmss_sysc,
-};
-
-/* epwmss0 */
-static struct omap_hwmod dra7xx_epwmss0_hwmod = {
-       .name           = "epwmss0",
-       .class          = &dra7xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4per2_clkdm",
-       .main_clk       = "l4_root_clk_div",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-                       .clkctrl_offs   = DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
-                       .context_offs   = DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
-               },
-       },
-};
-
-/* epwmss1 */
-static struct omap_hwmod dra7xx_epwmss1_hwmod = {
-       .name           = "epwmss1",
-       .class          = &dra7xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4per2_clkdm",
-       .main_clk       = "l4_root_clk_div",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-                       .clkctrl_offs   = DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
-                       .context_offs   = DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
-               },
-       },
-};
-
-/* epwmss2 */
-static struct omap_hwmod dra7xx_epwmss2_hwmod = {
-       .name           = "epwmss2",
-       .class          = &dra7xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4per2_clkdm",
-       .main_clk       = "l4_root_clk_div",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-                       .clkctrl_offs   = DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
-                       .context_offs   = DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
-               },
-       },
-};
-
-/*
- * 'dma' class
- *
- */
-
-static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x002c,
-       .syss_offs      = 0x0028,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
-                          MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
-       .name   = "dma",
-       .sysc   = &dra7xx_dma_sysc,
-};
-
-/* dma dev_attr */
-static struct omap_dma_dev_attr dma_dev_attr = {
-       .dev_caps       = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
-                         IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
-       .lch_count      = 32,
-};
-
-/* dma_system */
-static struct omap_hwmod dra7xx_dma_system_hwmod = {
-       .name           = "dma_system",
-       .class          = &dra7xx_dma_hwmod_class,
-       .clkdm_name     = "dma_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
-               },
-       },
-       .dev_attr       = &dma_dev_attr,
-};
-
 /*
  * 'tpcc' class
  *
@@ -626,112 +469,9 @@ static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
        .parent_hwmod   = &dra7xx_dss_hwmod,
 };
 
-/* AES (the 'P' (public) device) */
-static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
-       .rev_offs       = 0x0080,
-       .sysc_offs      = 0x0084,
-       .syss_offs      = 0x0088,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
 
-static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
-       .name   = "aes",
-       .sysc   = &dra7xx_aes_sysc,
-};
 
-/* AES1 */
-static struct omap_hwmod dra7xx_aes1_hwmod = {
-       .name           = "aes1",
-       .class          = &dra7xx_aes_hwmod_class,
-       .clkdm_name     = "l4sec_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
-/* AES2 */
-static struct omap_hwmod dra7xx_aes2_hwmod = {
-       .name           = "aes2",
-       .class          = &dra7xx_aes_hwmod_class,
-       .clkdm_name     = "l4sec_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
-/* sha0 HIB2 (the 'P' (public) device) */
-static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
-       .rev_offs       = 0x100,
-       .sysc_offs      = 0x110,
-       .syss_offs      = 0x114,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
-
-static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
-       .name           = "sham",
-       .sysc           = &dra7xx_sha0_sysc,
-};
 
-static struct omap_hwmod dra7xx_sha0_hwmod = {
-       .name           = "sham",
-       .class          = &dra7xx_sha0_hwmod_class,
-       .clkdm_name     = "l4sec_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm           = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
-/*
- * 'elm' class
- *
- */
-
-static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
-       .name   = "elm",
-       .sysc   = &dra7xx_elm_sysc,
-};
-
-/* elm */
-
-static struct omap_hwmod dra7xx_elm_hwmod = {
-       .name           = "elm",
-       .class          = &dra7xx_elm_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
-               },
-       },
-};
 
 /*
  * 'gpmc' class
@@ -797,55 +537,6 @@ static struct omap_hwmod dra7xx_mpu_hwmod = {
        },
 };
 
-/*
- * 'ocp2scp' class
- *
- */
-
-static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
-       .name   = "ocp2scp",
-       .sysc   = &dra7xx_ocp2scp_sysc,
-};
-
-/* ocp2scp1 */
-static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
-       .name           = "ocp2scp1",
-       .class          = &dra7xx_ocp2scp_hwmod_class,
-       .clkdm_name     = "l3init_clkdm",
-       .main_clk       = "l4_root_clk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
-/* ocp2scp3 */
-static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
-       .name           = "ocp2scp3",
-       .class          = &dra7xx_ocp2scp_hwmod_class,
-       .clkdm_name     = "l3init_clkdm",
-       .main_clk       = "l4_root_clk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
 
 /*
  * 'PCIE' class
@@ -1031,103 +722,6 @@ static struct omap_hwmod dra7xx_sata_hwmod = {
        },
 };
 
-/*
- * 'smartreflex' class
- *
- */
-
-/* The IP is not compliant to type1 / type2 scheme */
-static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
-       .rev_offs       = -ENODEV,
-       .sysc_offs      = 0x0038,
-       .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap36xx_sr_sysc_fields,
-};
-
-static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
-       .name   = "smartreflex",
-       .sysc   = &dra7xx_smartreflex_sysc,
-};
-
-/* smartreflex_core */
-/* smartreflex_core dev_attr */
-static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
-       .sensor_voltdm_name     = "core",
-};
-
-static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
-       .name           = "smartreflex_core",
-       .class          = &dra7xx_smartreflex_hwmod_class,
-       .clkdm_name     = "coreaon_clkdm",
-       .main_clk       = "wkupaon_iclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &smartreflex_core_dev_attr,
-};
-
-/* smartreflex_mpu */
-/* smartreflex_mpu dev_attr */
-static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
-       .sensor_voltdm_name     = "mpu",
-};
-
-static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
-       .name           = "smartreflex_mpu",
-       .class          = &dra7xx_smartreflex_hwmod_class,
-       .clkdm_name     = "coreaon_clkdm",
-       .main_clk       = "wkupaon_iclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &smartreflex_mpu_dev_attr,
-};
-
-/*
- * 'spinlock' class
- *
- */
-
-static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
-                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
-       .name   = "spinlock",
-       .sysc   = &dra7xx_spinlock_sysc,
-};
-
-/* spinlock */
-static struct omap_hwmod dra7xx_spinlock_hwmod = {
-       .name           = "spinlock",
-       .class          = &dra7xx_spinlock_hwmod_class,
-       .clkdm_name     = "l4cfg_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
-               },
-       },
-};
-
 /*
  * 'timer' class
  *
@@ -1225,213 +819,6 @@ static struct omap_hwmod dra7xx_timer4_hwmod = {
        },
 };
 
-/* timer5 */
-static struct omap_hwmod dra7xx_timer5_hwmod = {
-       .name           = "timer5",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "ipu_clkdm",
-       .main_clk       = "timer5_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer6 */
-static struct omap_hwmod dra7xx_timer6_hwmod = {
-       .name           = "timer6",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "ipu_clkdm",
-       .main_clk       = "timer6_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer7 */
-static struct omap_hwmod dra7xx_timer7_hwmod = {
-       .name           = "timer7",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "ipu_clkdm",
-       .main_clk       = "timer7_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer8 */
-static struct omap_hwmod dra7xx_timer8_hwmod = {
-       .name           = "timer8",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "ipu_clkdm",
-       .main_clk       = "timer8_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer9 */
-static struct omap_hwmod dra7xx_timer9_hwmod = {
-       .name           = "timer9",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer9_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer10 */
-static struct omap_hwmod dra7xx_timer10_hwmod = {
-       .name           = "timer10",
-       .class          = &dra7xx_timer_1ms_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer10_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer11 */
-static struct omap_hwmod dra7xx_timer11_hwmod = {
-       .name           = "timer11",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "l4per_clkdm",
-       .main_clk       = "timer11_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer12 */
-static struct omap_hwmod dra7xx_timer12_hwmod = {
-       .name           = "timer12",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "wkupaon_clkdm",
-       .main_clk       = "secure_32k_clk_src_ck",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET,
-               },
-       },
-};
-
-/* timer13 */
-static struct omap_hwmod dra7xx_timer13_hwmod = {
-       .name           = "timer13",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "l4per3_clkdm",
-       .main_clk       = "timer13_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer14 */
-static struct omap_hwmod dra7xx_timer14_hwmod = {
-       .name           = "timer14",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "l4per3_clkdm",
-       .main_clk       = "timer14_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer15 */
-static struct omap_hwmod dra7xx_timer15_hwmod = {
-       .name           = "timer15",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "l4per3_clkdm",
-       .main_clk       = "timer15_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* timer16 */
-static struct omap_hwmod dra7xx_timer16_hwmod = {
-       .name           = "timer16",
-       .class          = &dra7xx_timer_hwmod_class,
-       .clkdm_name     = "l4per3_clkdm",
-       .main_clk       = "timer16_gfclk_mux",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* DES (the 'P' (public) device) */
-static struct omap_hwmod_class_sysconfig dra7xx_des_sysc = {
-       .rev_offs       = 0x0030,
-       .sysc_offs      = 0x0034,
-       .syss_offs      = 0x0038,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
-
-static struct omap_hwmod_class dra7xx_des_hwmod_class = {
-       .name   = "des",
-       .sysc   = &dra7xx_des_sysc,
-};
-
-/* DES */
-static struct omap_hwmod dra7xx_des_hwmod = {
-       .name           = "des",
-       .class          = &dra7xx_des_hwmod_class,
-       .clkdm_name     = "l4sec_clkdm",
-       .main_clk       = "l3_iclk_div",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET,
-                       .context_offs = DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET,
-                       .modulemode   = MODULEMODE_HWCTRL,
-               },
-       },
-};
-
 /*
  * 'usb_otg_ss' class
  *
@@ -1690,30 +1077,6 @@ static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_wkup -> dcan1 */
-static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
-       .master         = &dra7xx_l4_wkup_hwmod,
-       .slave          = &dra7xx_dcan1_hwmod,
-       .clk            = "wkupaon_iclk_mux",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per2 -> dcan2 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
-       .master         = &dra7xx_l4_per2_hwmod,
-       .slave          = &dra7xx_dcan2_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> dma_system */
-static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
-       .master         = &dra7xx_l4_cfg_hwmod,
-       .slave          = &dra7xx_dma_system_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_1 -> tpcc */
 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
        .master         = &dra7xx_l3_main_1_hwmod,
@@ -1762,38 +1125,6 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l3_main_1 -> aes1 */
-static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1 = {
-       .master         = &dra7xx_l3_main_1_hwmod,
-       .slave          = &dra7xx_aes1_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3_main_1 -> aes2 */
-static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2 = {
-       .master         = &dra7xx_l3_main_1_hwmod,
-       .slave          = &dra7xx_aes2_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3_main_1 -> sha0 */
-static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0 = {
-       .master         = &dra7xx_l3_main_1_hwmod,
-       .slave          = &dra7xx_sha0_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per1 -> elm */
-static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
-       .master         = &dra7xx_l4_per1_hwmod,
-       .slave          = &dra7xx_elm_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_1 -> gpmc */
 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
        .master         = &dra7xx_l3_main_1_hwmod,
@@ -1810,22 +1141,6 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> ocp2scp1 */
-static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
-       .master         = &dra7xx_l4_cfg_hwmod,
-       .slave          = &dra7xx_ocp2scp1_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> ocp2scp3 */
-static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
-       .master         = &dra7xx_l4_cfg_hwmod,
-       .slave          = &dra7xx_ocp2scp3_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_1 -> pciess1 */
 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
        .master         = &dra7xx_l3_main_1_hwmod,
@@ -1882,30 +1197,6 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_cfg -> smartreflex_core */
-static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
-       .master         = &dra7xx_l4_cfg_hwmod,
-       .slave          = &dra7xx_smartreflex_core_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> smartreflex_mpu */
-static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
-       .master         = &dra7xx_l4_cfg_hwmod,
-       .slave          = &dra7xx_smartreflex_mpu_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_cfg -> spinlock */
-static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
-       .master         = &dra7xx_l4_cfg_hwmod,
-       .slave          = &dra7xx_spinlock_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_wkup -> timer1 */
 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
        .master         = &dra7xx_l4_wkup_hwmod,
@@ -1938,110 +1229,6 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_per3 -> timer5 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer5_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per3 -> timer6 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer6_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per3 -> timer7 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer7_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per3 -> timer8 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer8_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per1 -> timer9 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
-       .master         = &dra7xx_l4_per1_hwmod,
-       .slave          = &dra7xx_timer9_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per1 -> timer10 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
-       .master         = &dra7xx_l4_per1_hwmod,
-       .slave          = &dra7xx_timer10_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per1 -> timer11 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
-       .master         = &dra7xx_l4_per1_hwmod,
-       .slave          = &dra7xx_timer11_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_wkup -> timer12 */
-static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12 = {
-       .master         = &dra7xx_l4_wkup_hwmod,
-       .slave          = &dra7xx_timer12_hwmod,
-       .clk            = "wkupaon_iclk_mux",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per3 -> timer13 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer13_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per3 -> timer14 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer14_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per3 -> timer15 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer15_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per3 -> timer16 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
-       .master         = &dra7xx_l4_per3_hwmod,
-       .slave          = &dra7xx_timer16_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4_per1 -> des */
-static struct omap_hwmod_ocp_if dra7xx_l4_per1__des = {
-       .master         = &dra7xx_l4_per1_hwmod,
-       .slave          = &dra7xx_des_hwmod,
-       .clk            = "l3_iclk_div",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l4_per3 -> usb_otg_ss1 */
 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
        .master         = &dra7xx_l4_per3_hwmod,
@@ -2106,30 +1293,6 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4_per2 -> epwmss0 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
-       .master         = &dra7xx_l4_per2_hwmod,
-       .slave          = &dra7xx_epwmss0_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_per2 -> epwmss1 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
-       .master         = &dra7xx_l4_per2_hwmod,
-       .slave          = &dra7xx_epwmss1_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4_per2 -> epwmss2 */
-static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
-       .master         = &dra7xx_l4_per2_hwmod,
-       .slave          = &dra7xx_epwmss2_hwmod,
-       .clk            = "l4_root_clk_div",
-       .user           = OCP_USER_MPU,
-};
-
 static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
        &dra7xx_l3_main_1__dmm,
        &dra7xx_l3_main_2__l3_instr,
@@ -2146,48 +1309,24 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
        &dra7xx_l3_main_1__bb2d,
        &dra7xx_l4_wkup__counter_32k,
        &dra7xx_l4_wkup__ctrl_module_wkup,
-       &dra7xx_l4_wkup__dcan1,
-       &dra7xx_l4_per2__dcan2,
-       &dra7xx_l4_cfg__dma_system,
        &dra7xx_l3_main_1__tpcc,
        &dra7xx_l3_main_1__tptc0,
        &dra7xx_l3_main_1__tptc1,
        &dra7xx_l3_main_1__dss,
        &dra7xx_l3_main_1__dispc,
        &dra7xx_l3_main_1__hdmi,
-       &dra7xx_l3_main_1__aes1,
-       &dra7xx_l3_main_1__aes2,
-       &dra7xx_l3_main_1__sha0,
-       &dra7xx_l4_per1__elm,
        &dra7xx_l3_main_1__gpmc,
        &dra7xx_l4_cfg__mpu,
-       &dra7xx_l4_cfg__ocp2scp1,
-       &dra7xx_l4_cfg__ocp2scp3,
        &dra7xx_l3_main_1__pciess1,
        &dra7xx_l4_cfg__pciess1,
        &dra7xx_l3_main_1__pciess2,
        &dra7xx_l4_cfg__pciess2,
        &dra7xx_l3_main_1__qspi,
        &dra7xx_l4_cfg__sata,
-       &dra7xx_l4_cfg__smartreflex_core,
-       &dra7xx_l4_cfg__smartreflex_mpu,
-       &dra7xx_l4_cfg__spinlock,
        &dra7xx_l4_wkup__timer1,
        &dra7xx_l4_per1__timer2,
        &dra7xx_l4_per1__timer3,
        &dra7xx_l4_per1__timer4,
-       &dra7xx_l4_per3__timer5,
-       &dra7xx_l4_per3__timer6,
-       &dra7xx_l4_per3__timer7,
-       &dra7xx_l4_per3__timer8,
-       &dra7xx_l4_per1__timer9,
-       &dra7xx_l4_per1__timer10,
-       &dra7xx_l4_per1__timer11,
-       &dra7xx_l4_per3__timer13,
-       &dra7xx_l4_per3__timer14,
-       &dra7xx_l4_per3__timer15,
-       &dra7xx_l4_per3__timer16,
-       &dra7xx_l4_per1__des,
        &dra7xx_l4_per3__usb_otg_ss1,
        &dra7xx_l4_per3__usb_otg_ss2,
        &dra7xx_l4_per3__usb_otg_ss3,
@@ -2195,15 +1334,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
        &dra7xx_l4_per2__vcp1,
        &dra7xx_l3_main_1__vcp2,
        &dra7xx_l4_per2__vcp2,
-       &dra7xx_l4_per2__epwmss0,
-       &dra7xx_l4_per2__epwmss1,
-       &dra7xx_l4_per2__epwmss2,
-       NULL,
-};
-
-/* GP-only hwmod links */
-static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
-       &dra7xx_l4_wkup__timer12,
        NULL,
 };
 
@@ -2256,8 +1386,5 @@ int __init dra7xx_hwmod_init(void)
                }
        }
 
-       if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
-               ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
-
        return ret;
 }
index ca56563e3fec4e198eb8c44a405d8d36e3344c27..c85cb8b5831cdbff5a8d241ac76ce84b83b7b13c 100644 (file)
@@ -98,7 +98,6 @@ extern struct omap_hwmod_class omap2_hdq1w_class;
 extern struct omap_hwmod_class omap2xxx_timer_hwmod_class;
 extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class;
 extern struct omap_hwmod_class omap2xxx_gpio_hwmod_class;
-extern struct omap_hwmod_class omap2xxx_dma_hwmod_class;
 extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class;
 extern struct omap_hwmod_class omap2xxx_mcspi_class;
 
index d5ddba00bb7310bf0120902e2837dbddc4e90713..143623bb056db0e1bbdd3a5f077e57887e4229c6 100644 (file)
@@ -26,8 +26,6 @@
 #include <linux/kernel.h>
 #include <linux/errno.h>
 
-#include <sound/aess.h>
-
 #include "omap_hwmod.h"
 #include "common.h"
 
 #define OMAP_RTC_STATUS_BUSY   BIT(0)
 #define OMAP_RTC_MAX_READY_TIME        50
 
-/**
- * omap_hwmod_aess_preprogram - enable AESS internal autogating
- * @oh: struct omap_hwmod *
- *
- * The AESS will not IdleAck to the PRCM until its internal autogating
- * is enabled.  Since internal autogating is disabled by default after
- * AESS reset, we must enable autogating after the hwmod code resets
- * the AESS.  Returns 0.
- */
-int omap_hwmod_aess_preprogram(struct omap_hwmod *oh)
-{
-       void __iomem *va;
-
-       va = omap_hwmod_get_mpu_rt_va(oh);
-       if (!va)
-               return -EINVAL;
-
-       aess_enable_autogating(va);
-
-       return 0;
-}
-
 /**
  * omap_rtc_wait_not_busy - Wait for the RTC BUSY flag
  * @oh: struct omap_hwmod *
index ca52271de5a880d7e7e51bb05b21efc04ae706aa..dbb7c2acef31eb1c0645438a851a007327605afe 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/platform_data/ti-sysc.h>
 #include <linux/platform_data/wkup_m3.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
+#include <linux/platform_data/ti-prm.h>
 
 #include "clockdomain.h"
 #include "common.h"
@@ -42,6 +43,17 @@ struct pdata_init {
 static struct of_dev_auxdata omap_auxdata_lookup[];
 static struct twl4030_gpio_platform_data twl_gpio_auxdata;
 
+#if IS_ENABLED(CONFIG_OMAP_IOMMU)
+int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
+                                   u8 *pwrst);
+#else
+static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev,
+                                                 bool request, u8 *pwrst)
+{
+       return 0;
+}
+#endif
+
 #ifdef CONFIG_MACH_NOKIA_N8X0
 static void __init omap2420_n8x0_legacy_init(void)
 {
@@ -260,16 +272,6 @@ static void __init omap3_pandora_legacy_init(void)
 }
 #endif /* CONFIG_ARCH_OMAP3 */
 
-#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
-static struct iommu_platform_data omap4_iommu_pdata = {
-       .reset_name = "mmu_cache",
-       .assert_reset = omap_device_assert_hardreset,
-       .deassert_reset = omap_device_deassert_hardreset,
-       .device_enable = omap_device_enable,
-       .device_idle = omap_device_idle,
-};
-#endif
-
 #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
 static struct wkup_m3_platform_data wkup_m3_data = {
        .reset_name = "wkup_m3",
@@ -285,6 +287,10 @@ static void __init omap5_uevm_legacy_init(void)
 #endif
 
 #ifdef CONFIG_SOC_DRA7XX
+static struct iommu_platform_data dra7_ipu1_dsp_iommu_pdata = {
+       .set_pwrdm_constraint = omap_iommu_set_pwrdm_constraint,
+};
+
 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1;
 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2;
 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3;
@@ -306,10 +312,14 @@ static void __init dra7x_evm_mmc_quirk(void)
 
 static struct clockdomain *ti_sysc_find_one_clockdomain(struct clk *clk)
 {
+       struct clk_hw *hw = __clk_get_hw(clk);
        struct clockdomain *clkdm = NULL;
        struct clk_hw_omap *hwclk;
 
-       hwclk = to_clk_hw_omap(__clk_get_hw(clk));
+       hwclk = to_clk_hw_omap(hw);
+       if (!omap2_clk_is_hw_omap(hw))
+               return NULL;
+
        if (hwclk && hwclk->clkdm_name)
                clkdm = clkdm_lookup(hwclk->clkdm_name);
 
@@ -408,6 +418,12 @@ void omap_pcs_legacy_init(int irq, void (*rearm)(void))
        pcs_pdata.rearm = rearm;
 }
 
+static struct ti_prm_platform_data ti_prm_pdata = {
+       .clkdm_deny_idle = clkdm_deny_idle,
+       .clkdm_allow_idle = clkdm_allow_idle,
+       .clkdm_lookup = clkdm_lookup,
+};
+
 /*
  * GPIOs for TWL are initialized by the I2C bus and need custom
  * handing until DSS has device tree bindings.
@@ -488,10 +504,6 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
                       &wkup_m3_data),
 #endif
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
-       OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
-                      &omap4_iommu_pdata),
-       OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
-                      &omap4_iommu_pdata),
        OF_DEV_AUXDATA("ti,omap4-smartreflex-iva", 0x4a0db000,
                       "4a0db000.smartreflex", &omap_sr_pdata[OMAP_SR_IVA]),
        OF_DEV_AUXDATA("ti,omap4-smartreflex-core", 0x4a0dd000,
@@ -506,10 +518,18 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
                       &dra7_hsmmc_data_mmc2),
        OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc",
                       &dra7_hsmmc_data_mmc3),
+       OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x40d01000, "40d01000.mmu",
+                      &dra7_ipu1_dsp_iommu_pdata),
+       OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x41501000, "41501000.mmu",
+                      &dra7_ipu1_dsp_iommu_pdata),
+       OF_DEV_AUXDATA("ti,dra7-iommu", 0x58882000, "58882000.mmu",
+                      &dra7_ipu1_dsp_iommu_pdata),
 #endif
        /* Common auxdata */
        OF_DEV_AUXDATA("ti,sysc", 0, NULL, &ti_sysc_pdata),
        OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
+       OF_DEV_AUXDATA("ti,omap-prm-inst", 0, NULL, &ti_prm_pdata),
+       OF_DEV_AUXDATA("ti,omap-sdma", 0, NULL, &dma_plat_info),
        { /* sentinel */ },
 };
 
index 1581b6a6a416c9ddd477376ab279f2956b017bd8..6953c47d8dc6816042999650ec0d53c7a792d4ee 100644 (file)
@@ -83,8 +83,6 @@ static int omap2_enter_full_retention(void)
        l = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0) | OMAP24XX_USBSTANDBYCTRL;
        omap_ctrl_writel(l, OMAP2_CONTROL_DEVCONF0);
 
-       cpu_cluster_pm_enter();
-
        /* One last check for pending IRQs to avoid extra latency due
         * to sleeping unnecessarily. */
        if (omap_irq_pending())
@@ -96,8 +94,6 @@ static int omap2_enter_full_retention(void)
                           OMAP_SDRC_REGADDR(SDRC_POWER));
 
 no_sleep:
-       cpu_cluster_pm_exit();
-
        clk_enable(osc_ck);
 
        /* clear CORE wake-up events */
@@ -162,25 +158,27 @@ static int omap2_can_sleep(void)
                return 0;
        if (__clk_is_enabled(osc_ck))
                return 0;
-       if (omap_dma_running())
-               return 0;
 
        return 1;
 }
 
 static void omap2_pm_idle(void)
 {
-       if (!omap2_can_sleep()) {
-               if (omap_irq_pending())
-                       return;
-               omap2_enter_mpu_retention();
-               return;
-       }
+       int error;
 
        if (omap_irq_pending())
                return;
 
+       error = cpu_cluster_pm_enter();
+       if (error || !omap2_can_sleep()) {
+               omap2_enter_mpu_retention();
+               goto out_cpu_cluster_pm;
+       }
+
        omap2_enter_full_retention();
+
+out_cpu_cluster_pm:
+       cpu_cluster_pm_exit();
 }
 
 static void __init prcm_setup_regs(void)
index 54254fc92c2ed93488b672116c27b4d0defe764f..e66e9948636cb37a0493d2cd3c91397642b19618 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <linux/omap-dma.h>
 #include <linux/omap-gpmc.h>
 
 #include <trace/events/power.h>
@@ -85,7 +84,6 @@ static void omap3_core_save_context(void)
        omap3_gpmc_save_context();
        /* Save the system control module context, padconf already save above*/
        omap3_control_save_context();
-       omap_dma_global_context_save();
 }
 
 static void omap3_core_restore_context(void)
@@ -96,7 +94,6 @@ static void omap3_core_restore_context(void)
        omap3_gpmc_restore_context();
        /* Restore the interrupt controller context */
        omap_intc_restore_context();
-       omap_dma_global_context_restore();
 }
 
 /*
@@ -547,9 +544,7 @@ int __init omap3_pm_init(void)
 
                local_irq_disable();
 
-               omap_dma_global_context_save();
                omap3_save_secure_ram_context();
-               omap_dma_global_context_restore();
 
                local_irq_enable();
        }
index e2ad14e77064ccd6cb15fd3140b9a274b9042cde..7078a61c1d3fc25328834881770c1f2f6dd2802c 100644 (file)
@@ -68,6 +68,7 @@
 #define AM43XX_CM_PER_ICSS_CDOFFS                      0x0300
 #define AM43XX_CM_PER_L4LS_CDOFFS                      0x0400
 #define AM43XX_CM_PER_EMIF_CDOFFS                      0x0700
+#define AM43XX_CM_PER_LCDC_CDOFFS                      0x0800
 #define AM43XX_CM_PER_DSS_CDOFFS                       0x0a00
 #define AM43XX_CM_PER_CPSW_CDOFFS                      0x0b00
 #define AM43XX_CM_PER_OCPWP_L3_CDOFFS                  0x0c00
index 08c99413d02caac340f9855ebd162a59ac1126ed..7d859994ff9517631615f235b8b8fd5f8cb6d0e8 100644 (file)
@@ -65,18 +65,9 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
 static struct omap_system_dma_plat_info *p;
 static struct omap_dma_dev_attr *d;
 static void omap_clear_dma(int lch);
-static int omap_dma_set_prio_lch(int lch, unsigned char read_prio,
-                                unsigned char write_prio);
 static int enable_1510_mode;
 static u32 errata;
 
-static struct omap_dma_global_context_registers {
-       u32 dma_irqenable_l0;
-       u32 dma_irqenable_l1;
-       u32 dma_ocp_sysconfig;
-       u32 dma_gcr;
-} omap_dma_global_context;
-
 struct dma_link_info {
        int *linked_dmach_q;
        int no_of_lchs_linked;
@@ -90,42 +81,6 @@ struct dma_link_info {
 
 };
 
-static struct dma_link_info *dma_linked_lch;
-
-#ifndef CONFIG_ARCH_OMAP1
-
-/* Chain handling macros */
-#define OMAP_DMA_CHAIN_QINIT(chain_id)                                 \
-       do {                                                            \
-               dma_linked_lch[chain_id].q_head =                       \
-               dma_linked_lch[chain_id].q_tail =                       \
-               dma_linked_lch[chain_id].q_count = 0;                   \
-       } while (0)
-#define OMAP_DMA_CHAIN_QFULL(chain_id)                                 \
-               (dma_linked_lch[chain_id].no_of_lchs_linked ==          \
-               dma_linked_lch[chain_id].q_count)
-#define OMAP_DMA_CHAIN_QLAST(chain_id)                                 \
-       do {                                                            \
-               ((dma_linked_lch[chain_id].no_of_lchs_linked-1) ==      \
-               dma_linked_lch[chain_id].q_count)                       \
-       } while (0)
-#define OMAP_DMA_CHAIN_QEMPTY(chain_id)                                        \
-               (0 == dma_linked_lch[chain_id].q_count)
-#define __OMAP_DMA_CHAIN_INCQ(end)                                     \
-       ((end) = ((end)+1) % dma_linked_lch[chain_id].no_of_lchs_linked)
-#define OMAP_DMA_CHAIN_INCQHEAD(chain_id)                              \
-       do {                                                            \
-               __OMAP_DMA_CHAIN_INCQ(dma_linked_lch[chain_id].q_head); \
-               dma_linked_lch[chain_id].q_count--;                     \
-       } while (0)
-
-#define OMAP_DMA_CHAIN_INCQTAIL(chain_id)                              \
-       do {                                                            \
-               __OMAP_DMA_CHAIN_INCQ(dma_linked_lch[chain_id].q_tail); \
-               dma_linked_lch[chain_id].q_count++; \
-       } while (0)
-#endif
-
 static int dma_lch_count;
 static int dma_chan_count;
 static int omap_dma_reserve_channels;
@@ -137,9 +92,6 @@ static inline void disable_lnk(int lch);
 static void omap_disable_channel_irq(int lch);
 static inline void omap_enable_channel_irq(int lch);
 
-#define REVISIT_24XX()         printk(KERN_ERR "FIXME: no %s on 24xx\n", \
-                                               __func__);
-
 #ifdef CONFIG_ARCH_OMAP15XX
 /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
 static int omap_dma_in_1510_mode(void)
@@ -278,19 +230,6 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
 }
 EXPORT_SYMBOL(omap_set_dma_transfer_params);
 
-void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode)
-{
-       if (dma_omap2plus()) {
-               u32 csdp;
-
-               csdp = p->dma_read(CSDP, lch);
-               csdp &= ~(0x3 << 16);
-               csdp |= (mode << 16);
-               p->dma_write(csdp, CSDP, lch);
-       }
-}
-EXPORT_SYMBOL(omap_set_dma_write_mode);
-
 void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode mode)
 {
        if (dma_omap1() && !dma_omap15xx()) {
@@ -332,25 +271,6 @@ void omap_set_dma_src_params(int lch, int src_port, int src_amode,
 }
 EXPORT_SYMBOL(omap_set_dma_src_params);
 
-void omap_set_dma_params(int lch, struct omap_dma_channel_params *params)
-{
-       omap_set_dma_transfer_params(lch, params->data_type,
-                                    params->elem_count, params->frame_count,
-                                    params->sync_mode, params->trigger,
-                                    params->src_or_dst_synch);
-       omap_set_dma_src_params(lch, params->src_port,
-                               params->src_amode, params->src_start,
-                               params->src_ei, params->src_fi);
-
-       omap_set_dma_dest_params(lch, params->dst_port,
-                                params->dst_amode, params->dst_start,
-                                params->dst_ei, params->dst_fi);
-       if (params->read_prio || params->write_prio)
-               omap_dma_set_prio_lch(lch, params->read_prio,
-                                     params->write_prio);
-}
-EXPORT_SYMBOL(omap_set_dma_params);
-
 void omap_set_dma_src_data_pack(int lch, int enable)
 {
        u32 l;
@@ -507,12 +427,6 @@ static inline void omap_disable_channel_irq(int lch)
                p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
 }
 
-void omap_enable_dma_irq(int lch, u16 bits)
-{
-       dma_chan[lch].enabled_irqs |= bits;
-}
-EXPORT_SYMBOL(omap_enable_dma_irq);
-
 void omap_disable_dma_irq(int lch, u16 bits)
 {
        dma_chan[lch].enabled_irqs &= ~bits;
@@ -532,12 +446,6 @@ static inline void enable_lnk(int lch)
        if (dma_chan[lch].next_lch != -1)
                l = dma_chan[lch].next_lch | (1 << 15);
 
-#ifndef CONFIG_ARCH_OMAP1
-       if (dma_omap2plus())
-               if (dma_chan[lch].next_linked_ch != -1)
-                       l = dma_chan[lch].next_linked_ch | (1 << 15);
-#endif
-
        p->dma_write(l, CLNK_CTRL, lch);
 }
 
@@ -564,42 +472,6 @@ static inline void disable_lnk(int lch)
        dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 
-static inline void omap2_enable_irq_lch(int lch)
-{
-       u32 val;
-       unsigned long flags;
-
-       if (dma_omap1())
-               return;
-
-       spin_lock_irqsave(&dma_chan_lock, flags);
-       /* clear IRQ STATUS */
-       p->dma_write(1 << lch, IRQSTATUS_L0, lch);
-       /* Enable interrupt */
-       val = p->dma_read(IRQENABLE_L0, lch);
-       val |= 1 << lch;
-       p->dma_write(val, IRQENABLE_L0, lch);
-       spin_unlock_irqrestore(&dma_chan_lock, flags);
-}
-
-static inline void omap2_disable_irq_lch(int lch)
-{
-       u32 val;
-       unsigned long flags;
-
-       if (dma_omap1())
-               return;
-
-       spin_lock_irqsave(&dma_chan_lock, flags);
-       /* Disable interrupt */
-       val = p->dma_read(IRQENABLE_L0, lch);
-       val &= ~(1 << lch);
-       p->dma_write(val, IRQENABLE_L0, lch);
-       /* clear IRQ STATUS */
-       p->dma_write(1 << lch, IRQSTATUS_L0, lch);
-       spin_unlock_irqrestore(&dma_chan_lock, flags);
-}
-
 int omap_request_dma(int dev_id, const char *dev_name,
                     void (*callback)(int lch, u16 ch_status, void *data),
                     void *data, int *dma_ch_out)
@@ -628,9 +500,6 @@ int omap_request_dma(int dev_id, const char *dev_name,
        if (p->clear_lch_regs)
                p->clear_lch_regs(free_ch);
 
-       if (dma_omap2plus())
-               omap_clear_dma(free_ch);
-
        spin_unlock_irqrestore(&dma_chan_lock, flags);
 
        chan->dev_name = dev_name;
@@ -638,20 +507,10 @@ int omap_request_dma(int dev_id, const char *dev_name,
        chan->data = data;
        chan->flags = 0;
 
-#ifndef CONFIG_ARCH_OMAP1
-       if (dma_omap2plus()) {
-               chan->chain_id = -1;
-               chan->next_linked_ch = -1;
-       }
-#endif
-
        chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ;
 
        if (dma_omap1())
                chan->enabled_irqs |= OMAP1_DMA_TOUT_IRQ;
-       else if (dma_omap2plus())
-               chan->enabled_irqs |= OMAP2_DMA_MISALIGNED_ERR_IRQ |
-                       OMAP2_DMA_TRANS_ERR_IRQ;
 
        if (dma_omap16xx()) {
                /* If the sync device is set, configure it dynamically. */
@@ -668,11 +527,6 @@ int omap_request_dma(int dev_id, const char *dev_name,
                p->dma_write(dev_id, CCR, free_ch);
        }
 
-       if (dma_omap2plus()) {
-               omap_enable_channel_irq(free_ch);
-               omap2_enable_irq_lch(free_ch);
-       }
-
        *dma_ch_out = free_ch;
 
        return 0;
@@ -689,20 +543,12 @@ void omap_free_dma(int lch)
                return;
        }
 
-       /* Disable interrupt for logical channel */
-       if (dma_omap2plus())
-               omap2_disable_irq_lch(lch);
-
        /* Disable all DMA interrupts for the channel. */
        omap_disable_channel_irq(lch);
 
        /* Make sure the DMA transfer is stopped. */
        p->dma_write(0, CCR, lch);
 
-       /* Clear registers */
-       if (dma_omap2plus())
-               omap_clear_dma(lch);
-
        spin_lock_irqsave(&dma_chan_lock, flags);
        dma_chan[lch].dev_id = -1;
        dma_chan[lch].next_lch = -1;
@@ -711,71 +557,6 @@ void omap_free_dma(int lch)
 }
 EXPORT_SYMBOL(omap_free_dma);
 
-/**
- * @brief omap_dma_set_global_params : Set global priority settings for dma
- *
- * @param arb_rate
- * @param max_fifo_depth
- * @param tparams - Number of threads to reserve : DMA_THREAD_RESERVE_NORM
- *                                                DMA_THREAD_RESERVE_ONET
- *                                                DMA_THREAD_RESERVE_TWOT
- *                                                DMA_THREAD_RESERVE_THREET
- */
-void
-omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
-{
-       u32 reg;
-
-       if (dma_omap1()) {
-               printk(KERN_ERR "FIXME: no %s on 15xx/16xx\n", __func__);
-               return;
-       }
-
-       if (max_fifo_depth == 0)
-               max_fifo_depth = 1;
-       if (arb_rate == 0)
-               arb_rate = 1;
-
-       reg = 0xff & max_fifo_depth;
-       reg |= (0x3 & tparams) << 12;
-       reg |= (arb_rate & 0xff) << 16;
-
-       p->dma_write(reg, GCR, 0);
-}
-EXPORT_SYMBOL(omap_dma_set_global_params);
-
-/**
- * @brief omap_dma_set_prio_lch : Set channel wise priority settings
- *
- * @param lch
- * @param read_prio - Read priority
- * @param write_prio - Write priority
- * Both of the above can be set with one of the following values :
- *     DMA_CH_PRIO_HIGH/DMA_CH_PRIO_LOW
- */
-static int
-omap_dma_set_prio_lch(int lch, unsigned char read_prio,
-                     unsigned char write_prio)
-{
-       u32 l;
-
-       if (unlikely((lch < 0 || lch >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid channel id\n");
-               return -EINVAL;
-       }
-       l = p->dma_read(CCR, lch);
-       l &= ~((1 << 6) | (1 << 26));
-       if (d->dev_caps & IS_RW_PRIORITY)
-               l |= ((read_prio & 0x1) << 6) | ((write_prio & 0x1) << 26);
-       else
-               l |= ((read_prio & 0x1) << 6);
-
-       p->dma_write(l, CCR, lch);
-
-       return 0;
-}
-
-
 /*
  * Clears any DMA state so the DMA engine is ready to restart with new buffers
  * through omap_start_dma(). Any buffers in flight are discarded.
@@ -926,29 +707,6 @@ EXPORT_SYMBOL(omap_stop_dma);
  * Allows changing the DMA callback function or data. This may be needed if
  * the driver shares a single DMA channel for multiple dma triggers.
  */
-int omap_set_dma_callback(int lch,
-                         void (*callback)(int lch, u16 ch_status, void *data),
-                         void *data)
-{
-       unsigned long flags;
-
-       if (lch < 0)
-               return -ENODEV;
-
-       spin_lock_irqsave(&dma_chan_lock, flags);
-       if (dma_chan[lch].dev_id == -1) {
-               printk(KERN_ERR "DMA callback for not set for free channel\n");
-               spin_unlock_irqrestore(&dma_chan_lock, flags);
-               return -EINVAL;
-       }
-       dma_chan[lch].callback = callback;
-       dma_chan[lch].data = data;
-       spin_unlock_irqrestore(&dma_chan_lock, flags);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_set_dma_callback);
-
 /*
  * Returns current physical source address for the given DMA channel.
  * If the channel is running the caller must disable interrupts prior calling
@@ -1048,34 +806,6 @@ int omap_dma_running(void)
        return 0;
 }
 
-/*
- * lch_queue DMA will start right after lch_head one is finished.
- * For this DMA link to start, you still need to start (see omap_start_dma)
- * the first one. That will fire up the entire queue.
- */
-void omap_dma_link_lch(int lch_head, int lch_queue)
-{
-       if (omap_dma_in_1510_mode()) {
-               if (lch_head == lch_queue) {
-                       p->dma_write(p->dma_read(CCR, lch_head) | (3 << 8),
-                                                               CCR, lch_head);
-                       return;
-               }
-               printk(KERN_ERR "DMA linking is not supported in 1510 mode\n");
-               BUG();
-               return;
-       }
-
-       if ((dma_chan[lch_head].dev_id == -1) ||
-           (dma_chan[lch_queue].dev_id == -1)) {
-               pr_err("omap_dma: trying to link non requested channels\n");
-               dump_stack();
-       }
-
-       dma_chan[lch_head].next_lch = lch_queue;
-}
-EXPORT_SYMBOL(omap_dma_link_lch);
-
 /*----------------------------------------------------------------------------*/
 
 #ifdef CONFIG_ARCH_OMAP1
@@ -1136,145 +866,6 @@ static irqreturn_t omap1_dma_irq_handler(int irq, void *dev_id)
 #define omap1_dma_irq_handler  NULL
 #endif
 
-#ifdef CONFIG_ARCH_OMAP2PLUS
-
-static int omap2_dma_handle_ch(int ch)
-{
-       u32 status = p->dma_read(CSR, ch);
-
-       if (!status) {
-               if (printk_ratelimit())
-                       pr_warn("Spurious DMA IRQ for lch %d\n", ch);
-               p->dma_write(1 << ch, IRQSTATUS_L0, ch);
-               return 0;
-       }
-       if (unlikely(dma_chan[ch].dev_id == -1)) {
-               if (printk_ratelimit())
-                       pr_warn("IRQ %04x for non-allocated DMA channel %d\n",
-                               status, ch);
-               return 0;
-       }
-       if (unlikely(status & OMAP_DMA_DROP_IRQ))
-               pr_info("DMA synchronization event drop occurred with device %d\n",
-                       dma_chan[ch].dev_id);
-       if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) {
-               printk(KERN_INFO "DMA transaction error with device %d\n",
-                      dma_chan[ch].dev_id);
-               if (IS_DMA_ERRATA(DMA_ERRATA_i378)) {
-                       u32 ccr;
-
-                       ccr = p->dma_read(CCR, ch);
-                       ccr &= ~OMAP_DMA_CCR_EN;
-                       p->dma_write(ccr, CCR, ch);
-                       dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE;
-               }
-       }
-       if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ))
-               printk(KERN_INFO "DMA secure error with device %d\n",
-                      dma_chan[ch].dev_id);
-       if (unlikely(status & OMAP2_DMA_MISALIGNED_ERR_IRQ))
-               printk(KERN_INFO "DMA misaligned error with device %d\n",
-                      dma_chan[ch].dev_id);
-
-       p->dma_write(status, CSR, ch);
-       p->dma_write(1 << ch, IRQSTATUS_L0, ch);
-       /* read back the register to flush the write */
-       p->dma_read(IRQSTATUS_L0, ch);
-
-       /* If the ch is not chained then chain_id will be -1 */
-       if (dma_chan[ch].chain_id != -1) {
-               int chain_id = dma_chan[ch].chain_id;
-               dma_chan[ch].state = DMA_CH_NOTSTARTED;
-               if (p->dma_read(CLNK_CTRL, ch) & (1 << 15))
-                       dma_chan[dma_chan[ch].next_linked_ch].state =
-                                                       DMA_CH_STARTED;
-               if (dma_linked_lch[chain_id].chain_mode ==
-                                               OMAP_DMA_DYNAMIC_CHAIN)
-                       disable_lnk(ch);
-
-               if (!OMAP_DMA_CHAIN_QEMPTY(chain_id))
-                       OMAP_DMA_CHAIN_INCQHEAD(chain_id);
-
-               status = p->dma_read(CSR, ch);
-               p->dma_write(status, CSR, ch);
-       }
-
-       if (likely(dma_chan[ch].callback != NULL))
-               dma_chan[ch].callback(ch, status, dma_chan[ch].data);
-
-       return 0;
-}
-
-/* STATUS register count is from 1-32 while our is 0-31 */
-static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id)
-{
-       u32 val, enable_reg;
-       int i;
-
-       val = p->dma_read(IRQSTATUS_L0, 0);
-       if (val == 0) {
-               if (printk_ratelimit())
-                       printk(KERN_WARNING "Spurious DMA IRQ\n");
-               return IRQ_HANDLED;
-       }
-       enable_reg = p->dma_read(IRQENABLE_L0, 0);
-       val &= enable_reg; /* Dispatch only relevant interrupts */
-       for (i = 0; i < dma_lch_count && val != 0; i++) {
-               if (val & 1)
-                       omap2_dma_handle_ch(i);
-               val >>= 1;
-       }
-
-       return IRQ_HANDLED;
-}
-
-static struct irqaction omap24xx_dma_irq = {
-       .name = "DMA",
-       .handler = omap2_dma_irq_handler,
-};
-
-#else
-static struct irqaction omap24xx_dma_irq;
-#endif
-
-/*----------------------------------------------------------------------------*/
-
-/*
- * Note that we are currently using only IRQENABLE_L0 and L1.
- * As the DSP may be using IRQENABLE_L2 and L3, let's not
- * touch those for now.
- */
-void omap_dma_global_context_save(void)
-{
-       omap_dma_global_context.dma_irqenable_l0 =
-               p->dma_read(IRQENABLE_L0, 0);
-       omap_dma_global_context.dma_irqenable_l1 =
-               p->dma_read(IRQENABLE_L1, 0);
-       omap_dma_global_context.dma_ocp_sysconfig =
-               p->dma_read(OCP_SYSCONFIG, 0);
-       omap_dma_global_context.dma_gcr = p->dma_read(GCR, 0);
-}
-
-void omap_dma_global_context_restore(void)
-{
-       int ch;
-
-       p->dma_write(omap_dma_global_context.dma_gcr, GCR, 0);
-       p->dma_write(omap_dma_global_context.dma_ocp_sysconfig,
-               OCP_SYSCONFIG, 0);
-       p->dma_write(omap_dma_global_context.dma_irqenable_l0,
-               IRQENABLE_L0, 0);
-       p->dma_write(omap_dma_global_context.dma_irqenable_l1,
-               IRQENABLE_L1, 0);
-
-       if (IS_DMA_ERRATA(DMA_ROMCODE_BUG))
-               p->dma_write(0x3 , IRQSTATUS_L0, 0);
-
-       for (ch = 0; ch < dma_chan_count; ch++)
-               if (dma_chan[ch].dev_id != -1)
-                       omap_clear_dma(ch);
-}
-
 struct omap_system_dma_plat_info *omap_get_plat_info(void)
 {
        return p;
@@ -1286,7 +877,6 @@ static int omap_system_dma_probe(struct platform_device *pdev)
        int ch, ret = 0;
        int dma_irq;
        char irq_name[4];
-       int irq_rel;
 
        p = pdev->dev.platform_data;
        if (!p) {
@@ -1312,21 +902,9 @@ static int omap_system_dma_probe(struct platform_device *pdev)
        if (!dma_chan)
                return -ENOMEM;
 
-       if (dma_omap2plus()) {
-               dma_linked_lch = kcalloc(dma_lch_count,
-                                        sizeof(*dma_linked_lch),
-                                        GFP_KERNEL);
-               if (!dma_linked_lch) {
-                       ret = -ENOMEM;
-                       goto exit_dma_lch_fail;
-               }
-       }
-
        spin_lock_init(&dma_chan_lock);
        for (ch = 0; ch < dma_chan_count; ch++) {
                omap_clear_dma(ch);
-               if (dma_omap2plus())
-                       omap2_disable_irq_lch(ch);
 
                dma_chan[ch].dev_id = -1;
                dma_chan[ch].next_lch = -1;
@@ -1359,26 +937,6 @@ static int omap_system_dma_probe(struct platform_device *pdev)
                }
        }
 
-       if (d->dev_caps & IS_RW_PRIORITY)
-               omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE,
-                               DMA_DEFAULT_FIFO_DEPTH, 0);
-
-       if (dma_omap2plus() && !(d->dev_caps & DMA_ENGINE_HANDLE_IRQ)) {
-               strcpy(irq_name, "0");
-               dma_irq = platform_get_irq_byname(pdev, irq_name);
-               if (dma_irq < 0) {
-                       dev_err(&pdev->dev, "failed: request IRQ %d", dma_irq);
-                       ret = dma_irq;
-                       goto exit_dma_lch_fail;
-               }
-               ret = setup_irq(dma_irq, &omap24xx_dma_irq);
-               if (ret) {
-                       dev_err(&pdev->dev, "set_up failed for IRQ %d for DMA (error %d)\n",
-                               dma_irq, ret);
-                       goto exit_dma_lch_fail;
-               }
-       }
-
        /* reserve dma channels 0 and 1 in high security devices on 34xx */
        if (d->dev_caps & HS_CHANNELS_RESERVED) {
                pr_info("Reserving DMA channels 0 and 1 for HS ROM code\n");
@@ -1389,34 +947,21 @@ static int omap_system_dma_probe(struct platform_device *pdev)
        return 0;
 
 exit_dma_irq_fail:
-       dev_err(&pdev->dev, "unable to request IRQ %d for DMA (error %d)\n",
-               dma_irq, ret);
-       for (irq_rel = 0; irq_rel < ch; irq_rel++) {
-               dma_irq = platform_get_irq(pdev, irq_rel);
-               free_irq(dma_irq, (void *)(irq_rel + 1));
-       }
-
-exit_dma_lch_fail:
        return ret;
 }
 
 static int omap_system_dma_remove(struct platform_device *pdev)
 {
-       int dma_irq;
+       int dma_irq, irq_rel = 0;
 
-       if (dma_omap2plus()) {
-               char irq_name[4];
-               strcpy(irq_name, "0");
-               dma_irq = platform_get_irq_byname(pdev, irq_name);
-               if (dma_irq >= 0)
-                       remove_irq(dma_irq, &omap24xx_dma_irq);
-       } else {
-               int irq_rel = 0;
-               for ( ; irq_rel < dma_chan_count; irq_rel++) {
-                       dma_irq = platform_get_irq(pdev, irq_rel);
-                       free_irq(dma_irq, (void *)(irq_rel + 1));
-               }
+       if (dma_omap2plus())
+               return 0;
+
+       for ( ; irq_rel < dma_chan_count; irq_rel++) {
+               dma_irq = platform_get_irq(pdev, irq_rel);
+               free_irq(dma_irq, (void *)(irq_rel + 1));
        }
+
        return 0;
 }
 
index 27bb925adc8d9fd03b000190438764d2e70aa484..10119c7ab4374acb3902634b43b1ce14d9d512c4 100644 (file)
@@ -1,2 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-dtb-$(CONFIG_ARCH_STRATIX10) += socfpga_stratix10_socdk.dtb
+dtb-$(CONFIG_ARCH_STRATIX10) += socfpga_stratix10_socdk.dtb \
+                               socfpga_stratix10_socdk_nand.dtb
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts
new file mode 100644 (file)
index 0000000..9946515
--- /dev/null
@@ -0,0 +1,223 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright Altera Corporation (C) 2015. All rights reserved.
+ */
+
+#include "socfpga_stratix10.dtsi"
+
+/ {
+       model = "SoCFPGA Stratix 10 SoCDK";
+
+       aliases {
+               serial0 = &uart0;
+               ethernet0 = &gmac0;
+               ethernet1 = &gmac1;
+               ethernet2 = &gmac2;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               hps0 {
+                       label = "hps_led0";
+                       gpios = <&portb 20 GPIO_ACTIVE_HIGH>;
+               };
+
+               hps1 {
+                       label = "hps_led1";
+                       gpios = <&portb 19 GPIO_ACTIVE_HIGH>;
+               };
+
+               hps2 {
+                       label = "hps_led2";
+                       gpios = <&portb 21 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               /* We expect the bootloader to fill in the reg */
+               reg = <0 0 0 0>;
+       };
+
+       ref_033v: 033-v-ref {
+               compatible = "regulator-fixed";
+               regulator-name = "0.33V";
+               regulator-min-microvolt = <330000>;
+               regulator-max-microvolt = <330000>;
+       };
+
+       soc {
+               clocks {
+                       osc1 {
+                               clock-frequency = <25000000>;
+                       };
+               };
+
+               eccmgr {
+                       sdmmca-ecc@ff8c8c00 {
+                               compatible = "altr,socfpga-s10-sdmmc-ecc",
+                                            "altr,socfpga-sdmmc-ecc";
+                               reg = <0xff8c8c00 0x100>;
+                               altr,ecc-parent = <&mmc>;
+                               interrupts = <14 4>,
+                                            <15 4>;
+                       };
+               };
+       };
+};
+
+&gpio1 {
+       status = "okay";
+};
+
+&gmac2 {
+       status = "okay";
+       phy-mode = "rgmii";
+       phy-handle = <&phy0>;
+
+       max-frame-size = <9000>;
+
+       mdio0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "snps,dwmac-mdio";
+               phy0: ethernet-phy@0 {
+                       reg = <4>;
+
+                       txd0-skew-ps = <0>; /* -420ps */
+                       txd1-skew-ps = <0>; /* -420ps */
+                       txd2-skew-ps = <0>; /* -420ps */
+                       txd3-skew-ps = <0>; /* -420ps */
+                       rxd0-skew-ps = <420>; /* 0ps */
+                       rxd1-skew-ps = <420>; /* 0ps */
+                       rxd2-skew-ps = <420>; /* 0ps */
+                       rxd3-skew-ps = <420>; /* 0ps */
+                       txen-skew-ps = <0>; /* -420ps */
+                       txc-skew-ps = <900>; /* 0ps */
+                       rxdv-skew-ps = <420>; /* 0ps */
+                       rxc-skew-ps = <1680>; /* 780ps */
+               };
+       };
+};
+
+&nand {
+       status = "okay";
+
+       flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0>;
+               nand-bus-width = <16>;
+
+               partition@0 {
+                       label = "u-boot";
+                       reg = <0 0x200000>;
+               };
+
+               partition@200000 {
+                       label = "env";
+                       reg = <0x200000 0x40000>;
+               };
+
+               partition@240000 {
+                       label = "dtb";
+                       reg = <0x240000 0x40000>;
+               };
+
+               partition@280000 {
+                       label = "kernel";
+                       reg = <0x280000 0x2000000>;
+               };
+
+               partition@2280000 {
+                       label = "misc";
+                       reg = <0x2280000 0x2000000>;
+               };
+
+               partition@4280000 {
+                       label = "rootfs";
+                       reg = <0x4280000 0x3bd80000>;
+               };
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+       disable-over-current;
+};
+
+&watchdog0 {
+       status = "okay";
+};
+
+&i2c2 {
+       status = "okay";
+       clock-frequency = <100000>;
+       i2c-sda-falling-time-ns = <890>;  /* hcnt */
+       i2c-sdl-falling-time-ns = <890>;  /* lcnt */
+
+       adc@14 {
+               compatible = "lltc,ltc2497";
+               reg = <0x14>;
+               vref-supply = <&ref_033v>;
+       };
+
+       temp@4c {
+               compatible = "maxim,max1619";
+               reg = <0x4c>;
+       };
+
+       eeprom@51 {
+               compatible = "atmel,24c32";
+               reg = <0x51>;
+               pagesize = <32>;
+       };
+
+       rtc@68 {
+               compatible = "dallas,ds1339";
+               reg = <0x68>;
+       };
+};
+
+&qspi {
+       flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "n25q00a";
+               reg = <0>;
+               spi-max-frequency = <100000000>;
+
+               m25p,fast-read;
+               cdns,page-size = <256>;
+               cdns,block-size = <16>;
+               cdns,read-delay = <1>;
+               cdns,tshsl-ns = <50>;
+               cdns,tsd2d-ns = <50>;
+               cdns,tchsh-ns = <4>;
+               cdns,tslch-ns = <4>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       qspi_boot: partition@0 {
+                               label = "Boot and fpga data";
+                               reg = <0x0 0x034B0000>;
+                       };
+
+                       qspi_rootfs: partition@4000000 {
+                               label = "Root Filesystem - JFFS2";
+                               reg = <0x034B0000 0x0EB50000>;
+                       };
+               };
+       };
+};
index c563d3eb2d98e843b15f8ca2d1fb1077a6edc7c9..7d370dac4c85710b43d7b8dc9d4bfe151b092afd 100644 (file)
 };
 
 &ir {
+       linux,rc-map-name = "rc-hisi-poplar";
        status = "okay";
 };
 
index 13821a0ff524e1944a14b2079deec6e768eaf00b..12bc1d3ed4243f5b50e2c4bfedacbd9def07cd4f 100644 (file)
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
-                       bus-range = <0 15>;
+                       bus-range = <0x00 0xff>;
                        num-lanes = <1>;
                        ranges = <0x81000000 0x0 0x00000000 0x4f00000 0x0 0x100000
                                  0x82000000 0x0 0x3000000 0x3000000 0x0 0x01f00000>;
index 1253af30da8e67c89c35743d082c58e54fe3c15f..40cb16e8c8143f8182558dd7aca0a79e02e778f6 100644 (file)
@@ -1,2 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-dtb-$(CONFIG_ARCH_AGILEX) += socfpga_agilex_socdk.dtb
+dtb-$(CONFIG_ARCH_AGILEX) += socfpga_agilex_socdk.dtb \
+                            socfpga_agilex_socdk_nand.dtb
index 94090c6fb946a6bee451056b935a00d80fbe0ec7..ef66e90e2d7a4115a9878fc8719c3e8a62eaaf99 100644 (file)
                        rx-fifo-depth = <16384>;
                        snps,multicast-filter-bins = <256>;
                        iommus = <&smmu 1>;
+                       altr,sysmgr-syscon = <&sysmgr 0x44 0>;
                        status = "disabled";
                };
 
                        rx-fifo-depth = <16384>;
                        snps,multicast-filter-bins = <256>;
                        iommus = <&smmu 2>;
+                       altr,sysmgr-syscon = <&sysmgr 0x48 8>;
                        status = "disabled";
                };
 
                        rx-fifo-depth = <16384>;
                        snps,multicast-filter-bins = <256>;
                        iommus = <&smmu 3>;
+                       altr,sysmgr-syscon = <&sysmgr 0x4c 16>;
                        status = "disabled";
                };
 
                        status = "disabled";
                };
 
+               nand: nand@ffb90000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "altr,socfpga-denali-nand";
+                       reg = <0xffb90000 0x10000>,
+                             <0xffb80000 0x1000>;
+                       reg-names = "nand_data", "denali_reg";
+                       interrupts = <0 97 4>;
+                       resets = <&rst NAND_RESET>, <&rst NAND_OCP_RESET>;
+                       status = "disabled";
+               };
+
                ocram: sram@ffe00000 {
                        compatible = "mmio-sram";
                        reg = <0xffe00000 0x40000>;
                };
 
                sysmgr: sysmgr@ffd12000 {
-                       compatible = "altr,sys-mgr", "syscon";
+                       compatible = "altr,sys-mgr-s10","altr,sys-mgr";
                        reg = <0xffd12000 0x500>;
                };
 
                        reg = <0xf8011100 0xc0>;
                };
 
+               eccmgr {
+                       compatible = "altr,socfpga-s10-ecc-manager",
+                                    "altr,socfpga-a10-ecc-manager";
+                       altr,sysmgr-syscon = <&sysmgr>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       interrupts = <0 15 4>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       ranges;
+
+                       sdramedac {
+                               compatible = "altr,sdram-edac-s10";
+                               altr,sdr-syscon = <&sdr>;
+                               interrupts = <16 4>;
+                       };
+
+                       ocram-ecc@ff8cc000 {
+                               compatible = "altr,socfpga-s10-ocram-ecc",
+                                            "altr,socfpga-a10-ocram-ecc";
+                               reg = <0xff8cc000 0x100>;
+                               altr,ecc-parent = <&ocram>;
+                               interrupts = <1 4>;
+                       };
+
+                       usb0-ecc@ff8c4000 {
+                               compatible = "altr,socfpga-s10-usb-ecc",
+                                            "altr,socfpga-usb-ecc";
+                               reg = <0xff8c4000 0x100>;
+                               altr,ecc-parent = <&usb0>;
+                               interrupts = <2 4>;
+                       };
+
+                       emac0-rx-ecc@ff8c0000 {
+                               compatible = "altr,socfpga-s10-eth-mac-ecc",
+                                            "altr,socfpga-eth-mac-ecc";
+                               reg = <0xff8c0000 0x100>;
+                               altr,ecc-parent = <&gmac0>;
+                               interrupts = <4 4>;
+                       };
+
+                       emac0-tx-ecc@ff8c0400 {
+                               compatible = "altr,socfpga-s10-eth-mac-ecc",
+                                            "altr,socfpga-eth-mac-ecc";
+                               reg = <0xff8c0400 0x100>;
+                               altr,ecc-parent = <&gmac0>;
+                               interrupts = <5 4>;
+                       };
+
+                       sdmmca-ecc@ff8c8c00 {
+                               compatible = "altr,socfpga-s10-sdmmc-ecc",
+                                            "altr,socfpga-sdmmc-ecc";
+                               reg = <0xff8c8c00 0x100>;
+                               altr,ecc-parent = <&mmc>;
+                               interrupts = <14 4>,
+                                            <15 4>;
+                       };
+               };
+
                qspi: spi@ff8d2000 {
                        compatible = "cdns,qspi-nor";
                        #address-cells = <1>;
diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex_socdk_nand.dts b/arch/arm64/boot/dts/intel/socfpga_agilex_socdk_nand.dts
new file mode 100644 (file)
index 0000000..979aa59
--- /dev/null
@@ -0,0 +1,135 @@
+// SPDX-License-Identifier:     GPL-2.0
+/*
+ * Copyright (C) 2019, Intel Corporation
+ */
+#include "socfpga_agilex.dtsi"
+
+/ {
+       model = "SoCFPGA Agilex SoCDK";
+
+       aliases {
+               serial0 = &uart0;
+               ethernet0 = &gmac0;
+               ethernet1 = &gmac1;
+               ethernet2 = &gmac2;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               hps0 {
+                       label = "hps_led0";
+                       gpios = <&portb 20 GPIO_ACTIVE_HIGH>;
+               };
+
+               hps1 {
+                       label = "hps_led1";
+                       gpios = <&portb 19 GPIO_ACTIVE_HIGH>;
+               };
+
+               hps2 {
+                       label = "hps_led2";
+                       gpios = <&portb 21 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               /* We expect the bootloader to fill in the reg */
+               reg = <0 0 0 0>;
+       };
+
+       soc {
+               clocks {
+                       osc1 {
+                               clock-frequency = <25000000>;
+                       };
+               };
+       };
+};
+
+&gpio1 {
+       status = "okay";
+};
+
+&gmac2 {
+       status = "okay";
+       phy-mode = "rgmii";
+       phy-handle = <&phy0>;
+
+       max-frame-size = <9000>;
+
+       mdio0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "snps,dwmac-mdio";
+               phy0: ethernet-phy@0 {
+                       reg = <4>;
+
+                       txd0-skew-ps = <0>; /* -420ps */
+                       txd1-skew-ps = <0>; /* -420ps */
+                       txd2-skew-ps = <0>; /* -420ps */
+                       txd3-skew-ps = <0>; /* -420ps */
+                       rxd0-skew-ps = <420>; /* 0ps */
+                       rxd1-skew-ps = <420>; /* 0ps */
+                       rxd2-skew-ps = <420>; /* 0ps */
+                       rxd3-skew-ps = <420>; /* 0ps */
+                       txen-skew-ps = <0>; /* -420ps */
+                       txc-skew-ps = <900>; /* 0ps */
+                       rxdv-skew-ps = <420>; /* 0ps */
+                       rxc-skew-ps = <1680>; /* 780ps */
+               };
+       };
+};
+
+&nand {
+       status = "okay";
+
+       flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0>;
+               nand-bus-width = <16>;
+
+               partition@0 {
+                       label = "u-boot";
+                       reg = <0 0x200000>;
+               };
+               partition@200000 {
+                       label = "env";
+                       reg = <0x200000 0x40000>;
+               };
+               partition@240000 {
+                       label = "dtb";
+                       reg = <0x240000 0x40000>;
+               };
+               partition@280000 {
+                       label = "kernel";
+                       reg = <0x280000 0x2000000>;
+               };
+               partition@2280000 {
+                       label = "misc";
+                       reg = <0x2280000 0x2000000>;
+               };
+               partition@4280000 {
+                       label = "rootfs";
+                       reg = <0x4280000 0x3bd80000>;
+               };
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+       disable-over-current;
+};
+
+&watchdog0 {
+       status = "okay";
+};
index 8fdbd2267384186b2211f393eb771da4525bb357..2153842321ce949d9dda3a69e20879b04174049e 100644 (file)
@@ -3,22 +3,21 @@ dtb-$(CONFIG_ARCH_R8A774A1) += r8a774a1-hihope-rzg2m.dtb
 dtb-$(CONFIG_ARCH_R8A774A1) += r8a774a1-hihope-rzg2m-ex.dtb
 dtb-$(CONFIG_ARCH_R8A774B1) += r8a774b1-hihope-rzg2n.dtb
 dtb-$(CONFIG_ARCH_R8A774B1) += r8a774b1-hihope-rzg2n-ex.dtb
-dtb-$(CONFIG_ARCH_R8A774C0) += r8a774c0-cat874.dtb r8a774c0-ek874.dtb
-dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb
-dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-kf.dtb
-dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-xs.dtb
-dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb r8a7795-es1-h3ulcb.dtb
-dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-h3ulcb-kf.dtb
-dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb
-dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-kf.dtb
-dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-xs.dtb
-dtb-$(CONFIG_ARCH_R8A77960) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb
-dtb-$(CONFIG_ARCH_R8A77960) += r8a7796-m3ulcb-kf.dtb
-dtb-$(CONFIG_ARCH_R8A77960) += r8a7796-salvator-xs.dtb
+dtb-$(CONFIG_ARCH_R8A774C0) += r8a774c0-cat874.dtb r8a774c0-ek874.dtb \
+                              r8a774c0-ek874-idk-2121wr.dtb
+dtb-$(CONFIG_ARCH_R8A7795) += r8a77950-salvator-x.dtb
+dtb-$(CONFIG_ARCH_R8A7795) += r8a77950-ulcb.dtb r8a77950-ulcb-kf.dtb
+dtb-$(CONFIG_ARCH_R8A7795) += r8a77951-salvator-x.dtb r8a77951-salvator-xs.dtb
+dtb-$(CONFIG_ARCH_R8A7795) += r8a77951-ulcb.dtb r8a77951-ulcb-kf.dtb
+dtb-$(CONFIG_ARCH_R8A77950) += r8a77950-salvator-x.dtb
+dtb-$(CONFIG_ARCH_R8A77950) += r8a77950-ulcb.dtb r8a77950-ulcb-kf.dtb
+dtb-$(CONFIG_ARCH_R8A77951) += r8a77951-salvator-x.dtb r8a77951-salvator-xs.dtb
+dtb-$(CONFIG_ARCH_R8A77951) += r8a77951-ulcb.dtb r8a77951-ulcb-kf.dtb
+dtb-$(CONFIG_ARCH_R8A77960) += r8a77960-salvator-x.dtb r8a77960-salvator-xs.dtb
+dtb-$(CONFIG_ARCH_R8A77960) += r8a77960-ulcb.dtb r8a77960-ulcb-kf.dtb
 dtb-$(CONFIG_ARCH_R8A77961) += r8a77961-salvator-xs.dtb
 dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-salvator-x.dtb r8a77965-salvator-xs.dtb
-dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-m3nulcb.dtb
-dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-m3nulcb-kf.dtb
+dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-ulcb.dtb r8a77965-ulcb-kf.dtb
 dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle.dtb r8a77970-v3msk.dtb
 dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-condor.dtb r8a77980-v3hsk.dtb
 dtb-$(CONFIG_ARCH_R8A77990) += r8a77990-ebisu.dtb
index 2c942a7eaeeba2933a33a749a043f5fb79071cef..bd056904e8bdba3d5cf4c637c15352afe46207ef 100644 (file)
 
                gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        wlan_en_reg: regulator-wlan_en {
index 34a9f472fbb43072fd68ee86818eb431d4e8a84a..8f950dabca5401507fa21a128328f95366452762 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a774a1-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a774a1-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a774a1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774a1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774a1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774a1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774a1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
-                               0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
-                               0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
-                               0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000>,
+                                <0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000>,
+                                <0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000>,
+                                <0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
index fe78387e4bb866ec819fac911dfa463ea3ca2d8d..c40ea300968ea8c892785790e7af10ac166e9991 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a774b1-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a774b1-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a774b1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774b1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774b1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774b1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774b1",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                                 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                                 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                                 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
-                                 0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
-                                 0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
-                                 0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000>,
+                                <0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000>,
+                                <0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000>,
+                                <0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
index c99b1dec52ef65f8519a296c309103060397b5ac..26aee004a44e2d03d57dd8a120a167b3e36e349b 100644 (file)
 
                gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        wlan_en_reg: fixedregulator {
diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts b/arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts
new file mode 100644 (file)
index 0000000..a7b27d0
--- /dev/null
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the Silicon Linux RZ/G2E evaluation kit (EK874),
+ * connected to an Advantech IDK-2121WR 21.5" LVDS panel
+ *
+ * Copyright (C) 2019 Renesas Electronics Corp.
+ */
+
+#include "r8a774c0-ek874.dts"
+
+/ {
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm5 0 50000>;
+
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <6>;
+
+               power-supply = <&reg_12p0v>;
+               enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
+       };
+
+       panel-lvds {
+               compatible = "advantech,idk-2121wr", "panel-lvds";
+
+               width-mm = <476>;
+               height-mm = <268>;
+
+               data-mapping = "vesa-24";
+
+               panel-timing {
+                       clock-frequency = <148500000>;
+                       hactive = <1920>;
+                       vactive = <1080>;
+                       hsync-len = <44>;
+                       hfront-porch = <88>;
+                       hback-porch = <148>;
+                       vfront-porch = <4>;
+                       vback-porch = <36>;
+                       vsync-len = <5>;
+               };
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               dual-lvds-odd-pixels;
+                               panel_in0: endpoint {
+                                       remote-endpoint = <&lvds0_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               dual-lvds-even-pixels;
+                               panel_in1: endpoint {
+                                       remote-endpoint = <&lvds1_out>;
+                               };
+                       };
+               };
+       };
+};
+
+&gpio0 {
+       /*
+        * When GP0_17 is low LVDS[01] are connected to the LVDS connector
+        * When GP0_17 is high LVDS[01] are connected to the LT8918L
+        */
+       lvds-connector-en-gpio{
+               gpio-hog;
+               gpios = <17 GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "lvds-connector-en-gpio";
+       };
+};
+
+&lvds0 {
+       ports {
+               port@1 {
+                       lvds0_out: endpoint {
+                               remote-endpoint = <&panel_in0>;
+                       };
+               };
+       };
+};
+
+&lvds1 {
+       status = "okay";
+
+       clocks = <&cpg CPG_MOD 727>, <&x13_clk>, <&extal_clk>;
+       clock-names = "fck", "dclkin.0", "extal";
+
+       ports {
+               port@1 {
+                       lvds1_out: endpoint {
+                               remote-endpoint = <&panel_in1>;
+                       };
+               };
+       };
+};
+
+&pfc {
+       pwm5_pins: pwm5 {
+               groups = "pwm5_a";
+               function = "pwm5";
+       };
+};
+
+&pwm5 {
+       pinctrl-0 = <&pwm5_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
index c7bdc3606323fc97cb9c851b38c4ffa0f31a8dd7..a53cd5fcc401b656f748045bbec9ae43fa97c8b5 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a774c0-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a774c0-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a774c0",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774c0",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774c0",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a774c0",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                                 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                                 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                                 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
similarity index 96%
rename from arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
rename to arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
index c72968623e94b79047a794c6edfcaa66847594df..2438825c9b22e26d9f1a5ae8ba5d40706d17ea01 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 /dts-v1/;
-#include "r8a7795-es1.dtsi"
+#include "r8a77950.dtsi"
 #include "salvator-x.dtsi"
 
 / {
-       model = "Renesas Salvator-X board based on r8a7795 ES1.x";
+       model = "Renesas Salvator-X board based on r8a77950";
        compatible = "renesas,salvator-x", "renesas,r8a7795";
 
        memory@48000000 {
similarity index 75%
rename from arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-kf.dts
rename to arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts
index 80791ed27539bf8fc967972e3d5ebb933d8d5e1e..dcaaf12cec40dab425d6563d9e7dc9b3b3bbcf58 100644 (file)
@@ -6,11 +6,11 @@
  * Copyright (C) 2017 Cogent Embedded, Inc.
  */
 
-#include "r8a7795-h3ulcb.dts"
+#include "r8a77950-ulcb.dts"
 #include "ulcb-kf.dtsi"
 
 / {
-       model = "Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+";
+       model = "Renesas H3ULCB Kingfisher board based on r8a77950";
        compatible = "shimafuji,kingfisher", "renesas,h3ulcb",
                     "renesas,r8a7795";
 };
similarity index 89%
rename from arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb.dts
rename to arch/arm64/boot/dts/renesas/r8a77950-ulcb.dts
index 598b98168559e0e4d83b045cf700ccca69f8335b..38a6d6a108d488ed1db926f299c204634af19274 100644 (file)
@@ -7,11 +7,11 @@
  */
 
 /dts-v1/;
-#include "r8a7795-es1.dtsi"
+#include "r8a77950.dtsi"
 #include "ulcb.dtsi"
 
 / {
-       model = "Renesas H3ULCB board based on r8a7795 ES1.x";
+       model = "Renesas H3ULCB board based on r8a77950";
        compatible = "renesas,h3ulcb", "renesas,r8a7795";
 
        memory@48000000 {
similarity index 98%
rename from arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
rename to arch/arm64/boot/dts/renesas/r8a77950.dtsi
index 14d8513d2a47336f9bd5be602d350bcff53d8378..15216495e1c8b31ca671e275bf3c48df46b97088 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the R-Car H3 (R8A77950) ES1.x SoC
+ * Device Tree Source for the R-Car H3 (R8A77950) SoC
  *
  * Copyright (C) 2015 Renesas Electronics Corp.
  */
 
-#include "r8a7795.dtsi"
+#include "r8a77951.dtsi"
 
 &audma0 {
        iommus = <&ipmmu_mp1 0>, <&ipmmu_mp1 1>,
similarity index 96%
rename from arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
rename to arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
index 72874f675359e7a4060553732a10dafb21f33d85..a402a2fb6e3c313b550daaa3d74f71e354350a6e 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 /dts-v1/;
-#include "r8a7795.dtsi"
+#include "r8a77951.dtsi"
 #include "salvator-x.dtsi"
 
 / {
-       model = "Renesas Salvator-X board based on r8a7795 ES2.0+";
+       model = "Renesas Salvator-X board based on r8a77951";
        compatible = "renesas,salvator-x", "renesas,r8a7795";
 
        memory@48000000 {
similarity index 96%
rename from arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
rename to arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
index 36667c81d43d517b2e8dea66ab486520aa5eec3a..cef9da4376a3f673d81312ded692d5e273590c49 100644 (file)
@@ -1,16 +1,16 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the Salvator-X 2nd version board with R-Car H3 ES2.0
+ * Device Tree Source for the Salvator-X 2nd version board with R-Car H3 ES2.0+
  *
  * Copyright (C) 2015-2017 Renesas Electronics Corp.
  */
 
 /dts-v1/;
-#include "r8a7795.dtsi"
+#include "r8a77951.dtsi"
 #include "salvator-xs.dtsi"
 
 / {
-       model = "Renesas Salvator-X 2nd version board based on r8a7795 ES2.0+";
+       model = "Renesas Salvator-X 2nd version board based on r8a77951";
        compatible = "renesas,salvator-xs", "renesas,r8a7795";
 
        memory@48000000 {
         * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
         *   (when SW31 is the default setting on Salvator-XS).
         * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
-        *   r8a7795 with Salvator-XS.
+        *   r8a77951 with Salvator-XS.
         *   Hence the SW31 setting must be changed like 2) below.
         *   1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
         *      - Connect GP6_3[01] to ADV7842.
similarity index 75%
rename from arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-kf.dts
rename to arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dts
index 2f24dfc45617baf6c6f35e963c2d77490f476ea9..11f943a67703f0a878277ff6aef1e98da7ed2869 100644 (file)
@@ -6,11 +6,11 @@
  * Copyright (C) 2017 Cogent Embedded, Inc.
  */
 
-#include "r8a7795-es1-h3ulcb.dts"
+#include "r8a77951-ulcb.dts"
 #include "ulcb-kf.dtsi"
 
 / {
-       model = "Renesas H3ULCB Kingfisher board based on r8a7795 ES1.x";
+       model = "Renesas H3ULCB Kingfisher board based on r8a77951";
        compatible = "shimafuji,kingfisher", "renesas,h3ulcb",
                     "renesas,r8a7795";
 };
similarity index 92%
rename from arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
rename to arch/arm64/boot/dts/renesas/r8a77951-ulcb.dts
index 54515eaf0310f1727f4e695196b74b5bd7354645..8ad8f2a539771de8eb239dce2ff212d390e3d4d6 100644 (file)
@@ -7,11 +7,11 @@
  */
 
 /dts-v1/;
-#include "r8a7795.dtsi"
+#include "r8a77951.dtsi"
 #include "ulcb.dtsi"
 
 / {
-       model = "Renesas H3ULCB board based on r8a7795 ES2.0+";
+       model = "Renesas H3ULCB board based on r8a77951";
        compatible = "renesas,h3ulcb", "renesas,r8a7795";
 
        memory@48000000 {
similarity index 94%
rename from arch/arm64/boot/dts/renesas/r8a7795.dtsi
rename to arch/arm64/boot/dts/renesas/r8a77951.dtsi
index fde6ec122d3b40067e4d4da4a5e5a8b8f0c506ae..a8729eb744db2b5327b9933c94f8babc60a7b9e8 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the R-Car H3 (R8A77950) SoC
+ * Device Tree Source for the R-Car H3 (R8A77951) SoC
  *
  * Copyright (C) 2015 Renesas Electronics Corp.
  */
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a7795-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7795-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7795-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe6460000 0 0x100>;
-                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 326>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7795-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe6470000 0 0x100>;
-                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 329>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a7795",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7795",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7795",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7795",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7795",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
-                               0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
-                               0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
-                               0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000>,
+                                <0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000>,
+                                <0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000>,
+                                <0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
                        interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
similarity index 94%
rename from arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
rename to arch/arm64/boot/dts/renesas/r8a77960-salvator-x.dts
index de37e91e3b7ac31dd48185f2d3ed3051b0f0067f..ecfbeafeaf367f15ef9c9d0f8d7c582e6a358da5 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 /dts-v1/;
-#include "r8a7796.dtsi"
+#include "r8a77960.dtsi"
 #include "salvator-x.dtsi"
 
 / {
-       model = "Renesas Salvator-X board based on r8a7796";
+       model = "Renesas Salvator-X board based on r8a77960";
        compatible = "renesas,salvator-x", "renesas,r8a7796";
 
        memory@48000000 {
similarity index 94%
rename from arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts
rename to arch/arm64/boot/dts/renesas/r8a77960-salvator-xs.dts
index a1cbfef2053fe40812258a96ac75f3a649a9fe48..249896a38fdcc7a83d24579a8aa664fcf009b252 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 /dts-v1/;
-#include "r8a7796.dtsi"
+#include "r8a77960.dtsi"
 #include "salvator-xs.dtsi"
 
 / {
-       model = "Renesas Salvator-X 2nd version board based on r8a7796";
+       model = "Renesas Salvator-X 2nd version board based on r8a77960";
        compatible = "renesas,salvator-xs", "renesas,r8a7796";
 
        memory@48000000 {
similarity index 77%
rename from arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts
rename to arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dts
index 2df50eb11f165aaccefa4d2cb5f6d51c7de38788..2151c37d77a6c9423cae7d6f4aaab59b5280a3ea 100644 (file)
@@ -6,11 +6,11 @@
  * Copyright (C) 2017 Cogent Embedded, Inc.
  */
 
-#include "r8a7796-m3ulcb.dts"
+#include "r8a77960-ulcb.dts"
 #include "ulcb-kf.dtsi"
 
 / {
-       model = "Renesas M3ULCB Kingfisher board based on r8a7796";
+       model = "Renesas M3ULCB Kingfisher board based on r8a77960";
        compatible = "shimafuji,kingfisher", "renesas,m3ulcb",
                     "renesas,r8a7796";
 };
similarity index 90%
rename from arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
rename to arch/arm64/boot/dts/renesas/r8a77960-ulcb.dts
index 9e4594c27fa6c5534d074eae609ece05eec8538e..d041042a56192ab26fe02529413ee087b9540404 100644 (file)
@@ -7,11 +7,11 @@
  */
 
 /dts-v1/;
-#include "r8a7796.dtsi"
+#include "r8a77960.dtsi"
 #include "ulcb.dtsi"
 
 / {
-       model = "Renesas M3ULCB board based on r8a7796";
+       model = "Renesas M3ULCB board based on r8a77960";
        compatible = "renesas,m3ulcb", "renesas,r8a7796";
 
        memory@48000000 {
similarity index 94%
rename from arch/arm64/boot/dts/renesas/r8a7796.dtsi
rename to arch/arm64/boot/dts/renesas/r8a77960.dtsi
index b9db882b0351155c611f04ca8ea0d7a81f13203a..60f156cfd2d68673024b402b89a75f16b4d2f509 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a7796-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a7796-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a7796",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7796",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7796",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7796",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a7796",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
-                               0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
-                               0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
-                               0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000>,
+                                <0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000>,
+                                <0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000>,
+                                <0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
index 64466c86b698826d7fba4103fd60e1155adbbfc7..be3824bda632233ef7d9221a6b6ccaa9651faa1a 100644 (file)
                ranges;
 
                rwdt: watchdog@e6020000 {
+                       compatible = "renesas,r8a77961-wdt",
+                                    "renesas,rcar-gen3-wdt";
                        reg = <0 0xe6020000 0 0x0c>;
-                       /* placeholder */
+                       clocks = <&cpg CPG_MOD 402>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 402>;
+                       status = "disabled";
+               };
+
+               gpio0: gpio@e6050000 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6050000 0 0x50>;
+                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 0 16>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 912>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 912>;
+               };
+
+               gpio1: gpio@e6051000 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6051000 0 0x50>;
+                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 32 29>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 911>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 911>;
                };
 
                gpio2: gpio@e6052000 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
                        reg = <0 0xe6052000 0 0x50>;
+                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                        #gpio-cells = <2>;
                        gpio-controller;
+                       gpio-ranges = <&pfc 0 64 15>;
                        #interrupt-cells = <2>;
                        interrupt-controller;
-                       /* placeholder */
+                       clocks = <&cpg CPG_MOD 910>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 910>;
                };
 
                gpio3: gpio@e6053000 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
                        reg = <0 0xe6053000 0 0x50>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
                        #gpio-cells = <2>;
                        gpio-controller;
+                       gpio-ranges = <&pfc 0 96 16>;
                        #interrupt-cells = <2>;
                        interrupt-controller;
-                       /* placeholder */
+                       clocks = <&cpg CPG_MOD 909>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 909>;
                };
 
                gpio4: gpio@e6054000 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
                        reg = <0 0xe6054000 0 0x50>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
                        #gpio-cells = <2>;
                        gpio-controller;
+                       gpio-ranges = <&pfc 0 128 18>;
                        #interrupt-cells = <2>;
                        interrupt-controller;
-                       /* placeholder */
+                       clocks = <&cpg CPG_MOD 908>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 908>;
                };
 
                gpio5: gpio@e6055000 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
                        reg = <0 0xe6055000 0 0x50>;
+                       interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
                        #gpio-cells = <2>;
                        gpio-controller;
+                       gpio-ranges = <&pfc 0 160 26>;
                        #interrupt-cells = <2>;
                        interrupt-controller;
-                       /* placeholder */
+                       clocks = <&cpg CPG_MOD 907>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 907>;
                };
 
                gpio6: gpio@e6055400 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
                        reg = <0 0xe6055400 0 0x50>;
+                       interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
                        #gpio-cells = <2>;
                        gpio-controller;
+                       gpio-ranges = <&pfc 0 192 32>;
                        #interrupt-cells = <2>;
                        interrupt-controller;
-                       /* placeholder */
+                       clocks = <&cpg CPG_MOD 906>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 906>;
+               };
+
+               gpio7: gpio@e6055800 {
+                       compatible = "renesas,gpio-r8a77961",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6055800 0 0x50>;
+                       interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 224 4>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 905>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 905>;
                };
 
                pfc: pin-controller@e6060000 {
                        /* placeholder */
                };
 
+               i2c0: i2c@e6500000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77961",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6500000 0 0x40>;
+                       interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 931>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 931>;
+                       dmas = <&dmac1 0x91>, <&dmac1 0x90>,
+                              <&dmac2 0x91>, <&dmac2 0x90>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c1: i2c@e6508000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77961",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6508000 0 0x40>;
+                       interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 930>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 930>;
+                       dmas = <&dmac1 0x93>, <&dmac1 0x92>,
+                              <&dmac2 0x93>, <&dmac2 0x92>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
                i2c2: i2c@e6510000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77961",
+                                    "renesas,rcar-gen3-i2c";
                        reg = <0 0xe6510000 0 0x40>;
-                       /* placeholder */
+                       interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 929>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 929>;
+                       dmas = <&dmac1 0x95>, <&dmac1 0x94>,
+                              <&dmac2 0x95>, <&dmac2 0x94>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c3: i2c@e66d0000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77961",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66d0000 0 0x40>;
+                       interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 928>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 928>;
+                       dmas = <&dmac0 0x97>, <&dmac0 0x96>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
                };
 
                i2c4: i2c@e66d8000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77961",
+                                    "renesas,rcar-gen3-i2c";
                        reg = <0 0xe66d8000 0 0x40>;
-                       /* placeholder */
+                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 927>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 927>;
+                       dmas = <&dmac0 0x99>, <&dmac0 0x98>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c5: i2c@e66e0000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77961",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66e0000 0 0x40>;
+                       interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 919>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 919>;
+                       dmas = <&dmac0 0x9b>, <&dmac0 0x9a>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c6: i2c@e66e8000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77961",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66e8000 0 0x40>;
+                       interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 918>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 918>;
+                       dmas = <&dmac0 0x9d>, <&dmac0 0x9c>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
                };
 
                i2c_dvfs: i2c@e60b0000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       compatible = "renesas,iic-r8a77961",
+                                    "renesas,rcar-gen3-iic",
+                                    "renesas,rmobile-iic";
                        reg = <0 0xe60b0000 0 0x425>;
-                       /* placeholder */
+                       interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 926>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 926>;
+                       dmas = <&dmac0 0x11>, <&dmac0 0x10>;
+                       dma-names = "tx", "rx";
+                       status = "disabled";
                };
 
+
                hscif1: serial@e6550000 {
                        reg = <0 0xe6550000 0 0x60>;
                        /* placeholder */
                        /* placeholder */
                };
 
+               dmac0: dma-controller@e6700000 {
+                       compatible = "renesas,dmac-r8a77961",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe6700000 0 0x10000>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 219>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 219>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               dmac1: dma-controller@e7300000 {
+                       compatible = "renesas,dmac-r8a77961",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7300000 0 0x10000>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 218>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 218>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               dmac2: dma-controller@e7310000 {
+                       compatible = "renesas,dmac-r8a77961",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7310000 0 0x10000>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 217>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 217>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
                avb: ethernet@e6800000 {
+                       compatible = "renesas,etheravb-r8a77961",
+                                    "renesas,etheravb-rcar-gen3";
                        reg = <0 0xe6800000 0 0x800>, <0 0xe6a00000 0 0x10000>;
+                       interrupts = <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>,
+                                    <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+                                    <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>,
+                                    <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1", "ch2", "ch3",
+                                         "ch4", "ch5", "ch6", "ch7",
+                                         "ch8", "ch9", "ch10", "ch11",
+                                         "ch12", "ch13", "ch14", "ch15",
+                                         "ch16", "ch17", "ch18", "ch19",
+                                         "ch20", "ch21", "ch22", "ch23",
+                                         "ch24";
+                       clocks = <&cpg CPG_MOD 812>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 812>;
+                       phy-mode = "rgmii";
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       /* placeholder */
+                       status = "disabled";
                };
 
                pwm1: pwm@e6e31000 {
                };
 
                sdhi0: sd@ee100000 {
+                       compatible = "renesas,sdhi-r8a77961",
+                                    "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee100000 0 0x2000>;
-                       /* placeholder */
+                       interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 314>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 314>;
+                       status = "disabled";
+               };
+
+               sdhi1: sd@ee120000 {
+                       compatible = "renesas,sdhi-r8a77961",
+                                    "renesas,rcar-gen3-sdhi";
+                       reg = <0 0xee120000 0 0x2000>;
+                       interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 313>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 313>;
+                       status = "disabled";
                };
 
                sdhi2: sd@ee140000 {
+                       compatible = "renesas,sdhi-r8a77961",
+                                    "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee140000 0 0x2000>;
-                       /* placeholder */
+                       interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 312>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 312>;
+                       status = "disabled";
                };
 
                sdhi3: sd@ee160000 {
+                       compatible = "renesas,sdhi-r8a77961",
+                                    "renesas,rcar-gen3-sdhi";
                        reg = <0 0xee160000 0 0x2000>;
-                       /* placeholder */
+                       interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 311>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+                       resets = <&cpg 311>;
+                       status = "disabled";
                };
 
                gic: interrupt-controller@f1010000 {
similarity index 92%
rename from arch/arm64/boot/dts/renesas/r8a77965-m3nulcb-kf.dts
rename to arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dts
index dadad97051b99f8c51e9cdd88bdaf25043791f60..12aa08fd6fd87f7eeaa131a61789f8715684ef9b 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (C) 2018 Cogent Embedded, Inc.
  */
 
-#include "r8a77965-m3nulcb.dts"
+#include "r8a77965-ulcb.dts"
 #include "ulcb-kf.dtsi"
 
 / {
index bdbe197774d2f659773c546c39152c545b45d94b..c17d90bd160e0045378adf60d380ca0f5ca3cdf8 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a77965-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a77965-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a77965",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77965",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77965",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77965",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77965",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec720000 0 0x10000>;
-                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                               0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                               0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000
-                               0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000
-                               0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000
-                               0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00100000>,
+                                <0x02000000 0 0xeea00000 0 0xeea00000 0 0x00200000>,
+                                <0x02000000 0 0xc0000000 0 0xc0000000 0 0x08000000>,
+                                <0x42000000 0 0xc8000000 0 0xc8000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
index 0d0558e53533f0dc4cfaaf7a4f88e0a2ac464ac1..664a73a2cc69dc2a66374a9f536a0e4ebc624240 100644 (file)
 
                thermal: thermal@e6190000 {
                        compatible = "renesas,thermal-r8a77970";
-                       reg =  <0 0xe6190000 0 0x10
-                               0 0xe6190100 0 0x120>;
+                       reg = <0 0xe6190000 0 0x10>,
+                             <0 0xe6190100 0 0x120>;
                        interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,dmac-r8a77970",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7";
                        compatible = "renesas,dmac-r8a77970",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7";
index 4d86669af819f089cf05c7e6933b2996e92d61ad..b340fb469999392b31e826536270cdcc7caea667 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,dmac-r8a77980",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77980",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 362 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 364 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 365 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 366 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 362 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 364 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 365 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 366 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                          "ch0", "ch1", "ch2", "ch3",
                                          "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <
-                               0x01000000 0 0x00000000 0 0xfe100000 0 0x0100000
-                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x0200000
-                               0x02000000 0 0x30000000 0 0x30000000 0 0x8000000
-                               0x42000000 0 0x38000000 0 0x38000000 0 0x8000000
-                       >;
-                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000
-                                     0 0x80000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x0100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x0200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x8000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x8000000>;
+                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
                        interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
                        #interrupt-cells = <1>;
                        interrupt-map-mask = <0 0 0 0>;
-                       interrupt-map = <0 0 0 0 &gic GIC_SPI 148
-                                        IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map = <0 0 0 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>;
                        clock-names = "pcie", "pcie_bus";
                        power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
index b38f9d442fc08f2c7e5a606e0ddc8fe9ac6dfd78..4fd2b14fbb8b5a13ba1387474c202248673db705 100644 (file)
 
                gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi1: regulator-vcc-sdhi1 {
 
                gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vga {
        /* audio_clkout0/1/2/3 */
        #clock-cells = <1>;
        clock-frequency = <12288000 11289600>;
-       clkout-lr-synchronous;
 
        status = "okay";
 
index 67a6824a962c57a1b6ab0159201e713a6977eb34..32d91f2102460f276914b370a334e3f8c098d77b 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a77990-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a77990-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a77990",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77990",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77990",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        compatible = "renesas,dmac-r8a77990",
                                     "renesas,rcar-dmac";
                        reg = <0 0xec700000 0 0x10000>;
-                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7",
                        #size-cells = <2>;
                        bus-range = <0x00 0xff>;
                        device_type = "pci";
-                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-                                 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-                                 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-                                 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+                       ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
+                                <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
+                                <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
+                                <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
                        /* Map all possible DDR as inbound ranges */
                        dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>;
                        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
index e6ee2b709ba61bd32d4554cfedfed1aaffe69356..9503007c34c004dfe7427a429a9030ebe1d5a81a 100644 (file)
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        reg = <0 0xe61c0000 0 0x200>;
-                       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 18 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       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 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                        compatible = "renesas,r8a77995-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65a0000 0 0x100>;
-                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 330>;
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
                        compatible = "renesas,r8a77995-usb-dmac",
                                     "renesas,usb-dmac";
                        reg = <0 0xe65b0000 0 0x100>;
-                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "ch0", "ch1";
                        clocks = <&cpg CPG_MOD 331>;
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
                        compatible = "renesas,dmac-r8a77995",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe6700000 0 0x10000>;
-                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7";
                        compatible = "renesas,dmac-r8a77995",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7300000 0 0x10000>;
-                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7";
                        compatible = "renesas,dmac-r8a77995",
                                     "renesas,rcar-dmac";
                        reg = <0 0xe7310000 0 0x10000>;
-                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
-                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "error",
                                        "ch0", "ch1", "ch2", "ch3",
                                        "ch4", "ch5", "ch6", "ch7";
index 21e01056e759e77638a636a002dbfa2cc0082dfd..98bbcafc8c0d030ccd89372028603ad05ec4ea0c 100644 (file)
 
                gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi3: regulator-vcc-sdhi3 {
 
                gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vga {
index 3ef89171538ffd03ae8b4b67a80f679a1eb3c9e1..ff88af8e39d3fa10fb69e10d21f621ede93d4754 100644 (file)
 
                gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        x12_clk: x12 {
index 2bdc23804f40eda34b2bb1d9ee8a197cb12df170..f4f1f5148cc2328daff965ed6521dfc98b5773dc 100644 (file)
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_SPRD) += sc9836-openphone.dtb \
-                       sp9860g-1h10.dtb
+                       sp9860g-1h10.dtb        \
+                       sp9863a-1h10.dtb
diff --git a/arch/arm64/boot/dts/sprd/sc9863a.dtsi b/arch/arm64/boot/dts/sprd/sc9863a.dtsi
new file mode 100644 (file)
index 0000000..cd80756
--- /dev/null
@@ -0,0 +1,523 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Unisoc SC9863A SoC DTS file
+ *
+ * Copyright (C) 2019, Unisoc Inc.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "sharkl3.dtsi"
+
+/ {
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&CPU0>;
+                               };
+                               core1 {
+                                       cpu = <&CPU1>;
+                               };
+                               core2 {
+                                       cpu = <&CPU2>;
+                               };
+                               core3 {
+                                       cpu = <&CPU3>;
+                               };
+                               core4 {
+                                       cpu = <&CPU4>;
+                               };
+                               core5 {
+                                       cpu = <&CPU5>;
+                               };
+                               core6 {
+                                       cpu = <&CPU6>;
+                               };
+                               core7 {
+                                       cpu = <&CPU7>;
+                               };
+                       };
+               };
+
+               CPU0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+
+               CPU1: cpu@100 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x100>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+
+               CPU2: cpu@200 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x200>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+
+               CPU3: cpu@300 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x300>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+
+               CPU4: cpu@400 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x400>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+
+               CPU5: cpu@500 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x500>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+
+               CPU6: cpu@600 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x600>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+
+               CPU7: cpu@700 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x0 0x700>;
+                       enable-method = "psci";
+                       cpu-idle-states = <&CORE_PD>;
+               };
+       };
+
+       idle-states {
+               entry-method = "arm,psci";
+               CORE_PD: core-pd {
+                       compatible = "arm,idle-state";
+                       entry-latency-us = <4000>;
+                       exit-latency-us = <4000>;
+                       min-residency-us = <10000>;
+                       local-timer-stop;
+                       arm,psci-suspend-param = <0x00010000>;
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>, /* Physical Secure PPI */
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>, /* Physical Non-Secure PPI */
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>, /* Virtual PPI */
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>; /* Hipervisor PPI */
+       };
+
+       pmu {
+               compatible = "arm,armv8-pmuv3";
+               interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       soc {
+               gic: interrupt-controller@14000000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <3>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges;
+                       redistributor-stride = <0x0 0x20000>;   /* 128KB stride */
+                       #redistributor-regions = <1>;
+                       interrupt-controller;
+                       reg = <0x0 0x14000000 0 0x20000>,       /* GICD */
+                             <0x0 0x14040000 0 0x100000>;      /* GICR */
+                       interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               funnel@10001000 {
+                       compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
+                       reg = <0 0x10001000 0 0x1000>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       funnel_soc_out_port: endpoint {
+                                               remote-endpoint = <&etb_in>;
+                                       };
+                               };
+                       };
+
+                       in-ports {
+                               port {
+                                       funnel_soc_in_port: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_ca55_out_port>;
+                                       };
+                               };
+                       };
+               };
+
+               etb@10003000 {
+                       compatible = "arm,coresight-tmc", "arm,primecell";
+                       reg = <0 0x10003000 0 0x1000>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       in-ports {
+                               port {
+                                       etb_in: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_soc_out_port>;
+                                       };
+                               };
+                       };
+               };
+
+               funnel@12001000 {
+                       compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
+                       reg = <0 0x12001000 0 0x1000>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       funnel_little_out_port: endpoint {
+                                               remote-endpoint =
+                                               <&etf_little_in>;
+                                       };
+                               };
+                       };
+
+                       in-ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       funnel_little_in_port0: endpoint {
+                                               remote-endpoint = <&etm0_out>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       funnel_little_in_port1: endpoint {
+                                               remote-endpoint = <&etm1_out>;
+                                       };
+                               };
+
+                               port@2 {
+                                       reg = <2>;
+                                       funnel_little_in_port2: endpoint {
+                                               remote-endpoint = <&etm2_out>;
+                                       };
+                               };
+
+                               port@3 {
+                                       reg = <3>;
+                                       funnel_little_in_port3: endpoint {
+                                               remote-endpoint = <&etm3_out>;
+                                       };
+                               };
+                       };
+               };
+
+               etf@12002000 {
+                       compatible = "arm,coresight-tmc", "arm,primecell";
+                       reg = <0 0x12002000 0 0x1000>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etf_little_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_ca55_in_port0>;
+                                       };
+                               };
+                       };
+
+                       in-port {
+                               port {
+                                       etf_little_in: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_little_out_port>;
+                                       };
+                               };
+                       };
+               };
+
+               etf@12003000 {
+                       compatible = "arm,coresight-tmc", "arm,primecell";
+                       reg = <0 0x12003000 0 0x1000>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etf_big_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_ca55_in_port1>;
+                                       };
+                               };
+                       };
+
+                       in-ports {
+                               port {
+                                       etf_big_in: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_big_out_port>;
+                                       };
+                               };
+                       };
+               };
+
+               funnel@12004000 {
+                       compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
+                       reg = <0 0x12004000 0 0x1000>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       funnel_ca55_out_port: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_soc_in_port>;
+                                       };
+                               };
+                       };
+
+                       in-ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       funnel_ca55_in_port0: endpoint {
+                                               remote-endpoint =
+                                               <&etf_little_out>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       funnel_ca55_in_port1: endpoint {
+                                               remote-endpoint =
+                                               <&etf_big_out>;
+                                       };
+                               };
+                       };
+               };
+
+               funnel@12005000 {
+                       compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
+                       reg = <0 0x12005000 0 0x1000>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       funnel_big_out_port: endpoint {
+                                               remote-endpoint =
+                                               <&etf_big_in>;
+                                       };
+                               };
+                       };
+
+                       in-ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       funnel_big_in_port0: endpoint {
+                                               remote-endpoint = <&etm4_out>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       funnel_big_in_port1: endpoint {
+                                               remote-endpoint = <&etm5_out>;
+                                       };
+                               };
+
+                               port@2 {
+                                       reg = <2>;
+                                       funnel_big_in_port2: endpoint {
+                                               remote-endpoint = <&etm6_out>;
+                                       };
+                               };
+
+                               port@3 {
+                                       reg = <3>;
+                                       funnel_big_in_port3: endpoint {
+                                               remote-endpoint = <&etm7_out>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13040000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13040000 0 0x1000>;
+                       cpu = <&CPU0>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm0_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_little_in_port0>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13140000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13140000 0 0x1000>;
+                       cpu = <&CPU1>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm1_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_little_in_port1>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13240000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13240000 0 0x1000>;
+                       cpu = <&CPU2>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm2_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_little_in_port2>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13340000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13340000 0 0x1000>;
+                       cpu = <&CPU3>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm3_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_little_in_port3>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13440000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13440000 0 0x1000>;
+                       cpu = <&CPU4>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm4_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_big_in_port0>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13540000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13540000 0 0x1000>;
+                       cpu = <&CPU5>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm5_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_big_in_port1>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13640000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13640000 0 0x1000>;
+                       cpu = <&CPU6>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm6_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_big_in_port2>;
+                                       };
+                               };
+                       };
+               };
+
+               etm@13740000 {
+                       compatible = "arm,coresight-etm4x", "arm,primecell";
+                       reg = <0 0x13740000 0 0x1000>;
+                       cpu = <&CPU7>;
+                       clocks = <&ext_26m>;
+                       clock-names = "apb_pclk";
+
+                       out-ports {
+                               port {
+                                       etm7_out: endpoint {
+                                               remote-endpoint =
+                                               <&funnel_big_in_port3>;
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm64/boot/dts/sprd/sharkl3.dtsi b/arch/arm64/boot/dts/sprd/sharkl3.dtsi
new file mode 100644 (file)
index 0000000..0222128
--- /dev/null
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Unisoc Sharkl3 platform DTS file
+ *
+ * Copyright (C) 2019, Unisoc Inc.
+ */
+
+/ {
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       soc: soc {
+               compatible = "simple-bus";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               apb@70000000 {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x0 0x70000000 0x10000000>;
+
+                       uart0: serial@0 {
+                               compatible = "sprd,sc9863a-uart",
+                                            "sprd,sc9836-uart";
+                               reg = <0x0 0x100>;
+                               interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&ext_26m>;
+                               status = "disabled";
+                       };
+
+                       uart1: serial@100000 {
+                               compatible = "sprd,sc9863a-uart",
+                                            "sprd,sc9836-uart";
+                               reg = <0x100000 0x100>;
+                               interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&ext_26m>;
+                               status = "disabled";
+                       };
+
+                       uart2: serial@200000 {
+                               compatible = "sprd,sc9863a-uart",
+                                            "sprd,sc9836-uart";
+                               reg = <0x200000 0x100>;
+                               interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&ext_26m>;
+                               status = "disabled";
+                       };
+
+                       uart3: serial@300000 {
+                               compatible = "sprd,sc9863a-uart",
+                                            "sprd,sc9836-uart";
+                               reg = <0x300000 0x100>;
+                               interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&ext_26m>;
+                               status = "disabled";
+                       };
+
+                       uart4: serial@400000 {
+                               compatible = "sprd,sc9863a-uart",
+                                            "sprd,sc9836-uart";
+                               reg = <0x400000 0x100>;
+                               interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&ext_26m>;
+                               status = "disabled";
+                       };
+               };
+       };
+
+       ext_26m: ext-26m {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <26000000>;
+               clock-output-names = "ext-26m";
+       };
+};
diff --git a/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts b/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
new file mode 100644 (file)
index 0000000..5c32c15
--- /dev/null
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Unisoc SP9863A-1h10 boards DTS file
+ *
+ * Copyright (C) 2019, Unisoc Inc.
+ */
+
+/dts-v1/;
+
+#include "sc9863a.dtsi"
+
+/ {
+       model = "Spreadtrum SP9863A-1H10 Board";
+
+       compatible = "sprd,sp9863a-1h10", "sprd,sc9863a";
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x0 0x80000000 0x0 0x80000000>;
+       };
+
+       chosen {
+               stdout-path = "serial1:115200n8";
+               bootargs = "earlycon";
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
+};
index ba8f82a29a816a0bc7b5a6793403ccfa09f5c7d9..e794b2d53adfcf9d9c0a94d93f7e3109c725ae40 100644 (file)
@@ -44,13 +44,6 @@ static struct cvmx_bootmem_desc *cvmx_bootmem_desc;
 
 /* See header file for descriptions of functions */
 
-/**
- * This macro returns the size of a member of a structure.
- * Logically it is the same as "sizeof(s::field)" in C++, but
- * C lacks the "::" operator.
- */
-#define SIZEOF_FIELD(s, field) sizeof(((s *)NULL)->field)
-
 /**
  * This macro returns a member of the
  * cvmx_bootmem_named_block_desc_t structure. These members can't
@@ -65,7 +58,7 @@ static struct cvmx_bootmem_desc *cvmx_bootmem_desc;
 #define CVMX_BOOTMEM_NAMED_GET_FIELD(addr, field)                      \
        __cvmx_bootmem_desc_get(addr,                                   \
                offsetof(struct cvmx_bootmem_named_block_desc, field),  \
-               SIZEOF_FIELD(struct cvmx_bootmem_named_block_desc, field))
+               sizeof_field(struct cvmx_bootmem_named_block_desc, field))
 
 /**
  * This function is the implementation of the get macros defined
index b56af759dcdfcc2b8c3d19ff7bfed99bda0ddde2..819bdfcc2e714d64ba1657de319dcc1ba6b6a5da 100644 (file)
@@ -138,6 +138,14 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
                                return NULL;
        }
 
+       /*
+        * Map uncached objects in the low part of address space to
+        * CONFIG_NIOS2_IO_REGION_BASE
+        */
+       if (IS_MAPPABLE_UNCACHEABLE(phys_addr) &&
+           IS_MAPPABLE_UNCACHEABLE(last_addr))
+               return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr);
+
        /* Mappings have to be page-aligned */
        offset = phys_addr & ~PAGE_MASK;
        phys_addr &= PAGE_MASK;
index 6e5a2a4faeab0d9fe4b49851ecee60d6e7baada4..4ec2a9f14f845cebe96449faeb32914abcf55eae 100644 (file)
@@ -97,12 +97,12 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
 #ifdef CONFIG_SMP
 #ifdef CONFIG_PPC64
 #define PPC_BPF_LOAD_CPU(r)            \
-       do { BUILD_BUG_ON(FIELD_SIZEOF(struct paca_struct, paca_index) != 2);   \
+       do { BUILD_BUG_ON(sizeof_field(struct paca_struct, paca_index) != 2);   \
                PPC_LHZ_OFFS(r, 13, offsetof(struct paca_struct, paca_index));  \
        } while (0)
 #else
 #define PPC_BPF_LOAD_CPU(r)     \
-       do { BUILD_BUG_ON(FIELD_SIZEOF(struct task_struct, cpu) != 4);          \
+       do { BUILD_BUG_ON(sizeof_field(struct task_struct, cpu) != 4);          \
                PPC_LHZ_OFFS(r, 2, offsetof(struct task_struct, cpu));          \
        } while(0)
 #endif
index d57b46e0dd6044d1a918e8a518f4fead29ad5c0e..0acc9d5fb19e9a638c8bdc4f6f699d5b62689e7d 100644 (file)
@@ -321,7 +321,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
                        ctx->seen |= SEEN_XREG | SEEN_MEM | (1<<(K & 0xf));
                        break;
                case BPF_LD | BPF_W | BPF_LEN: /*       A = skb->len; */
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, len) != 4);
+                       BUILD_BUG_ON(sizeof_field(struct sk_buff, len) != 4);
                        PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, len));
                        break;
                case BPF_LDX | BPF_W | BPF_ABS: /* A = *((u32 *)(seccomp_data + K)); */
@@ -333,16 +333,16 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
 
                        /*** Ancillary info loads ***/
                case BPF_ANC | SKF_AD_PROTOCOL: /* A = ntohs(skb->protocol); */
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff,
+                       BUILD_BUG_ON(sizeof_field(struct sk_buff,
                                                  protocol) != 2);
                        PPC_NTOHS_OFFS(r_A, r_skb, offsetof(struct sk_buff,
                                                            protocol));
                        break;
                case BPF_ANC | SKF_AD_IFINDEX:
                case BPF_ANC | SKF_AD_HATYPE:
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct net_device,
+                       BUILD_BUG_ON(sizeof_field(struct net_device,
                                                ifindex) != 4);
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct net_device,
+                       BUILD_BUG_ON(sizeof_field(struct net_device,
                                                type) != 2);
                        PPC_LL_OFFS(r_scratch1, r_skb, offsetof(struct sk_buff,
                                                                dev));
@@ -365,17 +365,17 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
 
                        break;
                case BPF_ANC | SKF_AD_MARK:
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4);
+                       BUILD_BUG_ON(sizeof_field(struct sk_buff, mark) != 4);
                        PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
                                                          mark));
                        break;
                case BPF_ANC | SKF_AD_RXHASH:
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4);
+                       BUILD_BUG_ON(sizeof_field(struct sk_buff, hash) != 4);
                        PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
                                                          hash));
                        break;
                case BPF_ANC | SKF_AD_VLAN_TAG:
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2);
+                       BUILD_BUG_ON(sizeof_field(struct sk_buff, vlan_tci) != 2);
 
                        PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
                                                          vlan_tci));
@@ -388,7 +388,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
                                PPC_ANDI(r_A, r_A, 1);
                        break;
                case BPF_ANC | SKF_AD_QUEUE:
-                       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff,
+                       BUILD_BUG_ON(sizeof_field(struct sk_buff,
                                                  queue_mapping) != 2);
                        PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
                                                          queue_mapping));
index 634759ac8c717a8d0c2b5774ceb9ec9ce53da86b..d325b67d00dfcf70c4f3cf89e68e3964eec62a06 100644 (file)
@@ -2,8 +2,8 @@ menu "SoC selection"
 
 config SOC_SIFIVE
        bool "SiFive SoCs"
-       select SERIAL_SIFIVE
-       select SERIAL_SIFIVE_CONSOLE
+       select SERIAL_SIFIVE if TTY
+       select SERIAL_SIFIVE_CONSOLE if TTY
        select CLK_SIFIVE
        select CLK_SIFIVE_FU540_PRCI
        select SIFIVE_PLIC
index a474f98ce4fae8d49e65dec1f8da26d72c70745b..36db8145f9f46013c2b1b31e3c7e9f75e4dce349 100644 (file)
@@ -24,7 +24,7 @@ $(obj)/Image: vmlinux FORCE
 $(obj)/Image.gz: $(obj)/Image FORCE
        $(call if_changed,gzip)
 
-loader.o: $(src)/loader.S $(obj)/Image
+$(obj)/loader.o: $(src)/loader.S $(obj)/Image
 
 $(obj)/loader: $(obj)/loader.o $(obj)/Image $(obj)/loader.lds FORCE
        $(Q)$(LD) -T $(obj)/loader.lds -o $@ $(obj)/loader.o
index d4051e88e6250ddbb621b18c0dc6f8356411ffd8..bc88841d335d20816596d354060341d2377c4df8 100644 (file)
@@ -124,6 +124,7 @@ config S390
        select HAVE_ARCH_JUMP_LABEL
        select HAVE_ARCH_JUMP_LABEL_RELATIVE
        select HAVE_ARCH_KASAN
+       select HAVE_ARCH_KASAN_VMALLOC
        select CPU_NO_EFFICIENT_FFS if !HAVE_MARCH_Z9_109_FEATURES
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_SOFT_DIRTY
index 6dc6c4fbc8e2b1a59796afb96bff120d4c0f8a21..69289e99cabdcee175a4a176881a128f49e3a574 100644 (file)
@@ -27,7 +27,6 @@
 #define MACHINE_FLAG_DIAG9C    BIT(3)
 #define MACHINE_FLAG_ESOP      BIT(4)
 #define MACHINE_FLAG_IDTE      BIT(5)
-#define MACHINE_FLAG_DIAG44    BIT(6)
 #define MACHINE_FLAG_EDAT1     BIT(7)
 #define MACHINE_FLAG_EDAT2     BIT(8)
 #define MACHINE_FLAG_TOPOLOGY  BIT(10)
@@ -94,7 +93,6 @@ extern unsigned long __swsusp_reset_dma;
 #define MACHINE_HAS_DIAG9C     (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C)
 #define MACHINE_HAS_ESOP       (S390_lowcore.machine_flags & MACHINE_FLAG_ESOP)
 #define MACHINE_HAS_IDTE       (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE)
-#define MACHINE_HAS_DIAG44     (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44)
 #define MACHINE_HAS_EDAT1      (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1)
 #define MACHINE_HAS_EDAT2      (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2)
 #define MACHINE_HAS_TOPOLOGY   (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY)
index ef3c00b049ab45b4cd050d97a30e8210b63f7676..4093a2856929a0a420b82c819116fc6d4da6e90b 100644 (file)
@@ -86,7 +86,7 @@ static inline int share(unsigned long addr, u16 cmd)
        };
 
        if (!is_prot_virt_guest())
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        /*
         * Sharing is page wise, if we encounter addresses that are
         * not page aligned, we assume something went wrong. If
index db32a55daaec605a7b0042f7c4eb126996c9ccba..cd241ee66eff4feb6d39842ac9972136394e23c1 100644 (file)
@@ -204,21 +204,6 @@ static __init void detect_diag9c(void)
                S390_lowcore.machine_flags |= MACHINE_FLAG_DIAG9C;
 }
 
-static __init void detect_diag44(void)
-{
-       int rc;
-
-       diag_stat_inc(DIAG_STAT_X044);
-       asm volatile(
-               "       diag    0,0,0x44\n"
-               "0:     la      %0,0\n"
-               "1:\n"
-               EX_TABLE(0b,1b)
-               : "=d" (rc) : "0" (-EOPNOTSUPP) : "cc");
-       if (!rc)
-               S390_lowcore.machine_flags |= MACHINE_FLAG_DIAG44;
-}
-
 static __init void detect_machine_facilities(void)
 {
        if (test_facility(8)) {
@@ -331,7 +316,6 @@ void __init startup_init(void)
        setup_arch_string();
        setup_boot_command_line();
        detect_diag9c();
-       detect_diag44();
        detect_machine_facilities();
        save_vector_registers();
        setup_topology();
index c07fdcd737266de36e821eae1d0fcc0bb41abf27..77d93c534284d0bba7b1a02f99e743d9d5ff8292 100644 (file)
@@ -1303,18 +1303,28 @@ static void hw_perf_event_update(struct perf_event *event, int flush_all)
                 */
                if (flush_all && done)
                        break;
-
-               /* If an event overflow happened, discard samples by
-                * processing any remaining sample-data-blocks.
-                */
-               if (event_overflow)
-                       flush_all = 1;
        }
 
        /* Account sample overflows in the event hardware structure */
        if (sampl_overflow)
                OVERFLOW_REG(hwc) = DIV_ROUND_UP(OVERFLOW_REG(hwc) +
                                                 sampl_overflow, 1 + num_sdb);
+
+       /* Perf_event_overflow() and perf_event_account_interrupt() limit
+        * the interrupt rate to an upper limit. Roughly 1000 samples per
+        * task tick.
+        * Hitting this limit results in a large number
+        * of throttled REF_REPORT_THROTTLE entries and the samples
+        * are dropped.
+        * Slightly increase the interval to avoid hitting this limit.
+        */
+       if (event_overflow) {
+               SAMPL_RATE(hwc) += DIV_ROUND_UP(SAMPL_RATE(hwc), 10);
+               debug_sprintf_event(sfdbg, 1, "%s: rate adjustment %ld\n",
+                                   __func__,
+                                   DIV_ROUND_UP(SAMPL_RATE(hwc), 10));
+       }
+
        if (sampl_overflow || event_overflow)
                debug_sprintf_event(sfdbg, 4, "%s: "
                                    "overflows: sample %llu event %llu"
index 2794cad9312e37cda034425386edf7356f2e6d97..a08bd2522dd95a08a27de50850e60546fedb31e5 100644 (file)
@@ -413,14 +413,11 @@ EXPORT_SYMBOL(arch_vcpu_is_preempted);
 
 void smp_yield_cpu(int cpu)
 {
-       if (MACHINE_HAS_DIAG9C) {
-               diag_stat_inc_norecursion(DIAG_STAT_X09C);
-               asm volatile("diag %0,0,0x9c"
-                            : : "d" (pcpu_devices[cpu].address));
-       } else if (MACHINE_HAS_DIAG44 && !smp_cpu_mtid) {
-               diag_stat_inc_norecursion(DIAG_STAT_X044);
-               asm volatile("diag 0,0,0x44");
-       }
+       if (!MACHINE_HAS_DIAG9C)
+               return;
+       diag_stat_inc_norecursion(DIAG_STAT_X09C);
+       asm volatile("diag %0,0,0x9c"
+                    : : "d" (pcpu_devices[cpu].address));
 }
 
 /*
index ce1e4bbe53aaf2d447f4aa82a4ba1c55ffdc13e6..9b2dab5a69f995055c9067f37a5688d65f1b4642 100644 (file)
@@ -242,7 +242,6 @@ static inline void arch_spin_lock_classic(arch_spinlock_t *lp)
 
 void arch_spin_lock_wait(arch_spinlock_t *lp)
 {
-       /* Use classic spinlocks + niai if the steal time is >= 10% */
        if (test_cpu_flag(CIF_DEDICATED_CPU))
                arch_spin_lock_queued(lp);
        else
index bda7ac0ddd29710d62bb23911408cc4e64adc329..32b7a30b2485d53f9dede2756ddfb7ce105bc4da 100644 (file)
@@ -238,7 +238,7 @@ static int test_unwind_irq(struct unwindme *u)
 {
        preempt_disable();
        if (register_external_irq(EXT_IRQ_CLK_COMP, unwindme_irq_handler)) {
-               pr_info("Couldn't reqister external interrupt handler");
+               pr_info("Couldn't register external interrupt handler");
                return -1;
        }
        u->task = current;
index 460f2557294021f0f7bd49e1f31bcfbaed007f31..06345616a6466a921c9476ca6ecf6a0710a3638a 100644 (file)
@@ -82,7 +82,8 @@ static pte_t * __init kasan_early_pte_alloc(void)
 enum populate_mode {
        POPULATE_ONE2ONE,
        POPULATE_MAP,
-       POPULATE_ZERO_SHADOW
+       POPULATE_ZERO_SHADOW,
+       POPULATE_SHALLOW
 };
 static void __init kasan_early_vmemmap_populate(unsigned long address,
                                                unsigned long end,
@@ -116,6 +117,12 @@ static void __init kasan_early_vmemmap_populate(unsigned long address,
                        pgd_populate(&init_mm, pg_dir, p4_dir);
                }
 
+               if (IS_ENABLED(CONFIG_KASAN_S390_4_LEVEL_PAGING) &&
+                   mode == POPULATE_SHALLOW) {
+                       address = (address + P4D_SIZE) & P4D_MASK;
+                       continue;
+               }
+
                p4_dir = p4d_offset(pg_dir, address);
                if (p4d_none(*p4_dir)) {
                        if (mode == POPULATE_ZERO_SHADOW &&
@@ -130,6 +137,12 @@ static void __init kasan_early_vmemmap_populate(unsigned long address,
                        p4d_populate(&init_mm, p4_dir, pu_dir);
                }
 
+               if (!IS_ENABLED(CONFIG_KASAN_S390_4_LEVEL_PAGING) &&
+                   mode == POPULATE_SHALLOW) {
+                       address = (address + PUD_SIZE) & PUD_MASK;
+                       continue;
+               }
+
                pu_dir = pud_offset(p4_dir, address);
                if (pud_none(*pu_dir)) {
                        if (mode == POPULATE_ZERO_SHADOW &&
@@ -195,6 +208,9 @@ static void __init kasan_early_vmemmap_populate(unsigned long address,
                                page = kasan_early_shadow_page;
                                pte_val(*pt_dir) = __pa(page) | pgt_prot_zero;
                                break;
+                       case POPULATE_SHALLOW:
+                               /* should never happen */
+                               break;
                        }
                }
                address += PAGE_SIZE;
@@ -313,22 +329,50 @@ void __init kasan_early_init(void)
        init_mm.pgd = early_pg_dir;
        /*
         * Current memory layout:
-        * +- 0 -------------+   +- shadow start -+
-        * | 1:1 ram mapping |  /| 1/8 ram        |
-        * +- end of ram ----+ / +----------------+
-        * | ... gap ...     |/  |      kasan     |
-        * +- shadow start --+   |      zero      |
-        * | 1/8 addr space  |   |      page      |
-        * +- shadow end    -+   |      mapping   |
-        * | ... gap ...     |\  |    (untracked) |
-        * +- modules vaddr -+ \ +----------------+
-        * | 2Gb             |  \|      unmapped  | allocated per module
-        * +-----------------+   +- shadow end ---+
+        * +- 0 -------------+     +- shadow start -+
+        * | 1:1 ram mapping |    /| 1/8 ram        |
+        * |                 |   / |                |
+        * +- end of ram ----+  /  +----------------+
+        * | ... gap ...     | /   |                |
+        * |                 |/    |    kasan       |
+        * +- shadow start --+     |    zero        |
+        * | 1/8 addr space  |     |    page        |
+        * +- shadow end    -+     |    mapping     |
+        * | ... gap ...     |\    |  (untracked)   |
+        * +- vmalloc area  -+ \   |                |
+        * | vmalloc_size    |  \  |                |
+        * +- modules vaddr -+   \ +----------------+
+        * | 2Gb             |    \|      unmapped  | allocated per module
+        * +-----------------+     +- shadow end ---+
+        *
+        * Current memory layout (KASAN_VMALLOC):
+        * +- 0 -------------+     +- shadow start -+
+        * | 1:1 ram mapping |    /| 1/8 ram        |
+        * |                 |   / |                |
+        * +- end of ram ----+  /  +----------------+
+        * | ... gap ...     | /   |    kasan       |
+        * |                 |/    |    zero        |
+        * +- shadow start --+     |    page        |
+        * | 1/8 addr space  |     |    mapping     |
+        * +- shadow end    -+     |  (untracked)   |
+        * | ... gap ...     |\    |                |
+        * +- vmalloc area  -+ \   +- vmalloc area -+
+        * | vmalloc_size    |  \  |shallow populate|
+        * +- modules vaddr -+   \ +- modules area -+
+        * | 2Gb             |    \|shallow populate|
+        * +-----------------+     +- shadow end ---+
         */
        /* populate kasan shadow (for identity mapping and zero page mapping) */
        kasan_early_vmemmap_populate(__sha(0), __sha(memsize), POPULATE_MAP);
        if (IS_ENABLED(CONFIG_MODULES))
                untracked_mem_end = vmax - MODULES_LEN;
+       if (IS_ENABLED(CONFIG_KASAN_VMALLOC)) {
+               untracked_mem_end = vmax - vmalloc_size - MODULES_LEN;
+               /* shallowly populate kasan shadow for vmalloc and modules */
+               kasan_early_vmemmap_populate(__sha(untracked_mem_end),
+                                            __sha(vmax), POPULATE_SHALLOW);
+       }
+       /* populate kasan shadow for untracked memory */
        kasan_early_vmemmap_populate(__sha(max_physmem_end),
                                     __sha(untracked_mem_end),
                                     POPULATE_ZERO_SHADOW);
index f6d148451dfc724eb8f2fa5bf4916d8d459136d8..f3dc3f25b3ff08c2af8bd2a1db845fd2c6308ded 100644 (file)
@@ -325,9 +325,9 @@ int __init sh_early_platform_driver_probe(char *class_str,
 }
 
 /**
- * sh_early_platform_cleanup - clean up early platform code
+ * early_platform_cleanup - clean up early platform code
  */
-static int __init sh_early_platform_cleanup(void)
+void __init early_platform_cleanup(void)
 {
        struct platform_device *pd, *pd2;
 
@@ -337,11 +337,4 @@ static int __init sh_early_platform_cleanup(void)
                list_del(&pd->dev.devres_head);
                memset(&pd->dev.devres_head, 0, sizeof(pd->dev.devres_head));
        }
-
-       return 0;
 }
-/*
- * This must happen once after all early devices are probed but before probing
- * real platform devices.
- */
-subsys_initcall(sh_early_platform_cleanup);
index 6d61f8cf4c131dac3b48b33acc4635f85814a32e..0d5f3c9d52f30edbcbf51141b8de16a294236903 100644 (file)
@@ -266,6 +266,7 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
                ptr = &remcomInBuffer[1];
                if (kgdb_hex2long(&ptr, &addr))
                        linux_regs->pc = addr;
+               /* fallthrough */
        case 'D':
        case 'k':
                atomic_set(&kgdb_cpu_doing_single_step, -1);
index 84cc8f7f83e9934e1aae5b4d38d3ce099c38e32a..c8eabb973b8688648dff42f70bd6f05b43a35103 100644 (file)
@@ -180,19 +180,19 @@ do {                                                                      \
 
 #define emit_loadptr(BASE, STRUCT, FIELD, DEST)                                \
 do {   unsigned int _off = offsetof(STRUCT, FIELD);                    \
-       BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(void *));    \
+       BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(void *));    \
        *prog++ = LDPTRI | RS1(BASE) | S13(_off) | RD(DEST);            \
 } while (0)
 
 #define emit_load32(BASE, STRUCT, FIELD, DEST)                         \
 do {   unsigned int _off = offsetof(STRUCT, FIELD);                    \
-       BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u32));       \
+       BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(u32));       \
        *prog++ = LD32I | RS1(BASE) | S13(_off) | RD(DEST);             \
 } while (0)
 
 #define emit_load16(BASE, STRUCT, FIELD, DEST)                         \
 do {   unsigned int _off = offsetof(STRUCT, FIELD);                    \
-       BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u16));       \
+       BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(u16));       \
        *prog++ = LD16I | RS1(BASE) | S13(_off) | RD(DEST);             \
 } while (0)
 
@@ -202,7 +202,7 @@ do {        unsigned int _off = offsetof(STRUCT, FIELD);                    \
 } while (0)
 
 #define emit_load8(BASE, STRUCT, FIELD, DEST)                          \
-do {   BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u8));        \
+do {   BUILD_BUG_ON(sizeof_field(STRUCT, FIELD) != sizeof(u8));        \
        __emit_load8(BASE, STRUCT, FIELD, DEST);                        \
 } while (0)
 
index 319be936c348ef1f0c09ed99d243e4d04efb8005..fa31470bbf24aa72582b37d56879f16081fe6eaa 100644 (file)
@@ -259,7 +259,7 @@ static void __init setup_xstate_features(void)
                                                   xmm_space);
 
        xstate_offsets[XFEATURE_SSE]    = xstate_sizes[XFEATURE_FP];
-       xstate_sizes[XFEATURE_SSE]      = FIELD_SIZEOF(struct fxregs_state,
+       xstate_sizes[XFEATURE_SSE]      = sizeof_field(struct fxregs_state,
                                                       xmm_space);
 
        for (i = FIRST_EXTENDED_XFEATURE; i < XFEATURE_MAX; i++) {
index 060a361d9d11b09303d901cbfa7dff896d5af1d2..024c3053dbbab673d4d23f7e78726022b03620b5 100644 (file)
@@ -1042,20 +1042,6 @@ void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent,
        if (unlikely(atomic_read(&current->tracing_graph_pause)))
                return;
 
-       /*
-        * If the return location is actually pointing directly to
-        * the start of a direct trampoline (if we trace the trampoline
-        * it will still be offset by MCOUNT_INSN_SIZE), then the
-        * return address is actually off by one word, and we
-        * need to adjust for that.
-        */
-       if (ftrace_direct_func_count) {
-               if (ftrace_find_direct_func(self_addr + MCOUNT_INSN_SIZE)) {
-                       self_addr = *parent;
-                       parent++;
-               }
-       }
-
        /*
         * Protect against fault, even if it shouldn't
         * happen. This tool is too much intrusive to
index 9d54aa37ce6c7074be56e99a14bc60d0bc058edd..a5d75f6bf4c7eedc96454bade72dbc9fe88af74d 100644 (file)
@@ -754,10 +754,12 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page,
        if (WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED)))
                return false;
 
-       if (bio->bi_vcnt > 0 && !bio_full(bio, len)) {
+       if (bio->bi_vcnt > 0) {
                struct bio_vec *bv = &bio->bi_io_vec[bio->bi_vcnt - 1];
 
                if (page_is_mergeable(bv, page, len, off, same_page)) {
+                       if (bio->bi_iter.bi_size > UINT_MAX - len)
+                               return false;
                        bv->bv_len += len;
                        bio->bi_iter.bi_size += len;
                        return true;
index 708dea92dac8c6037dd1716e3d1bccadf346abac..a229b94d53908aa35ff3f2d8d1fa3532df4c2899 100644 (file)
@@ -1061,26 +1061,6 @@ err_unlock:
        return PTR_ERR(blkg);
 }
 
-/**
- * blkcg_drain_queue - drain blkcg part of request_queue
- * @q: request_queue to drain
- *
- * Called from blk_drain_queue().  Responsible for draining blkcg part.
- */
-void blkcg_drain_queue(struct request_queue *q)
-{
-       lockdep_assert_held(&q->queue_lock);
-
-       /*
-        * @q could be exiting and already have destroyed all blkgs as
-        * indicated by NULL root_blkg.  If so, don't confuse policies.
-        */
-       if (!q->root_blkg)
-               return;
-
-       blk_throtl_drain(q);
-}
-
 /**
  * blkcg_exit_queue - exit and release blkcg part of request_queue
  * @q: request_queue being released
index a1e228752083f411f114cd990fa4cad546e3ca45..e0a094fddee5f3e16b660c8cab189987663cb7f7 100644 (file)
@@ -1310,7 +1310,7 @@ EXPORT_SYMBOL_GPL(blk_rq_err_bytes);
 
 void blk_account_io_completion(struct request *req, unsigned int bytes)
 {
-       if (blk_do_io_stat(req)) {
+       if (req->part && blk_do_io_stat(req)) {
                const int sgrp = op_stat_group(req_op(req));
                struct hd_struct *part;
 
@@ -1328,7 +1328,8 @@ void blk_account_io_done(struct request *req, u64 now)
         * normal IO on queueing nor completion.  Accounting the
         * containing request is enough.
         */
-       if (blk_do_io_stat(req) && !(req->rq_flags & RQF_FLUSH_SEQ)) {
+       if (req->part && blk_do_io_stat(req) &&
+           !(req->rq_flags & RQF_FLUSH_SEQ)) {
                const int sgrp = op_stat_group(req_op(req));
                struct hd_struct *part;
 
@@ -1792,9 +1793,9 @@ int __init blk_dev_init(void)
 {
        BUILD_BUG_ON(REQ_OP_LAST >= (1 << REQ_OP_BITS));
        BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 *
-                       FIELD_SIZEOF(struct request, cmd_flags));
+                       sizeof_field(struct request, cmd_flags));
        BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 *
-                       FIELD_SIZEOF(struct bio, bi_opf));
+                       sizeof_field(struct bio, bi_opf));
 
        /* used for unplugging and affects IO latency/throughput - HIGHPRI */
        kblockd_workqueue = alloc_workqueue("kblockd",
index aded260922684061047a2bceac0aaedc0d5ee8d8..9dc53cf9b1f17fb8fbefe6cb647f8b57f76d4c44 100644 (file)
@@ -436,10 +436,10 @@ static int adiantum_init_tfm(struct crypto_skcipher *tfm)
 
        BUILD_BUG_ON(offsetofend(struct adiantum_request_ctx, u) !=
                     sizeof(struct adiantum_request_ctx));
-       subreq_size = max(FIELD_SIZEOF(struct adiantum_request_ctx,
+       subreq_size = max(sizeof_field(struct adiantum_request_ctx,
                                       u.hash_desc) +
                          crypto_shash_descsize(hash),
-                         FIELD_SIZEOF(struct adiantum_request_ctx,
+                         sizeof_field(struct adiantum_request_ctx,
                                       u.streamcipher_req) +
                          crypto_skcipher_reqsize(streamcipher));
 
index 808f2b3621068f6db28e7c3083f3176aeb111c09..495a2d1e1460eaaa3bc0e8c45be9660ba8cebd6f 100644 (file)
@@ -347,7 +347,7 @@ static int essiv_aead_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(aead))
                return PTR_ERR(aead);
 
-       subreq_size = FIELD_SIZEOF(struct essiv_aead_request_ctx, aead_req) +
+       subreq_size = sizeof_field(struct essiv_aead_request_ctx, aead_req) +
                      crypto_aead_reqsize(aead);
 
        tctx->ivoffset = offsetof(struct essiv_aead_request_ctx, aead_req) +
index 08bb9f2f2d2310367c9fde629aaa62e8955bf0e9..5e4a8860a9c0c57e5cdcf64b523ec6d9d40baaf7 100644 (file)
@@ -1314,9 +1314,19 @@ static void acpi_dev_pm_detach(struct device *dev, bool power_off)
  */
 int acpi_dev_pm_attach(struct device *dev, bool power_on)
 {
+       /*
+        * Skip devices whose ACPI companions match the device IDs below,
+        * because they require special power management handling incompatible
+        * with the generic ACPI PM domain.
+        */
+       static const struct acpi_device_id special_pm_ids[] = {
+               {"PNP0C0B", }, /* Generic ACPI fan */
+               {"INT3404", }, /* Fan */
+               {}
+       };
        struct acpi_device *adev = ACPI_COMPANION(dev);
 
-       if (!adev)
+       if (!adev || !acpi_match_device_ids(adev, special_pm_ids))
                return 0;
 
        /*
index e9bc9fcc7ea5cb8213fdf73bc855b86f2c947341..b2dad43dbf82962b76c47c0a87d44bd15541e1de 100644 (file)
@@ -3310,7 +3310,7 @@ static void binder_transaction(struct binder_proc *proc,
                        binder_size_t parent_offset;
                        struct binder_fd_array_object *fda =
                                to_binder_fd_array_object(hdr);
-                       size_t num_valid = (buffer_offset - off_start_offset) *
+                       size_t num_valid = (buffer_offset - off_start_offset) /
                                                sizeof(binder_size_t);
                        struct binder_buffer_object *parent =
                                binder_validate_ptr(target_proc, t->buffer,
@@ -3384,7 +3384,7 @@ static void binder_transaction(struct binder_proc *proc,
                                t->buffer->user_data + sg_buf_offset;
                        sg_buf_offset += ALIGN(bp->length, sizeof(u64));
 
-                       num_valid = (buffer_offset - off_start_offset) *
+                       num_valid = (buffer_offset - off_start_offset) /
                                        sizeof(binder_size_t);
                        ret = binder_fixup_parent(t, thread, bp,
                                                  off_start_offset,
index 30d0523014e0d49e0ac6e16880a7bb08ecfbef27..6cdbf15312387f93455bafb2b816e691def1cb94 100644 (file)
@@ -359,7 +359,7 @@ static int handle_remove(const char *nodename, struct device *dev)
  * If configured, or requested by the commandline, devtmpfs will be
  * auto-mounted after the kernel mounted the root filesystem.
  */
-int devtmpfs_mount(const char *mntdir)
+int devtmpfs_mount(void)
 {
        int err;
 
@@ -369,7 +369,7 @@ int devtmpfs_mount(const char *mntdir)
        if (!thread)
                return 0;
 
-       err = ksys_mount("devtmpfs", mntdir, "devtmpfs", MS_SILENT, NULL);
+       err = do_mount("devtmpfs", "dev", "devtmpfs", MS_SILENT, NULL);
        if (err)
                printk(KERN_INFO "devtmpfs: error mounting %i\n", err);
        else
@@ -394,7 +394,7 @@ static int devtmpfsd(void *p)
        *err = ksys_unshare(CLONE_NEWNS);
        if (*err)
                goto out;
-       *err = ksys_mount("devtmpfs", "/", "devtmpfs", MS_SILENT, NULL);
+       *err = do_mount("devtmpfs", "/", "devtmpfs", MS_SILENT, NULL);
        if (*err)
                goto out;
        ksys_chdir("/.."); /* will traverse into overmounted root */
index 7c532548b0a62d8d0ac99d8d052de4a8d045ef18..cf6b6b722e5c91612b93a52e59b27e06a4aa8877 100644 (file)
@@ -1325,10 +1325,14 @@ struct device *platform_find_device_by_driver(struct device *start,
 }
 EXPORT_SYMBOL_GPL(platform_find_device_by_driver);
 
+void __weak __init early_platform_cleanup(void) { }
+
 int __init platform_bus_init(void)
 {
        int error;
 
+       early_platform_cleanup();
+
        error = device_register(&platform_bus);
        if (error) {
                put_device(&platform_bus);
index e8c5c54e1d2657a1394dde3bdee52b443d32b2e3..d6a6adfd5159d5c6f2587fa10fce6f9d9a5e1a0b 100644 (file)
@@ -171,6 +171,15 @@ static struct xen_blkif *xen_blkif_alloc(domid_t domid)
        blkif->domid = domid;
        atomic_set(&blkif->refcnt, 1);
        init_completion(&blkif->drain_complete);
+
+       /*
+        * Because freeing back to the cache may be deferred, it is not
+        * safe to unload the module (and hence destroy the cache) until
+        * this has completed. To prevent premature unloading, take an
+        * extra module reference here and release only when the object
+        * has been freed back to the cache.
+        */
+       __module_get(THIS_MODULE);
        INIT_WORK(&blkif->free_work, xen_blkif_deferred_free);
 
        return blkif;
@@ -320,6 +329,7 @@ static void xen_blkif_free(struct xen_blkif *blkif)
 
        /* Make sure everything is drained before shutting down */
        kmem_cache_free(xen_blkif_cachep, blkif);
+       module_put(THIS_MODULE);
 }
 
 int __init xen_blkif_interface_init(void)
index 56887c6877a7b519c2bba19f9c15c273d6035eb2..ccb44fe790a71ebbc5ccfa07216cbffaad29d6bd 100644 (file)
@@ -343,6 +343,12 @@ static int sysc_get_clocks(struct sysc *ddata)
                return -EINVAL;
        }
 
+       /* Always add a slot for main clocks fck and ick even if unused */
+       if (!nr_fck)
+               ddata->nr_clocks++;
+       if (!nr_ick)
+               ddata->nr_clocks++;
+
        ddata->clocks = devm_kcalloc(ddata->dev,
                                     ddata->nr_clocks, sizeof(*ddata->clocks),
                                     GFP_KERNEL);
@@ -421,7 +427,7 @@ static int sysc_enable_opt_clocks(struct sysc *ddata)
        struct clk *clock;
        int i, error;
 
-       if (!ddata->clocks)
+       if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1)
                return 0;
 
        for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {
@@ -455,7 +461,7 @@ static void sysc_disable_opt_clocks(struct sysc *ddata)
        struct clk *clock;
        int i;
 
-       if (!ddata->clocks)
+       if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1)
                return;
 
        for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {
@@ -981,7 +987,8 @@ static int sysc_disable_module(struct device *dev)
                return ret;
        }
 
-       if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY)
+       if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_MSTANDBY) ||
+           ddata->cfg.quirks & (SYSC_QUIRK_FORCE_MSTANDBY))
                best_mode = SYSC_IDLE_FORCE;
 
        reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
@@ -1583,6 +1590,10 @@ static int sysc_reset(struct sysc *ddata)
        sysc_val |= sysc_mask;
        sysc_write(ddata, sysc_offset, sysc_val);
 
+       if (ddata->cfg.srst_udelay)
+               usleep_range(ddata->cfg.srst_udelay,
+                            ddata->cfg.srst_udelay * 2);
+
        if (ddata->clk_enable_quirk)
                ddata->clk_enable_quirk(ddata);
 
index a60a1be937ad6566a50270fef46b458ba8edf954..05834953e1fd3a30f2fd6a66e775c7875b8f2638 100644 (file)
@@ -53,6 +53,8 @@
 #define APMU_DISP1     0x110
 #define APMU_CCIC0     0x50
 #define APMU_CCIC1     0xf4
+#define APMU_USBHSIC0  0xf8
+#define APMU_USBHSIC1  0xfc
 #define MPMU_UART_PLL  0x14
 
 struct mmp2_clk_unit {
@@ -194,6 +196,8 @@ static struct mmp_clk_mix_config sdh_mix_config = {
 };
 
 static DEFINE_SPINLOCK(usb_lock);
+static DEFINE_SPINLOCK(usbhsic0_lock);
+static DEFINE_SPINLOCK(usbhsic1_lock);
 
 static DEFINE_SPINLOCK(disp0_lock);
 static DEFINE_SPINLOCK(disp1_lock);
@@ -224,6 +228,8 @@ static struct mmp_param_div_clk apmu_div_clks[] = {
 
 static struct mmp_param_gate_clk apmu_gate_clks[] = {
        {MMP2_CLK_USB, "usb_clk", "usb_pll", 0, APMU_USB, 0x9, 0x9, 0x0, 0, &usb_lock},
+       {MMP2_CLK_USBHSIC0, "usbhsic0_clk", "usb_pll", 0, APMU_USBHSIC0, 0x1b, 0x1b, 0x0, 0, &usbhsic0_lock},
+       {MMP2_CLK_USBHSIC1, "usbhsic1_clk", "usb_pll", 0, APMU_USBHSIC1, 0x1b, 0x1b, 0x0, 0, &usbhsic1_lock},
        /* The gate clocks has mux parent. */
        {MMP2_CLK_SDH0, "sdh0_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH0, 0x1b, 0x1b, 0x0, 0, &sdh_lock},
        {MMP2_CLK_SDH1, "sdh1_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH1, 0x1b, 0x1b, 0x0, 0, &sdh_lock},
index 0005be5ea2b45f560a2a378a3c66b89354b3fb42..33d19c8eb02723646d48ad1eb9a864fd0bc13d81 100644 (file)
@@ -381,7 +381,8 @@ u64 cpuidle_poll_time(struct cpuidle_driver *drv,
                if (dev->states_usage[i].disable)
                        continue;
 
-               limit_ns = (u64)drv->states[i].target_residency_ns;
+               limit_ns = drv->states[i].target_residency_ns;
+               break;
        }
 
        dev->poll_limit_ns = limit_ns;
index c76423aaef4d7ebe1098ec63507752ecf0eb194a..ce6a5f80fb8384c810d8c0890e1a003d216cbed4 100644 (file)
@@ -403,6 +403,13 @@ void cpuidle_driver_state_disabled(struct cpuidle_driver *drv, int idx,
 
        mutex_lock(&cpuidle_lock);
 
+       spin_lock(&cpuidle_driver_lock);
+
+       if (!drv->cpumask) {
+               drv->states[idx].flags |= CPUIDLE_FLAG_UNUSABLE;
+               goto unlock;
+       }
+
        for_each_cpu(cpu, drv->cpumask) {
                struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu);
 
@@ -415,5 +422,8 @@ void cpuidle_driver_state_disabled(struct cpuidle_driver *drv, int idx,
                        dev->states_usage[idx].disable &= ~CPUIDLE_STATE_DISABLED_BY_DRIVER;
        }
 
+unlock:
+       spin_unlock(&cpuidle_driver_lock);
+
        mutex_unlock(&cpuidle_lock);
 }
index 425149e8bab0799753cc1db9a82104fb7bb6600d..57f6944d65a6d21f4b5c87e3d1b8e4c43152bfdf 100644 (file)
 #include <linux/printk.h>
 #include <linux/hrtimer.h>
 #include <linux/of.h>
+#include <linux/pm_qos.h>
 #include "governor.h"
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/devfreq.h>
 
+#define HZ_PER_KHZ     1000
+
 static struct class *devfreq_class;
 
 /*
@@ -98,6 +101,54 @@ static unsigned long find_available_max_freq(struct devfreq *devfreq)
        return max_freq;
 }
 
+/**
+ * get_freq_range() - Get the current freq range
+ * @devfreq:   the devfreq instance
+ * @min_freq:  the min frequency
+ * @max_freq:  the max frequency
+ *
+ * This takes into consideration all constraints.
+ */
+static void get_freq_range(struct devfreq *devfreq,
+                          unsigned long *min_freq,
+                          unsigned long *max_freq)
+{
+       unsigned long *freq_table = devfreq->profile->freq_table;
+       s32 qos_min_freq, qos_max_freq;
+
+       lockdep_assert_held(&devfreq->lock);
+
+       /*
+        * Initialize minimum/maximum frequency from freq table.
+        * The devfreq drivers can initialize this in either ascending or
+        * descending order and devfreq core supports both.
+        */
+       if (freq_table[0] < freq_table[devfreq->profile->max_state - 1]) {
+               *min_freq = freq_table[0];
+               *max_freq = freq_table[devfreq->profile->max_state - 1];
+       } else {
+               *min_freq = freq_table[devfreq->profile->max_state - 1];
+               *max_freq = freq_table[0];
+       }
+
+       /* Apply constraints from PM QoS */
+       qos_min_freq = dev_pm_qos_read_value(devfreq->dev.parent,
+                                            DEV_PM_QOS_MIN_FREQUENCY);
+       qos_max_freq = dev_pm_qos_read_value(devfreq->dev.parent,
+                                            DEV_PM_QOS_MAX_FREQUENCY);
+       *min_freq = max(*min_freq, (unsigned long)HZ_PER_KHZ * qos_min_freq);
+       if (qos_max_freq != PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE)
+               *max_freq = min(*max_freq,
+                               (unsigned long)HZ_PER_KHZ * qos_max_freq);
+
+       /* Apply constraints from OPP interface */
+       *min_freq = max(*min_freq, devfreq->scaling_min_freq);
+       *max_freq = min(*max_freq, devfreq->scaling_max_freq);
+
+       if (*min_freq > *max_freq)
+               *min_freq = *max_freq;
+}
+
 /**
  * devfreq_get_freq_level() - Lookup freq_table for the frequency
  * @devfreq:   the devfreq instance
@@ -351,16 +402,7 @@ int update_devfreq(struct devfreq *devfreq)
        err = devfreq->governor->get_target_freq(devfreq, &freq);
        if (err)
                return err;
-
-       /*
-        * Adjust the frequency with user freq, QoS and available freq.
-        *
-        * List from the highest priority
-        * max_freq
-        * min_freq
-        */
-       max_freq = min(devfreq->scaling_max_freq, devfreq->max_freq);
-       min_freq = max(devfreq->scaling_min_freq, devfreq->min_freq);
+       get_freq_range(devfreq, &min_freq, &max_freq);
 
        if (freq < min_freq) {
                freq = min_freq;
@@ -568,26 +610,69 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
                                 void *devp)
 {
        struct devfreq *devfreq = container_of(nb, struct devfreq, nb);
-       int ret;
+       int err = -EINVAL;
 
        mutex_lock(&devfreq->lock);
 
        devfreq->scaling_min_freq = find_available_min_freq(devfreq);
-       if (!devfreq->scaling_min_freq) {
-               mutex_unlock(&devfreq->lock);
-               return -EINVAL;
-       }
+       if (!devfreq->scaling_min_freq)
+               goto out;
 
        devfreq->scaling_max_freq = find_available_max_freq(devfreq);
        if (!devfreq->scaling_max_freq) {
-               mutex_unlock(&devfreq->lock);
-               return -EINVAL;
+               devfreq->scaling_max_freq = ULONG_MAX;
+               goto out;
        }
 
-       ret = update_devfreq(devfreq);
+       err = update_devfreq(devfreq);
+
+out:
        mutex_unlock(&devfreq->lock);
+       if (err)
+               dev_err(devfreq->dev.parent,
+                       "failed to update frequency from OPP notifier (%d)\n",
+                       err);
 
-       return ret;
+       return NOTIFY_OK;
+}
+
+/**
+ * qos_notifier_call() - Common handler for QoS constraints.
+ * @devfreq:    the devfreq instance.
+ */
+static int qos_notifier_call(struct devfreq *devfreq)
+{
+       int err;
+
+       mutex_lock(&devfreq->lock);
+       err = update_devfreq(devfreq);
+       mutex_unlock(&devfreq->lock);
+       if (err)
+               dev_err(devfreq->dev.parent,
+                       "failed to update frequency from PM QoS (%d)\n",
+                       err);
+
+       return NOTIFY_OK;
+}
+
+/**
+ * qos_min_notifier_call() - Callback for QoS min_freq changes.
+ * @nb:                Should be devfreq->nb_min
+ */
+static int qos_min_notifier_call(struct notifier_block *nb,
+                                        unsigned long val, void *ptr)
+{
+       return qos_notifier_call(container_of(nb, struct devfreq, nb_min));
+}
+
+/**
+ * qos_max_notifier_call() - Callback for QoS max_freq changes.
+ * @nb:                Should be devfreq->nb_max
+ */
+static int qos_max_notifier_call(struct notifier_block *nb,
+                                        unsigned long val, void *ptr)
+{
+       return qos_notifier_call(container_of(nb, struct devfreq, nb_max));
 }
 
 /**
@@ -599,16 +684,36 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
 static void devfreq_dev_release(struct device *dev)
 {
        struct devfreq *devfreq = to_devfreq(dev);
+       int err;
 
        mutex_lock(&devfreq_list_lock);
-       if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) {
-               mutex_unlock(&devfreq_list_lock);
-               dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
-               return;
-       }
        list_del(&devfreq->node);
        mutex_unlock(&devfreq_list_lock);
 
+       err = dev_pm_qos_remove_notifier(devfreq->dev.parent, &devfreq->nb_max,
+                                        DEV_PM_QOS_MAX_FREQUENCY);
+       if (err && err != -ENOENT)
+               dev_warn(dev->parent,
+                       "Failed to remove max_freq notifier: %d\n", err);
+       err = dev_pm_qos_remove_notifier(devfreq->dev.parent, &devfreq->nb_min,
+                                        DEV_PM_QOS_MIN_FREQUENCY);
+       if (err && err != -ENOENT)
+               dev_warn(dev->parent,
+                       "Failed to remove min_freq notifier: %d\n", err);
+
+       if (dev_pm_qos_request_active(&devfreq->user_max_freq_req)) {
+               err = dev_pm_qos_remove_request(&devfreq->user_max_freq_req);
+               if (err)
+                       dev_warn(dev->parent,
+                               "Failed to remove max_freq request: %d\n", err);
+       }
+       if (dev_pm_qos_request_active(&devfreq->user_min_freq_req)) {
+               err = dev_pm_qos_remove_request(&devfreq->user_min_freq_req);
+               if (err)
+                       dev_warn(dev->parent,
+                               "Failed to remove min_freq request: %d\n", err);
+       }
+
        if (devfreq->profile->exit)
                devfreq->profile->exit(devfreq->dev.parent);
 
@@ -660,6 +765,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
        devfreq->dev.parent = dev;
        devfreq->dev.class = devfreq_class;
        devfreq->dev.release = devfreq_dev_release;
+       INIT_LIST_HEAD(&devfreq->node);
        devfreq->profile = profile;
        strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
        devfreq->previous_freq = profile->initial_freq;
@@ -681,7 +787,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
                err = -EINVAL;
                goto err_dev;
        }
-       devfreq->min_freq = devfreq->scaling_min_freq;
 
        devfreq->scaling_max_freq = find_available_max_freq(devfreq);
        if (!devfreq->scaling_max_freq) {
@@ -689,7 +794,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
                err = -EINVAL;
                goto err_dev;
        }
-       devfreq->max_freq = devfreq->scaling_max_freq;
 
        devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
        atomic_set(&devfreq->suspend_count, 0);
@@ -730,6 +834,28 @@ struct devfreq *devfreq_add_device(struct device *dev,
 
        mutex_unlock(&devfreq->lock);
 
+       err = dev_pm_qos_add_request(dev, &devfreq->user_min_freq_req,
+                                    DEV_PM_QOS_MIN_FREQUENCY, 0);
+       if (err < 0)
+               goto err_devfreq;
+       err = dev_pm_qos_add_request(dev, &devfreq->user_max_freq_req,
+                                    DEV_PM_QOS_MAX_FREQUENCY,
+                                    PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE);
+       if (err < 0)
+               goto err_devfreq;
+
+       devfreq->nb_min.notifier_call = qos_min_notifier_call;
+       err = dev_pm_qos_add_notifier(devfreq->dev.parent, &devfreq->nb_min,
+                                     DEV_PM_QOS_MIN_FREQUENCY);
+       if (err)
+               goto err_devfreq;
+
+       devfreq->nb_max.notifier_call = qos_max_notifier_call;
+       err = dev_pm_qos_add_notifier(devfreq->dev.parent, &devfreq->nb_max,
+                                     DEV_PM_QOS_MAX_FREQUENCY);
+       if (err)
+               goto err_devfreq;
+
        mutex_lock(&devfreq_list_lock);
 
        governor = try_then_request_governor(devfreq->governor_name);
@@ -1303,41 +1429,37 @@ static ssize_t min_freq_store(struct device *dev, struct device_attribute *attr,
        unsigned long value;
        int ret;
 
+       /*
+        * Protect against theoretical sysfs writes between
+        * device_add and dev_pm_qos_add_request
+        */
+       if (!dev_pm_qos_request_active(&df->user_min_freq_req))
+               return -EAGAIN;
+
        ret = sscanf(buf, "%lu", &value);
        if (ret != 1)
                return -EINVAL;
 
-       mutex_lock(&df->lock);
-
-       if (value) {
-               if (value > df->max_freq) {
-                       ret = -EINVAL;
-                       goto unlock;
-               }
-       } else {
-               unsigned long *freq_table = df->profile->freq_table;
-
-               /* Get minimum frequency according to sorting order */
-               if (freq_table[0] < freq_table[df->profile->max_state - 1])
-                       value = freq_table[0];
-               else
-                       value = freq_table[df->profile->max_state - 1];
-       }
+       /* Round down to kHz for PM QoS */
+       ret = dev_pm_qos_update_request(&df->user_min_freq_req,
+                                       value / HZ_PER_KHZ);
+       if (ret < 0)
+               return ret;
 
-       df->min_freq = value;
-       update_devfreq(df);
-       ret = count;
-unlock:
-       mutex_unlock(&df->lock);
-       return ret;
+       return count;
 }
 
 static ssize_t min_freq_show(struct device *dev, struct device_attribute *attr,
                             char *buf)
 {
        struct devfreq *df = to_devfreq(dev);
+       unsigned long min_freq, max_freq;
 
-       return sprintf(buf, "%lu\n", max(df->scaling_min_freq, df->min_freq));
+       mutex_lock(&df->lock);
+       get_freq_range(df, &min_freq, &max_freq);
+       mutex_unlock(&df->lock);
+
+       return sprintf(buf, "%lu\n", min_freq);
 }
 
 static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr,
@@ -1347,33 +1469,37 @@ static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr,
        unsigned long value;
        int ret;
 
+       /*
+        * Protect against theoretical sysfs writes between
+        * device_add and dev_pm_qos_add_request
+        */
+       if (!dev_pm_qos_request_active(&df->user_max_freq_req))
+               return -EINVAL;
+
        ret = sscanf(buf, "%lu", &value);
        if (ret != 1)
                return -EINVAL;
 
-       mutex_lock(&df->lock);
-
-       if (value) {
-               if (value < df->min_freq) {
-                       ret = -EINVAL;
-                       goto unlock;
-               }
-       } else {
-               unsigned long *freq_table = df->profile->freq_table;
+       /*
+        * PM QoS frequencies are in kHz so we need to convert. Convert by
+        * rounding upwards so that the acceptable interval never shrinks.
+        *
+        * For example if the user writes "666666666" to sysfs this value will
+        * be converted to 666667 kHz and back to 666667000 Hz before an OPP
+        * lookup, this ensures that an OPP of 666666666Hz is still accepted.
+        *
+        * A value of zero means "no limit".
+        */
+       if (value)
+               value = DIV_ROUND_UP(value, HZ_PER_KHZ);
+       else
+               value = PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE;
 
-               /* Get maximum frequency according to sorting order */
-               if (freq_table[0] < freq_table[df->profile->max_state - 1])
-                       value = freq_table[df->profile->max_state - 1];
-               else
-                       value = freq_table[0];
-       }
+       ret = dev_pm_qos_update_request(&df->user_max_freq_req, value);
+       if (ret < 0)
+               return ret;
 
-       df->max_freq = value;
-       update_devfreq(df);
-       ret = count;
-unlock:
-       mutex_unlock(&df->lock);
-       return ret;
+       return count;
 }
 static DEVICE_ATTR_RW(min_freq);
 
@@ -1381,8 +1507,13 @@ static ssize_t max_freq_show(struct device *dev, struct device_attribute *attr,
                             char *buf)
 {
        struct devfreq *df = to_devfreq(dev);
+       unsigned long min_freq, max_freq;
+
+       mutex_lock(&df->lock);
+       get_freq_range(df, &min_freq, &max_freq);
+       mutex_unlock(&df->lock);
 
-       return sprintf(buf, "%lu\n", min(df->scaling_max_freq, df->max_freq));
+       return sprintf(buf, "%lu\n", max_freq);
 }
 static DEVICE_ATTR_RW(max_freq);
 
index 76fb072c22dc403ef5bb34c37472bd3fc1533415..5a5a1da01a00f3fbc8ca6e2e51a8dea69003342a 100644 (file)
@@ -221,7 +221,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
        a_fences = get_fences(a, &a_num_fences);
        b_fences = get_fences(b, &b_num_fences);
        if (a_num_fences > INT_MAX - b_num_fences)
-               return NULL;
+               goto err;
 
        num_fences = a_num_fences + b_num_fences;
 
index 6b6ba238b81a756b8e2e8b5c41154283a94531af..fc8f7b2fc7b331d907e27d27deffa2e0dd45ba78 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * OMAP DMAengine support
  */
+#include <linux/cpu_pm.h>
 #include <linux/delay.h>
 #include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
 #define OMAP_SDMA_REQUESTS     127
 #define OMAP_SDMA_CHANNELS     32
 
+struct omap_dma_config {
+       int lch_end;
+       unsigned int rw_priority:1;
+       unsigned int needs_busy_check:1;
+       unsigned int may_lose_context:1;
+       unsigned int needs_lch_clear:1;
+};
+
+struct omap_dma_context {
+       u32 irqenable_l0;
+       u32 irqenable_l1;
+       u32 ocp_sysconfig;
+       u32 gcr;
+};
+
 struct omap_dmadev {
        struct dma_device ddev;
        spinlock_t lock;
        void __iomem *base;
        const struct omap_dma_reg *reg_map;
        struct omap_system_dma_plat_info *plat;
+       const struct omap_dma_config *cfg;
+       struct notifier_block nb;
+       struct omap_dma_context context;
+       int lch_count;
+       DECLARE_BITMAP(lch_bitmap, OMAP_SDMA_CHANNELS);
+       struct mutex lch_lock;          /* for assigning logical channels */
        bool legacy;
        bool ll123_supported;
        struct dma_pool *desc_pool;
@@ -376,6 +398,19 @@ static unsigned omap_dma_get_csr(struct omap_chan *c)
        return val;
 }
 
+static void omap_dma_clear_lch(struct omap_dmadev *od, int lch)
+{
+       struct omap_chan *c;
+       int i;
+
+       c = od->lch_map[lch];
+       if (!c)
+               return;
+
+       for (i = CSDP; i <= od->cfg->lch_end; i++)
+               omap_dma_chan_write(c, i, 0);
+}
+
 static void omap_dma_assign(struct omap_dmadev *od, struct omap_chan *c,
        unsigned lch)
 {
@@ -633,6 +668,37 @@ static irqreturn_t omap_dma_irq(int irq, void *devid)
        return IRQ_HANDLED;
 }
 
+static int omap_dma_get_lch(struct omap_dmadev *od, int *lch)
+{
+       int channel;
+
+       mutex_lock(&od->lch_lock);
+       channel = find_first_zero_bit(od->lch_bitmap, od->lch_count);
+       if (channel >= od->lch_count)
+               goto out_busy;
+       set_bit(channel, od->lch_bitmap);
+       mutex_unlock(&od->lch_lock);
+
+       omap_dma_clear_lch(od, channel);
+       *lch = channel;
+
+       return 0;
+
+out_busy:
+       mutex_unlock(&od->lch_lock);
+       *lch = -EINVAL;
+
+       return -EBUSY;
+}
+
+static void omap_dma_put_lch(struct omap_dmadev *od, int lch)
+{
+       omap_dma_clear_lch(od, lch);
+       mutex_lock(&od->lch_lock);
+       clear_bit(lch, od->lch_bitmap);
+       mutex_unlock(&od->lch_lock);
+}
+
 static int omap_dma_alloc_chan_resources(struct dma_chan *chan)
 {
        struct omap_dmadev *od = to_omap_dma_dev(chan->device);
@@ -644,8 +710,7 @@ static int omap_dma_alloc_chan_resources(struct dma_chan *chan)
                ret = omap_request_dma(c->dma_sig, "DMA engine",
                                       omap_dma_callback, c, &c->dma_ch);
        } else {
-               ret = omap_request_dma(c->dma_sig, "DMA engine", NULL, NULL,
-                                      &c->dma_ch);
+               ret = omap_dma_get_lch(od, &c->dma_ch);
        }
 
        dev_dbg(dev, "allocating channel %u for %u\n", c->dma_ch, c->dma_sig);
@@ -702,7 +767,11 @@ static void omap_dma_free_chan_resources(struct dma_chan *chan)
        c->channel_base = NULL;
        od->lch_map[c->dma_ch] = NULL;
        vchan_free_chan_resources(&c->vc);
-       omap_free_dma(c->dma_ch);
+
+       if (od->legacy)
+               omap_free_dma(c->dma_ch);
+       else
+               omap_dma_put_lch(od, c->dma_ch);
 
        dev_dbg(od->ddev.dev, "freeing channel %u used for %u\n", c->dma_ch,
                c->dma_sig);
@@ -1453,16 +1522,128 @@ static void omap_dma_free(struct omap_dmadev *od)
        }
 }
 
+/* Currently only used for omap2. For omap1, also a check for lcd_dma is needed */
+static int omap_dma_busy_notifier(struct notifier_block *nb,
+                                 unsigned long cmd, void *v)
+{
+       struct omap_dmadev *od;
+       struct omap_chan *c;
+       int lch = -1;
+
+       od = container_of(nb, struct omap_dmadev, nb);
+
+       switch (cmd) {
+       case CPU_CLUSTER_PM_ENTER:
+               while (1) {
+                       lch = find_next_bit(od->lch_bitmap, od->lch_count,
+                                           lch + 1);
+                       if (lch >= od->lch_count)
+                               break;
+                       c = od->lch_map[lch];
+                       if (!c)
+                               continue;
+                       if (omap_dma_chan_read(c, CCR) & CCR_ENABLE)
+                               return NOTIFY_BAD;
+               }
+               break;
+       case CPU_CLUSTER_PM_ENTER_FAILED:
+       case CPU_CLUSTER_PM_EXIT:
+               break;
+       }
+
+       return NOTIFY_OK;
+}
+
+/*
+ * We are using IRQENABLE_L1, and legacy DMA code was using IRQENABLE_L0.
+ * As the DSP may be using IRQENABLE_L2 and L3, let's not touch those for
+ * now. Context save seems to be only currently needed on omap3.
+ */
+static void omap_dma_context_save(struct omap_dmadev *od)
+{
+       od->context.irqenable_l0 = omap_dma_glbl_read(od, IRQENABLE_L0);
+       od->context.irqenable_l1 = omap_dma_glbl_read(od, IRQENABLE_L1);
+       od->context.ocp_sysconfig = omap_dma_glbl_read(od, OCP_SYSCONFIG);
+       od->context.gcr = omap_dma_glbl_read(od, GCR);
+}
+
+static void omap_dma_context_restore(struct omap_dmadev *od)
+{
+       int i;
+
+       omap_dma_glbl_write(od, GCR, od->context.gcr);
+       omap_dma_glbl_write(od, OCP_SYSCONFIG, od->context.ocp_sysconfig);
+       omap_dma_glbl_write(od, IRQENABLE_L0, od->context.irqenable_l0);
+       omap_dma_glbl_write(od, IRQENABLE_L1, od->context.irqenable_l1);
+
+       /* Clear IRQSTATUS_L0 as legacy DMA code is no longer doing it */
+       if (od->plat->errata & DMA_ROMCODE_BUG)
+               omap_dma_glbl_write(od, IRQSTATUS_L0, 0);
+
+       /* Clear dma channels */
+       for (i = 0; i < od->lch_count; i++)
+               omap_dma_clear_lch(od, i);
+}
+
+/* Currently only used for omap3 */
+static int omap_dma_context_notifier(struct notifier_block *nb,
+                                    unsigned long cmd, void *v)
+{
+       struct omap_dmadev *od;
+
+       od = container_of(nb, struct omap_dmadev, nb);
+
+       switch (cmd) {
+       case CPU_CLUSTER_PM_ENTER:
+               omap_dma_context_save(od);
+               break;
+       case CPU_CLUSTER_PM_ENTER_FAILED:
+       case CPU_CLUSTER_PM_EXIT:
+               omap_dma_context_restore(od);
+               break;
+       }
+
+       return NOTIFY_OK;
+}
+
+static void omap_dma_init_gcr(struct omap_dmadev *od, int arb_rate,
+                             int max_fifo_depth, int tparams)
+{
+       u32 val;
+
+       /* Set only for omap2430 and later */
+       if (!od->cfg->rw_priority)
+               return;
+
+       if (max_fifo_depth == 0)
+               max_fifo_depth = 1;
+       if (arb_rate == 0)
+               arb_rate = 1;
+
+       val = 0xff & max_fifo_depth;
+       val |= (0x3 & tparams) << 12;
+       val |= (arb_rate & 0xff) << 16;
+
+       omap_dma_glbl_write(od, GCR, val);
+}
+
 #define OMAP_DMA_BUSWIDTHS     (BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
                                 BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
                                 BIT(DMA_SLAVE_BUSWIDTH_4_BYTES))
 
+/*
+ * No flags currently set for default configuration as omap1 is still
+ * using platform data.
+ */
+static const struct omap_dma_config default_cfg;
+
 static int omap_dma_probe(struct platform_device *pdev)
 {
+       const struct omap_dma_config *conf;
        struct omap_dmadev *od;
        struct resource *res;
        int rc, i, irq;
-       u32 lch_count;
+       u32 val;
 
        od = devm_kzalloc(&pdev->dev, sizeof(*od), GFP_KERNEL);
        if (!od)
@@ -1473,9 +1654,19 @@ static int omap_dma_probe(struct platform_device *pdev)
        if (IS_ERR(od->base))
                return PTR_ERR(od->base);
 
-       od->plat = omap_get_plat_info();
-       if (!od->plat)
-               return -EPROBE_DEFER;
+       conf = of_device_get_match_data(&pdev->dev);
+       if (conf) {
+               od->cfg = conf;
+               od->plat = dev_get_platdata(&pdev->dev);
+               if (!od->plat)
+                       dev_warn(&pdev->dev, "no sdma auxdata needed?\n");
+       } else {
+               od->cfg = &default_cfg;
+
+               od->plat = omap_get_plat_info();
+               if (!od->plat)
+                       return -EPROBE_DEFER;
+       }
 
        od->reg_map = od->plat->reg_map;
 
@@ -1507,6 +1698,7 @@ static int omap_dma_probe(struct platform_device *pdev)
        od->ddev.max_burst = SZ_16M - 1; /* CCEN: 24bit unsigned */
        od->ddev.dev = &pdev->dev;
        INIT_LIST_HEAD(&od->ddev.channels);
+       mutex_init(&od->lch_lock);
        spin_lock_init(&od->lock);
        spin_lock_init(&od->irq_lock);
 
@@ -1522,18 +1714,30 @@ static int omap_dma_probe(struct platform_device *pdev)
 
        /* Number of available logical channels */
        if (!pdev->dev.of_node) {
-               lch_count = od->plat->dma_attr->lch_count;
-               if (unlikely(!lch_count))
-                       lch_count = OMAP_SDMA_CHANNELS;
+               od->lch_count = od->plat->dma_attr->lch_count;
+               if (unlikely(!od->lch_count))
+                       od->lch_count = OMAP_SDMA_CHANNELS;
        } else if (of_property_read_u32(pdev->dev.of_node, "dma-channels",
-                                       &lch_count)) {
+                                       &od->lch_count)) {
                dev_info(&pdev->dev,
                         "Missing dma-channels property, using %u.\n",
                         OMAP_SDMA_CHANNELS);
-               lch_count = OMAP_SDMA_CHANNELS;
+               od->lch_count = OMAP_SDMA_CHANNELS;
+       }
+
+       /* Mask of allowed logical channels */
+       if (pdev->dev.of_node && !of_property_read_u32(pdev->dev.of_node,
+                                                      "dma-channel-mask",
+                                                      &val)) {
+               /* Tag channels not in mask as reserved */
+               val = ~val;
+               bitmap_from_arr32(od->lch_bitmap, &val, od->lch_count);
        }
+       if (od->plat->dma_attr->dev_caps & HS_CHANNELS_RESERVED)
+               bitmap_set(od->lch_bitmap, 0, 2);
 
-       od->lch_map = devm_kcalloc(&pdev->dev, lch_count, sizeof(*od->lch_map),
+       od->lch_map = devm_kcalloc(&pdev->dev, od->lch_count,
+                                  sizeof(*od->lch_map),
                                   GFP_KERNEL);
        if (!od->lch_map)
                return -ENOMEM;
@@ -1605,6 +1809,16 @@ static int omap_dma_probe(struct platform_device *pdev)
                }
        }
 
+       omap_dma_init_gcr(od, DMA_DEFAULT_ARB_RATE, DMA_DEFAULT_FIFO_DEPTH, 0);
+
+       if (od->cfg->needs_busy_check) {
+               od->nb.notifier_call = omap_dma_busy_notifier;
+               cpu_pm_register_notifier(&od->nb);
+       } else if (od->cfg->may_lose_context) {
+               od->nb.notifier_call = omap_dma_context_notifier;
+               cpu_pm_register_notifier(&od->nb);
+       }
+
        dev_info(&pdev->dev, "OMAP DMA engine driver%s\n",
                 od->ll123_supported ? " (LinkedList1/2/3 supported)" : "");
 
@@ -1616,6 +1830,9 @@ static int omap_dma_remove(struct platform_device *pdev)
        struct omap_dmadev *od = platform_get_drvdata(pdev);
        int irq;
 
+       if (od->cfg->may_lose_context)
+               cpu_pm_unregister_notifier(&od->nb);
+
        if (pdev->dev.of_node)
                of_dma_controller_free(pdev->dev.of_node);
 
@@ -1637,12 +1854,45 @@ static int omap_dma_remove(struct platform_device *pdev)
        return 0;
 }
 
+static const struct omap_dma_config omap2420_data = {
+       .lch_end = CCFN,
+       .rw_priority = true,
+       .needs_lch_clear = true,
+       .needs_busy_check = true,
+};
+
+static const struct omap_dma_config omap2430_data = {
+       .lch_end = CCFN,
+       .rw_priority = true,
+       .needs_lch_clear = true,
+};
+
+static const struct omap_dma_config omap3430_data = {
+       .lch_end = CCFN,
+       .rw_priority = true,
+       .needs_lch_clear = true,
+       .may_lose_context = true,
+};
+
+static const struct omap_dma_config omap3630_data = {
+       .lch_end = CCDN,
+       .rw_priority = true,
+       .needs_lch_clear = true,
+       .may_lose_context = true,
+};
+
+static const struct omap_dma_config omap4_data = {
+       .lch_end = CCDN,
+       .rw_priority = true,
+       .needs_lch_clear = true,
+};
+
 static const struct of_device_id omap_dma_match[] = {
-       { .compatible = "ti,omap2420-sdma", },
-       { .compatible = "ti,omap2430-sdma", },
-       { .compatible = "ti,omap3430-sdma", },
-       { .compatible = "ti,omap3630-sdma", },
-       { .compatible = "ti,omap4430-sdma", },
+       { .compatible = "ti,omap2420-sdma", .data = &omap2420_data, },
+       { .compatible = "ti,omap2430-sdma", .data = &omap2430_data, },
+       { .compatible = "ti,omap3430-sdma", .data = &omap3430_data, },
+       { .compatible = "ti,omap3630-sdma", .data = &omap3630_data, },
+       { .compatible = "ti,omap4430-sdma", .data = &omap4_data, },
        {},
 };
 MODULE_DEVICE_TABLE(of, omap_dma_match);
index d101f072c8f8ac85db7605966a979a05f06abcae..407816da9fcb46509feb3914cce58d4cda41e5ce 100644 (file)
@@ -681,7 +681,7 @@ device_initcall(efi_load_efivars);
                { name },                                  \
                { prop },                                  \
                offsetof(struct efi_fdt_params, field),    \
-               FIELD_SIZEOF(struct efi_fdt_params, field) \
+               sizeof_field(struct efi_fdt_params, field) \
        }
 
 struct params {
index d968c24714125288693c7754e587f9f5f5116dfe..0d12ebf661743f7c87898eb9febaaa1aa505672f 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: MIT
 menu "ACP (Audio CoProcessor) Configuration"
 
 config DRM_AMD_ACP
index 2e98c016cb47dbcf947ccaae97cb11fc8fde98a6..9375e7f1242057274c70eec0f24678bdee6f0965 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: MIT
 config DRM_AMDGPU_SI
        bool "Enable amdgpu support for SI parts"
        depends on DRM_AMDGPU
index 2cdaf3b2a72170c5a638530dce89007e850735a8..6614d8a6f4c8d367dcb8bb281f70514f6a054f22 100644 (file)
@@ -604,11 +604,8 @@ void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
                        continue;
                }
 
-               for (i = 0; i < num_entities; i++) {
-                       mutex_lock(&ctx->adev->lock_reset);
+               for (i = 0; i < num_entities; i++)
                        drm_sched_entity_fini(&ctx->entities[0][i].entity);
-                       mutex_unlock(&ctx->adev->lock_reset);
-               }
        }
 }
 
index 16fbd2bc8ad1ea00d3f1c7a6c9e8df996970571e..4043ebcea5de6e1efca0a89dad8356e5c5de385e 100644 (file)
@@ -268,23 +268,29 @@ static void df_v3_6_update_medium_grain_clock_gating(struct amdgpu_device *adev,
 {
        u32 tmp;
 
-       /* Put DF on broadcast mode */
-       adev->df_funcs->enable_broadcast_mode(adev, true);
-
-       if (enable && (adev->cg_flags & AMD_CG_SUPPORT_DF_MGCG)) {
-               tmp = RREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater);
-               tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
-               tmp |= DF_V3_6_MGCG_ENABLE_15_CYCLE_DELAY;
-               WREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater, tmp);
-       } else {
-               tmp = RREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater);
-               tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
-               tmp |= DF_V3_6_MGCG_DISABLE;
-               WREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater, tmp);
-       }
+       if (adev->cg_flags & AMD_CG_SUPPORT_DF_MGCG) {
+               /* Put DF on broadcast mode */
+               adev->df_funcs->enable_broadcast_mode(adev, true);
+
+               if (enable) {
+                       tmp = RREG32_SOC15(DF, 0,
+                                       mmDF_PIE_AON0_DfGlobalClkGater);
+                       tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
+                       tmp |= DF_V3_6_MGCG_ENABLE_15_CYCLE_DELAY;
+                       WREG32_SOC15(DF, 0,
+                                       mmDF_PIE_AON0_DfGlobalClkGater, tmp);
+               } else {
+                       tmp = RREG32_SOC15(DF, 0,
+                                       mmDF_PIE_AON0_DfGlobalClkGater);
+                       tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
+                       tmp |= DF_V3_6_MGCG_DISABLE;
+                       WREG32_SOC15(DF, 0,
+                                       mmDF_PIE_AON0_DfGlobalClkGater, tmp);
+               }
 
-       /* Exit broadcast mode */
-       adev->df_funcs->enable_broadcast_mode(adev, false);
+               /* Exit broadcast mode */
+               adev->df_funcs->enable_broadcast_mode(adev, false);
+       }
 }
 
 static void df_v3_6_get_clockgating_state(struct amdgpu_device *adev,
index f2c1b026397b9520f6f6c4ccc26d6800ec3a3374..ba9e53a1abc3affc852774537d5840a27f3c7379 100644 (file)
@@ -117,10 +117,13 @@ static const struct soc15_reg_golden golden_settings_gc_10_1[] =
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CGTT_SCLK_CTRL, 0x10000000, 0x10000100),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL2, 0xffffffff, 0x1402002f),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xffff9fff, 0x00001188),
+       SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE, 0x3fffffff, 0x08000009),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_1, 0x00400000, 0x04440000),
+       SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0x00000800, 0x00000820),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmRMI_SPARE, 0xffffffff, 0xffff3101),
+       SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL, 0x001f0000, 0x00070104),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ALU_CLK_CTRL, 0xffffffff, 0xffffffff),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ARB_CONFIG, 0x00000100, 0x00000130),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_LDS_CLK_CTRL, 0xffffffff, 0xffffffff),
@@ -162,10 +165,13 @@ static const struct soc15_reg_golden golden_settings_gc_10_1_1[] =
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CGTT_SCLK_CTRL, 0xffff0fff, 0x10000100),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL2, 0xffffffff, 0x1402002f),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xffffbfff, 0x00000188),
+       SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE, 0x3fffffff, 0x08000009),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_1, 0x00400000, 0x04440000),
+       SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0x00000800, 0x00000820),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmRMI_SPARE, 0xffffffff, 0xffff3101),
+       SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL, 0x001f0000, 0x00070105),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ALU_CLK_CTRL, 0xffffffff, 0xffffffff),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ARB_CONFIG, 0x00000133, 0x00000130),
        SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_LDS_CLK_CTRL, 0xffffffff, 0xffffffff),
index 983db77999e7a6d27800c7d42f2cd03028f5d194..52a647d7022d2bf8382e95d36419bf1e3dd326e7 100644 (file)
@@ -6146,7 +6146,23 @@ static void gfx_v8_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
        bool write64bit = flags & AMDGPU_FENCE_FLAG_64BIT;
        bool int_sel = flags & AMDGPU_FENCE_FLAG_INT;
 
-       /* EVENT_WRITE_EOP - flush caches, send int */
+       /* Workaround for cache flush problems. First send a dummy EOP
+        * event down the pipe with seq one below.
+        */
+       amdgpu_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
+       amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
+                                EOP_TC_ACTION_EN |
+                                EOP_TC_WB_ACTION_EN |
+                                EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
+                                EVENT_INDEX(5)));
+       amdgpu_ring_write(ring, addr & 0xfffffffc);
+       amdgpu_ring_write(ring, (upper_32_bits(addr) & 0xffff) |
+                               DATA_SEL(1) | INT_SEL(0));
+       amdgpu_ring_write(ring, lower_32_bits(seq - 1));
+       amdgpu_ring_write(ring, upper_32_bits(seq - 1));
+
+       /* Then send the real EOP event down the pipe:
+        * EVENT_WRITE_EOP - flush caches, send int */
        amdgpu_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
        amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
                                 EOP_TC_ACTION_EN |
@@ -6888,7 +6904,7 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_gfx = {
                5 +  /* COND_EXEC */
                7 +  /* PIPELINE_SYNC */
                VI_FLUSH_GPU_TLB_NUM_WREG * 5 + 9 + /* VM_FLUSH */
-               8 +  /* FENCE for VM_FLUSH */
+               12 +  /* FENCE for VM_FLUSH */
                20 + /* GDS switch */
                4 + /* double SWITCH_BUFFER,
                       the first COND_EXEC jump to the place just
@@ -6900,7 +6916,7 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_gfx = {
                31 + /* DE_META */
                3 + /* CNTX_CTRL */
                5 + /* HDP_INVL */
-               8 + 8 + /* FENCE x2 */
+               12 + 12 + /* FENCE x2 */
                2, /* SWITCH_BUFFER */
        .emit_ib_size = 4, /* gfx_v8_0_ring_emit_ib_gfx */
        .emit_ib = gfx_v8_0_ring_emit_ib_gfx,
index 2324695074463a9bd3fe16054fc057bb1ef7927c..f5725336a5f26dbc3082bd52a90bc260c557a026 100644 (file)
@@ -219,6 +219,21 @@ static uint32_t gmc_v10_0_get_invalidate_req(unsigned int vmid,
        return req;
 }
 
+/**
+ * gmc_v10_0_use_invalidate_semaphore - judge whether to use semaphore
+ *
+ * @adev: amdgpu_device pointer
+ * @vmhub: vmhub type
+ *
+ */
+static bool gmc_v10_0_use_invalidate_semaphore(struct amdgpu_device *adev,
+                                      uint32_t vmhub)
+{
+       return ((vmhub == AMDGPU_MMHUB_0 ||
+                vmhub == AMDGPU_MMHUB_1) &&
+               (!amdgpu_sriov_vf(adev)));
+}
+
 /*
  * GART
  * VMID 0 is the physical GPU addresses as used by the kernel.
@@ -229,6 +244,7 @@ static uint32_t gmc_v10_0_get_invalidate_req(unsigned int vmid,
 static void gmc_v10_0_flush_vm_hub(struct amdgpu_device *adev, uint32_t vmid,
                                   unsigned int vmhub, uint32_t flush_type)
 {
+       bool use_semaphore = gmc_v10_0_use_invalidate_semaphore(adev, vmhub);
        struct amdgpu_vmhub *hub = &adev->vmhub[vmhub];
        u32 tmp = gmc_v10_0_get_invalidate_req(vmid, flush_type);
        /* Use register 17 for GART */
@@ -244,8 +260,7 @@ static void gmc_v10_0_flush_vm_hub(struct amdgpu_device *adev, uint32_t vmid,
         */
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (vmhub == AMDGPU_MMHUB_0 ||
-           vmhub == AMDGPU_MMHUB_1) {
+       if (use_semaphore) {
                for (i = 0; i < adev->usec_timeout; i++) {
                        /* a read return value of 1 means semaphore acuqire */
                        tmp = RREG32_NO_KIQ(hub->vm_inv_eng0_sem + eng);
@@ -278,8 +293,7 @@ static void gmc_v10_0_flush_vm_hub(struct amdgpu_device *adev, uint32_t vmid,
        }
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (vmhub == AMDGPU_MMHUB_0 ||
-           vmhub == AMDGPU_MMHUB_1)
+       if (use_semaphore)
                /*
                 * add semaphore release after invalidation,
                 * write with 0 means semaphore release
@@ -369,6 +383,7 @@ error_alloc:
 static uint64_t gmc_v10_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
                                             unsigned vmid, uint64_t pd_addr)
 {
+       bool use_semaphore = gmc_v10_0_use_invalidate_semaphore(ring->adev, ring->funcs->vmhub);
        struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];
        uint32_t req = gmc_v10_0_get_invalidate_req(vmid, 0);
        unsigned eng = ring->vm_inv_eng;
@@ -381,8 +396,7 @@ static uint64_t gmc_v10_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
         */
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (ring->funcs->vmhub == AMDGPU_MMHUB_0 ||
-           ring->funcs->vmhub == AMDGPU_MMHUB_1)
+       if (use_semaphore)
                /* a read return value of 1 means semaphore acuqire */
                amdgpu_ring_emit_reg_wait(ring,
                                          hub->vm_inv_eng0_sem + eng, 0x1, 0x1);
@@ -398,8 +412,7 @@ static uint64_t gmc_v10_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
                                            req, 1 << vmid);
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (ring->funcs->vmhub == AMDGPU_MMHUB_0 ||
-           ring->funcs->vmhub == AMDGPU_MMHUB_1)
+       if (use_semaphore)
                /*
                 * add semaphore release after invalidation,
                 * write with 0 means semaphore release
index 3c355fb5d2b47227621c220115ebc1957841399a..a5b68b5e452fb96c24aa052e288c4880c5bbeb11 100644 (file)
@@ -416,6 +416,24 @@ static uint32_t gmc_v9_0_get_invalidate_req(unsigned int vmid,
        return req;
 }
 
+/**
+ * gmc_v9_0_use_invalidate_semaphore - judge whether to use semaphore
+ *
+ * @adev: amdgpu_device pointer
+ * @vmhub: vmhub type
+ *
+ */
+static bool gmc_v9_0_use_invalidate_semaphore(struct amdgpu_device *adev,
+                                      uint32_t vmhub)
+{
+       return ((vmhub == AMDGPU_MMHUB_0 ||
+                vmhub == AMDGPU_MMHUB_1) &&
+               (!amdgpu_sriov_vf(adev)) &&
+               (!(adev->asic_type == CHIP_RAVEN &&
+                  adev->rev_id < 0x8 &&
+                  adev->pdev->device == 0x15d8)));
+}
+
 /*
  * GART
  * VMID 0 is the physical GPU addresses as used by the kernel.
@@ -435,6 +453,7 @@ static uint32_t gmc_v9_0_get_invalidate_req(unsigned int vmid,
 static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
                                        uint32_t vmhub, uint32_t flush_type)
 {
+       bool use_semaphore = gmc_v9_0_use_invalidate_semaphore(adev, vmhub);
        const unsigned eng = 17;
        u32 j, tmp;
        struct amdgpu_vmhub *hub;
@@ -468,8 +487,7 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
         */
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (vmhub == AMDGPU_MMHUB_0 ||
-           vmhub == AMDGPU_MMHUB_1) {
+       if (use_semaphore) {
                for (j = 0; j < adev->usec_timeout; j++) {
                        /* a read return value of 1 means semaphore acuqire */
                        tmp = RREG32_NO_KIQ(hub->vm_inv_eng0_sem + eng);
@@ -499,8 +517,7 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
        }
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (vmhub == AMDGPU_MMHUB_0 ||
-           vmhub == AMDGPU_MMHUB_1)
+       if (use_semaphore)
                /*
                 * add semaphore release after invalidation,
                 * write with 0 means semaphore release
@@ -518,6 +535,7 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
 static uint64_t gmc_v9_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
                                            unsigned vmid, uint64_t pd_addr)
 {
+       bool use_semaphore = gmc_v9_0_use_invalidate_semaphore(ring->adev, ring->funcs->vmhub);
        struct amdgpu_device *adev = ring->adev;
        struct amdgpu_vmhub *hub = &adev->vmhub[ring->funcs->vmhub];
        uint32_t req = gmc_v9_0_get_invalidate_req(vmid, 0);
@@ -531,8 +549,7 @@ static uint64_t gmc_v9_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
         */
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (ring->funcs->vmhub == AMDGPU_MMHUB_0 ||
-           ring->funcs->vmhub == AMDGPU_MMHUB_1)
+       if (use_semaphore)
                /* a read return value of 1 means semaphore acuqire */
                amdgpu_ring_emit_reg_wait(ring,
                                          hub->vm_inv_eng0_sem + eng, 0x1, 0x1);
@@ -548,8 +565,7 @@ static uint64_t gmc_v9_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
                                            req, 1 << vmid);
 
        /* TODO: It needs to continue working on debugging with semaphore for GFXHUB as well. */
-       if (ring->funcs->vmhub == AMDGPU_MMHUB_0 ||
-           ring->funcs->vmhub == AMDGPU_MMHUB_1)
+       if (use_semaphore)
                /*
                 * add semaphore release after invalidation,
                 * write with 0 means semaphore release
index ba0e68057a89207df912040a37c49278b3a839d3..b3672d10ea54bfa76f01631265ca08fc0ccaa1e9 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: MIT
 #
 # Heterogenous system architecture configuration
 #
index 313183b800328c11cb7c5ec8d25a362afbe7037c..ae161fe86ebb6cca838d3f5ff845dc02178b5c6e 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: MIT
 menu "Display Engine Configuration"
        depends on DRM && DRM_AMDGPU
 
index 7873abea4112b434d0d1def2f5d3634aae0a9f23..5c3fcaa474109f74cc8c6b589f7f9ae11590beb8 100644 (file)
@@ -1625,6 +1625,7 @@ static enum bp_result construct_integrated_info(
                /* Don't need to check major revision as they are all 1 */
                switch (revision.minor) {
                case 11:
+               case 12:
                        result = get_integrated_info_v11(bp, info);
                        break;
                default:
index 790a2d211bd6db21a6a04cccd4c7bc9cad0f4a60..35c55e54eac014311111a6e85b0cf3701cc525f4 100644 (file)
@@ -471,12 +471,28 @@ static void rn_notify_wm_ranges(struct clk_mgr *clk_mgr_base)
 
 }
 
+static bool rn_are_clock_states_equal(struct dc_clocks *a,
+               struct dc_clocks *b)
+{
+       if (a->dispclk_khz != b->dispclk_khz)
+               return false;
+       else if (a->dppclk_khz != b->dppclk_khz)
+               return false;
+       else if (a->dcfclk_khz != b->dcfclk_khz)
+               return false;
+       else if (a->dcfclk_deep_sleep_khz != b->dcfclk_deep_sleep_khz)
+               return false;
+
+       return true;
+}
+
+
 static struct clk_mgr_funcs dcn21_funcs = {
        .get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz,
        .update_clocks = rn_update_clocks,
        .init_clocks = rn_init_clocks,
        .enable_pme_wa = rn_enable_pme_wa,
-       /* .dump_clk_registers = rn_dump_clk_registers, */
+       .are_clock_states_equal = rn_are_clock_states_equal,
        .notify_wm_ranges = rn_notify_wm_ranges
 };
 
@@ -518,36 +534,83 @@ struct clk_bw_params rn_bw_params = {
                .num_entries = 4,
        },
 
-       .wm_table = {
-               .entries = {
-                       {
-                               .wm_inst = WM_A,
-                               .wm_type = WM_TYPE_PSTATE_CHG,
-                               .pstate_latency_us = 23.84,
-                               .valid = true,
-                       },
-                       {
-                               .wm_inst = WM_B,
-                               .wm_type = WM_TYPE_PSTATE_CHG,
-                               .pstate_latency_us = 23.84,
-                               .valid = true,
-                       },
-                       {
-                               .wm_inst = WM_C,
-                               .wm_type = WM_TYPE_PSTATE_CHG,
-                               .pstate_latency_us = 23.84,
-                               .valid = true,
-                       },
-                       {
-                               .wm_inst = WM_D,
-                               .wm_type = WM_TYPE_PSTATE_CHG,
-                               .pstate_latency_us = 23.84,
-                               .valid = true,
-                       },
+};
+
+struct wm_table ddr4_wm_table = {
+       .entries = {
+               {
+                       .wm_inst = WM_A,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 11.72,
+                       .sr_exit_time_us = 6.09,
+                       .sr_enter_plus_exit_time_us = 7.14,
+                       .valid = true,
+               },
+               {
+                       .wm_inst = WM_B,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 11.72,
+                       .sr_exit_time_us = 10.12,
+                       .sr_enter_plus_exit_time_us = 11.48,
+                       .valid = true,
+               },
+               {
+                       .wm_inst = WM_C,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 11.72,
+                       .sr_exit_time_us = 10.12,
+                       .sr_enter_plus_exit_time_us = 11.48,
+                       .valid = true,
+               },
+               {
+                       .wm_inst = WM_D,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 11.72,
+                       .sr_exit_time_us = 10.12,
+                       .sr_enter_plus_exit_time_us = 11.48,
+                       .valid = true,
                },
        }
 };
 
+struct wm_table lpddr4_wm_table = {
+       .entries = {
+               {
+                       .wm_inst = WM_A,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 23.84,
+                       .sr_exit_time_us = 12.5,
+                       .sr_enter_plus_exit_time_us = 17.0,
+                       .valid = true,
+               },
+               {
+                       .wm_inst = WM_B,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 23.84,
+                       .sr_exit_time_us = 12.5,
+                       .sr_enter_plus_exit_time_us = 17.0,
+                       .valid = true,
+               },
+               {
+                       .wm_inst = WM_C,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 23.84,
+                       .sr_exit_time_us = 12.5,
+                       .sr_enter_plus_exit_time_us = 17.0,
+                       .valid = true,
+               },
+               {
+                       .wm_inst = WM_D,
+                       .wm_type = WM_TYPE_PSTATE_CHG,
+                       .pstate_latency_us = 23.84,
+                       .sr_exit_time_us = 12.5,
+                       .sr_enter_plus_exit_time_us = 17.0,
+                       .valid = true,
+               },
+       }
+};
+
+
 static unsigned int find_dcfclk_for_voltage(struct dpm_clocks *clock_table, unsigned int voltage)
 {
        int i;
@@ -561,7 +624,7 @@ static unsigned int find_dcfclk_for_voltage(struct dpm_clocks *clock_table, unsi
        return 0;
 }
 
-static void rn_clk_mgr_helper_populate_bw_params(struct clk_bw_params *bw_params, struct dpm_clocks *clock_table, struct hw_asic_id *asic_id)
+static void rn_clk_mgr_helper_populate_bw_params(struct clk_bw_params *bw_params, struct dpm_clocks *clock_table, struct integrated_info *bios_info)
 {
        int i, j = 0;
 
@@ -593,8 +656,8 @@ static void rn_clk_mgr_helper_populate_bw_params(struct clk_bw_params *bw_params
                bw_params->clk_table.entries[i].dcfclk_mhz = find_dcfclk_for_voltage(clock_table, clock_table->FClocks[j].Vol);
        }
 
-       bw_params->vram_type = asic_id->vram_type;
-       bw_params->num_channels = asic_id->vram_width / DDR4_DRAM_WIDTH;
+       bw_params->vram_type = bios_info->memory_type;
+       bw_params->num_channels = bios_info->ma_channel_number;
 
        for (i = 0; i < WM_SET_COUNT; i++) {
                bw_params->wm_table.entries[i].wm_inst = i;
@@ -669,15 +732,24 @@ void rn_clk_mgr_construct(
                        ASSERT(clk_mgr->base.dprefclk_khz == 600000);
                        clk_mgr->base.dprefclk_khz = 600000;
                }
+
+               if (ctx->dc_bios->integrated_info->memory_type == LpDdr4MemType) {
+                       rn_bw_params.wm_table = lpddr4_wm_table;
+               } else {
+                       rn_bw_params.wm_table = ddr4_wm_table;
+               }
        }
 
        dce_clock_read_ss_info(clk_mgr);
 
+
        clk_mgr->base.bw_params = &rn_bw_params;
 
        if (pp_smu && pp_smu->rn_funcs.get_dpm_clock_table) {
                pp_smu->rn_funcs.get_dpm_clock_table(&pp_smu->rn_funcs.pp_smu, &clock_table);
-               rn_clk_mgr_helper_populate_bw_params(clk_mgr->base.bw_params, &clock_table, &ctx->asic_id);
+               if (ctx->dc_bios && ctx->dc_bios->integrated_info) {
+                       rn_clk_mgr_helper_populate_bw_params (clk_mgr->base.bw_params, &clock_table, ctx->dc_bios->integrated_info);
+               }
        }
 
        if (!IS_FPGA_MAXIMUS_DC(ctx->dce_environment) && clk_mgr->smu_ver >= 0x00371500) {
index 12ba6fdf89b73213dceed7ee0f925a2e79fd11ae..62d8289abb4efb2f0654d33dc8270abf2bff7dc0 100644 (file)
@@ -372,7 +372,7 @@ bool dc_link_is_dp_sink_present(struct dc_link *link)
 
        if (GPIO_RESULT_OK != dal_ddc_open(
                ddc, GPIO_MODE_INPUT, GPIO_DDC_CONFIG_TYPE_MODE_I2C)) {
-               dal_gpio_destroy_ddc(&ddc);
+               dal_ddc_close(ddc);
 
                return present;
        }
index 7f904d55c1bceb6b136b64ad0818daddd2d778f4..81789191d4ec0aebc3f0c59e24903631ff60866a 100644 (file)
@@ -586,7 +586,7 @@ bool dal_ddc_service_query_ddc_data(
 bool dal_ddc_submit_aux_command(struct ddc_service *ddc,
                struct aux_payload *payload)
 {
-       uint8_t retrieved = 0;
+       uint32_t retrieved = 0;
        bool ret = 0;
 
        if (!ddc)
index 0f59b68aa4c245e0d7cc4b18150ddb53c741a663..504055fc70e8970046df79bccc1e243b069d6fce 100644 (file)
@@ -3522,7 +3522,14 @@ void dp_set_fec_enable(struct dc_link *link, bool enable)
        if (link_enc->funcs->fec_set_enable &&
                        link->dpcd_caps.fec_cap.bits.FEC_CAPABLE) {
                if (link->fec_state == dc_link_fec_ready && enable) {
-                       msleep(1);
+                       /* Accord to DP spec, FEC enable sequence can first
+                        * be transmitted anytime after 1000 LL codes have
+                        * been transmitted on the link after link training
+                        * completion. Using 1 lane RBR should have the maximum
+                        * time for transmitting 1000 LL codes which is 6.173 us.
+                        * So use 7 microseconds delay instead.
+                        */
+                       udelay(7);
                        link_enc->funcs->fec_set_enable(link_enc, true);
                        link->fec_state = dc_link_fec_enabled;
                } else if (link->fec_state == dc_link_fec_enabled && !enable) {
index e472608faf3351ba112a1968792be6f6e4aa207a..793c0cec407f9d36661216d55b55b0ba1fd3c6cd 100644 (file)
@@ -583,6 +583,8 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
        uint8_t reply;
        bool payload_reply = true;
        enum aux_channel_operation_result operation_result;
+       bool retry_on_defer = false;
+
        int aux_ack_retries = 0,
                aux_defer_retries = 0,
                aux_i2c_defer_retries = 0,
@@ -613,8 +615,10 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
                        break;
 
                        case AUX_TRANSACTION_REPLY_AUX_DEFER:
-                       case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK:
                        case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER:
+                               retry_on_defer = true;
+                               /* fall through */
+                       case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK:
                                if (++aux_defer_retries >= AUX_MAX_DEFER_RETRIES) {
                                        goto fail;
                                } else {
@@ -647,15 +651,24 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
                        break;
 
                case AUX_CHANNEL_OPERATION_FAILED_TIMEOUT:
-                       if (++aux_timeout_retries >= AUX_MAX_TIMEOUT_RETRIES)
-                               goto fail;
-                       else {
-                               /*
-                                * DP 1.4, 2.8.2:  AUX Transaction Response/Reply Timeouts
-                                * According to the DP spec there should be 3 retries total
-                                * with a 400us wait inbetween each. Hardware already waits
-                                * for 550us therefore no wait is required here.
-                                */
+                       // Check whether a DEFER had occurred before the timeout.
+                       // If so, treat timeout as a DEFER.
+                       if (retry_on_defer) {
+                               if (++aux_defer_retries >= AUX_MAX_DEFER_RETRIES)
+                                       goto fail;
+                               else if (payload->defer_delay > 0)
+                                       msleep(payload->defer_delay);
+                       } else {
+                               if (++aux_timeout_retries >= AUX_MAX_TIMEOUT_RETRIES)
+                                       goto fail;
+                               else {
+                                       /*
+                                        * DP 1.4, 2.8.2:  AUX Transaction Response/Reply Timeouts
+                                        * According to the DP spec there should be 3 retries total
+                                        * with a 400us wait inbetween each. Hardware already waits
+                                        * for 550us therefore no wait is required here.
+                                        */
+                               }
                        }
                        break;
 
index 63f3bddba7daaa50ab93dbd9a42fc13327208d84..10b47986526bd8a04b51243303b84657971eb344 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: MIT
 #
 # Makefile for DCN.
 
index 09793336d84f6944b44092fbce09e8f5d74b2283..23ff2f1c75b5ca2c7333f55d74a7a2b81b2999db 100644 (file)
@@ -923,7 +923,9 @@ static const struct resource_caps res_cap_nv14 = {
                .num_dwb = 1,
                .num_ddc = 5,
                .num_vmid = 16,
+#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
                .num_dsc = 5,
+#endif
 };
 
 static const struct dc_debug_options debug_defaults_drv = {
@@ -1536,13 +1538,20 @@ enum dc_status dcn20_build_mapped_resource(const struct dc *dc, struct dc_state
 
 static void acquire_dsc(struct resource_context *res_ctx,
                        const struct resource_pool *pool,
-                       struct display_stream_compressor **dsc)
+                       struct display_stream_compressor **dsc,
+                       int pipe_idx)
 {
        int i;
 
        ASSERT(*dsc == NULL);
        *dsc = NULL;
 
+       if (pool->res_cap->num_dsc == pool->res_cap->num_opp) {
+               *dsc = pool->dscs[pipe_idx];
+               res_ctx->is_dsc_acquired[pipe_idx] = true;
+               return;
+       }
+
        /* Find first free DSC */
        for (i = 0; i < pool->res_cap->num_dsc; i++)
                if (!res_ctx->is_dsc_acquired[i]) {
@@ -1585,7 +1594,7 @@ static enum dc_status add_dsc_to_stream_resource(struct dc *dc,
                if (pipe_ctx->stream != dc_stream)
                        continue;
 
-               acquire_dsc(&dc_ctx->res_ctx, pool, &pipe_ctx->stream_res.dsc);
+               acquire_dsc(&dc_ctx->res_ctx, pool, &pipe_ctx->stream_res.dsc, i);
 
                /* The number of DSCs can be less than the number of pipes */
                if (!pipe_ctx->stream_res.dsc) {
@@ -1785,7 +1794,7 @@ bool dcn20_split_stream_for_odm(
        next_odm_pipe->stream_res.opp = pool->opps[next_odm_pipe->pipe_idx];
 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
        if (next_odm_pipe->stream->timing.flags.DSC == 1) {
-               acquire_dsc(res_ctx, pool, &next_odm_pipe->stream_res.dsc);
+               acquire_dsc(res_ctx, pool, &next_odm_pipe->stream_res.dsc, next_odm_pipe->pipe_idx);
                ASSERT(next_odm_pipe->stream_res.dsc);
                if (next_odm_pipe->stream_res.dsc == NULL)
                        return false;
index 4b34016164348706e8be44aca42ef24d0aa89b13..fcb3877b4fcb2896c214f1bff48965a633904e1b 100644 (file)
@@ -492,15 +492,23 @@ void enc2_stream_encoder_dp_unblank(
                                DP_VID_N_MUL, n_multiply);
        }
 
-       /* set DIG_START to 0x1 to reset FIFO */
+       /* make sure stream is disabled before resetting steer fifo */
+       REG_UPDATE(DP_VID_STREAM_CNTL, DP_VID_STREAM_ENABLE, false);
+       REG_WAIT(DP_VID_STREAM_CNTL, DP_VID_STREAM_STATUS, 0, 10, 5000);
 
+       /* set DIG_START to 0x1 to reset FIFO */
        REG_UPDATE(DIG_FE_CNTL, DIG_START, 1);
+       udelay(1);
 
        /* write 0 to take the FIFO out of reset */
 
        REG_UPDATE(DIG_FE_CNTL, DIG_START, 0);
 
-       /* switch DP encoder to CRTC data */
+       /* switch DP encoder to CRTC data, but reset it the fifo first. It may happen
+        * that it overflows during mode transition, and sometimes doesn't recover.
+        */
+       REG_UPDATE(DP_STEER_FIFO, DP_STEER_FIFO_RESET, 1);
+       udelay(10);
 
        REG_UPDATE(DP_STEER_FIFO, DP_STEER_FIFO_RESET, 0);
 
index 14113ccf498d27c6d9eb48790cc83821fabb989e..5b8c17564bc198de20570550863f8d5c662b8c9c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: MIT
 #
 # Makefile for DCN21.
 
index 459bd9a5caed54dbdb1cffcbe2ea7dc8ba70ff7c..b29b2c99a564edb951c8d89dd1cae0caf638325c 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/slab.h>
+
 #include "dm_services.h"
 #include "dc.h"
 
@@ -257,7 +259,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = {
        .vmm_page_size_bytes = 4096,
        .dram_clock_change_latency_us = 23.84,
        .return_bus_width_bytes = 64,
-       .dispclk_dppclk_vco_speed_mhz = 3550,
+       .dispclk_dppclk_vco_speed_mhz = 3600,
        .xfc_bus_transport_time_us = 4,
        .xfc_xbuf_latency_tolerance_us = 4,
        .use_urgent_burst_bw = 1,
@@ -1000,6 +1002,8 @@ static void calculate_wm_set_for_vlevel(
        pipes[0].clks_cfg.socclk_mhz = dml->soc.clock_limits[vlevel].socclk_mhz;
 
        dml->soc.dram_clock_change_latency_us = table_entry->pstate_latency_us;
+       dml->soc.sr_exit_time_us = table_entry->sr_exit_time_us;
+       dml->soc.sr_enter_plus_exit_time_us = table_entry->sr_enter_plus_exit_time_us;
 
        wm_set->urgent_ns = get_wm_urgent(dml, pipes, pipe_cnt) * 1000;
        wm_set->cstate_pstate.cstate_enter_plus_exit_ns = get_wm_stutter_enter_exit(dml, pipes, pipe_cnt) * 1000;
@@ -1017,14 +1021,21 @@ static void calculate_wm_set_for_vlevel(
 
 static void patch_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_st *bb)
 {
+       int i;
+
        kernel_fpu_begin();
        if (dc->bb_overrides.sr_exit_time_ns) {
-               bb->sr_exit_time_us = dc->bb_overrides.sr_exit_time_ns / 1000.0;
+               for (i = 0; i < WM_SET_COUNT; i++) {
+                         dc->clk_mgr->bw_params->wm_table.entries[i].sr_exit_time_us =
+                                         dc->bb_overrides.sr_exit_time_ns / 1000.0;
+               }
        }
 
        if (dc->bb_overrides.sr_enter_plus_exit_time_ns) {
-               bb->sr_enter_plus_exit_time_us =
-                               dc->bb_overrides.sr_enter_plus_exit_time_ns / 1000.0;
+               for (i = 0; i < WM_SET_COUNT; i++) {
+                         dc->clk_mgr->bw_params->wm_table.entries[i].sr_enter_plus_exit_time_us =
+                                         dc->bb_overrides.sr_enter_plus_exit_time_ns / 1000.0;
+               }
        }
 
        if (dc->bb_overrides.urgent_latency_ns) {
@@ -1032,9 +1043,12 @@ static void patch_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_s
        }
 
        if (dc->bb_overrides.dram_clock_change_latency_ns) {
-               bb->dram_clock_change_latency_us =
+               for (i = 0; i < WM_SET_COUNT; i++) {
+                       dc->clk_mgr->bw_params->wm_table.entries[i].pstate_latency_us =
                                dc->bb_overrides.dram_clock_change_latency_ns / 1000.0;
+               }
        }
+
        kernel_fpu_end();
 }
 
index 970737217e53a18ee4331e3cc3aa570c63a79780..641ffb7cfaed4dbc739a707176e07baa08b65268 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: MIT
 #
 # Makefile for the 'dsc' sub-component of DAL.
 
index 4e18e77dcf422d0db1c76319595a897c300976fa..026e6a2a2c44cc2c6c01ee9755e8e8d206a16af0 100644 (file)
@@ -69,6 +69,8 @@ struct wm_range_table_entry {
        unsigned int wm_inst;
        unsigned int wm_type;
        double pstate_latency_us;
+       double sr_exit_time_us;
+       double sr_enter_plus_exit_time_us;
        bool valid;
 };
 
index bb012cb1a9f58bb515db94502a461a181c49d89f..c7fbb9c3ad6b3fe59814f2f3589dbde139296f59 100644 (file)
@@ -42,7 +42,7 @@ struct aux_payload {
        bool write;
        bool mot;
        uint32_t address;
-       uint8_t length;
+       uint32_t length;
        uint8_t *data;
        /*
         * used to return the reply type of the transaction
index 16e69bbc69aaa7b04a458880199962199abdf824..5437b50e9f90d1c6ee27fe966b9c42771ecd4023 100644 (file)
@@ -37,8 +37,8 @@
 #define STATIC_SCREEN_RAMP_DELTA_REFRESH_RATE_PER_FRAME ((1000 / 60) * 65)
 /* Number of elements in the render times cache array */
 #define RENDER_TIMES_MAX_COUNT 10
-/* Threshold to exit/exit BTR (to avoid frequent enter-exits at the lower limit) */
-#define BTR_MAX_MARGIN 2500
+/* Threshold to exit BTR (to avoid frequent enter-exits at the lower limit) */
+#define BTR_EXIT_MARGIN 2000
 /* Threshold to change BTR multiplier (to avoid frequent changes) */
 #define BTR_DRIFT_MARGIN 2000
 /*Threshold to exit fixed refresh rate*/
@@ -254,22 +254,24 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
        unsigned int delta_from_mid_point_in_us_1 = 0xFFFFFFFF;
        unsigned int delta_from_mid_point_in_us_2 = 0xFFFFFFFF;
        unsigned int frames_to_insert = 0;
+       unsigned int min_frame_duration_in_ns = 0;
+       unsigned int max_render_time_in_us = in_out_vrr->max_duration_in_us;
        unsigned int delta_from_mid_point_delta_in_us;
-       unsigned int max_render_time_in_us =
-                       in_out_vrr->max_duration_in_us - in_out_vrr->btr.margin_in_us;
+
+       min_frame_duration_in_ns = ((unsigned int) (div64_u64(
+               (1000000000ULL * 1000000),
+               in_out_vrr->max_refresh_in_uhz)));
 
        /* Program BTR */
-       if ((last_render_time_in_us + in_out_vrr->btr.margin_in_us / 2) < max_render_time_in_us) {
+       if (last_render_time_in_us + BTR_EXIT_MARGIN < max_render_time_in_us) {
                /* Exit Below the Range */
                if (in_out_vrr->btr.btr_active) {
                        in_out_vrr->btr.frame_counter = 0;
                        in_out_vrr->btr.btr_active = false;
                }
-       } else if (last_render_time_in_us > (max_render_time_in_us + in_out_vrr->btr.margin_in_us / 2)) {
+       } else if (last_render_time_in_us > max_render_time_in_us) {
                /* Enter Below the Range */
-               if (!in_out_vrr->btr.btr_active) {
-                       in_out_vrr->btr.btr_active = true;
-               }
+               in_out_vrr->btr.btr_active = true;
        }
 
        /* BTR set to "not active" so disengage */
@@ -325,9 +327,7 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
                /* Choose number of frames to insert based on how close it
                 * can get to the mid point of the variable range.
                 */
-               if ((frame_time_in_us / mid_point_frames_ceil) > in_out_vrr->min_duration_in_us &&
-                               (delta_from_mid_point_in_us_1 < delta_from_mid_point_in_us_2 ||
-                                               mid_point_frames_floor < 2)) {
+               if (delta_from_mid_point_in_us_1 < delta_from_mid_point_in_us_2) {
                        frames_to_insert = mid_point_frames_ceil;
                        delta_from_mid_point_delta_in_us = delta_from_mid_point_in_us_2 -
                                        delta_from_mid_point_in_us_1;
@@ -343,7 +343,7 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
                if (in_out_vrr->btr.frames_to_insert != 0 &&
                                delta_from_mid_point_delta_in_us < BTR_DRIFT_MARGIN) {
                        if (((last_render_time_in_us / in_out_vrr->btr.frames_to_insert) <
-                                       max_render_time_in_us) &&
+                                       in_out_vrr->max_duration_in_us) &&
                                ((last_render_time_in_us / in_out_vrr->btr.frames_to_insert) >
                                        in_out_vrr->min_duration_in_us))
                                frames_to_insert = in_out_vrr->btr.frames_to_insert;
@@ -796,11 +796,6 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
                refresh_range = in_out_vrr->max_refresh_in_uhz -
                                in_out_vrr->min_refresh_in_uhz;
 
-               in_out_vrr->btr.margin_in_us = in_out_vrr->max_duration_in_us -
-                               2 * in_out_vrr->min_duration_in_us;
-               if (in_out_vrr->btr.margin_in_us > BTR_MAX_MARGIN)
-                       in_out_vrr->btr.margin_in_us = BTR_MAX_MARGIN;
-
                in_out_vrr->supported = true;
        }
 
@@ -816,7 +811,6 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
        in_out_vrr->btr.inserted_duration_in_us = 0;
        in_out_vrr->btr.frames_to_insert = 0;
        in_out_vrr->btr.frame_counter = 0;
-
        in_out_vrr->btr.mid_point_in_us =
                                (in_out_vrr->min_duration_in_us +
                                 in_out_vrr->max_duration_in_us) / 2;
index dbe7835aabcf747c25825e76dac9d2e047bb9025..dc187844d10b1f5e99e4423f15cadb6b422643d5 100644 (file)
@@ -92,7 +92,6 @@ struct mod_vrr_params_btr {
        uint32_t inserted_duration_in_us;
        uint32_t frames_to_insert;
        uint32_t frame_counter;
-       uint32_t margin_in_us;
 };
 
 struct mod_vrr_params_fixed_refresh {
index ce3566ca3e24bc9c01ea1f382fa7b80b7692d974..cc71a1078a7a69204d6f2ba295a425c7f4fb9777 100644 (file)
@@ -1313,12 +1313,17 @@ static int arcturus_get_power_profile_mode(struct smu_context *smu,
                                        "VR",
                                        "COMPUTE",
                                        "CUSTOM"};
+       static const char *title[] = {
+                       "PROFILE_INDEX(NAME)"};
        uint32_t i, size = 0;
        int16_t workload_type = 0;
 
        if (!smu->pm_enabled || !buf)
                return -EINVAL;
 
+       size += sprintf(buf + size, "%16s\n",
+                       title[0]);
+
        for (i = 0; i <= PP_SMC_POWER_PROFILE_CUSTOM; i++) {
                /*
                 * Conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT
index c7c2b349858d221310da1513cf6e0d6d8b0fbe1d..2a27fb5d7dc6f0a8183a39e8f88783f73934c7b7 100644 (file)
@@ -3986,6 +3986,7 @@ static void intel_enable_ddi(struct intel_encoder *encoder,
        if (conn_state->content_protection ==
            DRM_MODE_CONTENT_PROTECTION_DESIRED)
                intel_hdcp_enable(to_intel_connector(conn_state->connector),
+                                 crtc_state->cpu_transcoder,
                                  (u8)conn_state->hdcp_content_type);
 }
 
@@ -4089,7 +4090,9 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder,
        if (conn_state->content_protection ==
            DRM_MODE_CONTENT_PROTECTION_DESIRED ||
            content_protection_type_changed)
-               intel_hdcp_enable(connector, (u8)conn_state->hdcp_content_type);
+               intel_hdcp_enable(connector,
+                                 crtc_state->cpu_transcoder,
+                                 (u8)conn_state->hdcp_content_type);
 }
 
 static void
index 050655a1a3d8d9c2920cf557f3a81388c2a60870..b05b2191b919b1ff886f7335ddf423ffbb3751c7 100644 (file)
@@ -2414,9 +2414,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 
        intel_psr_compute_config(intel_dp, pipe_config);
 
-       intel_hdcp_transcoder_config(intel_connector,
-                                    pipe_config->cpu_transcoder);
-
        return 0;
 }
 
index 3111ecaeabd0ef4717a01fe76e7488ad2b3fea6c..20616639b8ab10180f345cc2f247a67047b8e38d 100644 (file)
@@ -1284,7 +1284,7 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
                return 0;
 
        /* https://bugs.freedesktop.org/show_bug.cgi?id=108085 */
-       if (IS_GEMINILAKE(dev_priv))
+       if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
                return 0;
 
        if (IS_BROADWELL(dev_priv) || INTEL_GEN(dev_priv) >= 9)
index f1f41ca8402bf79585047d2c269c6bbe40675e4b..a448815d8fc2e70bc18689bb169074f70343bac5 100644 (file)
@@ -1821,23 +1821,6 @@ enum mei_fw_tc intel_get_mei_fw_tc(enum transcoder cpu_transcoder)
        }
 }
 
-void intel_hdcp_transcoder_config(struct intel_connector *connector,
-                                 enum transcoder cpu_transcoder)
-{
-       struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
-       struct intel_hdcp *hdcp = &connector->hdcp;
-
-       if (!hdcp->shim)
-               return;
-
-       if (INTEL_GEN(dev_priv) >= 12) {
-               mutex_lock(&hdcp->mutex);
-               hdcp->cpu_transcoder = cpu_transcoder;
-               hdcp->port_data.fw_tc = intel_get_mei_fw_tc(cpu_transcoder);
-               mutex_unlock(&hdcp->mutex);
-       }
-}
-
 static inline int initialize_hdcp_port_data(struct intel_connector *connector,
                                            const struct intel_hdcp_shim *shim)
 {
@@ -1959,8 +1942,10 @@ int intel_hdcp_init(struct intel_connector *connector,
        return 0;
 }
 
-int intel_hdcp_enable(struct intel_connector *connector, u8 content_type)
+int intel_hdcp_enable(struct intel_connector *connector,
+                     enum transcoder cpu_transcoder, u8 content_type)
 {
+       struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
        struct intel_hdcp *hdcp = &connector->hdcp;
        unsigned long check_link_interval = DRM_HDCP_CHECK_PERIOD_MS;
        int ret = -EINVAL;
@@ -1972,6 +1957,11 @@ int intel_hdcp_enable(struct intel_connector *connector, u8 content_type)
        WARN_ON(hdcp->value == DRM_MODE_CONTENT_PROTECTION_ENABLED);
        hdcp->content_type = content_type;
 
+       if (INTEL_GEN(dev_priv) >= 12) {
+               hdcp->cpu_transcoder = cpu_transcoder;
+               hdcp->port_data.fw_tc = intel_get_mei_fw_tc(cpu_transcoder);
+       }
+
        /*
         * Considering that HDCP2.2 is more secure than HDCP1.4, If the setup
         * is capable of HDCP2.2, it is preferred to use HDCP2.2.
index 41c1053d9e38b1e6a3f24fa1b21a3c10b07fb40a..f3c3272e712a18a6fdb6e8cc255ca90d936a3073 100644 (file)
@@ -21,11 +21,10 @@ enum transcoder;
 void intel_hdcp_atomic_check(struct drm_connector *connector,
                             struct drm_connector_state *old_state,
                             struct drm_connector_state *new_state);
-void intel_hdcp_transcoder_config(struct intel_connector *connector,
-                                 enum transcoder cpu_transcoder);
 int intel_hdcp_init(struct intel_connector *connector,
                    const struct intel_hdcp_shim *hdcp_shim);
-int intel_hdcp_enable(struct intel_connector *connector, u8 content_type);
+int intel_hdcp_enable(struct intel_connector *connector,
+                     enum transcoder cpu_transcoder, u8 content_type);
 int intel_hdcp_disable(struct intel_connector *connector);
 bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port);
 bool intel_hdcp_capable(struct intel_connector *connector);
index f6f5312205c49ede75fed758cab856b696882bab..f56fffc474faf98868420d81ac415552973c491a 100644 (file)
@@ -2489,9 +2489,6 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
                return -EINVAL;
        }
 
-       intel_hdcp_transcoder_config(intel_hdmi->attached_connector,
-                                    pipe_config->cpu_transcoder);
-
        return 0;
 }
 
index 9fdefbdc35467399afc5c0709c7b5ba6fd9987b4..75dd0e0367b7a5c467bd5dee3313feae6941da1b 100644 (file)
@@ -845,12 +845,6 @@ static const u8 *reg_offsets(const struct intel_engine_cs *engine)
        }
 }
 
-static void unwind_wa_tail(struct i915_request *rq)
-{
-       rq->tail = intel_ring_wrap(rq->ring, rq->wa_tail - WA_TAIL_BYTES);
-       assert_ring_tail_valid(rq->ring, rq->tail);
-}
-
 static struct i915_request *
 __unwind_incomplete_requests(struct intel_engine_cs *engine)
 {
@@ -863,12 +857,10 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
        list_for_each_entry_safe_reverse(rq, rn,
                                         &engine->active.requests,
                                         sched.link) {
-
                if (i915_request_completed(rq))
                        continue; /* XXX */
 
                __i915_request_unsubmit(rq);
-               unwind_wa_tail(rq);
 
                /*
                 * Push the request back into the queue for later resubmission.
@@ -1161,13 +1153,29 @@ execlists_schedule_out(struct i915_request *rq)
        i915_request_put(rq);
 }
 
-static u64 execlists_update_context(const struct i915_request *rq)
+static u64 execlists_update_context(struct i915_request *rq)
 {
        struct intel_context *ce = rq->hw_context;
-       u64 desc;
+       u64 desc = ce->lrc_desc;
+       u32 tail;
 
-       ce->lrc_reg_state[CTX_RING_TAIL] =
-               intel_ring_set_tail(rq->ring, rq->tail);
+       /*
+        * WaIdleLiteRestore:bdw,skl
+        *
+        * We should never submit the context with the same RING_TAIL twice
+        * just in case we submit an empty ring, which confuses the HW.
+        *
+        * We append a couple of NOOPs (gen8_emit_wa_tail) after the end of
+        * the normal request to be able to always advance the RING_TAIL on
+        * subsequent resubmissions (for lite restore). Should that fail us,
+        * and we try and submit the same tail again, force the context
+        * reload.
+        */
+       tail = intel_ring_set_tail(rq->ring, rq->tail);
+       if (unlikely(ce->lrc_reg_state[CTX_RING_TAIL] == tail))
+               desc |= CTX_DESC_FORCE_RESTORE;
+       ce->lrc_reg_state[CTX_RING_TAIL] = tail;
+       rq->tail = rq->wa_tail;
 
        /*
         * Make sure the context image is complete before we submit it to HW.
@@ -1186,13 +1194,11 @@ static u64 execlists_update_context(const struct i915_request *rq)
         */
        mb();
 
-       desc = ce->lrc_desc;
-       ce->lrc_desc &= ~CTX_DESC_FORCE_RESTORE;
-
        /* Wa_1607138340:tgl */
        if (IS_TGL_REVID(rq->i915, TGL_REVID_A0, TGL_REVID_A0))
                desc |= CTX_DESC_FORCE_RESTORE;
 
+       ce->lrc_desc &= ~CTX_DESC_FORCE_RESTORE;
        return desc;
 }
 
@@ -1703,16 +1709,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 
                                return;
                        }
-
-                       /*
-                        * WaIdleLiteRestore:bdw,skl
-                        * Apply the wa NOOPs to prevent
-                        * ring:HEAD == rq:TAIL as we resubmit the
-                        * request. See gen8_emit_fini_breadcrumb() for
-                        * where we prepare the padding after the
-                        * end of the request.
-                        */
-                       last->tail = last->wa_tail;
                }
        }
 
@@ -4120,17 +4116,18 @@ static void virtual_context_destroy(struct kref *kref)
        for (n = 0; n < ve->num_siblings; n++) {
                struct intel_engine_cs *sibling = ve->siblings[n];
                struct rb_node *node = &ve->nodes[sibling->id].rb;
+               unsigned long flags;
 
                if (RB_EMPTY_NODE(node))
                        continue;
 
-               spin_lock_irq(&sibling->active.lock);
+               spin_lock_irqsave(&sibling->active.lock, flags);
 
                /* Detachment is lazily performed in the execlists tasklet */
                if (!RB_EMPTY_NODE(node))
                        rb_erase_cached(node, &sibling->execlists.virtual);
 
-               spin_unlock_irq(&sibling->active.lock);
+               spin_unlock_irqrestore(&sibling->active.lock, flags);
        }
        GEM_BUG_ON(__tasklet_is_scheduled(&ve->base.execlists.tasklet));
 
index b9eb6b3149b711cea3a4a1673c5ae6bcf7c7bc23..d034fa413164bfeb3f68bdb9bf18a17ce131405b 100644 (file)
@@ -45,6 +45,7 @@
 #include "gem/i915_gem_context.h"
 #include "gem/i915_gem_ioctls.h"
 #include "gem/i915_gem_pm.h"
+#include "gt/intel_context.h"
 #include "gt/intel_engine_user.h"
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_pm.h"
@@ -1053,6 +1054,18 @@ out:
        return err;
 }
 
+static int __intel_context_flush_retire(struct intel_context *ce)
+{
+       struct intel_timeline *tl;
+
+       tl = intel_context_timeline_lock(ce);
+       if (IS_ERR(tl))
+               return PTR_ERR(tl);
+
+       intel_context_timeline_unlock(tl);
+       return 0;
+}
+
 static int __intel_engines_record_defaults(struct intel_gt *gt)
 {
        struct i915_request *requests[I915_NUM_ENGINES] = {};
@@ -1121,13 +1134,20 @@ err_rq:
                if (!rq)
                        continue;
 
-               /* We want to be able to unbind the state from the GGTT */
-               GEM_BUG_ON(intel_context_is_pinned(rq->hw_context));
-
+               GEM_BUG_ON(!test_bit(CONTEXT_ALLOC_BIT,
+                                    &rq->hw_context->flags));
                state = rq->hw_context->state;
                if (!state)
                        continue;
 
+               /* Serialise with retirement on another CPU */
+               err = __intel_context_flush_retire(rq->hw_context);
+               if (err)
+                       goto out;
+
+               /* We want to be able to unbind the state from the GGTT */
+               GEM_BUG_ON(intel_context_is_pinned(rq->hw_context));
+
                /*
                 * As we will hold a reference to the logical state, it will
                 * not be torn down with the context, and importantly the
index 65d7c2e599de03718c3466f165b75183b2d27ad1..2ae14bc149317afb65d2b8d04bd6fefd9a1f33e5 100644 (file)
@@ -2078,20 +2078,12 @@ gen8_update_reg_state_unlocked(const struct intel_context *ce,
        u32 *reg_state = ce->lrc_reg_state;
        int i;
 
-       if (IS_GEN(stream->perf->i915, 12)) {
-               u32 format = stream->oa_buffer.format;
+       reg_state[ctx_oactxctrl + 1] =
+               (stream->period_exponent << GEN8_OA_TIMER_PERIOD_SHIFT) |
+               (stream->periodic ? GEN8_OA_TIMER_ENABLE : 0) |
+               GEN8_OA_COUNTER_RESUME;
 
-               reg_state[ctx_oactxctrl + 1] =
-                       (format << GEN12_OAR_OACONTROL_COUNTER_FORMAT_SHIFT) |
-                       (stream->oa_config ? GEN12_OAR_OACONTROL_COUNTER_ENABLE : 0);
-       } else {
-               reg_state[ctx_oactxctrl + 1] =
-                       (stream->period_exponent << GEN8_OA_TIMER_PERIOD_SHIFT) |
-                       (stream->periodic ? GEN8_OA_TIMER_ENABLE : 0) |
-                       GEN8_OA_COUNTER_RESUME;
-       }
-
-       for (i = 0; !!ctx_flexeu0 && i < ARRAY_SIZE(flex_regs); i++)
+       for (i = 0; i < ARRAY_SIZE(flex_regs); i++)
                reg_state[ctx_flexeu0 + i * 2 + 1] =
                        oa_config_flex_reg(stream->oa_config, flex_regs[i]);
 
@@ -2224,34 +2216,51 @@ static int gen8_configure_context(struct i915_gem_context *ctx,
        return err;
 }
 
-static int gen12_emit_oar_config(struct intel_context *ce, bool enable)
+static int gen12_configure_oar_context(struct i915_perf_stream *stream, bool enable)
 {
-       struct i915_request *rq;
-       u32 *cs;
-       int err = 0;
-
-       rq = i915_request_create(ce);
-       if (IS_ERR(rq))
-               return PTR_ERR(rq);
-
-       cs = intel_ring_begin(rq, 4);
-       if (IS_ERR(cs)) {
-               err = PTR_ERR(cs);
-               goto out;
-       }
-
-       *cs++ = MI_LOAD_REGISTER_IMM(1);
-       *cs++ = i915_mmio_reg_offset(RING_CONTEXT_CONTROL(ce->engine->mmio_base));
-       *cs++ = _MASKED_FIELD(GEN12_CTX_CTRL_OAR_CONTEXT_ENABLE,
-                             enable ? GEN12_CTX_CTRL_OAR_CONTEXT_ENABLE : 0);
-       *cs++ = MI_NOOP;
+       int err;
+       struct intel_context *ce = stream->pinned_ctx;
+       u32 format = stream->oa_buffer.format;
+       struct flex regs_context[] = {
+               {
+                       GEN8_OACTXCONTROL,
+                       stream->perf->ctx_oactxctrl_offset + 1,
+                       enable ? GEN8_OA_COUNTER_RESUME : 0,
+               },
+       };
+       /* Offsets in regs_lri are not used since this configuration is only
+        * applied using LRI. Initialize the correct offsets for posterity.
+        */
+#define GEN12_OAR_OACONTROL_OFFSET 0x5B0
+       struct flex regs_lri[] = {
+               {
+                       GEN12_OAR_OACONTROL,
+                       GEN12_OAR_OACONTROL_OFFSET + 1,
+                       (format << GEN12_OAR_OACONTROL_COUNTER_FORMAT_SHIFT) |
+                       (enable ? GEN12_OAR_OACONTROL_COUNTER_ENABLE : 0)
+               },
+               {
+                       RING_CONTEXT_CONTROL(ce->engine->mmio_base),
+                       CTX_CONTEXT_CONTROL,
+                       _MASKED_FIELD(GEN12_CTX_CTRL_OAR_CONTEXT_ENABLE,
+                                     enable ?
+                                     GEN12_CTX_CTRL_OAR_CONTEXT_ENABLE :
+                                     0)
+               },
+       };
 
-       intel_ring_advance(rq, cs);
+       /* Modify the context image of pinned context with regs_context*/
+       err = intel_context_lock_pinned(ce);
+       if (err)
+               return err;
 
-out:
-       i915_request_add(rq);
+       err = gen8_modify_context(ce, regs_context, ARRAY_SIZE(regs_context));
+       intel_context_unlock_pinned(ce);
+       if (err)
+               return err;
 
-       return err;
+       /* Apply regs_lri using LRI with pinned context */
+       return gen8_modify_self(ce, regs_lri, ARRAY_SIZE(regs_lri));
 }
 
 /*
@@ -2277,53 +2286,16 @@ out:
  *   per-context OA state.
  *
  * Note: it's only the RCS/Render context that has any OA state.
+ * Note: the first flex register passed must always be R_PWR_CLK_STATE
  */
-static int lrc_configure_all_contexts(struct i915_perf_stream *stream,
-                                     const struct i915_oa_config *oa_config)
+static int oa_configure_all_contexts(struct i915_perf_stream *stream,
+                                    struct flex *regs,
+                                    size_t num_regs)
 {
        struct drm_i915_private *i915 = stream->perf->i915;
-       /* The MMIO offsets for Flex EU registers aren't contiguous */
-       const u32 ctx_flexeu0 = stream->perf->ctx_flexeu0_offset;
-#define ctx_flexeuN(N) (ctx_flexeu0 + 2 * (N) + 1)
-       struct flex regs[] = {
-               {
-                       GEN8_R_PWR_CLK_STATE,
-                       CTX_R_PWR_CLK_STATE,
-               },
-               {
-                       IS_GEN(i915, 12) ?
-                       GEN12_OAR_OACONTROL : GEN8_OACTXCONTROL,
-                       stream->perf->ctx_oactxctrl_offset + 1,
-               },
-               { EU_PERF_CNTL0, ctx_flexeuN(0) },
-               { EU_PERF_CNTL1, ctx_flexeuN(1) },
-               { EU_PERF_CNTL2, ctx_flexeuN(2) },
-               { EU_PERF_CNTL3, ctx_flexeuN(3) },
-               { EU_PERF_CNTL4, ctx_flexeuN(4) },
-               { EU_PERF_CNTL5, ctx_flexeuN(5) },
-               { EU_PERF_CNTL6, ctx_flexeuN(6) },
-       };
-#undef ctx_flexeuN
        struct intel_engine_cs *engine;
        struct i915_gem_context *ctx, *cn;
-       size_t array_size = IS_GEN(i915, 12) ? 2 : ARRAY_SIZE(regs);
-       int i, err;
-
-       if (IS_GEN(i915, 12)) {
-               u32 format = stream->oa_buffer.format;
-
-               regs[1].value =
-                       (format << GEN12_OAR_OACONTROL_COUNTER_FORMAT_SHIFT) |
-                       (oa_config ? GEN12_OAR_OACONTROL_COUNTER_ENABLE : 0);
-       } else {
-               regs[1].value =
-                       (stream->period_exponent << GEN8_OA_TIMER_PERIOD_SHIFT) |
-                       (stream->periodic ? GEN8_OA_TIMER_ENABLE : 0) |
-                       GEN8_OA_COUNTER_RESUME;
-       }
-
-       for (i = 2; !!ctx_flexeu0 && i < array_size; i++)
-               regs[i].value = oa_config_flex_reg(oa_config, regs[i].reg);
+       int err;
 
        lockdep_assert_held(&stream->perf->lock);
 
@@ -2353,7 +2325,7 @@ static int lrc_configure_all_contexts(struct i915_perf_stream *stream,
 
                spin_unlock(&i915->gem.contexts.lock);
 
-               err = gen8_configure_context(ctx, regs, array_size);
+               err = gen8_configure_context(ctx, regs, num_regs);
                if (err) {
                        i915_gem_context_put(ctx);
                        return err;
@@ -2378,7 +2350,7 @@ static int lrc_configure_all_contexts(struct i915_perf_stream *stream,
 
                regs[0].value = intel_sseu_make_rpcs(i915, &ce->sseu);
 
-               err = gen8_modify_self(ce, regs, array_size);
+               err = gen8_modify_self(ce, regs, num_regs);
                if (err)
                        return err;
        }
@@ -2386,6 +2358,56 @@ static int lrc_configure_all_contexts(struct i915_perf_stream *stream,
        return 0;
 }
 
+static int gen12_configure_all_contexts(struct i915_perf_stream *stream,
+                                       const struct i915_oa_config *oa_config)
+{
+       struct flex regs[] = {
+               {
+                       GEN8_R_PWR_CLK_STATE,
+                       CTX_R_PWR_CLK_STATE,
+               },
+       };
+
+       return oa_configure_all_contexts(stream, regs, ARRAY_SIZE(regs));
+}
+
+static int lrc_configure_all_contexts(struct i915_perf_stream *stream,
+                                     const struct i915_oa_config *oa_config)
+{
+       /* The MMIO offsets for Flex EU registers aren't contiguous */
+       const u32 ctx_flexeu0 = stream->perf->ctx_flexeu0_offset;
+#define ctx_flexeuN(N) (ctx_flexeu0 + 2 * (N) + 1)
+       struct flex regs[] = {
+               {
+                       GEN8_R_PWR_CLK_STATE,
+                       CTX_R_PWR_CLK_STATE,
+               },
+               {
+                       GEN8_OACTXCONTROL,
+                       stream->perf->ctx_oactxctrl_offset + 1,
+               },
+               { EU_PERF_CNTL0, ctx_flexeuN(0) },
+               { EU_PERF_CNTL1, ctx_flexeuN(1) },
+               { EU_PERF_CNTL2, ctx_flexeuN(2) },
+               { EU_PERF_CNTL3, ctx_flexeuN(3) },
+               { EU_PERF_CNTL4, ctx_flexeuN(4) },
+               { EU_PERF_CNTL5, ctx_flexeuN(5) },
+               { EU_PERF_CNTL6, ctx_flexeuN(6) },
+       };
+#undef ctx_flexeuN
+       int i;
+
+       regs[1].value =
+               (stream->period_exponent << GEN8_OA_TIMER_PERIOD_SHIFT) |
+               (stream->periodic ? GEN8_OA_TIMER_ENABLE : 0) |
+               GEN8_OA_COUNTER_RESUME;
+
+       for (i = 2; i < ARRAY_SIZE(regs); i++)
+               regs[i].value = oa_config_flex_reg(oa_config, regs[i].reg);
+
+       return oa_configure_all_contexts(stream, regs, ARRAY_SIZE(regs));
+}
+
 static int gen8_enable_metric_set(struct i915_perf_stream *stream)
 {
        struct intel_uncore *uncore = stream->uncore;
@@ -2464,7 +2486,7 @@ static int gen12_enable_metric_set(struct i915_perf_stream *stream)
         * to make sure all slices/subslices are ON before writing to NOA
         * registers.
         */
-       ret = lrc_configure_all_contexts(stream, oa_config);
+       ret = gen12_configure_all_contexts(stream, oa_config);
        if (ret)
                return ret;
 
@@ -2474,8 +2496,7 @@ static int gen12_enable_metric_set(struct i915_perf_stream *stream)
         * requested this.
         */
        if (stream->ctx) {
-               ret = gen12_emit_oar_config(stream->pinned_ctx,
-                                           oa_config != NULL);
+               ret = gen12_configure_oar_context(stream, true);
                if (ret)
                        return ret;
        }
@@ -2509,11 +2530,11 @@ static void gen12_disable_metric_set(struct i915_perf_stream *stream)
        struct intel_uncore *uncore = stream->uncore;
 
        /* Reset all contexts' slices/subslices configurations. */
-       lrc_configure_all_contexts(stream, NULL);
+       gen12_configure_all_contexts(stream, NULL);
 
        /* disable the context save/restore or OAR counters */
        if (stream->ctx)
-               gen12_emit_oar_config(stream->pinned_ctx, false);
+               gen12_configure_oar_context(stream, false);
 
        /* Make sure we disable noa to save power. */
        intel_uncore_rmw(uncore, RPM_CONFIG1, GEN10_GT_NOA_ENABLE, 0);
@@ -2713,7 +2734,8 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
                return -EINVAL;
        }
 
-       if (!(props->sample_flags & SAMPLE_OA_REPORT)) {
+       if (!(props->sample_flags & SAMPLE_OA_REPORT) &&
+           (INTEL_GEN(perf->i915) < 12 || !stream->ctx)) {
                DRM_DEBUG("Only OA report sampling supported\n");
                return -EINVAL;
        }
@@ -2745,7 +2767,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
 
        format_size = perf->oa_formats[props->oa_format].size;
 
-       stream->sample_flags |= SAMPLE_OA_REPORT;
+       stream->sample_flags = props->sample_flags;
        stream->sample_size += format_size;
 
        stream->oa_buffer.format_size = format_size;
@@ -2854,7 +2876,11 @@ void i915_oa_init_reg_state(const struct intel_context *ce,
                return;
 
        stream = engine->i915->perf.exclusive_stream;
-       if (stream)
+       /*
+        * For gen12, only CTX_R_PWR_CLK_STATE needs update, but the caller
+        * is already doing that, so nothing to be done for gen12 here.
+        */
+       if (stream && INTEL_GEN(stream->perf->i915) < 12)
                gen8_update_reg_state_unlocked(ce, stream);
 }
 
index d6214d3c8b337b5b6ab4c1f19fb17fbca003f41c..ef4c630afe3fca0b3e8158f044103dc762782104 100644 (file)
@@ -935,11 +935,13 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
        for_each_available_child_of_node(dev->of_node, child) {
                panel = of_drm_find_panel(child);
                if (IS_ERR(panel)) {
-                       dev_err(dev, "failed to find panel try bridge (%lu)\n",
+                       dev_err(dev, "failed to find panel try bridge (%ld)\n",
                                PTR_ERR(panel));
+                       panel = NULL;
+
                        bridge = of_drm_find_bridge(child);
                        if (IS_ERR(bridge)) {
-                               dev_err(dev, "failed to find bridge (%lu)\n",
+                               dev_err(dev, "failed to find bridge (%ld)\n",
                                        PTR_ERR(bridge));
                                return PTR_ERR(bridge);
                        }
index 9ab27aecfcf313b04d7158d6dc6de230b9a7b91c..1bd6b6d15ffb304d38c9cb3bfb718e2964e7a75f 100644 (file)
@@ -64,6 +64,25 @@ struct meson_cvbs_mode meson_cvbs_modes[MESON_CVBS_MODES_COUNT] = {
        },
 };
 
+static const struct meson_cvbs_mode *
+meson_cvbs_get_mode(const struct drm_display_mode *req_mode)
+{
+       int i;
+
+       for (i = 0; i < MESON_CVBS_MODES_COUNT; ++i) {
+               struct meson_cvbs_mode *meson_mode = &meson_cvbs_modes[i];
+
+               if (drm_mode_match(req_mode, &meson_mode->mode,
+                                  DRM_MODE_MATCH_TIMINGS |
+                                  DRM_MODE_MATCH_CLOCK |
+                                  DRM_MODE_MATCH_FLAGS |
+                                  DRM_MODE_MATCH_3D_FLAGS))
+                       return meson_mode;
+       }
+
+       return NULL;
+}
+
 /* Connector */
 
 static void meson_cvbs_connector_destroy(struct drm_connector *connector)
@@ -136,14 +155,8 @@ static int meson_venc_cvbs_encoder_atomic_check(struct drm_encoder *encoder,
                                        struct drm_crtc_state *crtc_state,
                                        struct drm_connector_state *conn_state)
 {
-       int i;
-
-       for (i = 0; i < MESON_CVBS_MODES_COUNT; ++i) {
-               struct meson_cvbs_mode *meson_mode = &meson_cvbs_modes[i];
-
-               if (drm_mode_equal(&crtc_state->mode, &meson_mode->mode))
-                       return 0;
-       }
+       if (meson_cvbs_get_mode(&crtc_state->mode))
+               return 0;
 
        return -EINVAL;
 }
@@ -191,24 +204,17 @@ static void meson_venc_cvbs_encoder_mode_set(struct drm_encoder *encoder,
                                   struct drm_display_mode *mode,
                                   struct drm_display_mode *adjusted_mode)
 {
+       const struct meson_cvbs_mode *meson_mode = meson_cvbs_get_mode(mode);
        struct meson_venc_cvbs *meson_venc_cvbs =
                                        encoder_to_meson_venc_cvbs(encoder);
        struct meson_drm *priv = meson_venc_cvbs->priv;
-       int i;
 
-       for (i = 0; i < MESON_CVBS_MODES_COUNT; ++i) {
-               struct meson_cvbs_mode *meson_mode = &meson_cvbs_modes[i];
+       if (meson_mode) {
+               meson_venci_cvbs_mode_set(priv, meson_mode->enci);
 
-               if (drm_mode_equal(mode, &meson_mode->mode)) {
-                       meson_venci_cvbs_mode_set(priv,
-                                                 meson_mode->enci);
-
-                       /* Setup 27MHz vclk2 for ENCI and VDAC */
-                       meson_vclk_setup(priv, MESON_VCLK_TARGET_CVBS,
-                                        MESON_VCLK_CVBS, MESON_VCLK_CVBS,
-                                        MESON_VCLK_CVBS, true);
-                       break;
-               }
+               /* Setup 27MHz vclk2 for ENCI and VDAC */
+               meson_vclk_setup(priv, MESON_VCLK_TARGET_CVBS, MESON_VCLK_CVBS,
+                                MESON_VCLK_CVBS, MESON_VCLK_CVBS, true);
        }
 }
 
index d43951caeea02b43cd740ee95c491b63d09c4e37..b113876c24283259475e59b8363cb5aef50fad03 100644 (file)
@@ -30,9 +30,8 @@ module_param_named(modeset, mgag200_modeset, int, 0400);
 static struct drm_driver driver;
 
 static const struct pci_device_id pciidlist[] = {
-       { PCI_VENDOR_ID_MATROX, 0x522, PCI_VENDOR_ID_SUN, 0x4852, 0, 0,
+       { PCI_VENDOR_ID_MATROX, 0x522, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                G200_SE_A | MGAG200_FLAG_HW_BUG_NO_STARTADD},
-       { PCI_VENDOR_ID_MATROX, 0x522, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_SE_A },
        { PCI_VENDOR_ID_MATROX, 0x524, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_SE_B },
        { PCI_VENDOR_ID_MATROX, 0x530, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_EV },
        { PCI_VENDOR_ID_MATROX, 0x532, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_WB },
index 43df86c38f58bcf061491cb718f66e215db40a7c..24f7700768dab9a7d715ff1b2de867eef4f4f9b7 100644 (file)
@@ -114,6 +114,7 @@ struct nv50_head_atom {
                u8 nhsync:1;
                u8 nvsync:1;
                u8 depth:4;
+               u8 bpc;
        } or;
 
        /* Currently only used for MST */
index 549486f1d93760a51c28bf10948e62a86613c428..63425e24601896cb31238ddbcba0b9b7fae03e41 100644 (file)
@@ -326,9 +326,9 @@ nv50_outp_atomic_check_view(struct drm_encoder *encoder,
                         * same size as the native one (e.g. different
                         * refresh rate)
                         */
-                       if (adjusted_mode->hdisplay == native_mode->hdisplay &&
-                           adjusted_mode->vdisplay == native_mode->vdisplay &&
-                           adjusted_mode->type & DRM_MODE_TYPE_DRIVER)
+                       if (mode->hdisplay == native_mode->hdisplay &&
+                           mode->vdisplay == native_mode->vdisplay &&
+                           mode->type & DRM_MODE_TYPE_DRIVER)
                                break;
                        mode = native_mode;
                        asyc->scaler.full = true;
@@ -353,10 +353,20 @@ nv50_outp_atomic_check(struct drm_encoder *encoder,
                       struct drm_crtc_state *crtc_state,
                       struct drm_connector_state *conn_state)
 {
-       struct nouveau_connector *nv_connector =
-               nouveau_connector(conn_state->connector);
-       return nv50_outp_atomic_check_view(encoder, crtc_state, conn_state,
-                                          nv_connector->native_mode);
+       struct drm_connector *connector = conn_state->connector;
+       struct nouveau_connector *nv_connector = nouveau_connector(connector);
+       struct nv50_head_atom *asyh = nv50_head_atom(crtc_state);
+       int ret;
+
+       ret = nv50_outp_atomic_check_view(encoder, crtc_state, conn_state,
+                                         nv_connector->native_mode);
+       if (ret)
+               return ret;
+
+       if (crtc_state->mode_changed || crtc_state->connectors_changed)
+               asyh->or.bpc = connector->display_info.bpc;
+
+       return 0;
 }
 
 /******************************************************************************
@@ -770,32 +780,54 @@ nv50_msto_atomic_check(struct drm_encoder *encoder,
        struct nv50_mstm *mstm = mstc->mstm;
        struct nv50_head_atom *asyh = nv50_head_atom(crtc_state);
        int slots;
+       int ret;
+
+       ret = nv50_outp_atomic_check_view(encoder, crtc_state, conn_state,
+                                         mstc->native);
+       if (ret)
+               return ret;
+
+       if (!crtc_state->mode_changed && !crtc_state->connectors_changed)
+               return 0;
+
+       /*
+        * When restoring duplicated states, we need to make sure that the bw
+        * remains the same and avoid recalculating it, as the connector's bpc
+        * may have changed after the state was duplicated
+        */
+       if (!state->duplicated) {
+               const int clock = crtc_state->adjusted_mode.clock;
 
-       if (crtc_state->mode_changed || crtc_state->connectors_changed) {
                /*
-                * When restoring duplicated states, we need to make sure that
-                * the bw remains the same and avoid recalculating it, as the
-                * connector's bpc may have changed after the state was
-                * duplicated
+                * XXX: Since we don't use HDR in userspace quite yet, limit
+                * the bpc to 8 to save bandwidth on the topology. In the
+                * future, we'll want to properly fix this by dynamically
+                * selecting the highest possible bpc that would fit in the
+                * topology
                 */
-               if (!state->duplicated) {
-                       const int bpp = connector->display_info.bpc * 3;
-                       const int clock = crtc_state->adjusted_mode.clock;
+               asyh->or.bpc = min(connector->display_info.bpc, 8U);
+               asyh->dp.pbn = drm_dp_calc_pbn_mode(clock, asyh->or.bpc * 3);
+       }
 
-                       asyh->dp.pbn = drm_dp_calc_pbn_mode(clock, bpp);
-               }
+       slots = drm_dp_atomic_find_vcpi_slots(state, &mstm->mgr, mstc->port,
+                                             asyh->dp.pbn);
+       if (slots < 0)
+               return slots;
 
-               slots = drm_dp_atomic_find_vcpi_slots(state, &mstm->mgr,
-                                                     mstc->port,
-                                                     asyh->dp.pbn);
-               if (slots < 0)
-                       return slots;
+       asyh->dp.tu = slots;
 
-               asyh->dp.tu = slots;
-       }
+       return 0;
+}
 
-       return nv50_outp_atomic_check_view(encoder, crtc_state, conn_state,
-                                          mstc->native);
+static u8
+nv50_dp_bpc_to_depth(unsigned int bpc)
+{
+       switch (bpc) {
+       case  6: return 0x2;
+       case  8: return 0x5;
+       case 10: /* fall-through */
+       default: return 0x6;
+       }
 }
 
 static void
@@ -808,7 +840,7 @@ nv50_msto_enable(struct drm_encoder *encoder)
        struct nv50_mstm *mstm = NULL;
        struct drm_connector *connector;
        struct drm_connector_list_iter conn_iter;
-       u8 proto, depth;
+       u8 proto;
        bool r;
 
        drm_connector_list_iter_begin(encoder->dev, &conn_iter);
@@ -837,14 +869,8 @@ nv50_msto_enable(struct drm_encoder *encoder)
        else
                proto = 0x9;
 
-       switch (mstc->connector.display_info.bpc) {
-       case  6: depth = 0x2; break;
-       case  8: depth = 0x5; break;
-       case 10:
-       default: depth = 0x6; break;
-       }
-
-       mstm->outp->update(mstm->outp, head->base.index, armh, proto, depth);
+       mstm->outp->update(mstm->outp, head->base.index, armh, proto,
+                          nv50_dp_bpc_to_depth(armh->or.bpc));
 
        msto->head = head;
        msto->mstc = mstc;
@@ -1498,20 +1524,14 @@ nv50_sor_enable(struct drm_encoder *encoder)
                                        lvds.lvds.script |= 0x0200;
                        }
 
-                       if (nv_connector->base.display_info.bpc == 8)
+                       if (asyh->or.bpc == 8)
                                lvds.lvds.script |= 0x0200;
                }
 
                nvif_mthd(&disp->disp->object, 0, &lvds, sizeof(lvds));
                break;
        case DCB_OUTPUT_DP:
-               if (nv_connector->base.display_info.bpc == 6)
-                       depth = 0x2;
-               else
-               if (nv_connector->base.display_info.bpc == 8)
-                       depth = 0x5;
-               else
-                       depth = 0x6;
+               depth = nv50_dp_bpc_to_depth(asyh->or.bpc);
 
                if (nv_encoder->link & 1)
                        proto = 0x8;
@@ -1662,7 +1682,7 @@ nv50_pior_enable(struct drm_encoder *encoder)
        nv50_outp_acquire(nv_encoder);
 
        nv_connector = nouveau_encoder_connector_get(nv_encoder);
-       switch (nv_connector->base.display_info.bpc) {
+       switch (asyh->or.bpc) {
        case 10: asyh->or.depth = 0x6; break;
        case  8: asyh->or.depth = 0x5; break;
        case  6: asyh->or.depth = 0x2; break;
index 71c23bf1fe25915534fc0b61c46a760f500ce921..c9692df2b76cca51604c0fb008643ff26a972be0 100644 (file)
@@ -81,18 +81,17 @@ nv50_head_atomic_check_dither(struct nv50_head_atom *armh,
                              struct nv50_head_atom *asyh,
                              struct nouveau_conn_atom *asyc)
 {
-       struct drm_connector *connector = asyc->state.connector;
        u32 mode = 0x00;
 
        if (asyc->dither.mode == DITHERING_MODE_AUTO) {
-               if (asyh->base.depth > connector->display_info.bpc * 3)
+               if (asyh->base.depth > asyh->or.bpc * 3)
                        mode = DITHERING_MODE_DYNAMIC2X2;
        } else {
                mode = asyc->dither.mode;
        }
 
        if (asyc->dither.depth == DITHERING_DEPTH_AUTO) {
-               if (connector->display_info.bpc >= 8)
+               if (asyh->or.bpc >= 8)
                        mode |= DITHERING_DEPTH_8BPC;
        } else {
                mode |= asyc->dither.depth;
index 5b413588b82303f805d9093a254655dad91f4d74..9a9a7f5003d3f370fe5f23926a836fd7ad0a6f37 100644 (file)
@@ -245,14 +245,22 @@ nouveau_conn_atomic_duplicate_state(struct drm_connector *connector)
 void
 nouveau_conn_reset(struct drm_connector *connector)
 {
+       struct nouveau_connector *nv_connector = nouveau_connector(connector);
        struct nouveau_conn_atom *asyc;
 
-       if (WARN_ON(!(asyc = kzalloc(sizeof(*asyc), GFP_KERNEL))))
-               return;
+       if (drm_drv_uses_atomic_modeset(connector->dev)) {
+               if (WARN_ON(!(asyc = kzalloc(sizeof(*asyc), GFP_KERNEL))))
+                       return;
+
+               if (connector->state)
+                       nouveau_conn_atomic_destroy_state(connector,
+                                                         connector->state);
+
+               __drm_atomic_helper_connector_reset(connector, &asyc->state);
+       } else {
+               asyc = &nv_connector->properties_state;
+       }
 
-       if (connector->state)
-               nouveau_conn_atomic_destroy_state(connector, connector->state);
-       __drm_atomic_helper_connector_reset(connector, &asyc->state);
        asyc->dither.mode = DITHERING_MODE_AUTO;
        asyc->dither.depth = DITHERING_DEPTH_AUTO;
        asyc->scaler.mode = DRM_MODE_SCALE_NONE;
@@ -276,8 +284,14 @@ void
 nouveau_conn_attach_properties(struct drm_connector *connector)
 {
        struct drm_device *dev = connector->dev;
-       struct nouveau_conn_atom *armc = nouveau_conn_atom(connector->state);
        struct nouveau_display *disp = nouveau_display(dev);
+       struct nouveau_connector *nv_connector = nouveau_connector(connector);
+       struct nouveau_conn_atom *armc;
+
+       if (drm_drv_uses_atomic_modeset(connector->dev))
+               armc = nouveau_conn_atom(connector->state);
+       else
+               armc = &nv_connector->properties_state;
 
        /* Init DVI-I specific properties. */
        if (connector->connector_type == DRM_MODE_CONNECTOR_DVII)
@@ -748,9 +762,9 @@ static int
 nouveau_connector_set_property(struct drm_connector *connector,
                               struct drm_property *property, uint64_t value)
 {
-       struct nouveau_conn_atom *asyc = nouveau_conn_atom(connector->state);
        struct nouveau_connector *nv_connector = nouveau_connector(connector);
        struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder;
+       struct nouveau_conn_atom *asyc = &nv_connector->properties_state;
        struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
        int ret;
 
index f43a8d63aef86e07c7078501ff4bad0e33ba937b..de84fb4708c7ab22f4e5abbf1aa5918500b3bc63 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <nvif/notify.h>
 
+#include <drm/drm_crtc.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_encoder.h>
 #include <drm/drm_dp_helper.h>
@@ -44,6 +45,60 @@ struct dcb_output;
 struct nouveau_backlight;
 #endif
 
+#define nouveau_conn_atom(p)                                                   \
+       container_of((p), struct nouveau_conn_atom, state)
+
+struct nouveau_conn_atom {
+       struct drm_connector_state state;
+
+       struct {
+               /* The enum values specifically defined here match nv50/gf119
+                * hw values, and the code relies on this.
+                */
+               enum {
+                       DITHERING_MODE_OFF = 0x00,
+                       DITHERING_MODE_ON = 0x01,
+                       DITHERING_MODE_DYNAMIC2X2 = 0x10 | DITHERING_MODE_ON,
+                       DITHERING_MODE_STATIC2X2 = 0x18 | DITHERING_MODE_ON,
+                       DITHERING_MODE_TEMPORAL = 0x20 | DITHERING_MODE_ON,
+                       DITHERING_MODE_AUTO
+               } mode;
+               enum {
+                       DITHERING_DEPTH_6BPC = 0x00,
+                       DITHERING_DEPTH_8BPC = 0x02,
+                       DITHERING_DEPTH_AUTO
+               } depth;
+       } dither;
+
+       struct {
+               int mode;       /* DRM_MODE_SCALE_* */
+               struct {
+                       enum {
+                               UNDERSCAN_OFF,
+                               UNDERSCAN_ON,
+                               UNDERSCAN_AUTO,
+                       } mode;
+                       u32 hborder;
+                       u32 vborder;
+               } underscan;
+               bool full;
+       } scaler;
+
+       struct {
+               int color_vibrance;
+               int vibrant_hue;
+       } procamp;
+
+       union {
+               struct {
+                       bool dither:1;
+                       bool scaler:1;
+                       bool procamp:1;
+               };
+               u8 mask;
+       } set;
+};
+
 struct nouveau_connector {
        struct drm_connector base;
        enum dcb_connector_type type;
@@ -63,6 +118,12 @@ struct nouveau_connector {
 #ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
        struct nouveau_backlight *backlight;
 #endif
+       /*
+        * Our connector property code expects a nouveau_conn_atom struct
+        * even on pre-nv50 where we do not support atomic. This embedded
+        * version gets used in the non atomic modeset case.
+        */
+       struct nouveau_conn_atom properties_state;
 };
 
 static inline struct nouveau_connector *nouveau_connector(
@@ -121,61 +182,6 @@ extern int nouveau_ignorelid;
 extern int nouveau_duallink;
 extern int nouveau_hdmimhz;
 
-#include <drm/drm_crtc.h>
-#define nouveau_conn_atom(p)                                                   \
-       container_of((p), struct nouveau_conn_atom, state)
-
-struct nouveau_conn_atom {
-       struct drm_connector_state state;
-
-       struct {
-               /* The enum values specifically defined here match nv50/gf119
-                * hw values, and the code relies on this.
-                */
-               enum {
-                       DITHERING_MODE_OFF = 0x00,
-                       DITHERING_MODE_ON = 0x01,
-                       DITHERING_MODE_DYNAMIC2X2 = 0x10 | DITHERING_MODE_ON,
-                       DITHERING_MODE_STATIC2X2 = 0x18 | DITHERING_MODE_ON,
-                       DITHERING_MODE_TEMPORAL = 0x20 | DITHERING_MODE_ON,
-                       DITHERING_MODE_AUTO
-               } mode;
-               enum {
-                       DITHERING_DEPTH_6BPC = 0x00,
-                       DITHERING_DEPTH_8BPC = 0x02,
-                       DITHERING_DEPTH_AUTO
-               } depth;
-       } dither;
-
-       struct {
-               int mode;       /* DRM_MODE_SCALE_* */
-               struct {
-                       enum {
-                               UNDERSCAN_OFF,
-                               UNDERSCAN_ON,
-                               UNDERSCAN_AUTO,
-                       } mode;
-                       u32 hborder;
-                       u32 vborder;
-               } underscan;
-               bool full;
-       } scaler;
-
-       struct {
-               int color_vibrance;
-               int vibrant_hue;
-       } procamp;
-
-       union {
-               struct {
-                       bool dither:1;
-                       bool scaler:1;
-                       bool procamp:1;
-               };
-               u8 mask;
-       } set;
-};
-
 void nouveau_conn_attach_properties(struct drm_connector *);
 void nouveau_conn_reset(struct drm_connector *);
 struct drm_connector_state *
index 4c4e8a30a1ac3cb7e30662fd4adee69ff0074d5a..536ba93b0f463510607781b4d865ff444d35a0fa 100644 (file)
@@ -18,15 +18,18 @@ static void panfrost_devfreq_update_utilization(struct panfrost_device *pfdev);
 static int panfrost_devfreq_target(struct device *dev, unsigned long *freq,
                                   u32 flags)
 {
-       struct panfrost_device *pfdev = dev_get_drvdata(dev);
+       struct dev_pm_opp *opp;
        int err;
 
+       opp = devfreq_recommended_opp(dev, freq, flags);
+       if (IS_ERR(opp))
+               return PTR_ERR(opp);
+       dev_pm_opp_put(opp);
+
        err = dev_pm_opp_set_rate(dev, *freq);
        if (err)
                return err;
 
-       *freq = clk_get_rate(pfdev->clock);
-
        return 0;
 }
 
@@ -60,20 +63,10 @@ static int panfrost_devfreq_get_dev_status(struct device *dev,
        return 0;
 }
 
-static int panfrost_devfreq_get_cur_freq(struct device *dev, unsigned long *freq)
-{
-       struct panfrost_device *pfdev = platform_get_drvdata(to_platform_device(dev));
-
-       *freq = clk_get_rate(pfdev->clock);
-
-       return 0;
-}
-
 static struct devfreq_dev_profile panfrost_devfreq_profile = {
        .polling_ms = 50, /* ~3 frames */
        .target = panfrost_devfreq_target,
        .get_dev_status = panfrost_devfreq_get_dev_status,
-       .get_cur_freq = panfrost_devfreq_get_cur_freq,
 };
 
 int panfrost_devfreq_init(struct panfrost_device *pfdev)
index 9458dc6c750cf36397afcb692f65e5e702f07096..f61364f7c471218ffbbbecce3b996db6f12ab665 100644 (file)
@@ -303,14 +303,17 @@ static int panfrost_ioctl_mmap_bo(struct drm_device *dev, void *data,
        }
 
        /* Don't allow mmapping of heap objects as pages are not pinned. */
-       if (to_panfrost_bo(gem_obj)->is_heap)
-               return -EINVAL;
+       if (to_panfrost_bo(gem_obj)->is_heap) {
+               ret = -EINVAL;
+               goto out;
+       }
 
        ret = drm_gem_create_mmap_offset(gem_obj);
        if (ret == 0)
                args->offset = drm_vma_node_offset_addr(&gem_obj->vma_node);
-       drm_gem_object_put_unlocked(gem_obj);
 
+out:
+       drm_gem_object_put_unlocked(gem_obj);
        return ret;
 }
 
@@ -347,20 +350,19 @@ static int panfrost_ioctl_madvise(struct drm_device *dev, void *data,
                return -ENOENT;
        }
 
+       mutex_lock(&pfdev->shrinker_lock);
        args->retained = drm_gem_shmem_madvise(gem_obj, args->madv);
 
        if (args->retained) {
                struct panfrost_gem_object *bo = to_panfrost_bo(gem_obj);
 
-               mutex_lock(&pfdev->shrinker_lock);
-
                if (args->madv == PANFROST_MADV_DONTNEED)
-                       list_add_tail(&bo->base.madv_list, &pfdev->shrinker_list);
+                       list_add_tail(&bo->base.madv_list,
+                                     &pfdev->shrinker_list);
                else if (args->madv == PANFROST_MADV_WILLNEED)
                        list_del_init(&bo->base.madv_list);
-
-               mutex_unlock(&pfdev->shrinker_lock);
        }
+       mutex_unlock(&pfdev->shrinker_lock);
 
        drm_gem_object_put_unlocked(gem_obj);
        return 0;
@@ -443,7 +445,7 @@ panfrost_postclose(struct drm_device *dev, struct drm_file *file)
 {
        struct panfrost_file_priv *panfrost_priv = file->driver_priv;
 
-       panfrost_perfcnt_close(panfrost_priv);
+       panfrost_perfcnt_close(file);
        panfrost_job_close(panfrost_priv);
 
        panfrost_mmu_pgtable_free(panfrost_priv);
index deca0c30bbd436b7c1579e8d03f916c69999fa9c..fd766b1395fb18eb25985b7aad7b1e155b15bdf3 100644 (file)
@@ -19,6 +19,16 @@ static void panfrost_gem_free_object(struct drm_gem_object *obj)
        struct panfrost_gem_object *bo = to_panfrost_bo(obj);
        struct panfrost_device *pfdev = obj->dev->dev_private;
 
+       /*
+        * Make sure the BO is no longer inserted in the shrinker list before
+        * taking care of the destruction itself. If we don't do that we have a
+        * race condition between this function and what's done in
+        * panfrost_gem_shrinker_scan().
+        */
+       mutex_lock(&pfdev->shrinker_lock);
+       list_del_init(&bo->base.madv_list);
+       mutex_unlock(&pfdev->shrinker_lock);
+
        if (bo->sgts) {
                int i;
                int n_sgt = bo->base.base.size / SZ_2M;
@@ -33,15 +43,10 @@ static void panfrost_gem_free_object(struct drm_gem_object *obj)
                kfree(bo->sgts);
        }
 
-       mutex_lock(&pfdev->shrinker_lock);
-       if (!list_empty(&bo->base.madv_list))
-               list_del(&bo->base.madv_list);
-       mutex_unlock(&pfdev->shrinker_lock);
-
        drm_gem_shmem_free_object(obj);
 }
 
-static int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_priv)
+int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_priv)
 {
        int ret;
        size_t size = obj->size;
@@ -80,7 +85,7 @@ static int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_p
        return ret;
 }
 
-static void panfrost_gem_close(struct drm_gem_object *obj, struct drm_file *file_priv)
+void panfrost_gem_close(struct drm_gem_object *obj, struct drm_file *file_priv)
 {
        struct panfrost_gem_object *bo = to_panfrost_bo(obj);
        struct panfrost_file_priv *priv = file_priv->driver_priv;
index 50920819cc1698fce981f9e4fdd104ab631a9d3f..4b17e73087643729af0ef73ce63a88ddb982e9f5 100644 (file)
@@ -45,6 +45,10 @@ panfrost_gem_create_with_handle(struct drm_file *file_priv,
                                u32 flags,
                                uint32_t *handle);
 
+int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_priv);
+void panfrost_gem_close(struct drm_gem_object *obj,
+                       struct drm_file *file_priv);
+
 void panfrost_gem_shrinker_init(struct drm_device *dev);
 void panfrost_gem_shrinker_cleanup(struct drm_device *dev);
 
index 2dba192bf198454982d54ab9403f253e0529c652..2c04e858c50ac9afaa69964a2704573b5580c5b5 100644 (file)
@@ -67,9 +67,10 @@ static int panfrost_perfcnt_dump_locked(struct panfrost_device *pfdev)
 }
 
 static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,
-                                         struct panfrost_file_priv *user,
+                                         struct drm_file *file_priv,
                                          unsigned int counterset)
 {
+       struct panfrost_file_priv *user = file_priv->driver_priv;
        struct panfrost_perfcnt *perfcnt = pfdev->perfcnt;
        struct drm_gem_shmem_object *bo;
        u32 cfg;
@@ -91,14 +92,14 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,
        perfcnt->bo = to_panfrost_bo(&bo->base);
 
        /* Map the perfcnt buf in the address space attached to file_priv. */
-       ret = panfrost_mmu_map(perfcnt->bo);
+       ret = panfrost_gem_open(&perfcnt->bo->base.base, file_priv);
        if (ret)
                goto err_put_bo;
 
        perfcnt->buf = drm_gem_shmem_vmap(&bo->base);
        if (IS_ERR(perfcnt->buf)) {
                ret = PTR_ERR(perfcnt->buf);
-               goto err_put_bo;
+               goto err_close_bo;
        }
 
        /*
@@ -157,14 +158,17 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,
 
 err_vunmap:
        drm_gem_shmem_vunmap(&perfcnt->bo->base.base, perfcnt->buf);
+err_close_bo:
+       panfrost_gem_close(&perfcnt->bo->base.base, file_priv);
 err_put_bo:
        drm_gem_object_put_unlocked(&bo->base);
        return ret;
 }
 
 static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
-                                          struct panfrost_file_priv *user)
+                                          struct drm_file *file_priv)
 {
+       struct panfrost_file_priv *user = file_priv->driver_priv;
        struct panfrost_perfcnt *perfcnt = pfdev->perfcnt;
 
        if (user != perfcnt->user)
@@ -180,6 +184,7 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
        perfcnt->user = NULL;
        drm_gem_shmem_vunmap(&perfcnt->bo->base.base, perfcnt->buf);
        perfcnt->buf = NULL;
+       panfrost_gem_close(&perfcnt->bo->base.base, file_priv);
        drm_gem_object_put_unlocked(&perfcnt->bo->base.base);
        perfcnt->bo = NULL;
        pm_runtime_mark_last_busy(pfdev->dev);
@@ -191,7 +196,6 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
 int panfrost_ioctl_perfcnt_enable(struct drm_device *dev, void *data,
                                  struct drm_file *file_priv)
 {
-       struct panfrost_file_priv *pfile = file_priv->driver_priv;
        struct panfrost_device *pfdev = dev->dev_private;
        struct panfrost_perfcnt *perfcnt = pfdev->perfcnt;
        struct drm_panfrost_perfcnt_enable *req = data;
@@ -207,10 +211,10 @@ int panfrost_ioctl_perfcnt_enable(struct drm_device *dev, void *data,
 
        mutex_lock(&perfcnt->lock);
        if (req->enable)
-               ret = panfrost_perfcnt_enable_locked(pfdev, pfile,
+               ret = panfrost_perfcnt_enable_locked(pfdev, file_priv,
                                                     req->counterset);
        else
-               ret = panfrost_perfcnt_disable_locked(pfdev, pfile);
+               ret = panfrost_perfcnt_disable_locked(pfdev, file_priv);
        mutex_unlock(&perfcnt->lock);
 
        return ret;
@@ -248,15 +252,16 @@ out:
        return ret;
 }
 
-void panfrost_perfcnt_close(struct panfrost_file_priv *pfile)
+void panfrost_perfcnt_close(struct drm_file *file_priv)
 {
+       struct panfrost_file_priv *pfile = file_priv->driver_priv;
        struct panfrost_device *pfdev = pfile->pfdev;
        struct panfrost_perfcnt *perfcnt = pfdev->perfcnt;
 
        pm_runtime_get_sync(pfdev->dev);
        mutex_lock(&perfcnt->lock);
        if (perfcnt->user == pfile)
-               panfrost_perfcnt_disable_locked(pfdev, pfile);
+               panfrost_perfcnt_disable_locked(pfdev, file_priv);
        mutex_unlock(&perfcnt->lock);
        pm_runtime_mark_last_busy(pfdev->dev);
        pm_runtime_put_autosuspend(pfdev->dev);
index 13b8fdaa1b432175f0176cfc000876f3e897b7e9..8bbcf5f5fb3391ce625eedbcb4c1b32e8bc9ebb6 100644 (file)
@@ -9,7 +9,7 @@ void panfrost_perfcnt_sample_done(struct panfrost_device *pfdev);
 void panfrost_perfcnt_clean_cache_done(struct panfrost_device *pfdev);
 int panfrost_perfcnt_init(struct panfrost_device *pfdev);
 void panfrost_perfcnt_fini(struct panfrost_device *pfdev);
-void panfrost_perfcnt_close(struct panfrost_file_priv *pfile);
+void panfrost_perfcnt_close(struct drm_file *file_priv);
 int panfrost_ioctl_perfcnt_enable(struct drm_device *dev, void *data,
                                  struct drm_file *file_priv);
 int panfrost_ioctl_perfcnt_dump(struct drm_device *dev, void *data,
index 9333c865d4a9a92c780409710fa1fb9d68412fcb..9f8dcd3f83850149bbc6e75bfc11d86d8ef7e3df 100644 (file)
@@ -896,29 +896,6 @@ struct i2c_client *i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address
 }
 EXPORT_SYMBOL_GPL(i2c_new_dummy_device);
 
-/**
- * i2c_new_dummy - return a new i2c device bound to a dummy driver
- * @adapter: the adapter managing the device
- * @address: seven bit address to be used
- * Context: can sleep
- *
- * This deprecated function has the same functionality as @i2c_new_dummy_device,
- * it just returns NULL instead of an ERR_PTR in case of an error for
- * compatibility with current I2C API. It will be removed once all users are
- * converted.
- *
- * This returns the new i2c client, which should be saved for later use with
- * i2c_unregister_device(); or NULL to indicate an error.
- */
-struct i2c_client *i2c_new_dummy(struct i2c_adapter *adapter, u16 address)
-{
-       struct i2c_client *ret;
-
-       ret = i2c_new_dummy_device(adapter, address);
-       return IS_ERR(ret) ? NULL : ret;
-}
-EXPORT_SYMBOL_GPL(i2c_new_dummy);
-
 struct i2c_dummy_devres {
        struct i2c_client *client;
 };
index 7b837641f166e6305e0cfd4c26dba6df2dd163cf..7320275c7e56dee7ee0a6bb3af4461dc0c9826ab 100644 (file)
@@ -992,6 +992,7 @@ static const struct iio_trigger_ops st_accel_trigger_ops = {
 #define ST_ACCEL_TRIGGER_OPS NULL
 #endif
 
+#ifdef CONFIG_ACPI
 static const struct iio_mount_matrix *
 get_mount_matrix(const struct iio_dev *indio_dev,
                 const struct iio_chan_spec *chan)
@@ -1012,7 +1013,6 @@ static const struct iio_chan_spec_ext_info mount_matrix_ext_info[] = {
 static int apply_acpi_orientation(struct iio_dev *indio_dev,
                                  struct iio_chan_spec *channels)
 {
-#ifdef CONFIG_ACPI
        struct st_sensor_data *adata = iio_priv(indio_dev);
        struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
        struct acpi_device *adev;
@@ -1140,10 +1140,14 @@ static int apply_acpi_orientation(struct iio_dev *indio_dev,
 out:
        kfree(buffer.pointer);
        return ret;
+}
 #else /* !CONFIG_ACPI */
+static int apply_acpi_orientation(struct iio_dev *indio_dev,
+                                 struct iio_chan_spec *channels)
+{
        return 0;
-#endif
 }
+#endif
 
 /*
  * st_accel_get_settings() - get sensor settings from device name
index edc6f1cc90b2448d037174113bbb42c048d77ff7..3f03abf100b599d666dbae8bf7b0d5c7ca06d506 100644 (file)
@@ -39,6 +39,8 @@
 #define AD7124_STATUS_POR_FLAG_MSK     BIT(4)
 
 /* AD7124_ADC_CONTROL */
+#define AD7124_ADC_CTRL_REF_EN_MSK     BIT(8)
+#define AD7124_ADC_CTRL_REF_EN(x)      FIELD_PREP(AD7124_ADC_CTRL_REF_EN_MSK, x)
 #define AD7124_ADC_CTRL_PWR_MSK        GENMASK(7, 6)
 #define AD7124_ADC_CTRL_PWR(x)         FIELD_PREP(AD7124_ADC_CTRL_PWR_MSK, x)
 #define AD7124_ADC_CTRL_MODE_MSK       GENMASK(5, 2)
@@ -424,7 +426,10 @@ static int ad7124_init_channel_vref(struct ad7124_state *st,
                break;
        case AD7124_INT_REF:
                st->channel_config[channel_number].vref_mv = 2500;
-               break;
+               st->adc_control &= ~AD7124_ADC_CTRL_REF_EN_MSK;
+               st->adc_control |= AD7124_ADC_CTRL_REF_EN(1);
+               return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL,
+                                     2, st->adc_control);
        default:
                dev_err(&st->sd.spi->dev, "Invalid reference %d\n", refsel);
                return -EINVAL;
index f5ba94c03a8d9d59cbd9eba8b841810bd0cf50e2..e4683a68522a4502957887e475f951e5be74e53b 100644 (file)
@@ -85,7 +85,7 @@ err_unlock:
 
 static int ad7606_read_samples(struct ad7606_state *st)
 {
-       unsigned int num = st->chip_info->num_channels;
+       unsigned int num = st->chip_info->num_channels - 1;
        u16 *data = st->data;
        int ret;
 
index 5c2b3446fa4afe8e1719c0842c1b89359433527a..2c6f60edb7ced4c6258dcc4f2791ddd80d83bb97 100644 (file)
@@ -89,6 +89,7 @@ static int ad7949_spi_read_channel(struct ad7949_adc_chip *ad7949_adc, int *val,
                                   unsigned int channel)
 {
        int ret;
+       int i;
        int bits_per_word = ad7949_adc->resolution;
        int mask = GENMASK(ad7949_adc->resolution, 0);
        struct spi_message msg;
@@ -100,12 +101,23 @@ static int ad7949_spi_read_channel(struct ad7949_adc_chip *ad7949_adc, int *val,
                },
        };
 
-       ret = ad7949_spi_write_cfg(ad7949_adc,
-                                  channel << AD7949_OFFSET_CHANNEL_SEL,
-                                  AD7949_MASK_CHANNEL_SEL);
-       if (ret)
-               return ret;
+       /*
+        * 1: write CFG for sample N and read old data (sample N-2)
+        * 2: if CFG was not changed since sample N-1 then we'll get good data
+        *    at the next xfer, so we bail out now, otherwise we write something
+        *    and we read garbage (sample N-1 configuration).
+        */
+       for (i = 0; i < 2; i++) {
+               ret = ad7949_spi_write_cfg(ad7949_adc,
+                                          channel << AD7949_OFFSET_CHANNEL_SEL,
+                                          AD7949_MASK_CHANNEL_SEL);
+               if (ret)
+                       return ret;
+               if (channel == ad7949_adc->current_channel)
+                       break;
+       }
 
+       /* 3: write something and read actual data */
        ad7949_adc->buffer = 0;
        spi_message_init_with_transfers(&msg, tx, 1);
        ret = spi_sync(ad7949_adc->spi, &msg);
index 67d096f8180de12f3ec960f7eb1f74394336008e..c35a1beb817c242a0f1cc3d591e848ba15da2b31 100644 (file)
@@ -185,7 +185,7 @@ static int mrfld_adc_probe(struct platform_device *pdev)
        int irq;
        int ret;
 
-       indio_dev = devm_iio_device_alloc(dev, sizeof(*indio_dev));
+       indio_dev = devm_iio_device_alloc(dev, sizeof(struct mrfld_adc));
        if (!indio_dev)
                return -ENOMEM;
 
index e171db20c04a7bbcc8d1c2745abcf5ebf4e47b2a..02834ca3e1cede38c527e4c11dc64d0740c29ad6 100644 (file)
@@ -478,7 +478,13 @@ static int max1027_probe(struct spi_device *spi)
                st->trig->ops = &max1027_trigger_ops;
                st->trig->dev.parent = &spi->dev;
                iio_trigger_set_drvdata(st->trig, indio_dev);
-               iio_trigger_register(st->trig);
+               ret = devm_iio_trigger_register(&indio_dev->dev,
+                                               st->trig);
+               if (ret < 0) {
+                       dev_err(&indio_dev->dev,
+                               "Failed to register iio trigger\n");
+                       return ret;
+               }
 
                ret = devm_request_threaded_irq(&spi->dev, spi->irq,
                                                iio_trigger_generic_data_rdy_poll,
index da073d72f649f829997f6f3ca9a43c13399aba0d..e480529b3f0497cb3369bf62d6b79f57146b2d72 100644 (file)
 #define MAX9611_TEMP_SCALE_NUM         1000000
 #define MAX9611_TEMP_SCALE_DIV         2083
 
+/*
+ * Conversion time is 2 ms (typically) at Ta=25 degreeC
+ * No maximum value is known, so play it safe.
+ */
+#define MAX9611_CONV_TIME_US_RANGE     3000, 3300
+
 struct max9611_dev {
        struct device *dev;
        struct i2c_client *i2c_client;
@@ -236,11 +242,9 @@ static int max9611_read_single(struct max9611_dev *max9611,
                return ret;
        }
 
-       /*
-        * need a delay here to make register configuration
-        * stabilize. 1 msec at least, from empirical testing.
-        */
-       usleep_range(1000, 2000);
+       /* need a delay here to make register configuration stabilize. */
+
+       usleep_range(MAX9611_CONV_TIME_US_RANGE);
 
        ret = i2c_smbus_read_word_swapped(max9611->i2c_client, reg_addr);
        if (ret < 0) {
@@ -507,7 +511,7 @@ static int max9611_init(struct max9611_dev *max9611)
                        MAX9611_REG_CTRL2, 0);
                return ret;
        }
-       usleep_range(1000, 2000);
+       usleep_range(MAX9611_CONV_TIME_US_RANGE);
 
        return 0;
 }
index 963ff043eecf97b77d7990c84f0bcc70b60915a6..7ecd2ffa3132590551591826a70c07018efc6bb9 100644 (file)
@@ -229,7 +229,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
                        *val2 = 65536;
                        return IIO_VAL_FRACTIONAL;
                } else {
-                       *val = 100;
+                       *val = 100000;
                        *val2 = 65536;
                        return IIO_VAL_FRACTIONAL;
                }
index 45e77b308238b98af9d97216dc2258102797ced3..0686e41bb8a1c2ac425b7e8e31858060ea83912c 100644 (file)
@@ -117,6 +117,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6050,
                .config = &chip_config_6050,
                .fifo_size = 1024,
+               .temp = {INV_MPU6050_TEMP_OFFSET, INV_MPU6050_TEMP_SCALE},
        },
        {
                .whoami = INV_MPU6500_WHOAMI_VALUE,
@@ -124,6 +125,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6500,
                .config = &chip_config_6050,
                .fifo_size = 512,
+               .temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
        },
        {
                .whoami = INV_MPU6515_WHOAMI_VALUE,
@@ -131,6 +133,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6500,
                .config = &chip_config_6050,
                .fifo_size = 512,
+               .temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
        },
        {
                .whoami = INV_MPU6000_WHOAMI_VALUE,
@@ -138,6 +141,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6050,
                .config = &chip_config_6050,
                .fifo_size = 1024,
+               .temp = {INV_MPU6050_TEMP_OFFSET, INV_MPU6050_TEMP_SCALE},
        },
        {
                .whoami = INV_MPU9150_WHOAMI_VALUE,
@@ -145,6 +149,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6050,
                .config = &chip_config_6050,
                .fifo_size = 1024,
+               .temp = {INV_MPU6050_TEMP_OFFSET, INV_MPU6050_TEMP_SCALE},
        },
        {
                .whoami = INV_MPU9250_WHOAMI_VALUE,
@@ -152,6 +157,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6500,
                .config = &chip_config_6050,
                .fifo_size = 512,
+               .temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
        },
        {
                .whoami = INV_MPU9255_WHOAMI_VALUE,
@@ -159,6 +165,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6500,
                .config = &chip_config_6050,
                .fifo_size = 512,
+               .temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
        },
        {
                .whoami = INV_ICM20608_WHOAMI_VALUE,
@@ -166,6 +173,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_6500,
                .config = &chip_config_6050,
                .fifo_size = 512,
+               .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE},
        },
        {
                .whoami = INV_ICM20602_WHOAMI_VALUE,
@@ -173,6 +181,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
                .reg = &reg_set_icm20602,
                .config = &chip_config_6050,
                .fifo_size = 1008,
+               .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE},
        },
 };
 
@@ -481,12 +490,8 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev,
 
                        return IIO_VAL_INT_PLUS_MICRO;
                case IIO_TEMP:
-                       *val = 0;
-                       if (st->chip_type == INV_ICM20602)
-                               *val2 = INV_ICM20602_TEMP_SCALE;
-                       else
-                               *val2 = INV_MPU6050_TEMP_SCALE;
-
+                       *val = st->hw->temp.scale / 1000000;
+                       *val2 = st->hw->temp.scale % 1000000;
                        return IIO_VAL_INT_PLUS_MICRO;
                case IIO_MAGN:
                        return inv_mpu_magn_get_scale(st, chan, val, val2);
@@ -496,11 +501,7 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev,
        case IIO_CHAN_INFO_OFFSET:
                switch (chan->type) {
                case IIO_TEMP:
-                       if (st->chip_type == INV_ICM20602)
-                               *val = INV_ICM20602_TEMP_OFFSET;
-                       else
-                               *val = INV_MPU6050_TEMP_OFFSET;
-
+                       *val = st->hw->temp.offset;
                        return IIO_VAL_INT;
                default:
                        return -EINVAL;
index f1fb7b6bdab1cb4cae12f45e5709a7fd87cda86c..b096e010d4ee38ad4c2794ab2dd3508e963d5319 100644 (file)
@@ -107,6 +107,7 @@ struct inv_mpu6050_chip_config {
  *  @reg:   register map of the chip.
  *  @config:    configuration of the chip.
  *  @fifo_size:        size of the FIFO in bytes.
+ *  @temp:     offset and scale to apply to raw temperature.
  */
 struct inv_mpu6050_hw {
        u8 whoami;
@@ -114,6 +115,10 @@ struct inv_mpu6050_hw {
        const struct inv_mpu6050_reg_map *reg;
        const struct inv_mpu6050_chip_config *config;
        size_t fifo_size;
+       struct {
+               int offset;
+               int scale;
+       } temp;
 };
 
 /*
@@ -279,16 +284,19 @@ struct inv_mpu6050_state {
 #define INV_MPU6050_REG_UP_TIME_MIN          5000
 #define INV_MPU6050_REG_UP_TIME_MAX          10000
 
-#define INV_MPU6050_TEMP_OFFSET                     12421
-#define INV_MPU6050_TEMP_SCALE               2941
+#define INV_MPU6050_TEMP_OFFSET                     12420
+#define INV_MPU6050_TEMP_SCALE               2941176
 #define INV_MPU6050_MAX_GYRO_FS_PARAM        3
 #define INV_MPU6050_MAX_ACCL_FS_PARAM        3
 #define INV_MPU6050_THREE_AXIS               3
 #define INV_MPU6050_GYRO_CONFIG_FSR_SHIFT    3
 #define INV_MPU6050_ACCL_CONFIG_FSR_SHIFT    3
 
-#define INV_ICM20602_TEMP_OFFSET            8170
-#define INV_ICM20602_TEMP_SCALE                     3060
+#define INV_MPU6500_TEMP_OFFSET              7011
+#define INV_MPU6500_TEMP_SCALE               2995178
+
+#define INV_ICM20608_TEMP_OFFSET            8170
+#define INV_ICM20608_TEMP_SCALE                     3059976
 
 /* 6 + 6 + 7 (for MPU9x50) = 19 round up to 24 and plus 8 */
 #define INV_MPU6050_OUTPUT_DATA_SIZE         32
index c605b153be410af4f4ad8fc4fd1aee17838989ed..dc55d7dff3eb9b762104ff26927fa674323abdb2 100644 (file)
@@ -320,7 +320,6 @@ enum st_lsm6dsx_fifo_mode {
  * @odr: Output data rate of the sensor [Hz].
  * @watermark: Sensor watermark level.
  * @sip: Number of samples in a given pattern.
- * @decimator: FIFO decimation factor.
  * @ts_ref: Sensor timestamp reference for hw one.
  * @ext_info: Sensor settings if it is connected to i2c controller
  */
@@ -334,7 +333,6 @@ struct st_lsm6dsx_sensor {
 
        u16 watermark;
        u8 sip;
-       u8 decimator;
        s64 ts_ref;
 
        struct {
@@ -351,9 +349,9 @@ struct st_lsm6dsx_sensor {
  * @fifo_lock: Mutex to prevent concurrent access to the hw FIFO.
  * @conf_lock: Mutex to prevent concurrent FIFO configuration update.
  * @page_lock: Mutex to prevent concurrent memory page configuration.
- * @fifo_mode: FIFO operating mode supported by the device.
  * @suspend_mask: Suspended sensor bitmask.
  * @enable_mask: Enabled sensor bitmask.
+ * @fifo_mask: Enabled hw FIFO bitmask.
  * @ts_gain: Hw timestamp rate after internal calibration.
  * @ts_sip: Total number of timestamp samples in a given pattern.
  * @sip: Total number of samples (acc/gyro/ts) in a given pattern.
@@ -373,9 +371,9 @@ struct st_lsm6dsx_hw {
        struct mutex conf_lock;
        struct mutex page_lock;
 
-       enum st_lsm6dsx_fifo_mode fifo_mode;
        u8 suspend_mask;
        u8 enable_mask;
+       u8 fifo_mask;
        s64 ts_gain;
        u8 ts_sip;
        u8 sip;
index d416990ae309d7ba6e5bdb203ee9c8a4d6f51ddf..cb536b81a1c29a8a4b28c095a5c4cf39ccc2643f 100644 (file)
@@ -78,14 +78,20 @@ struct st_lsm6dsx_decimator_entry st_lsm6dsx_decimator_table[] = {
        { 32, 0x7 },
 };
 
-static int st_lsm6dsx_get_decimator_val(u8 val)
+static int
+st_lsm6dsx_get_decimator_val(struct st_lsm6dsx_sensor *sensor, u32 max_odr)
 {
        const int max_size = ARRAY_SIZE(st_lsm6dsx_decimator_table);
+       u32 decimator =  max_odr / sensor->odr;
        int i;
 
-       for (i = 0; i < max_size; i++)
-               if (st_lsm6dsx_decimator_table[i].decimator == val)
+       if (decimator > 1)
+               decimator = round_down(decimator, 2);
+
+       for (i = 0; i < max_size; i++) {
+               if (st_lsm6dsx_decimator_table[i].decimator == decimator)
                        break;
+       }
 
        return i == max_size ? 0 : st_lsm6dsx_decimator_table[i].val;
 }
@@ -111,6 +117,13 @@ static void st_lsm6dsx_get_max_min_odr(struct st_lsm6dsx_hw *hw,
        }
 }
 
+static u8 st_lsm6dsx_get_sip(struct st_lsm6dsx_sensor *sensor, u32 min_odr)
+{
+       u8 sip = sensor->odr / min_odr;
+
+       return sip > 1 ? round_down(sip, 2) : sip;
+}
+
 static int st_lsm6dsx_update_decimators(struct st_lsm6dsx_hw *hw)
 {
        const struct st_lsm6dsx_reg *ts_dec_reg;
@@ -131,12 +144,10 @@ static int st_lsm6dsx_update_decimators(struct st_lsm6dsx_hw *hw)
                sensor = iio_priv(hw->iio_devs[i]);
                /* update fifo decimators and sample in pattern */
                if (hw->enable_mask & BIT(sensor->id)) {
-                       sensor->sip = sensor->odr / min_odr;
-                       sensor->decimator = max_odr / sensor->odr;
-                       data = st_lsm6dsx_get_decimator_val(sensor->decimator);
+                       sensor->sip = st_lsm6dsx_get_sip(sensor, min_odr);
+                       data = st_lsm6dsx_get_decimator_val(sensor, max_odr);
                } else {
                        sensor->sip = 0;
-                       sensor->decimator = 0;
                        data = 0;
                }
                ts_sip = max_t(u16, ts_sip, sensor->sip);
@@ -176,17 +187,10 @@ int st_lsm6dsx_set_fifo_mode(struct st_lsm6dsx_hw *hw,
                             enum st_lsm6dsx_fifo_mode fifo_mode)
 {
        unsigned int data;
-       int err;
 
        data = FIELD_PREP(ST_LSM6DSX_FIFO_MODE_MASK, fifo_mode);
-       err = st_lsm6dsx_update_bits_locked(hw, ST_LSM6DSX_REG_FIFO_MODE_ADDR,
-                                           ST_LSM6DSX_FIFO_MODE_MASK, data);
-       if (err < 0)
-               return err;
-
-       hw->fifo_mode = fifo_mode;
-
-       return 0;
+       return st_lsm6dsx_update_bits_locked(hw, ST_LSM6DSX_REG_FIFO_MODE_ADDR,
+                                            ST_LSM6DSX_FIFO_MODE_MASK, data);
 }
 
 static int st_lsm6dsx_set_fifo_odr(struct st_lsm6dsx_sensor *sensor,
@@ -608,11 +612,17 @@ int st_lsm6dsx_flush_fifo(struct st_lsm6dsx_hw *hw)
 int st_lsm6dsx_update_fifo(struct st_lsm6dsx_sensor *sensor, bool enable)
 {
        struct st_lsm6dsx_hw *hw = sensor->hw;
+       u8 fifo_mask;
        int err;
 
        mutex_lock(&hw->conf_lock);
 
-       if (hw->fifo_mode != ST_LSM6DSX_FIFO_BYPASS) {
+       if (enable)
+               fifo_mask = hw->fifo_mask | BIT(sensor->id);
+       else
+               fifo_mask = hw->fifo_mask & ~BIT(sensor->id);
+
+       if (hw->fifo_mask) {
                err = st_lsm6dsx_flush_fifo(hw);
                if (err < 0)
                        goto out;
@@ -642,15 +652,19 @@ int st_lsm6dsx_update_fifo(struct st_lsm6dsx_sensor *sensor, bool enable)
        if (err < 0)
                goto out;
 
-       if (hw->enable_mask) {
+       if (fifo_mask) {
                /* reset hw ts counter */
                err = st_lsm6dsx_reset_hw_ts(hw);
                if (err < 0)
                        goto out;
 
                err = st_lsm6dsx_set_fifo_mode(hw, ST_LSM6DSX_FIFO_CONT);
+               if (err < 0)
+                       goto out;
        }
 
+       hw->fifo_mask = fifo_mask;
+
 out:
        mutex_unlock(&hw->conf_lock);
 
index 11b2c7bc8041a61cdb85c6f1059020700d83bd28..a7d40c02ce6b53a7a2606b454acb283738f7f33a 100644 (file)
@@ -1447,8 +1447,9 @@ st_lsm6dsx_set_odr(struct st_lsm6dsx_sensor *sensor, u32 req_odr)
        return st_lsm6dsx_update_bits_locked(hw, reg->addr, reg->mask, data);
 }
 
-int st_lsm6dsx_sensor_set_enable(struct st_lsm6dsx_sensor *sensor,
-                                bool enable)
+static int
+__st_lsm6dsx_sensor_set_enable(struct st_lsm6dsx_sensor *sensor,
+                              bool enable)
 {
        struct st_lsm6dsx_hw *hw = sensor->hw;
        u32 odr = enable ? sensor->odr : 0;
@@ -1466,6 +1467,26 @@ int st_lsm6dsx_sensor_set_enable(struct st_lsm6dsx_sensor *sensor,
        return 0;
 }
 
+static int
+st_lsm6dsx_check_events(struct st_lsm6dsx_sensor *sensor, bool enable)
+{
+       struct st_lsm6dsx_hw *hw = sensor->hw;
+
+       if (sensor->id == ST_LSM6DSX_ID_GYRO || enable)
+               return 0;
+
+       return hw->enable_event;
+}
+
+int st_lsm6dsx_sensor_set_enable(struct st_lsm6dsx_sensor *sensor,
+                                bool enable)
+{
+       if (st_lsm6dsx_check_events(sensor, enable))
+               return 0;
+
+       return __st_lsm6dsx_sensor_set_enable(sensor, enable);
+}
+
 static int st_lsm6dsx_read_oneshot(struct st_lsm6dsx_sensor *sensor,
                                   u8 addr, int *val)
 {
@@ -1661,7 +1682,7 @@ st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
        struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
        struct st_lsm6dsx_hw *hw = sensor->hw;
        u8 enable_event;
-       int err = 0;
+       int err;
 
        if (type != IIO_EV_TYPE_THRESH)
                return -EINVAL;
@@ -1689,7 +1710,8 @@ st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
                return err;
 
        mutex_lock(&hw->conf_lock);
-       err = st_lsm6dsx_sensor_set_enable(sensor, state);
+       if (enable_event || !(hw->fifo_mask & BIT(sensor->id)))
+               err = __st_lsm6dsx_sensor_set_enable(sensor, state);
        mutex_unlock(&hw->conf_lock);
        if (err < 0)
                return err;
@@ -2300,7 +2322,7 @@ static int __maybe_unused st_lsm6dsx_suspend(struct device *dev)
                hw->suspend_mask |= BIT(sensor->id);
        }
 
-       if (hw->fifo_mode != ST_LSM6DSX_FIFO_BYPASS)
+       if (hw->fifo_mask)
                err = st_lsm6dsx_flush_fifo(hw);
 
        return err;
@@ -2336,7 +2358,7 @@ static int __maybe_unused st_lsm6dsx_resume(struct device *dev)
                hw->suspend_mask &= ~BIT(sensor->id);
        }
 
-       if (hw->enable_mask)
+       if (hw->fifo_mask)
                err = st_lsm6dsx_set_fifo_mode(hw, ST_LSM6DSX_FIFO_CONT);
 
        return err;
index ddf47023364b0c840e6579b2e1f29d19de236645..d39c0d6b77f1ca2bbf20ffc0865846912bbb8885 100644 (file)
@@ -444,8 +444,10 @@ static struct ltc2983_custom_sensor *__ltc2983_custom_sensor_new(
                        else
                                temp = __convert_to_raw(temp, resolution);
                } else {
-                       of_property_read_u32_index(np, propname, index,
-                                                  (u32 *)&temp);
+                       u32 t32;
+
+                       of_property_read_u32_index(np, propname, index, &t32);
+                       temp = t32;
                }
 
                for (j = 0; j < n_size; j++)
index 25f2b70fd8efb1e29de3b4d93a22a1aba411af13..43a6f07e0afe2b9ffb62e59c052e189a15569189 100644 (file)
@@ -4763,6 +4763,7 @@ err_ib:
 err:
        unregister_netdevice_notifier(&cma_nb);
        ib_sa_unregister_client(&sa_client);
+       unregister_pernet_subsys(&cma_pernet_operations);
 err_wq:
        destroy_workqueue(cma_wq);
        return ret;
index 8434ec082c3ae43290961416e4f138a83317ccb9..2257d7f7810fd99396257039e897c5ddc3b59d31 100644 (file)
@@ -286,6 +286,9 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port)
        struct rdma_counter *counter;
        int ret;
 
+       if (!qp->res.valid)
+               return 0;
+
        if (!rdma_is_port_valid(dev, port))
                return -EINVAL;
 
index f509c478b469d118c8c3ed66ca4b1876d704ec4f..b7cb59844ece450e491f5b18e47105c88b3b2527 100644 (file)
@@ -238,28 +238,32 @@ void rdma_user_mmap_entry_remove(struct rdma_user_mmap_entry *entry)
 EXPORT_SYMBOL(rdma_user_mmap_entry_remove);
 
 /**
- * rdma_user_mmap_entry_insert() - Insert an entry to the mmap_xa
+ * rdma_user_mmap_entry_insert_range() - Insert an entry to the mmap_xa
+ *                                      in a given range.
  *
  * @ucontext: associated user context.
  * @entry: the entry to insert into the mmap_xa
  * @length: length of the address that will be mmapped
+ * @min_pgoff: minimum pgoff to be returned
+ * @max_pgoff: maximum pgoff to be returned
  *
  * This function should be called by drivers that use the rdma_user_mmap
  * interface for implementing their mmap syscall A database of mmap offsets is
  * handled in the core and helper functions are provided to insert entries
  * into the database and extract entries when the user calls mmap with the
- * given offset.  The function allocates a unique page offset that should be
- * provided to user, the user will use the offset to retrieve information such
- * as address to be mapped and how.
+ * given offset. The function allocates a unique page offset in a given range
+ * that should be provided to user, the user will use the offset to retrieve
+ * information such as address to be mapped and how.
  *
  * Return: 0 on success and -ENOMEM on failure
  */
-int rdma_user_mmap_entry_insert(struct ib_ucontext *ucontext,
-                               struct rdma_user_mmap_entry *entry,
-                               size_t length)
+int rdma_user_mmap_entry_insert_range(struct ib_ucontext *ucontext,
+                                     struct rdma_user_mmap_entry *entry,
+                                     size_t length, u32 min_pgoff,
+                                     u32 max_pgoff)
 {
        struct ib_uverbs_file *ufile = ucontext->ufile;
-       XA_STATE(xas, &ucontext->mmap_xa, 0);
+       XA_STATE(xas, &ucontext->mmap_xa, min_pgoff);
        u32 xa_first, xa_last, npages;
        int err;
        u32 i;
@@ -285,7 +289,7 @@ int rdma_user_mmap_entry_insert(struct ib_ucontext *ucontext,
        entry->npages = npages;
        while (true) {
                /* First find an empty index */
-               xas_find_marked(&xas, U32_MAX, XA_FREE_MARK);
+               xas_find_marked(&xas, max_pgoff, XA_FREE_MARK);
                if (xas.xa_node == XAS_RESTART)
                        goto err_unlock;
 
@@ -332,4 +336,30 @@ err_unlock:
        mutex_unlock(&ufile->umap_lock);
        return -ENOMEM;
 }
+EXPORT_SYMBOL(rdma_user_mmap_entry_insert_range);
+
+/**
+ * rdma_user_mmap_entry_insert() - Insert an entry to the mmap_xa.
+ *
+ * @ucontext: associated user context.
+ * @entry: the entry to insert into the mmap_xa
+ * @length: length of the address that will be mmapped
+ *
+ * This function should be called by drivers that use the rdma_user_mmap
+ * interface for handling user mmapped addresses. The database is handled in
+ * the core and helper functions are provided to insert entries into the
+ * database and extract entries when the user calls mmap with the given offset.
+ * The function allocates a unique page offset that should be provided to user,
+ * the user will use the offset to retrieve information such as address to
+ * be mapped and how.
+ *
+ * Return: 0 on success and -ENOMEM on failure
+ */
+int rdma_user_mmap_entry_insert(struct ib_ucontext *ucontext,
+                               struct rdma_user_mmap_entry *entry,
+                               size_t length)
+{
+       return rdma_user_mmap_entry_insert_range(ucontext, entry, length, 0,
+                                                U32_MAX);
+}
 EXPORT_SYMBOL(rdma_user_mmap_entry_insert);
index c9d294caa27a9d8d0ec61c461b71c2e0c20113d7..50c22575aed65041c33f2f008cd38a094cc2a714 100644 (file)
@@ -145,7 +145,7 @@ static inline bool is_rdma_read_cap(struct efa_dev *dev)
 }
 
 #define field_avail(x, fld, sz) (offsetof(typeof(x), fld) + \
-                                FIELD_SIZEOF(typeof(x), fld) <= (sz))
+                                sizeof_field(typeof(x), fld) <= (sz))
 
 #define is_reserved_cleared(reserved) \
        !memchr_inv(reserved, 0, sizeof(reserved))
index 5774dfc22e18c8c2bdb0f8ac79daf53d6dbf4e5f..a51525647ac86bd4d6b210c75f2c83ef0717dd64 100644 (file)
@@ -848,7 +848,7 @@ static const struct rhashtable_params sdma_rht_params = {
        .nelem_hint = NR_CPUS_HINT,
        .head_offset = offsetof(struct sdma_rht_node, node),
        .key_offset = offsetof(struct sdma_rht_node, cpu_id),
-       .key_len = FIELD_SIZEOF(struct sdma_rht_node, cpu_id),
+       .key_len = sizeof_field(struct sdma_rht_node, cpu_id),
        .max_size = NR_CPUS,
        .min_size = 8,
        .automatic_shrinking = true,
index b0e9bf7cd150898cf0dd779a13d765a994adb6cb..d36e3e14896dd7b38a6a7c9edc6a89198f5e362d 100644 (file)
@@ -107,9 +107,9 @@ enum {
        HFI1_HAS_GRH = (1 << 0),
 };
 
-#define LRH_16B_BYTES (FIELD_SIZEOF(struct hfi1_16b_header, lrh))
+#define LRH_16B_BYTES (sizeof_field(struct hfi1_16b_header, lrh))
 #define LRH_16B_DWORDS (LRH_16B_BYTES / sizeof(u32))
-#define LRH_9B_BYTES (FIELD_SIZEOF(struct ib_header, lrh))
+#define LRH_9B_BYTES (sizeof_field(struct ib_header, lrh))
 #define LRH_9B_DWORDS (LRH_9B_BYTES / sizeof(u32))
 
 /* 24Bits for qpn, upper 8Bits reserved */
index 0b5dc1d5928f00ebfa35920f5936d39626c19738..34055cbab38cf9032f860c392e174b63ecd47bed 100644 (file)
@@ -3018,16 +3018,17 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr)
        ibdev->ib_active = false;
        flush_workqueue(wq);
 
-       mlx4_ib_close_sriov(ibdev);
-       mlx4_ib_mad_cleanup(ibdev);
-       ib_unregister_device(&ibdev->ib_dev);
-       mlx4_ib_diag_cleanup(ibdev);
        if (ibdev->iboe.nb.notifier_call) {
                if (unregister_netdevice_notifier(&ibdev->iboe.nb))
                        pr_warn("failure unregistering notifier\n");
                ibdev->iboe.nb.notifier_call = NULL;
        }
 
+       mlx4_ib_close_sriov(ibdev);
+       mlx4_ib_mad_cleanup(ibdev);
+       ib_unregister_device(&ibdev->ib_dev);
+       mlx4_ib_diag_cleanup(ibdev);
+
        mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
                              ibdev->steer_qpn_count);
        kfree(ibdev->ib_uc_qpns_bitmap);
index 4937947400cd005913f28ea633cb6a56ad5a9ccd..4c26492ab8a32507b2ece6858b6d1abf890ae161 100644 (file)
@@ -157,7 +157,7 @@ int mlx5_cmd_alloc_memic(struct mlx5_dm *dm, phys_addr_t *addr,
        return -ENOMEM;
 }
 
-int mlx5_cmd_dealloc_memic(struct mlx5_dm *dm, phys_addr_t addr, u64 length)
+void mlx5_cmd_dealloc_memic(struct mlx5_dm *dm, phys_addr_t addr, u64 length)
 {
        struct mlx5_core_dev *dev = dm->dev;
        u64 hw_start_addr = MLX5_CAP64_DEV_MEM(dev, memic_bar_start_addr);
@@ -175,15 +175,13 @@ int mlx5_cmd_dealloc_memic(struct mlx5_dm *dm, phys_addr_t addr, u64 length)
        MLX5_SET(dealloc_memic_in, in, memic_size, length);
 
        err =  mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
+       if (err)
+               return;
 
-       if (!err) {
-               spin_lock(&dm->lock);
-               bitmap_clear(dm->memic_alloc_pages,
-                            start_page_idx, num_pages);
-               spin_unlock(&dm->lock);
-       }
-
-       return err;
+       spin_lock(&dm->lock);
+       bitmap_clear(dm->memic_alloc_pages,
+                    start_page_idx, num_pages);
+       spin_unlock(&dm->lock);
 }
 
 int mlx5_cmd_query_ext_ppcnt_counters(struct mlx5_core_dev *dev, void *out)
index 169cab4915e3f91093bbd7d7414e30f120dc2d28..945ebce736134f2f12eeea58ab5a34a6eb26e003 100644 (file)
@@ -46,7 +46,7 @@ int mlx5_cmd_modify_cong_params(struct mlx5_core_dev *mdev,
                                void *in, int in_size);
 int mlx5_cmd_alloc_memic(struct mlx5_dm *dm, phys_addr_t *addr,
                         u64 length, u32 alignment);
-int mlx5_cmd_dealloc_memic(struct mlx5_dm *dm, phys_addr_t addr, u64 length);
+void mlx5_cmd_dealloc_memic(struct mlx5_dm *dm, phys_addr_t addr, u64 length);
 void mlx5_cmd_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn, u16 uid);
 void mlx5_cmd_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u16 uid);
 void mlx5_cmd_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u16 uid);
index 51100350b688058dc782306a57fa81abd907612f..997cbfe4b90ce453308b109db9d48d2f7347bdd6 100644 (file)
@@ -2074,6 +2074,24 @@ static int mlx5_ib_mmap_clock_info_page(struct mlx5_ib_dev *dev,
                              virt_to_page(dev->mdev->clock_info));
 }
 
+static void mlx5_ib_mmap_free(struct rdma_user_mmap_entry *entry)
+{
+       struct mlx5_user_mmap_entry *mentry = to_mmmap(entry);
+       struct mlx5_ib_dev *dev = to_mdev(entry->ucontext->device);
+       struct mlx5_ib_dm *mdm;
+
+       switch (mentry->mmap_flag) {
+       case MLX5_IB_MMAP_TYPE_MEMIC:
+               mdm = container_of(mentry, struct mlx5_ib_dm, mentry);
+               mlx5_cmd_dealloc_memic(&dev->dm, mdm->dev_addr,
+                                      mdm->size);
+               kfree(mdm);
+               break;
+       default:
+               WARN_ON(true);
+       }
+}
+
 static int uar_mmap(struct mlx5_ib_dev *dev, enum mlx5_ib_mmap_cmd cmd,
                    struct vm_area_struct *vma,
                    struct mlx5_ib_ucontext *context)
@@ -2186,26 +2204,55 @@ free_bfreg:
        return err;
 }
 
-static int dm_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
+static int add_dm_mmap_entry(struct ib_ucontext *context,
+                            struct mlx5_ib_dm *mdm,
+                            u64 address)
+{
+       mdm->mentry.mmap_flag = MLX5_IB_MMAP_TYPE_MEMIC;
+       mdm->mentry.address = address;
+       return rdma_user_mmap_entry_insert_range(
+                       context, &mdm->mentry.rdma_entry,
+                       mdm->size,
+                       MLX5_IB_MMAP_DEVICE_MEM << 16,
+                       (MLX5_IB_MMAP_DEVICE_MEM << 16) + (1UL << 16) - 1);
+}
+
+static unsigned long mlx5_vma_to_pgoff(struct vm_area_struct *vma)
+{
+       unsigned long idx;
+       u8 command;
+
+       command = get_command(vma->vm_pgoff);
+       idx = get_extended_index(vma->vm_pgoff);
+
+       return (command << 16 | idx);
+}
+
+static int mlx5_ib_mmap_offset(struct mlx5_ib_dev *dev,
+                              struct vm_area_struct *vma,
+                              struct ib_ucontext *ucontext)
 {
-       struct mlx5_ib_ucontext *mctx = to_mucontext(context);
-       struct mlx5_ib_dev *dev = to_mdev(context->device);
-       u16 page_idx = get_extended_index(vma->vm_pgoff);
-       size_t map_size = vma->vm_end - vma->vm_start;
-       u32 npages = map_size >> PAGE_SHIFT;
+       struct mlx5_user_mmap_entry *mentry;
+       struct rdma_user_mmap_entry *entry;
+       unsigned long pgoff;
+       pgprot_t prot;
        phys_addr_t pfn;
+       int ret;
 
-       if (find_next_zero_bit(mctx->dm_pages, page_idx + npages, page_idx) !=
-           page_idx + npages)
+       pgoff = mlx5_vma_to_pgoff(vma);
+       entry = rdma_user_mmap_entry_get_pgoff(ucontext, pgoff);
+       if (!entry)
                return -EINVAL;
 
-       pfn = ((dev->mdev->bar_addr +
-             MLX5_CAP64_DEV_MEM(dev->mdev, memic_bar_start_addr)) >>
-             PAGE_SHIFT) +
-             page_idx;
-       return rdma_user_mmap_io(context, vma, pfn, map_size,
-                                pgprot_writecombine(vma->vm_page_prot),
-                                NULL);
+       mentry = to_mmmap(entry);
+       pfn = (mentry->address >> PAGE_SHIFT);
+       prot = pgprot_writecombine(vma->vm_page_prot);
+       ret = rdma_user_mmap_io(ucontext, vma, pfn,
+                               entry->npages * PAGE_SIZE,
+                               prot,
+                               entry);
+       rdma_user_mmap_entry_put(&mentry->rdma_entry);
+       return ret;
 }
 
 static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vma)
@@ -2248,11 +2295,8 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm
        case MLX5_IB_MMAP_CLOCK_INFO:
                return mlx5_ib_mmap_clock_info_page(dev, vma, context);
 
-       case MLX5_IB_MMAP_DEVICE_MEM:
-               return dm_mmap(ibcontext, vma);
-
        default:
-               return -EINVAL;
+               return mlx5_ib_mmap_offset(dev, vma, ibcontext);
        }
 
        return 0;
@@ -2288,8 +2332,9 @@ static int handle_alloc_dm_memic(struct ib_ucontext *ctx,
 {
        struct mlx5_dm *dm_db = &to_mdev(ctx->device)->dm;
        u64 start_offset;
-       u32 page_idx;
+       u16 page_idx;
        int err;
+       u64 address;
 
        dm->size = roundup(attr->length, MLX5_MEMIC_BASE_SIZE);
 
@@ -2298,28 +2343,30 @@ static int handle_alloc_dm_memic(struct ib_ucontext *ctx,
        if (err)
                return err;
 
-       page_idx = (dm->dev_addr - pci_resource_start(dm_db->dev->pdev, 0) -
-                   MLX5_CAP64_DEV_MEM(dm_db->dev, memic_bar_start_addr)) >>
-                   PAGE_SHIFT;
+       address = dm->dev_addr & PAGE_MASK;
+       err = add_dm_mmap_entry(ctx, dm, address);
+       if (err)
+               goto err_dealloc;
 
+       page_idx = dm->mentry.rdma_entry.start_pgoff & 0xFFFF;
        err = uverbs_copy_to(attrs,
                             MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX,
-                            &page_idx, sizeof(page_idx));
+                            &page_idx,
+                            sizeof(page_idx));
        if (err)
-               goto err_dealloc;
+               goto err_copy;
 
        start_offset = dm->dev_addr & ~PAGE_MASK;
        err = uverbs_copy_to(attrs,
                             MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET,
                             &start_offset, sizeof(start_offset));
        if (err)
-               goto err_dealloc;
-
-       bitmap_set(to_mucontext(ctx)->dm_pages, page_idx,
-                  DIV_ROUND_UP(dm->size, PAGE_SIZE));
+               goto err_copy;
 
        return 0;
 
+err_copy:
+       rdma_user_mmap_entry_remove(&dm->mentry.rdma_entry);
 err_dealloc:
        mlx5_cmd_dealloc_memic(dm_db, dm->dev_addr, dm->size);
 
@@ -2423,23 +2470,13 @@ int mlx5_ib_dealloc_dm(struct ib_dm *ibdm, struct uverbs_attr_bundle *attrs)
        struct mlx5_ib_ucontext *ctx = rdma_udata_to_drv_context(
                &attrs->driver_udata, struct mlx5_ib_ucontext, ibucontext);
        struct mlx5_core_dev *dev = to_mdev(ibdm->device)->mdev;
-       struct mlx5_dm *dm_db = &to_mdev(ibdm->device)->dm;
        struct mlx5_ib_dm *dm = to_mdm(ibdm);
-       u32 page_idx;
        int ret;
 
        switch (dm->type) {
        case MLX5_IB_UAPI_DM_TYPE_MEMIC:
-               ret = mlx5_cmd_dealloc_memic(dm_db, dm->dev_addr, dm->size);
-               if (ret)
-                       return ret;
-
-               page_idx = (dm->dev_addr - pci_resource_start(dev->pdev, 0) -
-                           MLX5_CAP64_DEV_MEM(dev, memic_bar_start_addr)) >>
-                           PAGE_SHIFT;
-               bitmap_clear(ctx->dm_pages, page_idx,
-                            DIV_ROUND_UP(dm->size, PAGE_SIZE));
-               break;
+               rdma_user_mmap_entry_remove(&dm->mentry.rdma_entry);
+               return 0;
        case MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM:
                ret = mlx5_dm_sw_icm_dealloc(dev, MLX5_SW_ICM_TYPE_STEERING,
                                             dm->size, ctx->devx_uid, dm->dev_addr,
@@ -3544,10 +3581,6 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
        }
 
        INIT_LIST_HEAD(&handler->list);
-       if (dst) {
-               memcpy(&dest_arr[0], dst, sizeof(*dst));
-               dest_num++;
-       }
 
        for (spec_index = 0; spec_index < flow_attr->num_of_specs; spec_index++) {
                err = parse_flow_attr(dev->mdev, spec,
@@ -3560,6 +3593,11 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
                ib_flow += ((union ib_flow_spec *)ib_flow)->size;
        }
 
+       if (dst && !(flow_act.action & MLX5_FLOW_CONTEXT_ACTION_DROP)) {
+               memcpy(&dest_arr[0], dst, sizeof(*dst));
+               dest_num++;
+       }
+
        if (!flow_is_multicast_only(flow_attr))
                set_underlay_qp(dev, spec, underlay_qpn);
 
@@ -3600,10 +3638,8 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
        }
 
        if (flow_act.action & MLX5_FLOW_CONTEXT_ACTION_DROP) {
-               if (!(flow_act.action & MLX5_FLOW_CONTEXT_ACTION_COUNT)) {
+               if (!dest_num)
                        rule_dst = NULL;
-                       dest_num = 0;
-               }
        } else {
                if (is_egress)
                        flow_act.action |= MLX5_FLOW_CONTEXT_ACTION_ALLOW;
@@ -6236,6 +6272,7 @@ static const struct ib_device_ops mlx5_ib_dev_ops = {
        .map_mr_sg = mlx5_ib_map_mr_sg,
        .map_mr_sg_pi = mlx5_ib_map_mr_sg_pi,
        .mmap = mlx5_ib_mmap,
+       .mmap_free = mlx5_ib_mmap_free,
        .modify_cq = mlx5_ib_modify_cq,
        .modify_device = mlx5_ib_modify_device,
        .modify_port = mlx5_ib_modify_port,
index 5986953ec2facfde153a3dae39e389d6b0747c39..b06f32ff5748f51b64fc24640816621719d2fba4 100644 (file)
@@ -118,6 +118,10 @@ enum {
        MLX5_MEMIC_BASE_SIZE    = 1 << MLX5_MEMIC_BASE_ALIGN,
 };
 
+enum mlx5_ib_mmap_type {
+       MLX5_IB_MMAP_TYPE_MEMIC = 1,
+};
+
 #define MLX5_LOG_SW_ICM_BLOCK_SIZE(dev)                                        \
        (MLX5_CAP_DEV_MEM(dev, log_sw_icm_alloc_granularity))
 #define MLX5_SW_ICM_BLOCK_SIZE(dev) (1 << MLX5_LOG_SW_ICM_BLOCK_SIZE(dev))
@@ -135,7 +139,6 @@ struct mlx5_ib_ucontext {
        u32                     tdn;
 
        u64                     lib_caps;
-       DECLARE_BITMAP(dm_pages, MLX5_MAX_MEMIC_PAGES);
        u16                     devx_uid;
        /* For RoCE LAG TX affinity */
        atomic_t                tx_port_affinity;
@@ -556,6 +559,12 @@ enum mlx5_ib_mtt_access_flags {
        MLX5_IB_MTT_WRITE = (1 << 1),
 };
 
+struct mlx5_user_mmap_entry {
+       struct rdma_user_mmap_entry rdma_entry;
+       u8 mmap_flag;
+       u64 address;
+};
+
 struct mlx5_ib_dm {
        struct ib_dm            ibdm;
        phys_addr_t             dev_addr;
@@ -567,6 +576,7 @@ struct mlx5_ib_dm {
                } icm_dm;
                /* other dm types specific params should be added here */
        };
+       struct mlx5_user_mmap_entry mentry;
 };
 
 #define MLX5_IB_MTT_PRESENT (MLX5_IB_MTT_READ | MLX5_IB_MTT_WRITE)
@@ -1101,6 +1111,13 @@ to_mflow_act(struct ib_flow_action *ibact)
        return container_of(ibact, struct mlx5_ib_flow_action, ib_action);
 }
 
+static inline struct mlx5_user_mmap_entry *
+to_mmmap(struct rdma_user_mmap_entry *rdma_entry)
+{
+       return container_of(rdma_entry,
+               struct mlx5_user_mmap_entry, rdma_entry);
+}
+
 int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context,
                        struct ib_udata *udata, unsigned long virt,
                        struct mlx5_db *db);
index f9a492ed900b91423a8de5dd91932a370a6b2a00..831ad578a7b29d2ba61a3ed475f2c7ffdcffc7a3 100644 (file)
@@ -389,7 +389,7 @@ void rxe_rcv(struct sk_buff *skb)
 
        calc_icrc = rxe_icrc_hdr(pkt, skb);
        calc_icrc = rxe_crc32(rxe, calc_icrc, (u8 *)payload_addr(pkt),
-                             payload_size(pkt));
+                             payload_size(pkt) + bth_pad(pkt));
        calc_icrc = (__force u32)cpu_to_be32(~calc_icrc);
        if (unlikely(calc_icrc != pack_icrc)) {
                if (skb->protocol == htons(ETH_P_IPV6))
index c5d9b558fa90a2f8e85af19a8c6a7d85e3e6fd9f..e5031172c0193ad3e2906210fe2e20f2da398a32 100644 (file)
@@ -500,6 +500,12 @@ static int fill_packet(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
                        if (err)
                                return err;
                }
+               if (bth_pad(pkt)) {
+                       u8 *pad = payload_addr(pkt) + paylen;
+
+                       memset(pad, 0, bth_pad(pkt));
+                       crc = rxe_crc32(rxe, crc, pad, bth_pad(pkt));
+               }
        }
        p = payload_addr(pkt) + paylen + bth_pad(pkt);
 
index 1cbfbd98eb221804e9424ecabbe267f6ade8c82f..c4a8195bf670945ef017837337598f3eb0cdc8e3 100644 (file)
@@ -732,6 +732,13 @@ static enum resp_states read_reply(struct rxe_qp *qp,
        if (err)
                pr_err("Failed copying memory\n");
 
+       if (bth_pad(&ack_pkt)) {
+               struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
+               u8 *pad = payload_addr(&ack_pkt) + payload;
+
+               memset(pad, 0, bth_pad(&ack_pkt));
+               icrc = rxe_crc32(rxe, icrc, pad, bth_pad(&ack_pkt));
+       }
        p = payload_addr(&ack_pkt) + payload + bth_pad(&ack_pkt);
        *p = ~icrc;
 
index 62390e9e002362ce5fe0e4ec499591c0a46798d7..8ad7da989a0ec57f3cdfbcc2dc895d4d5792f954 100644 (file)
@@ -63,7 +63,7 @@ struct vnic_stats {
        };
 };
 
-#define VNIC_STAT(m)            { FIELD_SIZEOF(struct opa_vnic_stats, m),   \
+#define VNIC_STAT(m)            { sizeof_field(struct opa_vnic_stats, m),   \
                                  offsetof(struct opa_vnic_stats, m) }
 
 static struct vnic_stats vnic_gstrings_stats[] = {
index c49afbea3458acadbbec159d251019409b8d96d8..2f9304d1db49635289e8d8db209a6cbf8141efaf 100644 (file)
@@ -6,13 +6,13 @@ config INTERCONNECT_QCOM
          Support for Qualcomm's Network-on-Chip interconnect hardware.
 
 config INTERCONNECT_QCOM_MSM8974
-       tristate "Qualcomm MSM8974 interconnect driver"
-       depends on INTERCONNECT_QCOM
-       depends on QCOM_SMD_RPM
-       select INTERCONNECT_QCOM_SMD_RPM
-       help
-         This is a driver for the Qualcomm Network-on-Chip on msm8974-based
-         platforms.
+       tristate "Qualcomm MSM8974 interconnect driver"
+       depends on INTERCONNECT_QCOM
+       depends on QCOM_SMD_RPM
+       select INTERCONNECT_QCOM_SMD_RPM
+       help
+        This is a driver for the Qualcomm Network-on-Chip on msm8974-based
+        platforms.
 
 config INTERCONNECT_QCOM_QCS404
        tristate "Qualcomm QCS404 interconnect driver"
index ce599a0c83d9583416a61f583c08742487606b60..bf8bd1aee358dd52fcfd99f8a1541c5f394463c6 100644 (file)
@@ -652,7 +652,7 @@ static int msm8974_icc_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct icc_onecell_data *data;
        struct icc_provider *provider;
-       struct icc_node *node;
+       struct icc_node *node, *tmp;
        size_t num_nodes, i;
        int ret;
 
@@ -732,7 +732,7 @@ static int msm8974_icc_probe(struct platform_device *pdev)
        return 0;
 
 err_del_icc:
-       list_for_each_entry(node, &provider->nodes, node_list) {
+       list_for_each_entry_safe(node, tmp, &provider->nodes, node_list) {
                icc_node_del(node);
                icc_node_destroy(node->id);
        }
@@ -748,9 +748,9 @@ static int msm8974_icc_remove(struct platform_device *pdev)
 {
        struct msm8974_icc_provider *qp = platform_get_drvdata(pdev);
        struct icc_provider *provider = &qp->provider;
-       struct icc_node *n;
+       struct icc_node *n, *tmp;
 
-       list_for_each_entry(n, &provider->nodes, node_list) {
+       list_for_each_entry_safe(n, tmp, &provider->nodes, node_list) {
                icc_node_del(n);
                icc_node_destroy(n->id);
        }
index b4966d8f3348d269e90f2c69f69d167ba613f905..8e0735a87040029f7854f70390de5596f0f88860 100644 (file)
@@ -414,7 +414,7 @@ static int qnoc_probe(struct platform_device *pdev)
        struct icc_provider *provider;
        struct qcom_icc_node **qnodes;
        struct qcom_icc_provider *qp;
-       struct icc_node *node;
+       struct icc_node *node, *tmp;
        size_t num_nodes, i;
        int ret;
 
@@ -494,7 +494,7 @@ static int qnoc_probe(struct platform_device *pdev)
 
        return 0;
 err:
-       list_for_each_entry(node, &provider->nodes, node_list) {
+       list_for_each_entry_safe(node, tmp, &provider->nodes, node_list) {
                icc_node_del(node);
                icc_node_destroy(node->id);
        }
@@ -508,9 +508,9 @@ static int qnoc_remove(struct platform_device *pdev)
 {
        struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
        struct icc_provider *provider = &qp->provider;
-       struct icc_node *n;
+       struct icc_node *n, *tmp;
 
-       list_for_each_entry(n, &provider->nodes, node_list) {
+       list_for_each_entry_safe(n, tmp, &provider->nodes, node_list) {
                icc_node_del(n);
                icc_node_destroy(n->id);
        }
index 502a6c22b41eea9ded02b65a51b68aa028a78ca6..387267ee9648509fa39bac0c25c5fd6db1fe1c46 100644 (file)
@@ -868,9 +868,9 @@ static int qnoc_remove(struct platform_device *pdev)
 {
        struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
        struct icc_provider *provider = &qp->provider;
-       struct icc_node *n;
+       struct icc_node *n, *tmp;
 
-       list_for_each_entry(n, &provider->nodes, node_list) {
+       list_for_each_entry_safe(n, tmp, &provider->nodes, node_list) {
                icc_node_del(n);
                icc_node_destroy(n->id);
        }
index 08c552e5e41b2f6c96f0142db37df659ab96fa9f..c05b121104561a4cd777b40cdb97ba14838f7ff2 100644 (file)
@@ -67,23 +67,34 @@ struct superblock_disk {
  * To save constantly doing look ups on disk we keep an in core copy of the
  * on-disk bitmap, the region_map.
  *
- * To further reduce metadata I/O overhead we use a second bitmap, the dmap
- * (dirty bitmap), which tracks the dirty words, i.e. longs, of the region_map.
+ * In order to track which regions are hydrated during a metadata transaction,
+ * we use a second set of bitmaps, the dmap (dirty bitmap), which includes two
+ * bitmaps, namely dirty_regions and dirty_words. The dirty_regions bitmap
+ * tracks the regions that got hydrated during the current metadata
+ * transaction. The dirty_words bitmap tracks the dirty words, i.e. longs, of
+ * the dirty_regions bitmap.
+ *
+ * This allows us to precisely track the regions that were hydrated during the
+ * current metadata transaction and update the metadata accordingly, when we
+ * commit the current transaction. This is important because dm-clone should
+ * only commit the metadata of regions that were properly flushed to the
+ * destination device beforehand. Otherwise, in case of a crash, we could end
+ * up with a corrupted dm-clone device.
  *
  * When a region finishes hydrating dm-clone calls
  * dm_clone_set_region_hydrated(), or for discard requests
  * dm_clone_cond_set_range(), which sets the corresponding bits in region_map
  * and dmap.
  *
- * During a metadata commit we scan the dmap for dirty region_map words (longs)
- * and update accordingly the on-disk metadata. Thus, we don't have to flush to
- * disk the whole region_map. We can just flush the dirty region_map words.
+ * During a metadata commit we scan dmap->dirty_words and dmap->dirty_regions
+ * and update the on-disk metadata accordingly. Thus, we don't have to flush to
+ * disk the whole region_map. We can just flush the dirty region_map bits.
  *
- * We use a dirty bitmap, which is smaller than the original region_map, to
- * reduce the amount of memory accesses during a metadata commit. As dm-bitset
- * accesses the on-disk bitmap in 64-bit word granularity, there is no
- * significant benefit in tracking the dirty region_map bits with a smaller
- * granularity.
+ * We use the helper dmap->dirty_words bitmap, which is smaller than the
+ * original region_map, to reduce the amount of memory accesses during a
+ * metadata commit. Moreover, as dm-bitset also accesses the on-disk bitmap in
+ * 64-bit word granularity, the dirty_words bitmap helps us avoid useless disk
+ * accesses.
  *
  * We could update directly the on-disk bitmap, when dm-clone calls either
  * dm_clone_set_region_hydrated() or dm_clone_cond_set_range(), buts this
@@ -92,12 +103,13 @@ struct superblock_disk {
  * e.g., in a hooked overwrite bio's completion routine, and further reduce the
  * I/O completion latency.
  *
- * We maintain two dirty bitmaps. During a metadata commit we atomically swap
- * the currently used dmap with the unused one. This allows the metadata update
- * functions to run concurrently with an ongoing commit.
+ * We maintain two dirty bitmap sets. During a metadata commit we atomically
+ * swap the currently used dmap with the unused one. This allows the metadata
+ * update functions to run concurrently with an ongoing commit.
  */
 struct dirty_map {
        unsigned long *dirty_words;
+       unsigned long *dirty_regions;
        unsigned int changed;
 };
 
@@ -115,6 +127,9 @@ struct dm_clone_metadata {
        struct dirty_map dmap[2];
        struct dirty_map *current_dmap;
 
+       /* Protected by lock */
+       struct dirty_map *committing_dmap;
+
        /*
         * In core copy of the on-disk bitmap to save constantly doing look ups
         * on disk.
@@ -461,34 +476,53 @@ static size_t bitmap_size(unsigned long nr_bits)
        return BITS_TO_LONGS(nr_bits) * sizeof(long);
 }
 
-static int dirty_map_init(struct dm_clone_metadata *cmd)
+static int __dirty_map_init(struct dirty_map *dmap, unsigned long nr_words,
+                           unsigned long nr_regions)
 {
-       cmd->dmap[0].changed = 0;
-       cmd->dmap[0].dirty_words = kvzalloc(bitmap_size(cmd->nr_words), GFP_KERNEL);
+       dmap->changed = 0;
 
-       if (!cmd->dmap[0].dirty_words) {
-               DMERR("Failed to allocate dirty bitmap");
+       dmap->dirty_words = kvzalloc(bitmap_size(nr_words), GFP_KERNEL);
+       if (!dmap->dirty_words)
+               return -ENOMEM;
+
+       dmap->dirty_regions = kvzalloc(bitmap_size(nr_regions), GFP_KERNEL);
+       if (!dmap->dirty_regions) {
+               kvfree(dmap->dirty_words);
                return -ENOMEM;
        }
 
-       cmd->dmap[1].changed = 0;
-       cmd->dmap[1].dirty_words = kvzalloc(bitmap_size(cmd->nr_words), GFP_KERNEL);
+       return 0;
+}
+
+static void __dirty_map_exit(struct dirty_map *dmap)
+{
+       kvfree(dmap->dirty_words);
+       kvfree(dmap->dirty_regions);
+}
+
+static int dirty_map_init(struct dm_clone_metadata *cmd)
+{
+       if (__dirty_map_init(&cmd->dmap[0], cmd->nr_words, cmd->nr_regions)) {
+               DMERR("Failed to allocate dirty bitmap");
+               return -ENOMEM;
+       }
 
-       if (!cmd->dmap[1].dirty_words) {
+       if (__dirty_map_init(&cmd->dmap[1], cmd->nr_words, cmd->nr_regions)) {
                DMERR("Failed to allocate dirty bitmap");
-               kvfree(cmd->dmap[0].dirty_words);
+               __dirty_map_exit(&cmd->dmap[0]);
                return -ENOMEM;
        }
 
        cmd->current_dmap = &cmd->dmap[0];
+       cmd->committing_dmap = NULL;
 
        return 0;
 }
 
 static void dirty_map_exit(struct dm_clone_metadata *cmd)
 {
-       kvfree(cmd->dmap[0].dirty_words);
-       kvfree(cmd->dmap[1].dirty_words);
+       __dirty_map_exit(&cmd->dmap[0]);
+       __dirty_map_exit(&cmd->dmap[1]);
 }
 
 static int __load_bitset_in_core(struct dm_clone_metadata *cmd)
@@ -633,21 +667,23 @@ unsigned long dm_clone_find_next_unhydrated_region(struct dm_clone_metadata *cmd
        return find_next_zero_bit(cmd->region_map, cmd->nr_regions, start);
 }
 
-static int __update_metadata_word(struct dm_clone_metadata *cmd, unsigned long word)
+static int __update_metadata_word(struct dm_clone_metadata *cmd,
+                                 unsigned long *dirty_regions,
+                                 unsigned long word)
 {
        int r;
        unsigned long index = word * BITS_PER_LONG;
        unsigned long max_index = min(cmd->nr_regions, (word + 1) * BITS_PER_LONG);
 
        while (index < max_index) {
-               if (test_bit(index, cmd->region_map)) {
+               if (test_bit(index, dirty_regions)) {
                        r = dm_bitset_set_bit(&cmd->bitset_info, cmd->bitset_root,
                                              index, &cmd->bitset_root);
-
                        if (r) {
                                DMERR("dm_bitset_set_bit failed");
                                return r;
                        }
+                       __clear_bit(index, dirty_regions);
                }
                index++;
        }
@@ -721,7 +757,7 @@ static int __flush_dmap(struct dm_clone_metadata *cmd, struct dirty_map *dmap)
                if (word == cmd->nr_words)
                        break;
 
-               r = __update_metadata_word(cmd, word);
+               r = __update_metadata_word(cmd, dmap->dirty_regions, word);
 
                if (r)
                        return r;
@@ -743,15 +779,17 @@ static int __flush_dmap(struct dm_clone_metadata *cmd, struct dirty_map *dmap)
        return 0;
 }
 
-int dm_clone_metadata_commit(struct dm_clone_metadata *cmd)
+int dm_clone_metadata_pre_commit(struct dm_clone_metadata *cmd)
 {
-       int r = -EPERM;
+       int r = 0;
        struct dirty_map *dmap, *next_dmap;
 
        down_write(&cmd->lock);
 
-       if (cmd->fail_io || dm_bm_is_read_only(cmd->bm))
+       if (cmd->fail_io || dm_bm_is_read_only(cmd->bm)) {
+               r = -EPERM;
                goto out;
+       }
 
        /* Get current dirty bitmap */
        dmap = cmd->current_dmap;
@@ -763,7 +801,7 @@ int dm_clone_metadata_commit(struct dm_clone_metadata *cmd)
         * The last commit failed, so we don't have a clean dirty-bitmap to
         * use.
         */
-       if (WARN_ON(next_dmap->changed)) {
+       if (WARN_ON(next_dmap->changed || cmd->committing_dmap)) {
                r = -EINVAL;
                goto out;
        }
@@ -773,11 +811,33 @@ int dm_clone_metadata_commit(struct dm_clone_metadata *cmd)
        cmd->current_dmap = next_dmap;
        spin_unlock_irq(&cmd->bitmap_lock);
 
-       /*
-        * No one is accessing the old dirty bitmap anymore, so we can flush
-        * it.
-        */
-       r = __flush_dmap(cmd, dmap);
+       /* Set old dirty bitmap as currently committing */
+       cmd->committing_dmap = dmap;
+out:
+       up_write(&cmd->lock);
+
+       return r;
+}
+
+int dm_clone_metadata_commit(struct dm_clone_metadata *cmd)
+{
+       int r = -EPERM;
+
+       down_write(&cmd->lock);
+
+       if (cmd->fail_io || dm_bm_is_read_only(cmd->bm))
+               goto out;
+
+       if (WARN_ON(!cmd->committing_dmap)) {
+               r = -EINVAL;
+               goto out;
+       }
+
+       r = __flush_dmap(cmd, cmd->committing_dmap);
+       if (!r) {
+               /* Clear committing dmap */
+               cmd->committing_dmap = NULL;
+       }
 out:
        up_write(&cmd->lock);
 
@@ -802,6 +862,7 @@ int dm_clone_set_region_hydrated(struct dm_clone_metadata *cmd, unsigned long re
        dmap = cmd->current_dmap;
 
        __set_bit(word, dmap->dirty_words);
+       __set_bit(region_nr, dmap->dirty_regions);
        __set_bit(region_nr, cmd->region_map);
        dmap->changed = 1;
 
@@ -830,6 +891,7 @@ int dm_clone_cond_set_range(struct dm_clone_metadata *cmd, unsigned long start,
                if (!test_bit(region_nr, cmd->region_map)) {
                        word = region_nr / BITS_PER_LONG;
                        __set_bit(word, dmap->dirty_words);
+                       __set_bit(region_nr, dmap->dirty_regions);
                        __set_bit(region_nr, cmd->region_map);
                        dmap->changed = 1;
                }
index 3fe50a781c1161a1050707331fa2c28169a8a917..14af1ebd853fd2048acc445e0c8b8e8a978b28c5 100644 (file)
@@ -75,7 +75,23 @@ void dm_clone_metadata_close(struct dm_clone_metadata *cmd);
 
 /*
  * Commit dm-clone metadata to disk.
+ *
+ * We use a two phase commit:
+ *
+ * 1. dm_clone_metadata_pre_commit(): Prepare the current transaction for
+ *    committing. After this is called, all subsequent metadata updates, done
+ *    through either dm_clone_set_region_hydrated() or
+ *    dm_clone_cond_set_range(), will be part of the **next** transaction.
+ *
+ * 2. dm_clone_metadata_commit(): Actually commit the current transaction to
+ *    disk and start a new transaction.
+ *
+ * This allows dm-clone to flush the destination device after step (1) to
+ * ensure that all freshly hydrated regions, for which we are updating the
+ * metadata, are properly written to non-volatile storage and won't be lost in
+ * case of a crash.
  */
+int dm_clone_metadata_pre_commit(struct dm_clone_metadata *cmd);
 int dm_clone_metadata_commit(struct dm_clone_metadata *cmd);
 
 /*
@@ -112,6 +128,7 @@ int dm_clone_metadata_abort(struct dm_clone_metadata *cmd);
  * Switches metadata to a read only mode. Once read-only mode has been entered
  * the following functions will return -EPERM:
  *
+ *   dm_clone_metadata_pre_commit()
  *   dm_clone_metadata_commit()
  *   dm_clone_set_region_hydrated()
  *   dm_clone_cond_set_range()
index b3d89072d21c6a26461dd9a60d32eaccf68200a5..d1e1b5b56b1bbb4ad205889930cc1db9d9bad02e 100644 (file)
@@ -86,6 +86,12 @@ struct clone {
 
        struct dm_clone_metadata *cmd;
 
+       /*
+        * bio used to flush the destination device, before committing the
+        * metadata.
+        */
+       struct bio flush_bio;
+
        /* Region hydration hash table */
        struct hash_table_bucket *ht;
 
@@ -1108,10 +1114,13 @@ static bool need_commit_due_to_time(struct clone *clone)
 /*
  * A non-zero return indicates read-only or fail mode.
  */
-static int commit_metadata(struct clone *clone)
+static int commit_metadata(struct clone *clone, bool *dest_dev_flushed)
 {
        int r = 0;
 
+       if (dest_dev_flushed)
+               *dest_dev_flushed = false;
+
        mutex_lock(&clone->commit_lock);
 
        if (!dm_clone_changed_this_transaction(clone->cmd))
@@ -1122,8 +1131,26 @@ static int commit_metadata(struct clone *clone)
                goto out;
        }
 
-       r = dm_clone_metadata_commit(clone->cmd);
+       r = dm_clone_metadata_pre_commit(clone->cmd);
+       if (unlikely(r)) {
+               __metadata_operation_failed(clone, "dm_clone_metadata_pre_commit", r);
+               goto out;
+       }
 
+       bio_reset(&clone->flush_bio);
+       bio_set_dev(&clone->flush_bio, clone->dest_dev->bdev);
+       clone->flush_bio.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
+
+       r = submit_bio_wait(&clone->flush_bio);
+       if (unlikely(r)) {
+               __metadata_operation_failed(clone, "flush destination device", r);
+               goto out;
+       }
+
+       if (dest_dev_flushed)
+               *dest_dev_flushed = true;
+
+       r = dm_clone_metadata_commit(clone->cmd);
        if (unlikely(r)) {
                __metadata_operation_failed(clone, "dm_clone_metadata_commit", r);
                goto out;
@@ -1194,6 +1221,7 @@ static void process_deferred_bios(struct clone *clone)
 static void process_deferred_flush_bios(struct clone *clone)
 {
        struct bio *bio;
+       bool dest_dev_flushed;
        struct bio_list bios = BIO_EMPTY_LIST;
        struct bio_list bio_completions = BIO_EMPTY_LIST;
 
@@ -1213,7 +1241,7 @@ static void process_deferred_flush_bios(struct clone *clone)
            !(dm_clone_changed_this_transaction(clone->cmd) && need_commit_due_to_time(clone)))
                return;
 
-       if (commit_metadata(clone)) {
+       if (commit_metadata(clone, &dest_dev_flushed)) {
                bio_list_merge(&bios, &bio_completions);
 
                while ((bio = bio_list_pop(&bios)))
@@ -1227,8 +1255,17 @@ static void process_deferred_flush_bios(struct clone *clone)
        while ((bio = bio_list_pop(&bio_completions)))
                bio_endio(bio);
 
-       while ((bio = bio_list_pop(&bios)))
-               generic_make_request(bio);
+       while ((bio = bio_list_pop(&bios))) {
+               if ((bio->bi_opf & REQ_PREFLUSH) && dest_dev_flushed) {
+                       /* We just flushed the destination device as part of
+                        * the metadata commit, so there is no reason to send
+                        * another flush.
+                        */
+                       bio_endio(bio);
+               } else {
+                       generic_make_request(bio);
+               }
+       }
 }
 
 static void do_worker(struct work_struct *work)
@@ -1400,7 +1437,7 @@ static void clone_status(struct dm_target *ti, status_type_t type,
 
                /* Commit to ensure statistics aren't out-of-date */
                if (!(status_flags & DM_STATUS_NOFLUSH_FLAG) && !dm_suspended(ti))
-                       (void) commit_metadata(clone);
+                       (void) commit_metadata(clone, NULL);
 
                r = dm_clone_get_free_metadata_block_count(clone->cmd, &nr_free_metadata_blocks);
 
@@ -1834,6 +1871,7 @@ static int clone_ctr(struct dm_target *ti, unsigned int argc, char **argv)
        bio_list_init(&clone->deferred_flush_completions);
        clone->hydration_offset = 0;
        atomic_set(&clone->hydrations_in_flight, 0);
+       bio_init(&clone->flush_bio, NULL, 0);
 
        clone->wq = alloc_workqueue("dm-" DM_MSG_PREFIX, WQ_MEM_RECLAIM, 0);
        if (!clone->wq) {
@@ -1907,6 +1945,7 @@ static void clone_dtr(struct dm_target *ti)
        struct clone *clone = ti->private;
 
        mutex_destroy(&clone->commit_lock);
+       bio_uninit(&clone->flush_bio);
 
        for (i = 0; i < clone->nr_ctr_args; i++)
                kfree(clone->ctr_args[i]);
@@ -1961,7 +2000,7 @@ static void clone_postsuspend(struct dm_target *ti)
        wait_event(clone->hydration_stopped, !atomic_read(&clone->hydrations_in_flight));
        flush_workqueue(clone->wq);
 
-       (void) commit_metadata(clone);
+       (void) commit_metadata(clone, NULL);
 }
 
 static void clone_resume(struct dm_target *ti)
index dbcc1e41cd57dd5a669466a6907a70f78a16014f..e0c32793c24872a07cd504202447fcd102056369 100644 (file)
@@ -599,45 +599,10 @@ static struct pgpath *__map_bio(struct multipath *m, struct bio *bio)
        return pgpath;
 }
 
-static struct pgpath *__map_bio_fast(struct multipath *m, struct bio *bio)
-{
-       struct pgpath *pgpath;
-       unsigned long flags;
-
-       /* Do we need to select a new pgpath? */
-       /*
-        * FIXME: currently only switching path if no path (due to failure, etc)
-        * - which negates the point of using a path selector
-        */
-       pgpath = READ_ONCE(m->current_pgpath);
-       if (!pgpath)
-               pgpath = choose_pgpath(m, bio->bi_iter.bi_size);
-
-       if (!pgpath) {
-               if (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) {
-                       /* Queue for the daemon to resubmit */
-                       spin_lock_irqsave(&m->lock, flags);
-                       bio_list_add(&m->queued_bios, bio);
-                       spin_unlock_irqrestore(&m->lock, flags);
-                       queue_work(kmultipathd, &m->process_queued_bios);
-
-                       return ERR_PTR(-EAGAIN);
-               }
-               return NULL;
-       }
-
-       return pgpath;
-}
-
 static int __multipath_map_bio(struct multipath *m, struct bio *bio,
                               struct dm_mpath_io *mpio)
 {
-       struct pgpath *pgpath;
-
-       if (!m->hw_handler_name)
-               pgpath = __map_bio_fast(m, bio);
-       else
-               pgpath = __map_bio(m, bio);
+       struct pgpath *pgpath = __map_bio(m, bio);
 
        if (IS_ERR(pgpath))
                return DM_MAPIO_SUBMITTED;
index 4c68a7b93d5edab9192a3ce9c24fcdc79b7e1acf..b88d6d701f5bb26bec60314164b4cd07926fab51 100644 (file)
@@ -188,6 +188,15 @@ struct dm_pool_metadata {
        unsigned long flags;
        sector_t data_block_size;
 
+       /*
+        * Pre-commit callback.
+        *
+        * This allows the thin provisioning target to run a callback before
+        * the metadata are committed.
+        */
+       dm_pool_pre_commit_fn pre_commit_fn;
+       void *pre_commit_context;
+
        /*
         * We reserve a section of the metadata for commit overhead.
         * All reported space does *not* include this.
@@ -826,6 +835,14 @@ static int __commit_transaction(struct dm_pool_metadata *pmd)
        if (unlikely(!pmd->in_service))
                return 0;
 
+       if (pmd->pre_commit_fn) {
+               r = pmd->pre_commit_fn(pmd->pre_commit_context);
+               if (r < 0) {
+                       DMERR("pre-commit callback failed");
+                       return r;
+               }
+       }
+
        r = __write_changed_details(pmd);
        if (r < 0)
                return r;
@@ -892,6 +909,8 @@ struct dm_pool_metadata *dm_pool_metadata_open(struct block_device *bdev,
        pmd->in_service = false;
        pmd->bdev = bdev;
        pmd->data_block_size = data_block_size;
+       pmd->pre_commit_fn = NULL;
+       pmd->pre_commit_context = NULL;
 
        r = __create_persistent_data_objects(pmd, format_device);
        if (r) {
@@ -2044,6 +2063,16 @@ int dm_pool_register_metadata_threshold(struct dm_pool_metadata *pmd,
        return r;
 }
 
+void dm_pool_register_pre_commit_callback(struct dm_pool_metadata *pmd,
+                                         dm_pool_pre_commit_fn fn,
+                                         void *context)
+{
+       pmd_write_lock_in_core(pmd);
+       pmd->pre_commit_fn = fn;
+       pmd->pre_commit_context = context;
+       pmd_write_unlock(pmd);
+}
+
 int dm_pool_metadata_set_needs_check(struct dm_pool_metadata *pmd)
 {
        int r = -EINVAL;
index f6be0d733c20267f569b72ab14314d0565425e80..7ef56bd2a7e33974469196486bdf05c9b4bedda3 100644 (file)
@@ -230,6 +230,13 @@ bool dm_pool_metadata_needs_check(struct dm_pool_metadata *pmd);
  */
 void dm_pool_issue_prefetches(struct dm_pool_metadata *pmd);
 
+/* Pre-commit callback */
+typedef int (*dm_pool_pre_commit_fn)(void *context);
+
+void dm_pool_register_pre_commit_callback(struct dm_pool_metadata *pmd,
+                                         dm_pool_pre_commit_fn fn,
+                                         void *context);
+
 /*----------------------------------------------------------------*/
 
 #endif
index 5a2c494cb55288e782d0fb4702d4e9efb8cab63a..57626c27a54bb5bc66be7c3832dc05059b2851d7 100644 (file)
@@ -328,6 +328,7 @@ struct pool_c {
        dm_block_t low_water_blocks;
        struct pool_features requested_pf; /* Features requested during table load */
        struct pool_features adjusted_pf;  /* Features used after adjusting for constituent devices */
+       struct bio flush_bio;
 };
 
 /*
@@ -2383,8 +2384,16 @@ static void process_deferred_bios(struct pool *pool)
        while ((bio = bio_list_pop(&bio_completions)))
                bio_endio(bio);
 
-       while ((bio = bio_list_pop(&bios)))
-               generic_make_request(bio);
+       while ((bio = bio_list_pop(&bios))) {
+               /*
+                * The data device was flushed as part of metadata commit,
+                * so complete redundant flushes immediately.
+                */
+               if (bio->bi_opf & REQ_PREFLUSH)
+                       bio_endio(bio);
+               else
+                       generic_make_request(bio);
+       }
 }
 
 static void do_worker(struct work_struct *ws)
@@ -3115,6 +3124,7 @@ static void pool_dtr(struct dm_target *ti)
        __pool_dec(pt->pool);
        dm_put_device(ti, pt->metadata_dev);
        dm_put_device(ti, pt->data_dev);
+       bio_uninit(&pt->flush_bio);
        kfree(pt);
 
        mutex_unlock(&dm_thin_pool_table.mutex);
@@ -3180,6 +3190,29 @@ static void metadata_low_callback(void *context)
        dm_table_event(pool->ti->table);
 }
 
+/*
+ * We need to flush the data device **before** committing the metadata.
+ *
+ * This ensures that the data blocks of any newly inserted mappings are
+ * properly written to non-volatile storage and won't be lost in case of a
+ * crash.
+ *
+ * Failure to do so can result in data corruption in the case of internal or
+ * external snapshots and in the case of newly provisioned blocks, when block
+ * zeroing is enabled.
+ */
+static int metadata_pre_commit_callback(void *context)
+{
+       struct pool_c *pt = context;
+       struct bio *flush_bio = &pt->flush_bio;
+
+       bio_reset(flush_bio);
+       bio_set_dev(flush_bio, pt->data_dev->bdev);
+       flush_bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
+
+       return submit_bio_wait(flush_bio);
+}
+
 static sector_t get_dev_size(struct block_device *bdev)
 {
        return i_size_read(bdev->bd_inode) >> SECTOR_SHIFT;
@@ -3348,6 +3381,7 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
        pt->data_dev = data_dev;
        pt->low_water_blocks = low_water_blocks;
        pt->adjusted_pf = pt->requested_pf = pf;
+       bio_init(&pt->flush_bio, NULL, 0);
        ti->num_flush_bios = 1;
 
        /*
@@ -3374,6 +3408,10 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
        if (r)
                goto out_flags_changed;
 
+       dm_pool_register_pre_commit_callback(pt->pool->pmd,
+                                            metadata_pre_commit_callback,
+                                            pt);
+
        pt->callbacks.congested_fn = pool_is_congested;
        dm_table_add_target_callbacks(ti->table, &pt->callbacks);
 
index 805b33e274967f7320eb2b05e1f5958512981500..4e7c9f398bc66b39b420c400769b496291338442 100644 (file)
@@ -1159,6 +1159,7 @@ static int super_90_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor
        /* not spare disk, or LEVEL_MULTIPATH */
        if (sb->level == LEVEL_MULTIPATH ||
                (rdev->desc_nr >= 0 &&
+                rdev->desc_nr < MD_SB_DISKS &&
                 sb->disks[rdev->desc_nr].state &
                 ((1<<MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE))))
                spare_disk = false;
index 21ea537bd55e9984f7cfe5b908a3d6bcad9038e9..eff04fa23dfad46d7d43dee24cde0a1fd90f2f68 100644 (file)
@@ -203,7 +203,13 @@ static void __rebalance2(struct dm_btree_info *info, struct btree_node *parent,
        struct btree_node *right = r->n;
        uint32_t nr_left = le32_to_cpu(left->header.nr_entries);
        uint32_t nr_right = le32_to_cpu(right->header.nr_entries);
-       unsigned threshold = 2 * merge_threshold(left) + 1;
+       /*
+        * Ensure the number of entries in each child will be greater
+        * than or equal to (max_entries / 3 + 1), so no matter which
+        * child is used for removal, the number will still be not
+        * less than (max_entries / 3).
+        */
+       unsigned int threshold = 2 * (merge_threshold(left) + 1);
 
        if (nr_left + nr_right < threshold) {
                /*
index a409ab6f30bc33375561d4cebc20c5e20f9435ba..201fd8aec59aca67842611d8524f205d2c9b63d4 100644 (file)
@@ -2782,7 +2782,7 @@ static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr,
                                write_targets++;
                        }
                }
-               if (bio->bi_end_io) {
+               if (rdev && bio->bi_end_io) {
                        atomic_inc(&rdev->nr_pending);
                        bio->bi_iter.bi_sector = sector_nr + rdev->data_offset;
                        bio_set_dev(bio, rdev->bdev);
index cab5b1352892fbd3584aec57e2180c51b01f6a23..d50238d0a85db0bf29f9ef67cd7ef23c826d8724 100644 (file)
@@ -1360,7 +1360,7 @@ int ppl_init_log(struct r5conf *conf)
                return -EINVAL;
        }
 
-       max_disks = FIELD_SIZEOF(struct ppl_log, disk_flush_bitmap) *
+       max_disks = sizeof_field(struct ppl_log, disk_flush_bitmap) *
                BITS_PER_BYTE;
        if (conf->raid_disks > max_disks) {
                pr_warn("md/raid:%s PPL doesn't support over %d disks in the array\n",
index f0fc538bfe597f7a1179b31eeaa8a8bfa837101a..d4d3b67ffbba7c7b57b142efb5f9441d8511c9a1 100644 (file)
@@ -5726,7 +5726,7 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi)
                                do_flush = false;
                        }
 
-                       if (!sh->batch_head)
+                       if (!sh->batch_head || sh == sh->batch_head)
                                set_bit(STRIPE_HANDLE, &sh->state);
                        clear_bit(STRIPE_DELAYED, &sh->state);
                        if ((!sh->batch_head || sh == sh->batch_head) &&
index 97d660606d9845981666cdf54f2a88bb5e511bc9..4dbdf3180d1080a334449961a727e88b4aaadc9a 100644 (file)
@@ -753,7 +753,7 @@ static const struct preview_update update_attrs[] = {
                preview_config_luma_enhancement,
                preview_enable_luma_enhancement,
                offsetof(struct prev_params, luma),
-               FIELD_SIZEOF(struct prev_params, luma),
+               sizeof_field(struct prev_params, luma),
                offsetof(struct omap3isp_prev_update_config, luma),
        }, /* OMAP3ISP_PREV_INVALAW */ {
                NULL,
@@ -762,55 +762,55 @@ static const struct preview_update update_attrs[] = {
                preview_config_hmed,
                preview_enable_hmed,
                offsetof(struct prev_params, hmed),
-               FIELD_SIZEOF(struct prev_params, hmed),
+               sizeof_field(struct prev_params, hmed),
                offsetof(struct omap3isp_prev_update_config, hmed),
        }, /* OMAP3ISP_PREV_CFA */ {
                preview_config_cfa,
                NULL,
                offsetof(struct prev_params, cfa),
-               FIELD_SIZEOF(struct prev_params, cfa),
+               sizeof_field(struct prev_params, cfa),
                offsetof(struct omap3isp_prev_update_config, cfa),
        }, /* OMAP3ISP_PREV_CHROMA_SUPP */ {
                preview_config_chroma_suppression,
                preview_enable_chroma_suppression,
                offsetof(struct prev_params, csup),
-               FIELD_SIZEOF(struct prev_params, csup),
+               sizeof_field(struct prev_params, csup),
                offsetof(struct omap3isp_prev_update_config, csup),
        }, /* OMAP3ISP_PREV_WB */ {
                preview_config_whitebalance,
                NULL,
                offsetof(struct prev_params, wbal),
-               FIELD_SIZEOF(struct prev_params, wbal),
+               sizeof_field(struct prev_params, wbal),
                offsetof(struct omap3isp_prev_update_config, wbal),
        }, /* OMAP3ISP_PREV_BLKADJ */ {
                preview_config_blkadj,
                NULL,
                offsetof(struct prev_params, blkadj),
-               FIELD_SIZEOF(struct prev_params, blkadj),
+               sizeof_field(struct prev_params, blkadj),
                offsetof(struct omap3isp_prev_update_config, blkadj),
        }, /* OMAP3ISP_PREV_RGB2RGB */ {
                preview_config_rgb_blending,
                NULL,
                offsetof(struct prev_params, rgb2rgb),
-               FIELD_SIZEOF(struct prev_params, rgb2rgb),
+               sizeof_field(struct prev_params, rgb2rgb),
                offsetof(struct omap3isp_prev_update_config, rgb2rgb),
        }, /* OMAP3ISP_PREV_COLOR_CONV */ {
                preview_config_csc,
                NULL,
                offsetof(struct prev_params, csc),
-               FIELD_SIZEOF(struct prev_params, csc),
+               sizeof_field(struct prev_params, csc),
                offsetof(struct omap3isp_prev_update_config, csc),
        }, /* OMAP3ISP_PREV_YC_LIMIT */ {
                preview_config_yc_range,
                NULL,
                offsetof(struct prev_params, yclimit),
-               FIELD_SIZEOF(struct prev_params, yclimit),
+               sizeof_field(struct prev_params, yclimit),
                offsetof(struct omap3isp_prev_update_config, yclimit),
        }, /* OMAP3ISP_PREV_DEFECT_COR */ {
                preview_config_dcor,
                preview_enable_dcor,
                offsetof(struct prev_params, dcor),
-               FIELD_SIZEOF(struct prev_params, dcor),
+               sizeof_field(struct prev_params, dcor),
                offsetof(struct omap3isp_prev_update_config, dcor),
        }, /* Previously OMAP3ISP_PREV_GAMMABYPASS, not used anymore */ {
                NULL,
@@ -828,13 +828,13 @@ static const struct preview_update update_attrs[] = {
                preview_config_noisefilter,
                preview_enable_noisefilter,
                offsetof(struct prev_params, nf),
-               FIELD_SIZEOF(struct prev_params, nf),
+               sizeof_field(struct prev_params, nf),
                offsetof(struct omap3isp_prev_update_config, nf),
        }, /* OMAP3ISP_PREV_GAMMA */ {
                preview_config_gammacorrn,
                preview_enable_gammacorrn,
                offsetof(struct prev_params, gamma),
-               FIELD_SIZEOF(struct prev_params, gamma),
+               sizeof_field(struct prev_params, gamma),
                offsetof(struct omap3isp_prev_update_config, gamma),
        }, /* OMAP3ISP_PREV_CONTRAST */ {
                preview_config_contrast,
index 4e700583659bac8ce871876166cdf44ebabf4e0e..003b7422aeef612cb6023d8dc45fd440d2b8bf2e 100644 (file)
@@ -2652,7 +2652,7 @@ struct v4l2_ioctl_info {
 /* Zero struct from after the field to the end */
 #define INFO_FL_CLEAR(v4l2_struct, field)                      \
        ((offsetof(struct v4l2_struct, field) +                 \
-         FIELD_SIZEOF(struct v4l2_struct, field)) << 16)
+         sizeof_field(struct v4l2_struct, field)) << 16)
 #define INFO_FL_CLEAR_MASK     (_IOC_SIZEMASK << 16)
 
 #define DEFINE_V4L_STUB_FUNC(_vidioc)                          \
index a880f10e3e7039bf5e270ea373ad55b065ce7cc0..8083173f1a8f3d9ba1cb92ceb9210b8c0122e171 100644 (file)
@@ -129,13 +129,13 @@ struct xgbe_stats {
 
 #define XGMAC_MMC_STAT(_string, _var)                          \
        { _string,                                              \
-         FIELD_SIZEOF(struct xgbe_mmc_stats, _var),            \
+         sizeof_field(struct xgbe_mmc_stats, _var),            \
          offsetof(struct xgbe_prv_data, mmc_stats._var),       \
        }
 
 #define XGMAC_EXT_STAT(_string, _var)                          \
        { _string,                                              \
-         FIELD_SIZEOF(struct xgbe_ext_stats, _var),            \
+         sizeof_field(struct xgbe_ext_stats, _var),            \
          offsetof(struct xgbe_prv_data, ext_stats._var),       \
        }
 
index 0cc2338d8d2a81216d7a91e0d48ad704b7921fbd..dfc77507b159a8aa336a18eedded4f8ec2e01a03 100644 (file)
@@ -205,11 +205,11 @@ static int __cvmx_bootmem_check_version(struct octeon_device *oct,
        major_version = (u32)__cvmx_bootmem_desc_get(
                        oct, oct->bootmem_desc_addr,
                        offsetof(struct cvmx_bootmem_desc, major_version),
-                       FIELD_SIZEOF(struct cvmx_bootmem_desc, major_version));
+                       sizeof_field(struct cvmx_bootmem_desc, major_version));
        minor_version = (u32)__cvmx_bootmem_desc_get(
                        oct, oct->bootmem_desc_addr,
                        offsetof(struct cvmx_bootmem_desc, minor_version),
-                       FIELD_SIZEOF(struct cvmx_bootmem_desc, minor_version));
+                       sizeof_field(struct cvmx_bootmem_desc, minor_version));
 
        dev_dbg(&oct->pci_dev->dev, "%s: major_version=%d\n", __func__,
                major_version);
@@ -237,13 +237,13 @@ static const struct cvmx_bootmem_named_block_desc
                                oct, named_addr,
                                offsetof(struct cvmx_bootmem_named_block_desc,
                                         base_addr),
-                               FIELD_SIZEOF(
+                               sizeof_field(
                                        struct cvmx_bootmem_named_block_desc,
                                        base_addr));
                desc->size = __cvmx_bootmem_desc_get(oct, named_addr,
                                offsetof(struct cvmx_bootmem_named_block_desc,
                                         size),
-                               FIELD_SIZEOF(
+                               sizeof_field(
                                        struct cvmx_bootmem_named_block_desc,
                                        size));
 
@@ -268,20 +268,20 @@ static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
                                        oct, oct->bootmem_desc_addr,
                                        offsetof(struct cvmx_bootmem_desc,
                                                 named_block_array_addr),
-                                       FIELD_SIZEOF(struct cvmx_bootmem_desc,
+                                       sizeof_field(struct cvmx_bootmem_desc,
                                                     named_block_array_addr));
                u32 num_blocks = (u32)__cvmx_bootmem_desc_get(
                                        oct, oct->bootmem_desc_addr,
                                        offsetof(struct cvmx_bootmem_desc,
                                                 nb_num_blocks),
-                                       FIELD_SIZEOF(struct cvmx_bootmem_desc,
+                                       sizeof_field(struct cvmx_bootmem_desc,
                                                     nb_num_blocks));
 
                u32 name_length = (u32)__cvmx_bootmem_desc_get(
                                        oct, oct->bootmem_desc_addr,
                                        offsetof(struct cvmx_bootmem_desc,
                                                 named_block_name_len),
-                                       FIELD_SIZEOF(struct cvmx_bootmem_desc,
+                                       sizeof_field(struct cvmx_bootmem_desc,
                                                     named_block_name_len));
 
                u64 named_addr = named_block_array_addr;
@@ -292,7 +292,7 @@ static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
                                         offsetof(
                                        struct cvmx_bootmem_named_block_desc,
                                        size),
-                                        FIELD_SIZEOF(
+                                        sizeof_field(
                                        struct cvmx_bootmem_named_block_desc,
                                        size));
 
index 5bb5abf99588747a5738e102e559f5e4108a8181..022a54a1805b46c85819964d79ac6ca3114cc379 100644 (file)
@@ -23,7 +23,7 @@ struct be_ethtool_stat {
 };
 
 enum {DRVSTAT_TX, DRVSTAT_RX, DRVSTAT};
-#define FIELDINFO(_struct, field) FIELD_SIZEOF(_struct, field), \
+#define FIELDINFO(_struct, field) sizeof_field(_struct, field), \
                                        offsetof(_struct, field)
 #define DRVSTAT_TX_INFO(field) #field, DRVSTAT_TX,\
                                        FIELDINFO(struct be_tx_stats, field)
index d862e9ba27e158e91afbc04669a3eb738bec765e..13dbd249f35fa346501457646cd8ef3ae0e992a2 100644 (file)
@@ -10240,7 +10240,7 @@ static int hclge_get_dfx_reg_len(struct hclge_dev *hdev, int *len)
                return ret;
        }
 
-       data_len_per_desc = FIELD_SIZEOF(struct hclge_desc, data);
+       data_len_per_desc = sizeof_field(struct hclge_desc, data);
        *len = 0;
        for (i = 0; i < dfx_reg_type_num; i++) {
                bd_num = bd_num_list[i];
index fbc39a2480d058d6bd8caa47ac4d5eb3a278ea60..180224eab1ca4a46c34e9c62061c7087cd22bfb4 100644 (file)
@@ -614,7 +614,7 @@ static void hclge_tm_vport_tc_info_update(struct hclge_vport *vport)
        }
 
        memcpy(kinfo->prio_tc, hdev->tm_info.prio_tc,
-              FIELD_SIZEOF(struct hnae3_knic_private_info, prio_tc));
+              sizeof_field(struct hnae3_knic_private_info, prio_tc));
 }
 
 static void hclge_tm_vport_info_update(struct hclge_dev *hdev)
index 60ec48fe4144693fb005ff6c16c00437369aaa9a..966aea949c0bdc5c8d2252de53ba1d6caed9c4c2 100644 (file)
@@ -450,7 +450,7 @@ static u32 hinic_get_rxfh_indir_size(struct net_device *netdev)
 
 #define HINIC_FUNC_STAT(_stat_item) {  \
        .name = #_stat_item, \
-       .size = FIELD_SIZEOF(struct hinic_vport_stats, _stat_item), \
+       .size = sizeof_field(struct hinic_vport_stats, _stat_item), \
        .offset = offsetof(struct hinic_vport_stats, _stat_item) \
 }
 
@@ -477,7 +477,7 @@ static struct hinic_stats hinic_function_stats[] = {
 
 #define HINIC_PORT_STAT(_stat_item) { \
        .name = #_stat_item, \
-       .size = FIELD_SIZEOF(struct hinic_phy_port_stats, _stat_item), \
+       .size = sizeof_field(struct hinic_phy_port_stats, _stat_item), \
        .offset = offsetof(struct hinic_phy_port_stats, _stat_item) \
 }
 
@@ -571,7 +571,7 @@ static struct hinic_stats hinic_port_stats[] = {
 
 #define HINIC_TXQ_STAT(_stat_item) { \
        .name = "txq%d_"#_stat_item, \
-       .size = FIELD_SIZEOF(struct hinic_txq_stats, _stat_item), \
+       .size = sizeof_field(struct hinic_txq_stats, _stat_item), \
        .offset = offsetof(struct hinic_txq_stats, _stat_item) \
 }
 
@@ -586,7 +586,7 @@ static struct hinic_stats hinic_tx_queue_stats[] = {
 
 #define HINIC_RXQ_STAT(_stat_item) { \
        .name = "rxq%d_"#_stat_item, \
-       .size = FIELD_SIZEOF(struct hinic_rxq_stats, _stat_item), \
+       .size = sizeof_field(struct hinic_rxq_stats, _stat_item), \
        .offset = offsetof(struct hinic_rxq_stats, _stat_item) \
 }
 
index c681d2d28107dd163415bc0b381b7d8508a5bb5c..68edf55ac90625b5e69e5e1009e8539281f604ae 100644 (file)
@@ -18,7 +18,7 @@ struct fm10k_stats {
 
 #define FM10K_STAT_FIELDS(_type, _name, _stat) { \
        .stat_string = _name, \
-       .sizeof_stat = FIELD_SIZEOF(_type, _stat), \
+       .sizeof_stat = sizeof_field(_type, _stat), \
        .stat_offset = offsetof(_type, _stat) \
 }
 
index d24d8731bef02727decbf530df6746c33e0b9761..317f3f1458db443d89f2e626dca4cee3b8cff463 100644 (file)
@@ -43,7 +43,7 @@ struct i40e_stats {
  */
 #define I40E_STAT(_type, _name, _stat) { \
        .stat_string = _name, \
-       .sizeof_stat = FIELD_SIZEOF(_type, _stat), \
+       .sizeof_stat = sizeof_field(_type, _stat), \
        .stat_offset = offsetof(_type, _stat) \
 }
 
index be24d42280d823bbf9d20181b4731282afb604e2..a3da422ab05b6d2e46da9dc1016a351d190fca1c 100644 (file)
@@ -659,7 +659,7 @@ i40e_status i40e_shutdown_lan_hmc(struct i40e_hw *hw)
 
 #define I40E_HMC_STORE(_struct, _ele)          \
        offsetof(struct _struct, _ele),         \
-       FIELD_SIZEOF(struct _struct, _ele)
+       sizeof_field(struct _struct, _ele)
 
 struct i40e_context_ele {
        u16 offset;
index dad3eec8ccd86ec49fb543439a36ce2f3b53a717..84c3d8d97ef6f4fbc7278044afa56c1652eeadc7 100644 (file)
@@ -42,7 +42,7 @@ struct iavf_stats {
  */
 #define IAVF_STAT(_type, _name, _stat) { \
        .stat_string = _name, \
-       .sizeof_stat = FIELD_SIZEOF(_type, _stat), \
+       .sizeof_stat = sizeof_field(_type, _stat), \
        .stat_offset = offsetof(_type, _stat) \
 }
 
index aec3c6c379df86b7bbe503a602ff7406d0b5758c..9ebd93e79aeb64889ea4447c47a5e631ed2765d6 100644 (file)
@@ -15,7 +15,7 @@ struct ice_stats {
 
 #define ICE_STAT(_type, _name, _stat) { \
        .stat_string = _name, \
-       .sizeof_stat = FIELD_SIZEOF(_type, _stat), \
+       .sizeof_stat = sizeof_field(_type, _stat), \
        .stat_offset = offsetof(_type, _stat) \
 }
 
@@ -36,10 +36,10 @@ static int ice_q_stats_len(struct net_device *netdev)
 #define ICE_VSI_STATS_LEN      ARRAY_SIZE(ice_gstrings_vsi_stats)
 
 #define ICE_PFC_STATS_LEN ( \
-               (FIELD_SIZEOF(struct ice_pf, stats.priority_xoff_rx) + \
-                FIELD_SIZEOF(struct ice_pf, stats.priority_xon_rx) + \
-                FIELD_SIZEOF(struct ice_pf, stats.priority_xoff_tx) + \
-                FIELD_SIZEOF(struct ice_pf, stats.priority_xon_tx)) \
+               (sizeof_field(struct ice_pf, stats.priority_xoff_rx) + \
+                sizeof_field(struct ice_pf, stats.priority_xon_rx) + \
+                sizeof_field(struct ice_pf, stats.priority_xoff_tx) + \
+                sizeof_field(struct ice_pf, stats.priority_xon_tx)) \
                 / sizeof(u64))
 #define ICE_ALL_STATS_LEN(n)   (ICE_PF_STATS_LEN + ICE_PFC_STATS_LEN + \
                                 ICE_VSI_STATS_LEN + ice_q_stats_len(n))
index ad34f22d44ef10761155c72ec44d58e4209aaf89..0997d352709b7dfcaba9383f43241e047a0391f9 100644 (file)
@@ -302,7 +302,7 @@ struct ice_ctx_ele {
 
 #define ICE_CTX_STORE(_struct, _ele, _width, _lsb) {   \
        .offset = offsetof(struct _struct, _ele),       \
-       .size_of = FIELD_SIZEOF(struct _struct, _ele),  \
+       .size_of = sizeof_field(struct _struct, _ele),  \
        .width = _width,                                \
        .lsb = _lsb,                                    \
 }
index 3182b059bf55ce0be15487d9cbd03a894b75105f..4690d6c87f39a52ce839e35b8983a157b373e436 100644 (file)
@@ -26,7 +26,7 @@ struct igb_stats {
 
 #define IGB_STAT(_name, _stat) { \
        .stat_string = _name, \
-       .sizeof_stat = FIELD_SIZEOF(struct igb_adapter, _stat), \
+       .sizeof_stat = sizeof_field(struct igb_adapter, _stat), \
        .stat_offset = offsetof(struct igb_adapter, _stat) \
 }
 static const struct igb_stats igb_gstrings_stats[] = {
@@ -76,7 +76,7 @@ static const struct igb_stats igb_gstrings_stats[] = {
 
 #define IGB_NETDEV_STAT(_net_stat) { \
        .stat_string = __stringify(_net_stat), \
-       .sizeof_stat = FIELD_SIZEOF(struct rtnl_link_stats64, _net_stat), \
+       .sizeof_stat = sizeof_field(struct rtnl_link_stats64, _net_stat), \
        .stat_offset = offsetof(struct rtnl_link_stats64, _net_stat) \
 }
 static const struct igb_stats igb_gstrings_net_stats[] = {
index ac98f1d9689218107ba72ef045ff62d2defea1b6..455c1cdceb6e2b51e30a8ab04d1aaa65177a0d88 100644 (file)
@@ -16,7 +16,7 @@ struct igc_stats {
 
 #define IGC_STAT(_name, _stat) { \
        .stat_string = _name, \
-       .sizeof_stat = FIELD_SIZEOF(struct igc_adapter, _stat), \
+       .sizeof_stat = sizeof_field(struct igc_adapter, _stat), \
        .stat_offset = offsetof(struct igc_adapter, _stat) \
 }
 
@@ -67,7 +67,7 @@ static const struct igc_stats igc_gstrings_stats[] = {
 
 #define IGC_NETDEV_STAT(_net_stat) { \
        .stat_string = __stringify(_net_stat), \
-       .sizeof_stat = FIELD_SIZEOF(struct rtnl_link_stats64, _net_stat), \
+       .sizeof_stat = sizeof_field(struct rtnl_link_stats64, _net_stat), \
        .stat_offset = offsetof(struct rtnl_link_stats64, _net_stat) \
 }
 
index c8c93ac436d4c8c1729c833411a415805d3cde73..c65eb1afc8fb9848cad664049a62cfabad764886 100644 (file)
@@ -19,10 +19,10 @@ struct ixgb_stats {
 };
 
 #define IXGB_STAT(m)           IXGB_STATS, \
-                               FIELD_SIZEOF(struct ixgb_adapter, m), \
+                               sizeof_field(struct ixgb_adapter, m), \
                                offsetof(struct ixgb_adapter, m)
 #define IXGB_NETDEV_STAT(m)    NETDEV_STATS, \
-                               FIELD_SIZEOF(struct net_device, m), \
+                               sizeof_field(struct net_device, m), \
                                offsetof(struct net_device, m)
 
 static struct ixgb_stats ixgb_gstrings_stats[] = {
index 54459b69c948481210cfd5795bd0912b100481a7..f7f309c96fa846c3e04301c9475acd5db38bb4f0 100644 (file)
@@ -31,14 +31,14 @@ struct ixgbe_stats {
 #define IXGBEVF_STAT(_name, _stat) { \
        .stat_string = _name, \
        .type = IXGBEVF_STATS, \
-       .sizeof_stat = FIELD_SIZEOF(struct ixgbevf_adapter, _stat), \
+       .sizeof_stat = sizeof_field(struct ixgbevf_adapter, _stat), \
        .stat_offset = offsetof(struct ixgbevf_adapter, _stat) \
 }
 
 #define IXGBEVF_NETDEV_STAT(_net_stat) { \
        .stat_string = #_net_stat, \
        .type = NETDEV_STATS, \
-       .sizeof_stat = FIELD_SIZEOF(struct net_device_stats, _net_stat), \
+       .sizeof_stat = sizeof_field(struct net_device_stats, _net_stat), \
        .stat_offset = offsetof(struct net_device_stats, _net_stat) \
 }
 
index d5b644131cff5cba613157b3d85f665f2a29d8a5..65a093216dacfdd7509a550cff1c82235f5da6d2 100644 (file)
@@ -1432,11 +1432,11 @@ struct mv643xx_eth_stats {
 };
 
 #define SSTAT(m)                                               \
-       { #m, FIELD_SIZEOF(struct net_device_stats, m),         \
+       { #m, sizeof_field(struct net_device_stats, m),         \
          offsetof(struct net_device, stats.m), -1 }
 
 #define MIBSTAT(m)                                             \
-       { #m, FIELD_SIZEOF(struct mib_counters, m),             \
+       { #m, sizeof_field(struct mib_counters, m),             \
          -1, offsetof(struct mv643xx_eth_private, mib_counters.m) }
 
 static const struct mv643xx_eth_stats mv643xx_eth_stats[] = {
index a1202e53710cd0c7f16aa4f572ae0bc62da7cb6d..8bf1f08fdee26d0b305f4af0f4841c45b8810f5e 100644 (file)
@@ -611,7 +611,7 @@ static u32 ptys_get_active_port(struct mlx4_ptys_reg *ptys_reg)
 }
 
 #define MLX4_LINK_MODES_SZ \
-       (FIELD_SIZEOF(struct mlx4_ptys_reg, eth_proto_cap) * 8)
+       (sizeof_field(struct mlx4_ptys_reg, eth_proto_cap) * 8)
 
 enum ethtool_report {
        SUPPORTED = 0,
index c76da309506b257307ba1de0582176bc60780d83..e4ec0e03c289490f2c96f93e5a73757e51d3deef 100644 (file)
@@ -87,10 +87,10 @@ static const struct rhashtable_params rhash_sa = {
         * value is not constant during the lifetime
         * of the key object.
         */
-       .key_len = FIELD_SIZEOF(struct mlx5_fpga_ipsec_sa_ctx, hw_sa) -
-                  FIELD_SIZEOF(struct mlx5_ifc_fpga_ipsec_sa_v1, cmd),
+       .key_len = sizeof_field(struct mlx5_fpga_ipsec_sa_ctx, hw_sa) -
+                  sizeof_field(struct mlx5_ifc_fpga_ipsec_sa_v1, cmd),
        .key_offset = offsetof(struct mlx5_fpga_ipsec_sa_ctx, hw_sa) +
-                     FIELD_SIZEOF(struct mlx5_ifc_fpga_ipsec_sa_v1, cmd),
+                     sizeof_field(struct mlx5_ifc_fpga_ipsec_sa_v1, cmd),
        .head_offset = offsetof(struct mlx5_fpga_ipsec_sa_ctx, hash),
        .automatic_shrinking = true,
        .min_size = 1,
index d6057748456768566478d7022b378c8ae879f185..9a48c4310887d1c15a83ac765fa439053cbf21c0 100644 (file)
@@ -209,7 +209,7 @@ enum fs_i_lock_class {
 };
 
 static const struct rhashtable_params rhash_fte = {
-       .key_len = FIELD_SIZEOF(struct fs_fte, val),
+       .key_len = sizeof_field(struct fs_fte, val),
        .key_offset = offsetof(struct fs_fte, val),
        .head_offset = offsetof(struct fs_fte, hash),
        .automatic_shrinking = true,
@@ -217,7 +217,7 @@ static const struct rhashtable_params rhash_fte = {
 };
 
 static const struct rhashtable_params rhash_fg = {
-       .key_len = FIELD_SIZEOF(struct mlx5_flow_group, mask),
+       .key_len = sizeof_field(struct mlx5_flow_group, mask),
        .key_offset = offsetof(struct mlx5_flow_group, mask),
        .head_offset = offsetof(struct mlx5_flow_group, hash),
        .automatic_shrinking = true,
index c80bb83c8ac9236e12821a61e9f2e03317b39762..0a721f6e8676e22f73fa8ade0345d765c3d30d82 100644 (file)
@@ -2652,17 +2652,17 @@ static int mem_ldx_skb(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta,
 
        switch (meta->insn.off) {
        case offsetof(struct __sk_buff, len):
-               if (size != FIELD_SIZEOF(struct __sk_buff, len))
+               if (size != sizeof_field(struct __sk_buff, len))
                        return -EOPNOTSUPP;
                wrp_mov(nfp_prog, dst, plen_reg(nfp_prog));
                break;
        case offsetof(struct __sk_buff, data):
-               if (size != FIELD_SIZEOF(struct __sk_buff, data))
+               if (size != sizeof_field(struct __sk_buff, data))
                        return -EOPNOTSUPP;
                wrp_mov(nfp_prog, dst, pptr_reg(nfp_prog));
                break;
        case offsetof(struct __sk_buff, data_end):
-               if (size != FIELD_SIZEOF(struct __sk_buff, data_end))
+               if (size != sizeof_field(struct __sk_buff, data_end))
                        return -EOPNOTSUPP;
                emit_alu(nfp_prog, dst,
                         plen_reg(nfp_prog), ALU_OP_ADD, pptr_reg(nfp_prog));
@@ -2683,12 +2683,12 @@ static int mem_ldx_xdp(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta,
 
        switch (meta->insn.off) {
        case offsetof(struct xdp_md, data):
-               if (size != FIELD_SIZEOF(struct xdp_md, data))
+               if (size != sizeof_field(struct xdp_md, data))
                        return -EOPNOTSUPP;
                wrp_mov(nfp_prog, dst, pptr_reg(nfp_prog));
                break;
        case offsetof(struct xdp_md, data_end):
-               if (size != FIELD_SIZEOF(struct xdp_md, data_end))
+               if (size != sizeof_field(struct xdp_md, data_end))
                        return -EOPNOTSUPP;
                emit_alu(nfp_prog, dst,
                         plen_reg(nfp_prog), ALU_OP_ADD, pptr_reg(nfp_prog));
index 8f732771d3fad8965318dca81a5e292a5310d8e6..11c83a99b0140dfb9c11e8246336d6aad0fe8278 100644 (file)
@@ -15,7 +15,7 @@
 
 const struct rhashtable_params nfp_bpf_maps_neutral_params = {
        .nelem_hint             = 4,
-       .key_len                = FIELD_SIZEOF(struct bpf_map, id),
+       .key_len                = sizeof_field(struct bpf_map, id),
        .key_offset             = offsetof(struct nfp_bpf_neutral_map, map_id),
        .head_offset            = offsetof(struct nfp_bpf_neutral_map, l),
        .automatic_shrinking    = true,
index 95a0d3910e316b42f42c82b66b7256e671432ccf..ac02369174a991aef59d03c448928ef643a4a482 100644 (file)
@@ -374,7 +374,7 @@ nfp_bpf_map_alloc(struct nfp_app_bpf *bpf, struct bpf_offloaded_map *offmap)
        }
 
        use_map_size = DIV_ROUND_UP(offmap->map.value_size, 4) *
-                      FIELD_SIZEOF(struct nfp_bpf_map, use_map[0]);
+                      sizeof_field(struct nfp_bpf_map, use_map[0]);
 
        nfp_map = kzalloc(sizeof(*nfp_map) + use_map_size, GFP_USER);
        if (!nfp_map)
index 31d94592a7c02b1da63855d33b8896fde4bfeb24..e0c985fcaec128c6757cc69ecf16946bfb9da9d3 100644 (file)
@@ -24,7 +24,7 @@ struct nfp_app;
 #define NFP_FL_STAT_ID_MU_NUM          GENMASK(31, 22)
 #define NFP_FL_STAT_ID_STAT            GENMASK(21, 0)
 
-#define NFP_FL_STATS_ELEM_RS           FIELD_SIZEOF(struct nfp_fl_stats_id, \
+#define NFP_FL_STATS_ELEM_RS           sizeof_field(struct nfp_fl_stats_id, \
                                                     init_unalloc)
 #define NFP_FLOWER_MASK_ENTRY_RS       256
 #define NFP_FLOWER_MASK_ELEMENT_RS     1
index 1a3008e331824c80a0aa0184d9f9e58b1d51291d..b36aa5bf3c5fa564b6c535204f7021962088b10c 100644 (file)
@@ -20,7 +20,7 @@ struct pch_gbe_stats {
 #define PCH_GBE_STAT(m)                                                \
 {                                                              \
        .string = #m,                                           \
-       .size = FIELD_SIZEOF(struct pch_gbe_hw_stats, m),       \
+       .size = sizeof_field(struct pch_gbe_hw_stats, m),       \
        .offset = offsetof(struct pch_gbe_hw_stats, m),         \
 }
 
index c303a92d5b06de883bc619ded419ca8587d41732..e8a1b27db84debab0aad020a869660bc310b2b80 100644 (file)
@@ -464,7 +464,7 @@ struct qede_fastpath {
        struct qede_tx_queue    *txq;
        struct qede_tx_queue    *xdp_tx;
 
-#define VEC_NAME_SIZE  (FIELD_SIZEOF(struct net_device, name) + 8)
+#define VEC_NAME_SIZE  (sizeof_field(struct net_device, name) + 8)
        char    name[VEC_NAME_SIZE];
 };
 
index a4cd6f2cfb862cb25315823d155b5497e59f5c2f..75d83c3cbf27f2dbf867c69888137f6b17a973c3 100644 (file)
@@ -20,7 +20,7 @@ struct qlcnic_stats {
        int stat_offset;
 };
 
-#define QLC_SIZEOF(m) FIELD_SIZEOF(struct qlcnic_adapter, m)
+#define QLC_SIZEOF(m) sizeof_field(struct qlcnic_adapter, m)
 #define QLC_OFF(m) offsetof(struct qlcnic_adapter, m)
 static const u32 qlcnic_fw_dump_level[] = {
        0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff
index 355cc810e32243361de5cfc233f0d844c5cd685a..cbc6b846ded54e0e95b3d088ec952514797c556d 100644 (file)
@@ -37,7 +37,7 @@ struct fw_info {
        u8      chksum;
 } __packed;
 
-#define FW_OPCODE_SIZE FIELD_SIZEOF(struct rtl_fw_phy_action, code[0])
+#define FW_OPCODE_SIZE sizeof_field(struct rtl_fw_phy_action, code[0])
 
 static bool rtl_fw_format_ok(struct rtl_fw *rtl_fw)
 {
index 0775b9464b4ea9e20701f52a2397f8a9966be08b..466483c4ac672d877c532f6e5bd637bb64a13e94 100644 (file)
@@ -30,7 +30,7 @@ struct sxgbe_stats {
 #define SXGBE_STAT(m)                                          \
 {                                                              \
        #m,                                                     \
-       FIELD_SIZEOF(struct sxgbe_extra_stats, m),              \
+       sizeof_field(struct sxgbe_extra_stats, m),              \
        offsetof(struct sxgbe_priv_data, xstats.m)              \
 }
 
index 1a768837ca728af9a7047db590a6ad40446f3ca5..b29603ec744c4225ad5bddd4e04dbb0f8eeba4ac 100644 (file)
@@ -34,7 +34,7 @@ struct stmmac_stats {
 };
 
 #define STMMAC_STAT(m) \
-       { #m, FIELD_SIZEOF(struct stmmac_extra_stats, m),       \
+       { #m, sizeof_field(struct stmmac_extra_stats, m),       \
        offsetof(struct stmmac_priv, xstats.m)}
 
 static const struct stmmac_stats stmmac_gstrings_stats[] = {
@@ -163,7 +163,7 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = {
 
 /* HW MAC Management counters (if supported) */
 #define STMMAC_MMC_STAT(m)     \
-       { #m, FIELD_SIZEOF(struct stmmac_counters, m),  \
+       { #m, sizeof_field(struct stmmac_counters, m),  \
        offsetof(struct stmmac_priv, mmc.m)}
 
 static const struct stmmac_stats stmmac_mmc[] = {
index 31248a6cc642e99f990cdd96b038724320b007b3..fa54efe3be63544dcd7f59142358854cbc7e6f40 100644 (file)
@@ -73,13 +73,13 @@ enum {
 };
 
 #define CPSW_STAT(m)           CPSW_STATS,                             \
-                               FIELD_SIZEOF(struct cpsw_hw_stats, m), \
+                               sizeof_field(struct cpsw_hw_stats, m), \
                                offsetof(struct cpsw_hw_stats, m)
 #define CPDMA_RX_STAT(m)       CPDMA_RX_STATS,                            \
-                               FIELD_SIZEOF(struct cpdma_chan_stats, m), \
+                               sizeof_field(struct cpdma_chan_stats, m), \
                                offsetof(struct cpdma_chan_stats, m)
 #define CPDMA_TX_STAT(m)       CPDMA_TX_STATS,                            \
-                               FIELD_SIZEOF(struct cpdma_chan_stats, m), \
+                               sizeof_field(struct cpdma_chan_stats, m), \
                                offsetof(struct cpdma_chan_stats, m)
 
 static const struct cpsw_stats cpsw_gstrings_stats[] = {
index 86a3f42a3dcc01371db5996747b1764c3e09843c..d6a192c1f3378e46277eb77e9851e3d9df1c0fec 100644 (file)
@@ -783,28 +783,28 @@ struct netcp_ethtool_stat {
 #define GBE_STATSA_INFO(field)                                         \
 {                                                                      \
        "GBE_A:"#field, GBE_STATSA_MODULE,                              \
-       FIELD_SIZEOF(struct gbe_hw_stats, field),                       \
+       sizeof_field(struct gbe_hw_stats, field),                       \
        offsetof(struct gbe_hw_stats, field)                            \
 }
 
 #define GBE_STATSB_INFO(field)                                         \
 {                                                                      \
        "GBE_B:"#field, GBE_STATSB_MODULE,                              \
-       FIELD_SIZEOF(struct gbe_hw_stats, field),                       \
+       sizeof_field(struct gbe_hw_stats, field),                       \
        offsetof(struct gbe_hw_stats, field)                            \
 }
 
 #define GBE_STATSC_INFO(field)                                         \
 {                                                                      \
        "GBE_C:"#field, GBE_STATSC_MODULE,                              \
-       FIELD_SIZEOF(struct gbe_hw_stats, field),                       \
+       sizeof_field(struct gbe_hw_stats, field),                       \
        offsetof(struct gbe_hw_stats, field)                            \
 }
 
 #define GBE_STATSD_INFO(field)                                         \
 {                                                                      \
        "GBE_D:"#field, GBE_STATSD_MODULE,                              \
-       FIELD_SIZEOF(struct gbe_hw_stats, field),                       \
+       sizeof_field(struct gbe_hw_stats, field),                       \
        offsetof(struct gbe_hw_stats, field)                            \
 }
 
@@ -957,7 +957,7 @@ static const struct netcp_ethtool_stat gbe13_et_stats[] = {
 #define GBENU_STATS_HOST(field)                                        \
 {                                                              \
        "GBE_HOST:"#field, GBENU_STATS0_MODULE,                 \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
@@ -967,56 +967,56 @@ static const struct netcp_ethtool_stat gbe13_et_stats[] = {
 #define GBENU_STATS_P1(field)                                  \
 {                                                              \
        "GBE_P1:"#field, GBENU_STATS1_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
 #define GBENU_STATS_P2(field)                                  \
 {                                                              \
        "GBE_P2:"#field, GBENU_STATS2_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
 #define GBENU_STATS_P3(field)                                  \
 {                                                              \
        "GBE_P3:"#field, GBENU_STATS3_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
 #define GBENU_STATS_P4(field)                                  \
 {                                                              \
        "GBE_P4:"#field, GBENU_STATS4_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
 #define GBENU_STATS_P5(field)                                  \
 {                                                              \
        "GBE_P5:"#field, GBENU_STATS5_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
 #define GBENU_STATS_P6(field)                                  \
 {                                                              \
        "GBE_P6:"#field, GBENU_STATS6_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
 #define GBENU_STATS_P7(field)                                  \
 {                                                              \
        "GBE_P7:"#field, GBENU_STATS7_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
 #define GBENU_STATS_P8(field)                                  \
 {                                                              \
        "GBE_P8:"#field, GBENU_STATS8_MODULE,                   \
-       FIELD_SIZEOF(struct gbenu_hw_stats, field),             \
+       sizeof_field(struct gbenu_hw_stats, field),             \
        offsetof(struct gbenu_hw_stats, field)                  \
 }
 
@@ -1607,21 +1607,21 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
 #define XGBE_STATS0_INFO(field)                                \
 {                                                      \
        "GBE_0:"#field, XGBE_STATS0_MODULE,             \
-       FIELD_SIZEOF(struct xgbe_hw_stats, field),      \
+       sizeof_field(struct xgbe_hw_stats, field),      \
        offsetof(struct xgbe_hw_stats, field)           \
 }
 
 #define XGBE_STATS1_INFO(field)                                \
 {                                                      \
        "GBE_1:"#field, XGBE_STATS1_MODULE,             \
-       FIELD_SIZEOF(struct xgbe_hw_stats, field),      \
+       sizeof_field(struct xgbe_hw_stats, field),      \
        offsetof(struct xgbe_hw_stats, field)           \
 }
 
 #define XGBE_STATS2_INFO(field)                                \
 {                                                      \
        "GBE_2:"#field, XGBE_STATS2_MODULE,             \
-       FIELD_SIZEOF(struct xgbe_hw_stats, field),      \
+       sizeof_field(struct xgbe_hw_stats, field),      \
        offsetof(struct xgbe_hw_stats, field)           \
 }
 
index 09f3604cfbf8fe3a73b409fc9021a4df686440f2..746736c83873702ee30114f5bce45b32ce7352eb 100644 (file)
@@ -21,7 +21,7 @@ struct fjes_stats {
 
 #define FJES_STAT(name, stat) { \
        .stat_string = name, \
-       .sizeof_stat = FIELD_SIZEOF(struct fjes_adapter, stat), \
+       .sizeof_stat = sizeof_field(struct fjes_adapter, stat), \
        .stat_offset = offsetof(struct fjes_adapter, stat) \
 }
 
index 5c6b7fc04ea6294b6592b23b278d3b70600ea05a..75757e9954ba24cda3aa8e9252a60be1bf9cd14e 100644 (file)
@@ -1156,7 +1156,7 @@ static void geneve_setup(struct net_device *dev)
 
 static const struct nla_policy geneve_policy[IFLA_GENEVE_MAX + 1] = {
        [IFLA_GENEVE_ID]                = { .type = NLA_U32 },
-       [IFLA_GENEVE_REMOTE]            = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
+       [IFLA_GENEVE_REMOTE]            = { .len = sizeof_field(struct iphdr, daddr) },
        [IFLA_GENEVE_REMOTE6]           = { .len = sizeof(struct in6_addr) },
        [IFLA_GENEVE_TTL]               = { .type = NLA_U8 },
        [IFLA_GENEVE_TOS]               = { .type = NLA_U8 },
index eff8fef4f775f185dc459e0fb87c51f2f0e4d7f8..02e66473f2ed137025f41eb83069b6349b1b2225 100644 (file)
@@ -571,7 +571,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
 
        /* Use the skb control buffer for building up the packet */
        BUILD_BUG_ON(sizeof(struct hv_netvsc_packet) >
-                       FIELD_SIZEOF(struct sk_buff, cb));
+                       sizeof_field(struct sk_buff, cb));
        packet = (struct hv_netvsc_packet *)skb->cb;
 
        packet->q_idx = skb_get_queue_mapping(skb);
index 34c1eaba536c05d2746c3fa3bd278d4805e94672..389d19dd7909ccfc136232eb4d51ee7e3a033560 100644 (file)
@@ -865,7 +865,7 @@ static struct sk_buff *sierra_net_tx_fixup(struct usbnet *dev,
        u16 len;
        bool need_tail;
 
-       BUILD_BUG_ON(FIELD_SIZEOF(struct usbnet, data)
+       BUILD_BUG_ON(sizeof_field(struct usbnet, data)
                                < sizeof(struct cdc_state));
 
        dev_dbg(&dev->udev->dev, "%s", __func__);
index 30e511c2c8d017f7f168dd3ef839314627e7ee53..9ce6d30576dde8579afb4ad750be6e762e9dfbd3 100644 (file)
@@ -2184,7 +2184,7 @@ static int __init usbnet_init(void)
 {
        /* Compiler should optimize this out. */
        BUILD_BUG_ON(
-               FIELD_SIZEOF(struct sk_buff, cb) < sizeof(struct skb_data));
+               sizeof_field(struct sk_buff, cb) < sizeof(struct skb_data));
 
        eth_random_addr(node_id);
        return 0;
index 4c34375c2e22096e8fd6ca47a5de1b678c06bcf2..3ec6b506033d8565812991f796e3ef768a969dd5 100644 (file)
@@ -3069,10 +3069,10 @@ static void vxlan_raw_setup(struct net_device *dev)
 
 static const struct nla_policy vxlan_policy[IFLA_VXLAN_MAX + 1] = {
        [IFLA_VXLAN_ID]         = { .type = NLA_U32 },
-       [IFLA_VXLAN_GROUP]      = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
+       [IFLA_VXLAN_GROUP]      = { .len = sizeof_field(struct iphdr, daddr) },
        [IFLA_VXLAN_GROUP6]     = { .len = sizeof(struct in6_addr) },
        [IFLA_VXLAN_LINK]       = { .type = NLA_U32 },
-       [IFLA_VXLAN_LOCAL]      = { .len = FIELD_SIZEOF(struct iphdr, saddr) },
+       [IFLA_VXLAN_LOCAL]      = { .len = sizeof_field(struct iphdr, saddr) },
        [IFLA_VXLAN_LOCAL6]     = { .len = sizeof(struct in6_addr) },
        [IFLA_VXLAN_TOS]        = { .type = NLA_U8 },
        [IFLA_VXLAN_TTL]        = { .type = NLA_U8 },
index fe14814af3007c2ee6be5b162042d977d5e7c241..c604613ab506d3c920cf52d54011403751a9b971 100644 (file)
@@ -774,7 +774,7 @@ void lbs_debugfs_remove_one(struct lbs_private *priv)
 
 #ifdef PROC_DEBUG
 
-#define item_size(n)   (FIELD_SIZEOF(struct lbs_private, n))
+#define item_size(n)   (sizeof_field(struct lbs_private, n))
 #define item_addr(n)   (offsetof(struct lbs_private, n))
 
 
index c386992abcdb870eb3fef637f627f4abab33de44..7cafcecd7b8565fbba414f9f567e98734940edc4 100644 (file)
@@ -36,11 +36,11 @@ struct mwifiex_cb {
 };
 
 /* size/addr for mwifiex_debug_info */
-#define item_size(n)           (FIELD_SIZEOF(struct mwifiex_debug_info, n))
+#define item_size(n)           (sizeof_field(struct mwifiex_debug_info, n))
 #define item_addr(n)           (offsetof(struct mwifiex_debug_info, n))
 
 /* size/addr for struct mwifiex_adapter */
-#define adapter_item_size(n)   (FIELD_SIZEOF(struct mwifiex_adapter, n))
+#define adapter_item_size(n)   (sizeof_field(struct mwifiex_adapter, n))
 #define adapter_item_addr(n)   (offsetof(struct mwifiex_adapter, n))
 
 struct mwifiex_debug_data {
index dfe37a525f3aff78433229932afa28854332eb90..667f18f465be1c6d35e52685f29095665efba00e 100644 (file)
@@ -1735,6 +1735,8 @@ static int nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
                if (ret)
                        dev_warn(ctrl->device,
                                 "Identify Descriptors failed (%d)\n", ret);
+               if (ret > 0)
+                       ret = 0;
        }
        return ret;
 }
@@ -2852,6 +2854,10 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
                 * admin connect
                 */
                if (ctrl->cntlid != le16_to_cpu(id->cntlid)) {
+                       dev_err(ctrl->device,
+                               "Mismatching cntlid: Connect %u vs Identify "
+                               "%u, rejecting\n",
+                               ctrl->cntlid, le16_to_cpu(id->cntlid));
                        ret = -EINVAL;
                        goto out_free;
                }
index 679a721ae229aaaf8432dc7206f4adbd3f305ec6..5a70ac395d53a0f724f3f29431c4c32afa235619 100644 (file)
@@ -95,7 +95,7 @@ struct nvme_fc_fcp_op {
 
 struct nvme_fcp_op_w_sgl {
        struct nvme_fc_fcp_op   op;
-       struct scatterlist      sgl[SG_CHUNK_SIZE];
+       struct scatterlist      sgl[NVME_INLINE_SG_CNT];
        uint8_t                 priv[0];
 };
 
@@ -342,7 +342,8 @@ nvme_fc_register_localport(struct nvme_fc_port_info *pinfo,
            !template->ls_req || !template->fcp_io ||
            !template->ls_abort || !template->fcp_abort ||
            !template->max_hw_queues || !template->max_sgl_segments ||
-           !template->max_dif_sgl_segments || !template->dma_boundary) {
+           !template->max_dif_sgl_segments || !template->dma_boundary ||
+           !template->module) {
                ret = -EINVAL;
                goto out_reghost_failed;
        }
@@ -2015,6 +2016,7 @@ nvme_fc_ctrl_free(struct kref *ref)
 {
        struct nvme_fc_ctrl *ctrl =
                container_of(ref, struct nvme_fc_ctrl, ref);
+       struct nvme_fc_lport *lport = ctrl->lport;
        unsigned long flags;
 
        if (ctrl->ctrl.tagset) {
@@ -2041,6 +2043,7 @@ nvme_fc_ctrl_free(struct kref *ref)
        if (ctrl->ctrl.opts)
                nvmf_free_options(ctrl->ctrl.opts);
        kfree(ctrl);
+       module_put(lport->ops->module);
 }
 
 static void
@@ -2141,7 +2144,7 @@ nvme_fc_map_data(struct nvme_fc_ctrl *ctrl, struct request *rq,
        freq->sg_table.sgl = freq->first_sgl;
        ret = sg_alloc_table_chained(&freq->sg_table,
                        blk_rq_nr_phys_segments(rq), freq->sg_table.sgl,
-                       SG_CHUNK_SIZE);
+                       NVME_INLINE_SG_CNT);
        if (ret)
                return -ENOMEM;
 
@@ -2150,7 +2153,7 @@ nvme_fc_map_data(struct nvme_fc_ctrl *ctrl, struct request *rq,
        freq->sg_cnt = fc_dma_map_sg(ctrl->lport->dev, freq->sg_table.sgl,
                                op->nents, rq_dma_dir(rq));
        if (unlikely(freq->sg_cnt <= 0)) {
-               sg_free_table_chained(&freq->sg_table, SG_CHUNK_SIZE);
+               sg_free_table_chained(&freq->sg_table, NVME_INLINE_SG_CNT);
                freq->sg_cnt = 0;
                return -EFAULT;
        }
@@ -2173,7 +2176,7 @@ nvme_fc_unmap_data(struct nvme_fc_ctrl *ctrl, struct request *rq,
        fc_dma_unmap_sg(ctrl->lport->dev, freq->sg_table.sgl, op->nents,
                        rq_dma_dir(rq));
 
-       sg_free_table_chained(&freq->sg_table, SG_CHUNK_SIZE);
+       sg_free_table_chained(&freq->sg_table, NVME_INLINE_SG_CNT);
 
        freq->sg_cnt = 0;
 }
@@ -2910,10 +2913,22 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)
 static void
 __nvme_fc_terminate_io(struct nvme_fc_ctrl *ctrl)
 {
-       nvme_stop_keep_alive(&ctrl->ctrl);
+       /*
+        * if state is connecting - the error occurred as part of a
+        * reconnect attempt. The create_association error paths will
+        * clean up any outstanding io.
+        *
+        * if it's a different state - ensure all pending io is
+        * terminated. Given this can delay while waiting for the
+        * aborted io to return, we recheck adapter state below
+        * before changing state.
+        */
+       if (ctrl->ctrl.state != NVME_CTRL_CONNECTING) {
+               nvme_stop_keep_alive(&ctrl->ctrl);
 
-       /* will block will waiting for io to terminate */
-       nvme_fc_delete_association(ctrl);
+               /* will block will waiting for io to terminate */
+               nvme_fc_delete_association(ctrl);
+       }
 
        if (ctrl->ctrl.state != NVME_CTRL_CONNECTING &&
            !nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING))
@@ -3059,10 +3074,15 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
                goto out_fail;
        }
 
+       if (!try_module_get(lport->ops->module)) {
+               ret = -EUNATCH;
+               goto out_free_ctrl;
+       }
+
        idx = ida_simple_get(&nvme_fc_ctrl_cnt, 0, 0, GFP_KERNEL);
        if (idx < 0) {
                ret = -ENOSPC;
-               goto out_free_ctrl;
+               goto out_mod_put;
        }
 
        ctrl->ctrl.opts = opts;
@@ -3215,6 +3235,8 @@ out_free_queues:
 out_free_ida:
        put_device(ctrl->dev);
        ida_simple_remove(&nvme_fc_ctrl_cnt, ctrl->cnum);
+out_mod_put:
+       module_put(lport->ops->module);
 out_free_ctrl:
        kfree(ctrl);
 out_fail:
index 3b9cbe0668fa488523f59aa0a12978c0c24fce18..1024fec7914c41b50d8e7087e39a5090131dd5e8 100644 (file)
@@ -28,6 +28,12 @@ extern unsigned int admin_timeout;
 #define NVME_DEFAULT_KATO      5
 #define NVME_KATO_GRACE                10
 
+#ifdef CONFIG_ARCH_NO_SG_CHAIN
+#define  NVME_INLINE_SG_CNT  0
+#else
+#define  NVME_INLINE_SG_CNT  2
+#endif
+
 extern struct workqueue_struct *nvme_wq;
 extern struct workqueue_struct *nvme_reset_wq;
 extern struct workqueue_struct *nvme_delete_wq;
index dcaad5831cee7aaef48758a332ae049d06ef9991..365a2ddbeaa762f84a51106163cc915e2c2919ef 100644 (file)
@@ -68,14 +68,14 @@ static int io_queue_depth = 1024;
 module_param_cb(io_queue_depth, &io_queue_depth_ops, &io_queue_depth, 0644);
 MODULE_PARM_DESC(io_queue_depth, "set io queue depth, should >= 2");
 
-static int write_queues;
-module_param(write_queues, int, 0644);
+static unsigned int write_queues;
+module_param(write_queues, uint, 0644);
 MODULE_PARM_DESC(write_queues,
        "Number of queues to use for writes. If not set, reads and writes "
        "will share a queue set.");
 
-static int poll_queues;
-module_param(poll_queues, int, 0644);
+static unsigned int poll_queues;
+module_param(poll_queues, uint, 0644);
 MODULE_PARM_DESC(poll_queues, "Number of queues to use for polled IO.");
 
 struct nvme_dev;
@@ -176,7 +176,6 @@ struct nvme_queue {
        u16 sq_tail;
        u16 last_sq_tail;
        u16 cq_head;
-       u16 last_cq_head;
        u16 qid;
        u8 cq_phase;
        u8 sqes;
@@ -1026,10 +1025,7 @@ static irqreturn_t nvme_irq(int irq, void *data)
         * the irq handler, even if that was on another CPU.
         */
        rmb();
-       if (nvmeq->cq_head != nvmeq->last_cq_head)
-               ret = IRQ_HANDLED;
        nvme_process_cq(nvmeq, &start, &end, -1);
-       nvmeq->last_cq_head = nvmeq->cq_head;
        wmb();
 
        if (start != end) {
@@ -1549,7 +1545,7 @@ static int nvme_create_queue(struct nvme_queue *nvmeq, int qid, bool polled)
        result = adapter_alloc_sq(dev, qid, nvmeq);
        if (result < 0)
                return result;
-       else if (result)
+       if (result)
                goto release_cq;
 
        nvmeq->cq_vector = vector;
@@ -2058,7 +2054,6 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues)
                .priv           = dev,
        };
        unsigned int irq_queues, this_p_queues;
-       unsigned int nr_cpus = num_possible_cpus();
 
        /*
         * Poll queues don't need interrupts, but we need at least one IO
@@ -2069,10 +2064,7 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues)
                this_p_queues = nr_io_queues - 1;
                irq_queues = 1;
        } else {
-               if (nr_cpus < nr_io_queues - this_p_queues)
-                       irq_queues = nr_cpus + 1;
-               else
-                       irq_queues = nr_io_queues - this_p_queues + 1;
+               irq_queues = nr_io_queues - this_p_queues + 1;
        }
        dev->io_queues[HCTX_TYPE_POLL] = this_p_queues;
 
@@ -3142,6 +3134,9 @@ static int __init nvme_init(void)
        BUILD_BUG_ON(sizeof(struct nvme_create_sq) != 64);
        BUILD_BUG_ON(sizeof(struct nvme_delete_queue) != 64);
        BUILD_BUG_ON(IRQ_AFFINITY_MAX_SETS < 2);
+
+       write_queues = min(write_queues, num_possible_cpus());
+       poll_queues = min(poll_queues, num_possible_cpus());
        return pci_register_driver(&nvme_driver);
 }
 
index dce59459ed41b9867b3645ae2688d62c57c1d52c..2a47c6c5007e1280a320f9776afe10005e23b98a 100644 (file)
@@ -731,7 +731,7 @@ static struct blk_mq_tag_set *nvme_rdma_alloc_tagset(struct nvme_ctrl *nctrl,
                set->reserved_tags = 2; /* connect + keep-alive */
                set->numa_node = nctrl->numa_node;
                set->cmd_size = sizeof(struct nvme_rdma_request) +
-                       SG_CHUNK_SIZE * sizeof(struct scatterlist);
+                       NVME_INLINE_SG_CNT * sizeof(struct scatterlist);
                set->driver_data = ctrl;
                set->nr_hw_queues = 1;
                set->timeout = ADMIN_TIMEOUT;
@@ -745,7 +745,7 @@ static struct blk_mq_tag_set *nvme_rdma_alloc_tagset(struct nvme_ctrl *nctrl,
                set->numa_node = nctrl->numa_node;
                set->flags = BLK_MQ_F_SHOULD_MERGE;
                set->cmd_size = sizeof(struct nvme_rdma_request) +
-                       SG_CHUNK_SIZE * sizeof(struct scatterlist);
+                       NVME_INLINE_SG_CNT * sizeof(struct scatterlist);
                set->driver_data = ctrl;
                set->nr_hw_queues = nctrl->queue_count - 1;
                set->timeout = NVME_IO_TIMEOUT;
@@ -1160,7 +1160,7 @@ static void nvme_rdma_unmap_data(struct nvme_rdma_queue *queue,
        }
 
        ib_dma_unmap_sg(ibdev, req->sg_table.sgl, req->nents, rq_dma_dir(rq));
-       sg_free_table_chained(&req->sg_table, SG_CHUNK_SIZE);
+       sg_free_table_chained(&req->sg_table, NVME_INLINE_SG_CNT);
 }
 
 static int nvme_rdma_set_sg_null(struct nvme_command *c)
@@ -1276,7 +1276,7 @@ static int nvme_rdma_map_data(struct nvme_rdma_queue *queue,
        req->sg_table.sgl = req->first_sgl;
        ret = sg_alloc_table_chained(&req->sg_table,
                        blk_rq_nr_phys_segments(rq), req->sg_table.sgl,
-                       SG_CHUNK_SIZE);
+                       NVME_INLINE_SG_CNT);
        if (ret)
                return -ENOMEM;
 
@@ -1314,7 +1314,7 @@ out:
 out_unmap_sg:
        ib_dma_unmap_sg(ibdev, req->sg_table.sgl, req->nents, rq_dma_dir(rq));
 out_free_table:
-       sg_free_table_chained(&req->sg_table, SG_CHUNK_SIZE);
+       sg_free_table_chained(&req->sg_table, NVME_INLINE_SG_CNT);
        return ret;
 }
 
index b50b53db37462499cafc46c40a0fe77f7a52095b..1c50af6219f321360b05b729a9f382842b6fb46b 100644 (file)
@@ -850,6 +850,7 @@ fcloop_targetport_delete(struct nvmet_fc_target_port *targetport)
 #define FCLOOP_DMABOUND_4G             0xFFFFFFFF
 
 static struct nvme_fc_port_template fctemplate = {
+       .module                 = THIS_MODULE,
        .localport_delete       = fcloop_localport_delete,
        .remoteport_delete      = fcloop_remoteport_delete,
        .create_queue           = fcloop_create_queue,
index a758bb3d5dd49fbfaee6e79001726a904b644261..4df4ebde208a0465dac1e975304fe4a6fd358c2f 100644 (file)
@@ -76,7 +76,7 @@ static void nvme_loop_complete_rq(struct request *req)
 {
        struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req);
 
-       sg_free_table_chained(&iod->sg_table, SG_CHUNK_SIZE);
+       sg_free_table_chained(&iod->sg_table, NVME_INLINE_SG_CNT);
        nvme_complete_rq(req);
 }
 
@@ -156,7 +156,7 @@ static blk_status_t nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx,
                iod->sg_table.sgl = iod->first_sgl;
                if (sg_alloc_table_chained(&iod->sg_table,
                                blk_rq_nr_phys_segments(req),
-                               iod->sg_table.sgl, SG_CHUNK_SIZE)) {
+                               iod->sg_table.sgl, NVME_INLINE_SG_CNT)) {
                        nvme_cleanup_cmd(req);
                        return BLK_STS_RESOURCE;
                }
@@ -342,7 +342,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl)
        ctrl->admin_tag_set.reserved_tags = 2; /* connect + keep-alive */
        ctrl->admin_tag_set.numa_node = NUMA_NO_NODE;
        ctrl->admin_tag_set.cmd_size = sizeof(struct nvme_loop_iod) +
-               SG_CHUNK_SIZE * sizeof(struct scatterlist);
+               NVME_INLINE_SG_CNT * sizeof(struct scatterlist);
        ctrl->admin_tag_set.driver_data = ctrl;
        ctrl->admin_tag_set.nr_hw_queues = 1;
        ctrl->admin_tag_set.timeout = ADMIN_TIMEOUT;
@@ -516,7 +516,7 @@ static int nvme_loop_create_io_queues(struct nvme_loop_ctrl *ctrl)
        ctrl->tag_set.numa_node = NUMA_NO_NODE;
        ctrl->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
        ctrl->tag_set.cmd_size = sizeof(struct nvme_loop_iod) +
-               SG_CHUNK_SIZE * sizeof(struct scatterlist);
+               NVME_INLINE_SG_CNT * sizeof(struct scatterlist);
        ctrl->tag_set.driver_data = ctrl;
        ctrl->tag_set.nr_hw_queues = ctrl->ctrl.queue_count - 1;
        ctrl->tag_set.timeout = NVME_IO_TIMEOUT;
index d93891a05f6033638916d7eda0a560110dcaf4ef..3371e4a0624838516a7ae6bbb62862fd17eed711 100644 (file)
@@ -518,10 +518,11 @@ static int __init of_platform_default_populate_init(void)
 {
        struct device_node *node;
 
+       device_links_supplier_sync_state_pause();
+
        if (!of_have_populated_dt())
                return -ENODEV;
 
-       device_links_supplier_sync_state_pause();
        /*
         * Handle certain compatibles explicitly, since we don't want to create
         * platform_devices for every node in /reserved-memory with a
@@ -545,8 +546,7 @@ arch_initcall_sync(of_platform_default_populate_init);
 
 static int __init of_platform_sync_state_init(void)
 {
-       if (of_have_populated_dt())
-               device_links_supplier_sync_state_resume();
+       device_links_supplier_sync_state_resume();
        return 0;
 }
 late_initcall_sync(of_platform_sync_state_init);
index d9b63bfa5dd786d74c3a14eb219f441f589050e0..94af6f5828a3dd2885b5f9ba6372d7637b8490bc 100644 (file)
@@ -834,10 +834,12 @@ static int rockchip_pcie_cfg_atu(struct rockchip_pcie *rockchip)
        if (!entry)
                return -ENODEV;
 
+       /* store the register number offset to program RC io outbound ATU */
+       offset = size >> 20;
+
        size = resource_size(entry->res);
        pci_addr = entry->res->start - entry->offset;
 
-       offset = size >> 20;
        for (reg_no = 0; reg_no < (size >> 20); reg_no++) {
                err = rockchip_pcie_prog_ob_atu(rockchip,
                                                reg_no + 1 + offset,
index b9a2349e4b909b5de8a15cc728178bec9a314224..33a62a6692c05be87b8450248c18a8c2db7eb4b4 100644 (file)
@@ -4779,7 +4779,7 @@ static int qeth_qdio_establish(struct qeth_card *card)
 
        QETH_CARD_TEXT(card, 2, "qdioest");
 
-       qib_param_field = kzalloc(FIELD_SIZEOF(struct qib, parm), GFP_KERNEL);
+       qib_param_field = kzalloc(sizeof_field(struct qib, parm), GFP_KERNEL);
        if (!qib_param_field) {
                rc =  -ENOMEM;
                goto out_free_nothing;
index 88f4dc140751c686c958519f0655e9b8e1f02e68..c1ecce95094d8dd4e4f2d5675941f121992424e7 100644 (file)
@@ -421,7 +421,7 @@ struct qeth_ipacmd_setassparms {
        } data;
 } __attribute__ ((packed));
 
-#define SETASS_DATA_SIZEOF(field) FIELD_SIZEOF(struct qeth_ipacmd_setassparms,\
+#define SETASS_DATA_SIZEOF(field) sizeof_field(struct qeth_ipacmd_setassparms,\
                                               data.field)
 
 /* SETRTG IPA Command:    ****************************************************/
@@ -535,7 +535,7 @@ struct qeth_ipacmd_setadpparms {
        } data;
 } __attribute__ ((packed));
 
-#define SETADP_DATA_SIZEOF(field) FIELD_SIZEOF(struct qeth_ipacmd_setadpparms,\
+#define SETADP_DATA_SIZEOF(field) sizeof_field(struct qeth_ipacmd_setadpparms,\
                                               data.field)
 
 /* CREATE_ADDR IPA Command:    ***********************************************/
@@ -648,7 +648,7 @@ struct qeth_ipacmd_vnicc {
        } data;
 };
 
-#define VNICC_DATA_SIZEOF(field)       FIELD_SIZEOF(struct qeth_ipacmd_vnicc,\
+#define VNICC_DATA_SIZEOF(field)       sizeof_field(struct qeth_ipacmd_vnicc,\
                                                     data.field)
 
 /* SETBRIDGEPORT IPA Command:   *********************************************/
@@ -729,7 +729,7 @@ struct qeth_ipacmd_setbridgeport {
        } data;
 } __packed;
 
-#define SBP_DATA_SIZEOF(field) FIELD_SIZEOF(struct qeth_ipacmd_setbridgeport,\
+#define SBP_DATA_SIZEOF(field) sizeof_field(struct qeth_ipacmd_setbridgeport,\
                                             data.field)
 
 /* ADDRESS_CHANGE_NOTIFICATION adapter-initiated "command" *******************/
@@ -790,7 +790,7 @@ struct qeth_ipa_cmd {
        } data;
 } __attribute__ ((packed));
 
-#define IPA_DATA_SIZEOF(field) FIELD_SIZEOF(struct qeth_ipa_cmd, data.field)
+#define IPA_DATA_SIZEOF(field) sizeof_field(struct qeth_ipa_cmd, data.field)
 
 /*
  * special command for ARP processing.
index e36608ce937ab67a2481e6a3616031eb28d6e671..33dbc051bff97f3525f5e9e736f9e2ac7bc3639e 100644 (file)
@@ -535,7 +535,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
        if ((le32_to_cpu(get_name_reply->status) == CT_OK)
         && (get_name_reply->data[0] != '\0')) {
                char *sp = get_name_reply->data;
-               int data_size = FIELD_SIZEOF(struct aac_get_name_resp, data);
+               int data_size = sizeof_field(struct aac_get_name_resp, data);
 
                sp[data_size - 1] = '\0';
                while (*sp == ' ')
@@ -574,7 +574,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd)
 
        dev = (struct aac_dev *)scsicmd->device->host->hostdata;
 
-       data_size = FIELD_SIZEOF(struct aac_get_name_resp, data);
+       data_size = sizeof_field(struct aac_get_name_resp, data);
 
        cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
 
index 063dccc18f70a04ff362a276087637cbcb0c5c76..5f9f0b18ddf372365c0df1b2916d408f8755e836 100644 (file)
@@ -1300,7 +1300,7 @@ struct be_cmd_get_port_name {
 
 /* Returns the number of items in the field array. */
 #define BE_NUMBER_OF_FIELD(_type_, _field_)    \
-       (FIELD_SIZEOF(_type_, _field_)/sizeof((((_type_ *)0)->_field_[0])))\
+       (sizeof_field(_type_, _field_)/sizeof((((_type_ *)0)->_field_[0])))\
 
 /**
  * Different types of iSCSI completions to host driver for both initiator
index 0d044c1659609e6b39abfdb2fb9958428317f414..c4e4b0136f86e7d86e784c831af1106af846d615 100644 (file)
@@ -2746,7 +2746,7 @@ static int __init libcxgbi_init_module(void)
 {
        pr_info("%s", version);
 
-       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, cb) <
+       BUILD_BUG_ON(sizeof_field(struct sk_buff, cb) <
                     sizeof(struct cxgbi_skb_cb));
        return 0;
 }
index ebd47c0cf9e93fd6a9b21a05e3bde6e82f6b8d73..70b99c0e2e678c4767af956704504ef39fb2276e 100644 (file)
@@ -1945,7 +1945,7 @@ enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc)
 
        ISCSI_DBG_EH(session, "scsi cmd %p timedout\n", sc);
 
-       spin_lock(&session->frwd_lock);
+       spin_lock_bh(&session->frwd_lock);
        task = (struct iscsi_task *)sc->SCp.ptr;
        if (!task) {
                /*
@@ -2072,7 +2072,7 @@ enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc)
 done:
        if (task)
                task->last_timeout = jiffies;
-       spin_unlock(&session->frwd_lock);
+       spin_unlock_bh(&session->frwd_lock);
        ISCSI_DBG_EH(session, "return %s\n", rc == BLK_EH_RESET_TIMER ?
                     "timer reset" : "shutdown or nh");
        return rc;
index f47b4b281b14ab5ed05973faf00c2aa09ec5b7c0..d7302c2052f916f74c909a3f35941e5e79b3c68e 100644 (file)
@@ -81,12 +81,21 @@ static int sas_get_port_device(struct asd_sas_port *port)
                else
                        dev->dev_type = SAS_SATA_DEV;
                dev->tproto = SAS_PROTOCOL_SATA;
-       } else {
+       } else if (port->oob_mode == SAS_OOB_MODE) {
                struct sas_identify_frame *id =
                        (struct sas_identify_frame *) dev->frame_rcvd;
                dev->dev_type = id->dev_type;
                dev->iproto = id->initiator_bits;
                dev->tproto = id->target_bits;
+       } else {
+               /* If the oob mode is OOB_NOT_CONNECTED, the port is
+                * disconnected due to race with PHY down. We cannot
+                * continue to discover this port
+                */
+               sas_put_device(dev);
+               pr_warn("Port %016llx is disconnected when discovering\n",
+                       SAS_ADDR(port->attached_sas_addr));
+               return -ENODEV;
        }
 
        sas_init_dev(dev);
index d4e1b120cc9ece1a6e4dcf265cd6ca56f812dd1d..0ea03ae93d91d7bcedb7870be83d711217b9a082 100644 (file)
@@ -4489,12 +4489,6 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
        phba->mbox_ext_buf_ctx.seqNum++;
        nemb_tp = phba->mbox_ext_buf_ctx.nembType;
 
-       dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
-       if (!dd_data) {
-               rc = -ENOMEM;
-               goto job_error;
-       }
-
        pbuf = (uint8_t *)dmabuf->virt;
        size = job->request_payload.payload_len;
        sg_copy_to_buffer(job->request_payload.sg_list,
@@ -4531,6 +4525,13 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
                                "2968 SLI_CONFIG ext-buffer wr all %d "
                                "ebuffers received\n",
                                phba->mbox_ext_buf_ctx.numBuf);
+
+               dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
+               if (!dd_data) {
+                       rc = -ENOMEM;
+                       goto job_error;
+               }
+
                /* mailbox command structure for base driver */
                pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
                if (!pmboxq) {
@@ -4579,6 +4580,8 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
        return SLI_CONFIG_HANDLED;
 
 job_error:
+       if (pmboxq)
+               mempool_free(pmboxq, phba->mbox_mem_pool);
        lpfc_bsg_dma_page_free(phba, dmabuf);
        kfree(dd_data);
 
index db4a04a207ecee98a15e702f18cc20d59d52bcfd..f6c8963c915d4aeda456299cddc62d4f7b03c811 100644 (file)
@@ -1985,6 +1985,8 @@ out_unlock:
 
 /* Declare and initialization an instance of the FC NVME template. */
 static struct nvme_fc_port_template lpfc_nvme_template = {
+       .module = THIS_MODULE,
+
        /* initiator-based functions */
        .localport_delete  = lpfc_nvme_localport_delete,
        .remoteport_delete = lpfc_nvme_remoteport_delete,
index ae97e2f310a36bbb0802160b7db8af9f1b4b3b5b..d7e7043f9eab283c69ed417da79a28ff5e5f50c0 100644 (file)
@@ -178,6 +178,7 @@ qla2x00_sysfs_read_nvram(struct file *filp, struct kobject *kobj,
 
        faddr = ha->flt_region_nvram;
        if (IS_QLA28XX(ha)) {
+               qla28xx_get_aux_images(vha, &active_regions);
                if (active_regions.aux.vpd_nvram == QLA27XX_SECONDARY_IMAGE)
                        faddr = ha->flt_region_nvram_sec;
        }
index 99f0a1a08143e0864e0ba69718945fe538ffd447..cbaf178fc9796a976b1a008afe6c0a5f1c73062e 100644 (file)
@@ -2399,7 +2399,7 @@ qla2x00_get_flash_image_status(struct bsg_job *bsg_job)
        struct qla_active_regions regions = { };
        struct active_regions active_regions = { };
 
-       qla28xx_get_aux_images(vha, &active_regions);
+       qla27xx_get_active_image(vha, &active_regions);
        regions.global_image = active_regions.global;
 
        if (IS_QLA28XX(ha)) {
index 460f443f64716852cff956f7fca3d87431ea2d4a..2edd9f7b30742e990a879d1a6e6705a1e7eecabf 100644 (file)
@@ -2401,6 +2401,7 @@ typedef struct fc_port {
        unsigned int id_changed:1;
        unsigned int scan_needed:1;
        unsigned int n2n_flag:1;
+       unsigned int explicit_logout:1;
 
        struct completion nvme_del_done;
        uint32_t nvme_prli_service_param;
index 59f6903e5abe3188aadc0f1eaed1d64ac3cd41e7..9dc09c1174169b6b5f5666dbaee9b62f76fcf627 100644 (file)
@@ -1523,6 +1523,10 @@ struct qla_flt_header {
 #define FLT_REG_NVRAM_SEC_28XX_1       0x10F
 #define FLT_REG_NVRAM_SEC_28XX_2       0x111
 #define FLT_REG_NVRAM_SEC_28XX_3       0x113
+#define FLT_REG_MPI_PRI_28XX           0xD3
+#define FLT_REG_MPI_SEC_28XX           0xF0
+#define FLT_REG_PEP_PRI_28XX           0xD1
+#define FLT_REG_PEP_SEC_28XX           0xF1
 
 struct qla_flt_region {
        uint16_t code;
index 6c28f38f8021a7f0ef8adde275866155e1e30738..aa5204163becadc2e88133779eefaafde4e79103 100644 (file)
@@ -533,6 +533,7 @@ static int qla_post_els_plogi_work(struct scsi_qla_host *vha, fc_port_t *fcport)
 
        e->u.fcport.fcport = fcport;
        fcport->flags |= FCF_ASYNC_ACTIVE;
+       fcport->disc_state = DSC_LOGIN_PEND;
        return qla2x00_post_work(vha, e);
 }
 
@@ -1526,8 +1527,8 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
                }
        }
 
-       /* for pure Target Mode. Login will not be initiated */
-       if (vha->host->active_mode == MODE_TARGET)
+       /* Target won't initiate port login if fabric is present */
+       if (vha->host->active_mode == MODE_TARGET && !N2N_TOPO(vha->hw))
                return 0;
 
        if (fcport->flags & FCF_ASYNC_SENT) {
@@ -1719,6 +1720,10 @@ void qla24xx_handle_relogin_event(scsi_qla_host_t *vha,
 void qla_handle_els_plogi_done(scsi_qla_host_t *vha,
                                      struct event_arg *ea)
 {
+       /* for pure Target Mode, PRLI will not be initiated */
+       if (vha->host->active_mode == MODE_TARGET)
+               return;
+
        ql_dbg(ql_dbg_disc, vha, 0x2118,
            "%s %d %8phC post PRLI\n",
            __func__, __LINE__, ea->fcport->port_name);
@@ -4852,6 +4857,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
        }
 
        INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn);
+       INIT_WORK(&fcport->free_work, qlt_free_session_done);
        INIT_WORK(&fcport->reg_work, qla_register_fcport_fn);
        INIT_LIST_HEAD(&fcport->gnl_entry);
        INIT_LIST_HEAD(&fcport->list);
@@ -4930,14 +4936,8 @@ qla2x00_configure_loop(scsi_qla_host_t *vha)
                set_bit(RSCN_UPDATE, &flags);
                clear_bit(LOCAL_LOOP_UPDATE, &flags);
 
-       } else if (ha->current_topology == ISP_CFG_N) {
-               clear_bit(RSCN_UPDATE, &flags);
-               if (qla_tgt_mode_enabled(vha)) {
-                       /* allow the other side to start the login */
-                       clear_bit(LOCAL_LOOP_UPDATE, &flags);
-                       set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
-               }
-       } else if (ha->current_topology == ISP_CFG_NL) {
+       } else if (ha->current_topology == ISP_CFG_NL ||
+                  ha->current_topology == ISP_CFG_N) {
                clear_bit(RSCN_UPDATE, &flags);
                set_bit(LOCAL_LOOP_UPDATE, &flags);
        } else if (!vha->flags.online ||
@@ -5054,7 +5054,6 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha)
                                memcpy(&ha->plogi_els_payld.data,
                                    (void *)ha->init_cb,
                                    sizeof(ha->plogi_els_payld.data));
-                               set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
                        } else {
                                ql_dbg(ql_dbg_init, vha, 0x00d1,
                                    "PLOGI ELS param read fail.\n");
index b25f87ff8cdee65e9739a65c5e7f4a26d2526049..8b050f0b43330543f365a4f8e83eb2ae67342813 100644 (file)
@@ -2405,11 +2405,19 @@ qla2x00_login_iocb(srb_t *sp, struct mbx_entry *mbx)
 static void
 qla24xx_logout_iocb(srb_t *sp, struct logio_entry_24xx *logio)
 {
+       u16 control_flags = LCF_COMMAND_LOGO;
        logio->entry_type = LOGINOUT_PORT_IOCB_TYPE;
-       logio->control_flags =
-           cpu_to_le16(LCF_COMMAND_LOGO|LCF_IMPL_LOGO);
-       if (!sp->fcport->keep_nport_handle)
-               logio->control_flags |= cpu_to_le16(LCF_FREE_NPORT);
+
+       if (sp->fcport->explicit_logout) {
+               control_flags |= LCF_EXPL_LOGO|LCF_FREE_NPORT;
+       } else {
+               control_flags |= LCF_IMPL_LOGO;
+
+               if (!sp->fcport->keep_nport_handle)
+                       control_flags |= LCF_FREE_NPORT;
+       }
+
+       logio->control_flags = cpu_to_le16(control_flags);
        logio->nport_handle = cpu_to_le16(sp->fcport->loop_id);
        logio->port_id[0] = sp->fcport->d_id.b.al_pa;
        logio->port_id[1] = sp->fcport->d_id.b.area;
@@ -2617,6 +2625,10 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
 
        memcpy(elsio->u.els_logo.els_logo_pyld, &logo_pyld,
            sizeof(struct els_logo_payload));
+       ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3075, "LOGO buffer:");
+       ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x010a,
+                      elsio->u.els_logo.els_logo_pyld,
+                      sizeof(*elsio->u.els_logo.els_logo_pyld));
 
        rval = qla2x00_start_sp(sp);
        if (rval != QLA_SUCCESS) {
@@ -2676,7 +2688,8 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
                ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3073,
                    "PLOGI ELS IOCB:\n");
                ql_dump_buffer(ql_log_info, vha, 0x0109,
-                   (uint8_t *)els_iocb, 0x70);
+                   (uint8_t *)els_iocb,
+                   sizeof(*els_iocb));
        } else {
                els_iocb->control_flags = 1 << 13;
                els_iocb->tx_byte_count =
@@ -2688,6 +2701,11 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
                els_iocb->rx_byte_count = 0;
                els_iocb->rx_address = 0;
                els_iocb->rx_len = 0;
+               ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3076,
+                      "LOGO ELS IOCB:");
+               ql_dump_buffer(ql_log_info, vha, 0x010b,
+                              els_iocb,
+                              sizeof(*els_iocb));
        }
 
        sp->vha->qla_stats.control_requests++;
@@ -2934,7 +2952,8 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
 
        ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3073, "PLOGI buffer:\n");
        ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x0109,
-           (uint8_t *)elsio->u.els_plogi.els_plogi_pyld, 0x70);
+           (uint8_t *)elsio->u.els_plogi.els_plogi_pyld,
+           sizeof(*elsio->u.els_plogi.els_plogi_pyld));
 
        rval = qla2x00_start_sp(sp);
        if (rval != QLA_SUCCESS) {
index 2601d7673c37dd9070d5b94018ab9a14054ac94c..7b8a6bfcf08d97c1cc1421cd67eb53dfbd8ea9c9 100644 (file)
@@ -1061,8 +1061,6 @@ global_port_update:
                        ql_dbg(ql_dbg_async, vha, 0x5011,
                            "Asynchronous PORT UPDATE ignored %04x/%04x/%04x.\n",
                            mb[1], mb[2], mb[3]);
-
-                       qlt_async_event(mb[0], vha, mb);
                        break;
                }
 
@@ -1079,8 +1077,6 @@ global_port_update:
                set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
                set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
                set_bit(VP_CONFIG_OK, &vha->vp_flags);
-
-               qlt_async_event(mb[0], vha, mb);
                break;
 
        case MBA_RSCN_UPDATE:           /* State Change Registration */
index 0cf94f05f0080623ec396ace7932fdc27efee40e..b7c1108c48e208f2e634309acd84d46b182bd7e3 100644 (file)
@@ -3921,6 +3921,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
                                        vha->d_id.b24 = 0;
                                        vha->d_id.b.al_pa = 1;
                                        ha->flags.n2n_bigger = 1;
+                                       ha->flags.n2n_ae = 0;
 
                                        id.b.al_pa = 2;
                                        ql_dbg(ql_dbg_async, vha, 0x5075,
@@ -3931,6 +3932,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
                                            "Format 1: Remote login - Waiting for WWPN %8phC.\n",
                                            rptid_entry->u.f1.port_name);
                                        ha->flags.n2n_bigger = 0;
+                                       ha->flags.n2n_ae = 1;
                                }
                                qla24xx_post_newsess_work(vha, &id,
                                    rptid_entry->u.f1.port_name,
@@ -3942,7 +3944,6 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
                        /* if our portname is higher then initiate N2N login */
 
                        set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags);
-                       ha->flags.n2n_ae = 1;
                        return;
                        break;
                case TOPO_FL:
index 941aa53363f564a23a15cc306abff534283659ee..bfcd02fdf2b8915df121562303e0b9358b836f89 100644 (file)
@@ -610,6 +610,7 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
 }
 
 static struct nvme_fc_port_template qla_nvme_fc_transport = {
+       .module = THIS_MODULE,
        .localport_delete = qla_nvme_localport_delete,
        .remoteport_delete = qla_nvme_remoteport_delete,
        .create_queue   = qla_nvme_alloc_queue,
index f2d5115b2d8d19c47aa41b23aee0fd491e5b81c0..bbe90354f49b09488fa2a3b126f1941694fbe7b1 100644 (file)
@@ -847,15 +847,15 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr)
                                ha->flt_region_img_status_pri = start;
                        break;
                case FLT_REG_IMG_SEC_27XX:
-                       if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
+                       if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
                                ha->flt_region_img_status_sec = start;
                        break;
                case FLT_REG_FW_SEC_27XX:
-                       if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
+                       if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
                                ha->flt_region_fw_sec = start;
                        break;
                case FLT_REG_BOOTLOAD_SEC_27XX:
-                       if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
+                       if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
                                ha->flt_region_boot_sec = start;
                        break;
                case FLT_REG_AUX_IMG_PRI_28XX:
@@ -2725,8 +2725,11 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
                ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
                    "Region %x is secure\n", region.code);
 
-               if (region.code == FLT_REG_FW ||
-                   region.code == FLT_REG_FW_SEC_27XX) {
+               switch (region.code) {
+               case FLT_REG_FW:
+               case FLT_REG_FW_SEC_27XX:
+               case FLT_REG_MPI_PRI_28XX:
+               case FLT_REG_MPI_SEC_28XX:
                        fw_array = dwptr;
 
                        /* 1st fw array */
@@ -2757,9 +2760,23 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
                                buf_size_without_sfub += risc_size;
                                fw_array += risc_size;
                        }
-               } else {
-                       ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
-                           "Secure region %x not supported\n",
+                       break;
+
+               case FLT_REG_PEP_PRI_28XX:
+               case FLT_REG_PEP_SEC_28XX:
+                       fw_array = dwptr;
+
+                       /* 1st fw array */
+                       risc_size = be32_to_cpu(fw_array[3]);
+                       risc_attr = be32_to_cpu(fw_array[9]);
+
+                       buf_size_without_sfub = risc_size;
+                       fw_array += risc_size;
+                       break;
+
+               default:
+                       ql_log(ql_log_warn + ql_dbg_verbose, vha,
+                           0xffff, "Secure region %x not supported\n",
                            region.code);
                        rval = QLA_COMMAND_ERROR;
                        goto done;
@@ -2880,7 +2897,7 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
                            "Sending Secure Flash MB Cmd\n");
                        rval = qla28xx_secure_flash_update(vha, 0, region.code,
                                buf_size_without_sfub, sfub_dma,
-                               sizeof(struct secure_flash_update_block));
+                               sizeof(struct secure_flash_update_block) >> 2);
                        if (rval != QLA_SUCCESS) {
                                ql_log(ql_log_warn, vha, 0xffff,
                                    "Secure Flash MB Cmd failed %x.", rval);
index 51b275a575a52b37ecd0659c88e763bfaf0de2c9..68c14143e50e4884f4057ad6071b662d9bd38378 100644 (file)
@@ -1104,6 +1104,7 @@ void qlt_free_session_done(struct work_struct *work)
                }
        }
 
+       sess->explicit_logout = 0;
        spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
        sess->free_pending = 0;
 
@@ -1160,7 +1161,6 @@ void qlt_unreg_sess(struct fc_port *sess)
        sess->last_rscn_gen = sess->rscn_gen;
        sess->last_login_gen = sess->login_gen;
 
-       INIT_WORK(&sess->free_work, qlt_free_session_done);
        queue_work(sess->vha->hw->wq, &sess->free_work);
 }
 EXPORT_SYMBOL(qlt_unreg_sess);
@@ -1265,7 +1265,6 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess)
            "Scheduling sess %p for deletion %8phC\n",
            sess, sess->port_name);
 
-       INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn);
        WARN_ON(!queue_work(sess->vha->hw->wq, &sess->del_work));
 }
 
@@ -4804,6 +4803,7 @@ static int qlt_handle_login(struct scsi_qla_host *vha,
 
        switch (sess->disc_state) {
        case DSC_DELETED:
+       case DSC_LOGIN_PEND:
                qlt_plogi_ack_unref(vha, pla);
                break;
 
index 042a24314edcfd476f11183cf0cfe05ebd8712c3..abe7f79bb78954b2eb5005e20821ebf3e0efe880 100644 (file)
@@ -246,6 +246,8 @@ static void tcm_qla2xxx_complete_mcmd(struct work_struct *work)
  */
 static void tcm_qla2xxx_free_mcmd(struct qla_tgt_mgmt_cmd *mcmd)
 {
+       if (!mcmd)
+               return;
        INIT_WORK(&mcmd->free_work, tcm_qla2xxx_complete_mcmd);
        queue_work(tcm_qla2xxx_free_wq, &mcmd->free_work);
 }
@@ -348,6 +350,7 @@ static void tcm_qla2xxx_close_session(struct se_session *se_sess)
        target_sess_cmd_list_set_waiting(se_sess);
        spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
 
+       sess->explicit_logout = 1;
        tcm_qla2xxx_put_sess(sess);
 }
 
index 8c674eca09f1368ef70618e12b1a4f9001d2602b..2323432a0edbcd07345235263a9bf8a610817b97 100644 (file)
@@ -4275,7 +4275,6 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha)
        return QLA_SUCCESS;
 
 mem_alloc_error_exit:
-       qla4xxx_mem_free(ha);
        return QLA_ERROR;
 }
 
index 417b868d8735eab8cf1a6dabb669cf0a0fc875a9..ed8d9709b9b96ef4c70feb530bc346c50052bef6 100644 (file)
@@ -24,6 +24,8 @@
 
 #define ISCSI_TRANSPORT_VERSION "2.0-870"
 
+#define ISCSI_SEND_MAX_ALLOWED  10
+
 #define CREATE_TRACE_POINTS
 #include <trace/events/iscsi.h>
 
@@ -3682,6 +3684,7 @@ iscsi_if_rx(struct sk_buff *skb)
                struct nlmsghdr *nlh;
                struct iscsi_uevent *ev;
                uint32_t group;
+               int retries = ISCSI_SEND_MAX_ALLOWED;
 
                nlh = nlmsg_hdr(skb);
                if (nlh->nlmsg_len < sizeof(*nlh) + sizeof(*ev) ||
@@ -3712,6 +3715,10 @@ iscsi_if_rx(struct sk_buff *skb)
                                break;
                        err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
                                                  ev, sizeof(*ev));
+                       if (err == -EAGAIN && --retries < 0) {
+                               printk(KERN_WARNING "Send reply failed, error %d\n", err);
+                               break;
+                       }
                } while (err < 0 && err != -ECONNREFUSED && err != -ESRCH);
                skb_pull(skb, rlen);
        }
index 7b7ef3acb504c06c95849212c5879a7931ffecee..412ac56ecd6025e79cb5b57cc07fed649091b5a9 100644 (file)
@@ -8689,11 +8689,11 @@ static void __attribute__((unused)) verify_structures(void)
        BUILD_BUG_ON(offsetof(struct pqi_general_admin_request,
                data.delete_operational_queue.queue_id) != 12);
        BUILD_BUG_ON(sizeof(struct pqi_general_admin_request) != 64);
-       BUILD_BUG_ON(FIELD_SIZEOF(struct pqi_general_admin_request,
+       BUILD_BUG_ON(sizeof_field(struct pqi_general_admin_request,
                data.create_operational_iq) != 64 - 11);
-       BUILD_BUG_ON(FIELD_SIZEOF(struct pqi_general_admin_request,
+       BUILD_BUG_ON(sizeof_field(struct pqi_general_admin_request,
                data.create_operational_oq) != 64 - 11);
-       BUILD_BUG_ON(FIELD_SIZEOF(struct pqi_general_admin_request,
+       BUILD_BUG_ON(sizeof_field(struct pqi_general_admin_request,
                data.delete_operational_queue) != 64 - 11);
 
        BUILD_BUG_ON(offsetof(struct pqi_general_admin_response,
index b2af04c57a39b3f7675b83de97ea54196dde0fab..6feeb0faf123af11818f9a84207102d67d12e2bb 100644 (file)
@@ -99,6 +99,12 @@ static int cdns_ufs_link_startup_notify(struct ufs_hba *hba,
         */
        ufshcd_dme_set(hba, UIC_ARG_MIB(PA_LOCAL_TX_LCC_ENABLE), 0);
 
+       /*
+        * Disabling Autohibern8 feature in cadence UFS
+        * to mask unexpected interrupt trigger.
+        */
+       hba->ahit = 0;
+
        return 0;
 }
 
index baeecee35d1e1229646ae0199d3d37fc023ae1b6..53dd87628cbe4a26997ceaf725ad90dff93418f9 100644 (file)
@@ -203,7 +203,7 @@ int ufs_bsg_probe(struct ufs_hba *hba)
        bsg_dev->parent = get_device(parent);
        bsg_dev->release = ufs_bsg_node_release;
 
-       dev_set_name(bsg_dev, "ufs-bsg");
+       dev_set_name(bsg_dev, "ufs-bsg%u", shost->host_no);
 
        ret = device_add(bsg_dev);
        if (ret)
index 2aac1e000977ef5e673e7d310ac2c0cbaae6e7a9..51c665a924b76cfb9b306af51b4dabe5a933d0d7 100644 (file)
@@ -805,8 +805,8 @@ s32 create_dir(struct inode *inode, struct chain_t *p_dir,
 s32 create_file(struct inode *inode, struct chain_t *p_dir,
                struct uni_name_t *p_uniname, u8 mode, struct file_id_t *fid);
 void remove_file(struct inode *inode, struct chain_t *p_dir, s32 entry);
-s32 rename_file(struct inode *inode, struct chain_t *p_dir, s32 old_entry,
-               struct uni_name_t *p_uniname, struct file_id_t *fid);
+s32 exfat_rename_file(struct inode *inode, struct chain_t *p_dir, s32 old_entry,
+                     struct uni_name_t *p_uniname, struct file_id_t *fid);
 s32 move_file(struct inode *inode, struct chain_t *p_olddir, s32 oldentry,
              struct chain_t *p_newdir, struct uni_name_t *p_uniname,
              struct file_id_t *fid);
index d2d3447083c7bd353a4d030574b31b72d8ce6309..794000e7bc6fae09ec157af540f34a6fc0ff9070 100644 (file)
@@ -192,8 +192,6 @@ static s32 clr_alloc_bitmap(struct super_block *sb, u32 clu)
 
        exfat_bitmap_clear((u8 *)p_fs->vol_amap[i]->b_data, b);
 
-       return sector_write(sb, sector, p_fs->vol_amap[i], 0);
-
 #ifdef CONFIG_EXFAT_DISCARD
        if (opts->discard) {
                ret = sb_issue_discard(sb, START_SECTOR(clu),
@@ -202,9 +200,13 @@ static s32 clr_alloc_bitmap(struct super_block *sb, u32 clu)
                if (ret == -EOPNOTSUPP) {
                        pr_warn("discard not supported by device, disabling");
                        opts->discard = 0;
+               } else {
+                       return ret;
                }
        }
 #endif /* CONFIG_EXFAT_DISCARD */
+
+       return sector_write(sb, sector, p_fs->vol_amap[i], 0);
 }
 
 static u32 test_alloc_bitmap(struct super_block *sb, u32 clu)
@@ -2322,8 +2324,8 @@ void remove_file(struct inode *inode, struct chain_t *p_dir, s32 entry)
        fs_func->delete_dir_entry(sb, p_dir, entry, 0, num_entries);
 }
 
-s32 rename_file(struct inode *inode, struct chain_t *p_dir, s32 oldentry,
-               struct uni_name_t *p_uniname, struct file_id_t *fid)
+s32 exfat_rename_file(struct inode *inode, struct chain_t *p_dir, s32 oldentry,
+                     struct uni_name_t *p_uniname, struct file_id_t *fid)
 {
        s32 ret, newentry = -1, num_old_entries, num_new_entries;
        sector_t sector_old, sector_new;
index 6e481908c59f642645824df070eb3efc7266f3dd..9f91853b189b01ee71143b1932ac1424bce6a15d 100644 (file)
@@ -1262,8 +1262,8 @@ static int ffsMoveFile(struct inode *old_parent_inode, struct file_id_t *fid,
        fs_set_vol_flags(sb, VOL_DIRTY);
 
        if (olddir.dir == newdir.dir)
-               ret = rename_file(new_parent_inode, &olddir, dentry, &uni_name,
-                                 fid);
+               ret = exfat_rename_file(new_parent_inode, &olddir, dentry,
+                                       &uni_name, fid);
        else
                ret = move_file(new_parent_inode, &olddir, dentry, &newdir,
                                &uni_name, fid);
index e763205e9e4ff5252a37610a84faffb7404a08f3..f61e373c75e9660897e7f1557bd1ed46353f6655 100644 (file)
@@ -63,11 +63,17 @@ static int init_display(struct fbtft_par *par)
 {
        int ret;
 
-       /* Set CS active high */
-       par->spi->mode |= SPI_CS_HIGH;
+       /*
+        * Set CS active inverse polarity: just setting SPI_CS_HIGH does not
+        * work with GPIO based chip selects that are logically active high
+        * but inverted inside the GPIO library, so enforce inverted
+        * semantics.
+        */
+       par->spi->mode ^= SPI_CS_HIGH;
        ret = spi_setup(par->spi);
        if (ret) {
-               dev_err(par->info->device, "Could not set SPI_CS_HIGH\n");
+               dev_err(par->info->device,
+                       "Could not set inverse CS polarity\n");
                return ret;
        }
 
index 27cc8eabcbe9dc598561087e9d9555d0098b31a8..76b25df376b8f0f5a696e188652da0d57abffae6 100644 (file)
@@ -150,10 +150,17 @@ static int init_display(struct fbtft_par *par)
 
        /* enable SPI interface by having CS and MOSI low during reset */
        save_mode = par->spi->mode;
-       par->spi->mode |= SPI_CS_HIGH;
-       ret = spi_setup(par->spi); /* set CS inactive low */
+       /*
+        * Set CS active inverse polarity: just setting SPI_CS_HIGH does not
+        * work with GPIO based chip selects that are logically active high
+        * but inverted inside the GPIO library, so enforce inverted
+        * semantics.
+        */
+       par->spi->mode ^= SPI_CS_HIGH;
+       ret = spi_setup(par->spi);
        if (ret) {
-               dev_err(par->info->device, "Could not set SPI_CS_HIGH\n");
+               dev_err(par->info->device,
+                       "Could not set inverse CS polarity\n");
                return ret;
        }
        write_reg(par, 0x00); /* make sure mode is set */
index ffb84987dd867fb5030ec56bf2cfc261bb7d605f..d3e098b41b1a4698878950299a4cf2273798f42a 100644 (file)
@@ -913,7 +913,7 @@ static int fbtft_init_display_from_property(struct fbtft_par *par)
        if (count == 0)
                return -EINVAL;
 
-       values = kmalloc_array(count, sizeof(*values), GFP_KERNEL);
+       values = kmalloc_array(count + 1, sizeof(*values), GFP_KERNEL);
        if (!values)
                return -ENOMEM;
 
@@ -926,9 +926,9 @@ static int fbtft_init_display_from_property(struct fbtft_par *par)
                gpiod_set_value(par->gpio.cs, 0);  /* Activate chip */
 
        index = -1;
-       while (index < count) {
-               val = values[++index];
+       val = values[++index];
 
+       while (index < count) {
                if (val & FBTFT_OF_INIT_CMD) {
                        val &= 0xFFFF;
                        i = 0;
index fb395cfe6b92792fbe7e02e4009fb1e8111dea2f..f20ab21a6b2ad9ccffe57c06ce28122d7efa741f 100644 (file)
@@ -6,6 +6,7 @@
 config NET_VENDOR_HP
        bool "HP devices"
        default y
+       depends on ETHERNET
        depends on ISA || EISA || PCI
        ---help---
          If you have a network (Ethernet) card belonging to this class, say Y.
index 1b9b43659bdf4159ab12af55d6a9a5b96b2b6087..a20c0bfa68f387dc69a48fe8732eebabc0d4a5be 100644 (file)
@@ -571,8 +571,7 @@ static int gigaset_initcshw(struct cardstate *cs)
 {
        struct usb_cardstate *ucs;
 
-       cs->hw.usb = ucs =
-               kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL);
+       cs->hw.usb = ucs = kzalloc(sizeof(struct usb_cardstate), GFP_KERNEL);
        if (!ucs) {
                pr_err("out of memory\n");
                return -ENOMEM;
@@ -584,9 +583,6 @@ static int gigaset_initcshw(struct cardstate *cs)
        ucs->bchars[3] = 0;
        ucs->bchars[4] = 0x11;
        ucs->bchars[5] = 0x13;
-       ucs->bulk_out_buffer = NULL;
-       ucs->bulk_out_urb = NULL;
-       ucs->read_urb = NULL;
        tasklet_init(&cs->write_tasklet,
                     gigaset_modem_fill, (unsigned long) cs);
 
@@ -685,6 +681,11 @@ static int gigaset_probe(struct usb_interface *interface,
                return -ENODEV;
        }
 
+       if (hostif->desc.bNumEndpoints < 2) {
+               dev_err(&interface->dev, "missing endpoints\n");
+               return -ENODEV;
+       }
+
        dev_info(&udev->dev, "%s: Device matched ... !\n", __func__);
 
        /* allocate memory for our device state and initialize it */
@@ -704,6 +705,12 @@ static int gigaset_probe(struct usb_interface *interface,
 
        endpoint = &hostif->endpoint[0].desc;
 
+       if (!usb_endpoint_is_bulk_out(endpoint)) {
+               dev_err(&interface->dev, "missing bulk-out endpoint\n");
+               retval = -ENODEV;
+               goto error;
+       }
+
        buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
        ucs->bulk_out_size = buffer_size;
        ucs->bulk_out_epnum = usb_endpoint_num(endpoint);
@@ -723,6 +730,12 @@ static int gigaset_probe(struct usb_interface *interface,
 
        endpoint = &hostif->endpoint[1].desc;
 
+       if (!usb_endpoint_is_int_in(endpoint)) {
+               dev_err(&interface->dev, "missing int-in endpoint\n");
+               retval = -ENODEV;
+               goto error;
+       }
+
        ucs->busy = 0;
 
        ucs->read_urb = usb_alloc_urb(0, GFP_KERNEL);
index 5319909eb2f6e81cab72ac3da2eb9fb246addd7b..e7f4ddcc1361938dacfa81f7e32160eac74993eb 100644 (file)
@@ -3,6 +3,7 @@ config OCTEON_ETHERNET
        tristate "Cavium Networks Octeon Ethernet support"
        depends on CAVIUM_OCTEON_SOC || COMPILE_TEST
        depends on NETDEVICES
+       depends on BROKEN
        select PHYLIB
        select MDIO_OCTEON
        help
index a6886cc5654cede0dcf3dbcee370fd7be53a18c9..56d116d79e56aa531a6baa9086149267e128b1d4 100644 (file)
@@ -41,7 +41,7 @@ struct ql_stats {
        int stat_offset;
 };
 
-#define QL_SIZEOF(m) FIELD_SIZEOF(struct ql_adapter, m)
+#define QL_SIZEOF(m) sizeof_field(struct ql_adapter, m)
 #define QL_OFF(m) offsetof(struct ql_adapter, m)
 
 static const struct ql_stats ql_gstrings_stats[] = {
index 4fac9dca798e812d8f4315baff14193fb6fcf13f..a7cac0719b8bcb322ed6af3ffa2e925352bd9572 100644 (file)
@@ -70,7 +70,7 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
        phost_conf = pusbd->actconfig;
        pconf_desc = &phost_conf->desc;
 
-       phost_iface = &usb_intf->altsetting[0];
+       phost_iface = usb_intf->cur_altsetting;
        piface_desc = &phost_iface->desc;
 
        pdvobjpriv->NumInterfaces = pconf_desc->bNumInterfaces;
index ba1288297ee4b747b6c741e1faff5a83a08db26a..a87562f632a7ff07a4f7fb405dbb66ad4764f0da 100644 (file)
@@ -247,7 +247,7 @@ static uint r8712_usb_dvobj_init(struct _adapter *padapter)
 
        pdvobjpriv->padapter = padapter;
        padapter->eeprom_address_size = 6;
-       phost_iface = &pintf->altsetting[0];
+       phost_iface = pintf->cur_altsetting;
        piface_desc = &phost_iface->desc;
        pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints;
        if (pusbd->speed == USB_SPEED_HIGH) {
index 02148a24818a603c402963e1db1326c75eb87258..4458c1e60fa315f92d0a07b3999a008430661e5b 100644 (file)
@@ -3309,7 +3309,7 @@ static int __init vchiq_driver_init(void)
        return 0;
 
 region_unregister:
-       platform_driver_unregister(&vchiq_driver);
+       unregister_chrdev_region(vchiq_devid, 1);
 
 class_destroy:
        class_destroy(vchiq_class);
index b722e9773232bea3ef1bcbf38499edcc8aa653ed..df2640a79f02f5c50e0824cd1192fc862a206b00 100644 (file)
@@ -679,7 +679,7 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
        struct ieee80211_sta *sta = control ? control->sta : NULL;
        struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
-       size_t driver_data_room = FIELD_SIZEOF(struct ieee80211_tx_info,
+       size_t driver_data_room = sizeof_field(struct ieee80211_tx_info,
                                               rate_driver_data);
 
        compiletime_assert(sizeof(struct wfx_tx_priv) <= driver_data_room,
index ac136663fa8e55fb08ece4416b95f52fa30ebe65..082c16a31616e10256658cfeef87a271b4d328c1 100644 (file)
@@ -4,6 +4,7 @@ config PRISM2_USB
        depends on WLAN && USB && CFG80211
        select WIRELESS_EXT
        select WEXT_PRIV
+       select CRC32
        help
          This is the wlan-ng prism 2.5/3 USB driver for a wide range of
          old USB wireless devices.
index e877b917c15f59fd6121f1c4dcca420aa2092520..30ea37e1a3f5e11021967201bd3f197030259050 100644 (file)
@@ -708,7 +708,7 @@ static int __init cxgbit_init(void)
        pr_info("%s dcb enabled.\n", DRV_NAME);
        register_dcbevent_notifier(&cxgbit_dcbevent_nb);
 #endif
-       BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, cb) <
+       BUILD_BUG_ON(sizeof_field(struct sk_buff, cb) <
                     sizeof(union cxgbit_skb_cb));
        return 0;
 }
index 59b79fc48266e6fa087b897c1ea590462a33f7b3..79b27865c6f42c7342274904db052c138fa2e61f 100644 (file)
@@ -108,7 +108,7 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
 
 config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
        bool "power_allocator"
-       select THERMAL_GOV_POWER_ALLOCATOR
+       depends on THERMAL_GOV_POWER_ALLOCATOR
        help
          Select this if you want to control temperature based on
          system and device power allocation. This governor can only
index 8b0ea8c70d73040bae8a09f85e7f086ce6afc0ad..635cf0466b5921c103bcf1b1c5bd657cf32e7e71 100644 (file)
@@ -2124,10 +2124,11 @@ resubmit:
 /*
  * Start the modem : init the data and start kernel thread
  */
-static int uea_boot(struct uea_softc *sc)
+static int uea_boot(struct uea_softc *sc, struct usb_interface *intf)
 {
-       int ret, size;
        struct intr_pkt *intr;
+       int ret = -ENOMEM;
+       int size;
 
        uea_enters(INS_TO_USBDEV(sc));
 
@@ -2152,6 +2153,11 @@ static int uea_boot(struct uea_softc *sc)
        if (UEA_CHIP_VERSION(sc) == ADI930)
                load_XILINX_firmware(sc);
 
+       if (intf->cur_altsetting->desc.bNumEndpoints < 1) {
+               ret = -ENODEV;
+               goto err0;
+       }
+
        intr = kmalloc(size, GFP_KERNEL);
        if (!intr)
                goto err0;
@@ -2163,8 +2169,7 @@ static int uea_boot(struct uea_softc *sc)
        usb_fill_int_urb(sc->urb_int, sc->usb_dev,
                         usb_rcvintpipe(sc->usb_dev, UEA_INTR_PIPE),
                         intr, size, uea_intr, sc,
-                        sc->usb_dev->actconfig->interface[0]->altsetting[0].
-                        endpoint[0].desc.bInterval);
+                        intf->cur_altsetting->endpoint[0].desc.bInterval);
 
        ret = usb_submit_urb(sc->urb_int, GFP_KERNEL);
        if (ret < 0) {
@@ -2179,6 +2184,7 @@ static int uea_boot(struct uea_softc *sc)
        sc->kthread = kthread_create(uea_kthread, sc, "ueagle-atm");
        if (IS_ERR(sc->kthread)) {
                uea_err(INS_TO_USBDEV(sc), "failed to create thread\n");
+               ret = PTR_ERR(sc->kthread);
                goto err2;
        }
 
@@ -2193,7 +2199,7 @@ err1:
        kfree(intr);
 err0:
        uea_leaves(INS_TO_USBDEV(sc));
-       return -ENOMEM;
+       return ret;
 }
 
 /*
@@ -2548,7 +2554,7 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
                }
        }
 
-       ret = uea_boot(sc);
+       ret = uea_boot(sc, intf);
        if (ret < 0)
                goto error;
 
index dbea28495e1ddb49193c9acae8b15a8f08cfb0c6..4e12a32ca392d3954489c9d4a441ad0bcdcb7729 100644 (file)
@@ -1275,7 +1275,7 @@ EXPORT_SYMBOL_GPL(usbatm_usb_disconnect);
 
 static int __init usbatm_usb_init(void)
 {
-       if (sizeof(struct usbatm_control) > FIELD_SIZEOF(struct sk_buff, cb)) {
+       if (sizeof(struct usbatm_control) > sizeof_field(struct sk_buff, cb)) {
                printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name);
                return -EIO;
        }
index 87338f9eb5bec73279acc5e679290875cd4a0072..ed204cbb63ea19719c4a72c13dd28987dcc26f1c 100644 (file)
@@ -156,7 +156,8 @@ static int usb_conn_probe(struct platform_device *pdev)
 
        info->vbus = devm_regulator_get(dev, "vbus");
        if (IS_ERR(info->vbus)) {
-               dev_err(dev, "failed to get vbus\n");
+               if (PTR_ERR(info->vbus) != -EPROBE_DEFER)
+                       dev_err(dev, "failed to get vbus\n");
                return PTR_ERR(info->vbus);
        }
 
index 281568d464f97d2ffed2618207b3e8737f7e413e..aa45840d82730ab290f656ff6f9c46a278470972 100644 (file)
@@ -1409,7 +1409,17 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
        if (usb_endpoint_xfer_control(&urb->ep->desc)) {
                if (hcd->self.uses_pio_for_control)
                        return ret;
-               if (hcd_uses_dma(hcd)) {
+               if (hcd->localmem_pool) {
+                       ret = hcd_alloc_coherent(
+                                       urb->dev->bus, mem_flags,
+                                       &urb->setup_dma,
+                                       (void **)&urb->setup_packet,
+                                       sizeof(struct usb_ctrlrequest),
+                                       DMA_TO_DEVICE);
+                       if (ret)
+                               return ret;
+                       urb->transfer_flags |= URB_SETUP_MAP_LOCAL;
+               } else if (hcd_uses_dma(hcd)) {
                        if (object_is_on_stack(urb->setup_packet)) {
                                WARN_ONCE(1, "setup packet is on stack\n");
                                return -EAGAIN;
@@ -1424,23 +1434,22 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
                                                urb->setup_dma))
                                return -EAGAIN;
                        urb->transfer_flags |= URB_SETUP_MAP_SINGLE;
-               } else if (hcd->localmem_pool) {
-                       ret = hcd_alloc_coherent(
-                                       urb->dev->bus, mem_flags,
-                                       &urb->setup_dma,
-                                       (void **)&urb->setup_packet,
-                                       sizeof(struct usb_ctrlrequest),
-                                       DMA_TO_DEVICE);
-                       if (ret)
-                               return ret;
-                       urb->transfer_flags |= URB_SETUP_MAP_LOCAL;
                }
        }
 
        dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
        if (urb->transfer_buffer_length != 0
            && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) {
-               if (hcd_uses_dma(hcd)) {
+               if (hcd->localmem_pool) {
+                       ret = hcd_alloc_coherent(
+                                       urb->dev->bus, mem_flags,
+                                       &urb->transfer_dma,
+                                       &urb->transfer_buffer,
+                                       urb->transfer_buffer_length,
+                                       dir);
+                       if (ret == 0)
+                               urb->transfer_flags |= URB_MAP_LOCAL;
+               } else if (hcd_uses_dma(hcd)) {
                        if (urb->num_sgs) {
                                int n;
 
@@ -1491,15 +1500,6 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
                                else
                                        urb->transfer_flags |= URB_DMA_MAP_SINGLE;
                        }
-               } else if (hcd->localmem_pool) {
-                       ret = hcd_alloc_coherent(
-                                       urb->dev->bus, mem_flags,
-                                       &urb->transfer_dma,
-                                       &urb->transfer_buffer,
-                                       urb->transfer_buffer_length,
-                                       dir);
-                       if (ret == 0)
-                               urb->transfer_flags |= URB_MAP_LOCAL;
                }
                if (ret && (urb->transfer_flags & (URB_SETUP_MAP_SINGLE |
                                URB_SETUP_MAP_LOCAL)))
index 0eab79f82ce41bd107de6e2997543a0aabfaf3a6..da923ec176122210705bb67cda9c81cecf83b3f9 100644 (file)
@@ -45,6 +45,7 @@ void usb_init_urb(struct urb *urb)
        if (urb) {
                memset(urb, 0, sizeof(*urb));
                kref_init(&urb->kref);
+               INIT_LIST_HEAD(&urb->urb_list);
                INIT_LIST_HEAD(&urb->anchor_list);
        }
 }
index 023f0357efd77eae3182aaf596120b8a8847fa8b..294276f7deb9e3451e191d769b960d3d143a5b3b 100644 (file)
@@ -29,7 +29,8 @@
 #define PCI_DEVICE_ID_INTEL_BXT_M              0x1aaa
 #define PCI_DEVICE_ID_INTEL_APL                        0x5aaa
 #define PCI_DEVICE_ID_INTEL_KBP                        0xa2b0
-#define PCI_DEVICE_ID_INTEL_CMLH               0x02ee
+#define PCI_DEVICE_ID_INTEL_CMLLP              0x02ee
+#define PCI_DEVICE_ID_INTEL_CMLH               0x06ee
 #define PCI_DEVICE_ID_INTEL_GLK                        0x31aa
 #define PCI_DEVICE_ID_INTEL_CNPLP              0x9dee
 #define PCI_DEVICE_ID_INTEL_CNPH               0xa36e
@@ -308,6 +309,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = {
        { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MRFLD),
          (kernel_ulong_t) &dwc3_pci_mrfld_properties, },
 
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CMLLP),
+         (kernel_ulong_t) &dwc3_pci_intel_properties, },
+
        { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CMLH),
          (kernel_ulong_t) &dwc3_pci_intel_properties, },
 
index 3996b9c4ff8d41fd0f46ebec5ab293661fc89dba..fd1b100d2927eecb57c2fb86f1d52ee24bfaa57b 100644 (file)
@@ -1117,6 +1117,9 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
 void dwc3_ep0_interrupt(struct dwc3 *dwc,
                const struct dwc3_event_depevt *event)
 {
+       struct dwc3_ep  *dep = dwc->eps[event->endpoint_number];
+       u8              cmd;
+
        switch (event->endpoint_event) {
        case DWC3_DEPEVT_XFERCOMPLETE:
                dwc3_ep0_xfer_complete(dwc, event);
@@ -1129,7 +1132,12 @@ void dwc3_ep0_interrupt(struct dwc3 *dwc,
        case DWC3_DEPEVT_XFERINPROGRESS:
        case DWC3_DEPEVT_RXTXFIFOEVT:
        case DWC3_DEPEVT_STREAMEVT:
+               break;
        case DWC3_DEPEVT_EPCMDCMPLT:
+               cmd = DEPEVT_PARAMETER_CMD(event->parameters);
+
+               if (cmd == DWC3_DEPCMD_ENDTRANSFER)
+                       dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
                break;
        }
 }
index a9aba716bf80be70c3a8df033f8e468f59477560..0c960a97ea0214ed73e5fe018587aafb6c8d3d8f 100644 (file)
@@ -2491,7 +2491,7 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep,
 
        req->request.actual = req->request.length - req->remaining;
 
-       if (!dwc3_gadget_ep_request_completed(req) &&
+       if (!dwc3_gadget_ep_request_completed(req) ||
                        req->num_pending_sgs) {
                __dwc3_gadget_kick_transfer(dep);
                goto out;
@@ -2719,6 +2719,9 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force,
        WARN_ON_ONCE(ret);
        dep->resource_index = 0;
 
+       if (!interrupt)
+               dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
+
        if (dwc3_is_usb31(dwc) || dwc->revision < DWC3_REVISION_310A)
                udelay(100);
 }
index 6ce044008cf6c4197dda79df4f5f1aab74b846b9..460d5d7c984f50c66ff6bc821cea526986008d2a 100644 (file)
@@ -621,8 +621,12 @@ static void ecm_disable(struct usb_function *f)
 
        DBG(cdev, "ecm deactivated\n");
 
-       if (ecm->port.in_ep->enabled)
+       if (ecm->port.in_ep->enabled) {
                gether_disconnect(&ecm->port);
+       } else {
+               ecm->port.in_ep->desc = NULL;
+               ecm->port.out_ep->desc = NULL;
+       }
 
        usb_ep_disable(ecm->notify);
        ecm->notify->desc = NULL;
index ce1d0235969c369ce02bd2c5fa6dfbfb36a8a549..0bbccac94d6c5eea78050d67bbf42dcf5f028842 100644 (file)
@@ -3509,7 +3509,7 @@ static void ffs_free_inst(struct usb_function_instance *f)
 
 static int ffs_set_inst_name(struct usb_function_instance *fi, const char *name)
 {
-       if (strlen(name) >= FIELD_SIZEOF(struct ffs_dev, name))
+       if (strlen(name) >= sizeof_field(struct ffs_dev, name))
                return -ENAMETOOLONG;
        return ffs_name_dev(to_f_fs_opts(fi)->dev, name);
 }
index d48df36622b74b565b037d5ce56d95dd1b150162..0d8e4a364ca6e0d54d01fc644c4907287b88646c 100644 (file)
@@ -618,6 +618,7 @@ static void rndis_disable(struct usb_function *f)
        gether_disconnect(&rndis->port);
 
        usb_ep_disable(rndis->notify);
+       rndis->notify->desc = NULL;
 }
 
 /*-------------------------------------------------------------------------*/
index b7d23c4387569e290a7482389169aa932312be7f..7a3a29e5e9d29d33bec4e9ff45e50f26986dbf96 100644 (file)
@@ -806,7 +806,7 @@ static void xhci_del_comp_mod_timer(struct xhci_hcd *xhci, u32 status,
 
 static int xhci_handle_usb2_port_link_resume(struct xhci_port *port,
                                             u32 *status, u32 portsc,
-                                            unsigned long flags)
+                                            unsigned long *flags)
 {
        struct xhci_bus_state *bus_state;
        struct xhci_hcd *xhci;
@@ -860,11 +860,11 @@ static int xhci_handle_usb2_port_link_resume(struct xhci_port *port,
                xhci_test_and_clear_bit(xhci, port, PORT_PLC);
                xhci_set_link_state(xhci, port, XDEV_U0);
 
-               spin_unlock_irqrestore(&xhci->lock, flags);
+               spin_unlock_irqrestore(&xhci->lock, *flags);
                time_left = wait_for_completion_timeout(
                        &bus_state->rexit_done[wIndex],
                        msecs_to_jiffies(XHCI_MAX_REXIT_TIMEOUT_MS));
-               spin_lock_irqsave(&xhci->lock, flags);
+               spin_lock_irqsave(&xhci->lock, *flags);
 
                if (time_left) {
                        slot_id = xhci_find_slot_id_by_port(hcd, xhci,
@@ -920,11 +920,13 @@ static void xhci_get_usb3_port_status(struct xhci_port *port, u32 *status,
 {
        struct xhci_bus_state *bus_state;
        struct xhci_hcd *xhci;
+       struct usb_hcd *hcd;
        u32 link_state;
        u32 portnum;
 
        bus_state = &port->rhub->bus_state;
        xhci = hcd_to_xhci(port->rhub->hcd);
+       hcd = port->rhub->hcd;
        link_state = portsc & PORT_PLS_MASK;
        portnum = port->hcd_portnum;
 
@@ -952,12 +954,20 @@ static void xhci_get_usb3_port_status(struct xhci_port *port, u32 *status,
                        bus_state->suspended_ports &= ~(1 << portnum);
        }
 
+       /* remote wake resume signaling complete */
+       if (bus_state->port_remote_wakeup & (1 << portnum) &&
+           link_state != XDEV_RESUME &&
+           link_state != XDEV_RECOVERY) {
+               bus_state->port_remote_wakeup &= ~(1 << portnum);
+               usb_hcd_end_port_resume(&hcd->self, portnum);
+       }
+
        xhci_hub_report_usb3_link_state(xhci, status, portsc);
        xhci_del_comp_mod_timer(xhci, portsc, portnum);
 }
 
 static void xhci_get_usb2_port_status(struct xhci_port *port, u32 *status,
-                                     u32 portsc, unsigned long flags)
+                                     u32 portsc, unsigned long *flags)
 {
        struct xhci_bus_state *bus_state;
        u32 link_state;
@@ -1007,7 +1017,7 @@ static void xhci_get_usb2_port_status(struct xhci_port *port, u32 *status,
 static u32 xhci_get_port_status(struct usb_hcd *hcd,
                struct xhci_bus_state *bus_state,
        u16 wIndex, u32 raw_port_status,
-               unsigned long flags)
+               unsigned long *flags)
        __releases(&xhci->lock)
        __acquires(&xhci->lock)
 {
@@ -1130,7 +1140,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                }
                trace_xhci_get_port_status(wIndex, temp);
                status = xhci_get_port_status(hcd, bus_state, wIndex, temp,
-                                             flags);
+                                             &flags);
                if (status == 0xffffffff)
                        goto error;
 
index e16eda6e2b8b22b768387a5c0c2a5091c4573059..3b1388fa2f36e74093e2dc2abc0083cd650266c5 100644 (file)
@@ -1909,13 +1909,17 @@ no_bw:
        xhci->usb3_rhub.num_ports = 0;
        xhci->num_active_eps = 0;
        kfree(xhci->usb2_rhub.ports);
+       kfree(xhci->usb2_rhub.psi);
        kfree(xhci->usb3_rhub.ports);
+       kfree(xhci->usb3_rhub.psi);
        kfree(xhci->hw_ports);
        kfree(xhci->rh_bw);
        kfree(xhci->ext_caps);
 
        xhci->usb2_rhub.ports = NULL;
+       xhci->usb2_rhub.psi = NULL;
        xhci->usb3_rhub.ports = NULL;
+       xhci->usb3_rhub.psi = NULL;
        xhci->hw_ports = NULL;
        xhci->rh_bw = NULL;
        xhci->ext_caps = NULL;
index a0025d23b25735b86dbf12eb1838130627319e61..2907fe4d78ddd3e78976a9f1306e296056da73ae 100644 (file)
@@ -521,6 +521,18 @@ static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
 }
 #endif /* CONFIG_PM */
 
+static void xhci_pci_shutdown(struct usb_hcd *hcd)
+{
+       struct xhci_hcd         *xhci = hcd_to_xhci(hcd);
+       struct pci_dev          *pdev = to_pci_dev(hcd->self.controller);
+
+       xhci_shutdown(hcd);
+
+       /* Yet another workaround for spurious wakeups at shutdown with HSW */
+       if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
+               pci_set_power_state(pdev, PCI_D3hot);
+}
+
 /*-------------------------------------------------------------------------*/
 
 /* PCI driver selection metadata; PCI hotplugging uses this */
@@ -556,6 +568,7 @@ static int __init xhci_pci_init(void)
 #ifdef CONFIG_PM
        xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend;
        xhci_pci_hc_driver.pci_resume = xhci_pci_resume;
+       xhci_pci_hc_driver.shutdown = xhci_pci_shutdown;
 #endif
        return pci_register_driver(&xhci_pci_driver);
 }
index 6475c3d3b43b660a6bc7cc06ad994fcf8f46fc40..d23f7408c81f1e4409389a5b51b3b05ff93275a0 100644 (file)
@@ -1628,7 +1628,6 @@ static void handle_port_status(struct xhci_hcd *xhci,
                slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1);
                if (slot_id && xhci->devs[slot_id])
                        xhci->devs[slot_id]->flags |= VDEV_PORT_ERROR;
-               bus_state->port_remote_wakeup &= ~(1 << hcd_portnum);
        }
 
        if ((portsc & PORT_PLC) && (portsc & PORT_PLS_MASK) == XDEV_RESUME) {
@@ -1648,6 +1647,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
                         */
                        bus_state->port_remote_wakeup |= 1 << hcd_portnum;
                        xhci_test_and_clear_bit(xhci, port, PORT_PLC);
+                       usb_hcd_start_port_resume(&hcd->self, hcd_portnum);
                        xhci_set_link_state(xhci, port, XDEV_U0);
                        /* Need to wait until the next link state change
                         * indicates the device is actually in U0.
@@ -1688,7 +1688,6 @@ static void handle_port_status(struct xhci_hcd *xhci,
                if (slot_id && xhci->devs[slot_id])
                        xhci_ring_device(xhci, slot_id);
                if (bus_state->port_remote_wakeup & (1 << hcd_portnum)) {
-                       bus_state->port_remote_wakeup &= ~(1 << hcd_portnum);
                        xhci_test_and_clear_bit(xhci, port, PORT_PLC);
                        usb_wakeup_notification(hcd->self.root_hub,
                                        hcd_portnum + 1);
@@ -2382,7 +2381,8 @@ static int handle_tx_event(struct xhci_hcd *xhci,
        case COMP_SUCCESS:
                if (EVENT_TRB_LEN(le32_to_cpu(event->transfer_len)) == 0)
                        break;
-               if (xhci->quirks & XHCI_TRUST_TX_LENGTH)
+               if (xhci->quirks & XHCI_TRUST_TX_LENGTH ||
+                   ep_ring->last_td_was_short)
                        trb_comp_code = COMP_SHORT_PACKET;
                else
                        xhci_warn_ratelimited(xhci,
index 6721d059f58a1a849d1acaf983e47647bba7698a..dbac0fa9748d5fcea4bbf44ce610c4ecd1d5b5c7 100644 (file)
@@ -770,7 +770,7 @@ static void xhci_stop(struct usb_hcd *hcd)
  *
  * This will only ever be called with the main usb_hcd (the USB3 roothub).
  */
-static void xhci_shutdown(struct usb_hcd *hcd)
+void xhci_shutdown(struct usb_hcd *hcd)
 {
        struct xhci_hcd *xhci = hcd_to_xhci(hcd);
 
@@ -789,11 +789,8 @@ static void xhci_shutdown(struct usb_hcd *hcd)
        xhci_dbg_trace(xhci, trace_xhci_dbg_init,
                        "xhci_shutdown completed - status = %x",
                        readl(&xhci->op_regs->status));
-
-       /* Yet another workaround for spurious wakeups at shutdown with HSW */
-       if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
-               pci_set_power_state(to_pci_dev(hcd->self.sysdev), PCI_D3hot);
 }
+EXPORT_SYMBOL_GPL(xhci_shutdown);
 
 #ifdef CONFIG_PM
 static void xhci_save_registers(struct xhci_hcd *xhci)
@@ -973,7 +970,7 @@ static bool xhci_pending_portevent(struct xhci_hcd *xhci)
 int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup)
 {
        int                     rc = 0;
-       unsigned int            delay = XHCI_MAX_HALT_USEC;
+       unsigned int            delay = XHCI_MAX_HALT_USEC * 2;
        struct usb_hcd          *hcd = xhci_to_hcd(xhci);
        u32                     command;
        u32                     res;
index dc6f62a4b1979e8037422fae9163e4edcd344185..13d8838cd552be01b145e0d2f78dc815c3ffad0b 100644 (file)
@@ -2050,6 +2050,7 @@ int xhci_start(struct xhci_hcd *xhci);
 int xhci_reset(struct xhci_hcd *xhci);
 int xhci_run(struct usb_hcd *hcd);
 int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks);
+void xhci_shutdown(struct usb_hcd *hcd);
 void xhci_init_driver(struct hc_driver *drv,
                      const struct xhci_driver_overrides *over);
 int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id);
index 6f5edb9fc61e024cc9549497c7d2629230b585e0..d8d157c4c271d32e44eb923bccef4dba6cd4192f 100644 (file)
@@ -669,7 +669,7 @@ static int adu_probe(struct usb_interface *interface,
        init_waitqueue_head(&dev->read_wait);
        init_waitqueue_head(&dev->write_wait);
 
-       res = usb_find_common_endpoints_reverse(&interface->altsetting[0],
+       res = usb_find_common_endpoints_reverse(interface->cur_altsetting,
                        NULL, NULL,
                        &dev->interrupt_in_endpoint,
                        &dev->interrupt_out_endpoint);
index 4afb5ddfd361f29b7506272bc270b02592aaff5f..e9437a176518a5f137a4df32d393b483e6d3b23c 100644 (file)
@@ -322,7 +322,7 @@ static int idmouse_probe(struct usb_interface *interface,
        int result;
 
        /* check if we have gotten the data or the hid interface */
-       iface_desc = &interface->altsetting[0];
+       iface_desc = interface->cur_altsetting;
        if (iface_desc->desc.bInterfaceClass != 0x0A)
                return -ENODEV;
 
index ac2b4fcc265f65c10a128bcf092de3a134319dc8..f48a23adbc35ddbbc66c5227d8c59e3413791b05 100644 (file)
@@ -1039,12 +1039,18 @@ static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 
                mutex_lock(&rp->fetch_lock);
                spin_lock_irqsave(&rp->b_lock, flags);
-               mon_free_buff(rp->b_vec, rp->b_size/CHUNK_SIZE);
-               kfree(rp->b_vec);
-               rp->b_vec  = vec;
-               rp->b_size = size;
-               rp->b_read = rp->b_in = rp->b_out = rp->b_cnt = 0;
-               rp->cnt_lost = 0;
+               if (rp->mmap_active) {
+                       mon_free_buff(vec, size/CHUNK_SIZE);
+                       kfree(vec);
+                       ret = -EBUSY;
+               } else {
+                       mon_free_buff(rp->b_vec, rp->b_size/CHUNK_SIZE);
+                       kfree(rp->b_vec);
+                       rp->b_vec  = vec;
+                       rp->b_size = size;
+                       rp->b_read = rp->b_in = rp->b_out = rp->b_cnt = 0;
+                       rp->cnt_lost = 0;
+               }
                spin_unlock_irqrestore(&rp->b_lock, flags);
                mutex_unlock(&rp->fetch_lock);
                }
@@ -1216,13 +1222,21 @@ mon_bin_poll(struct file *file, struct poll_table_struct *wait)
 static void mon_bin_vma_open(struct vm_area_struct *vma)
 {
        struct mon_reader_bin *rp = vma->vm_private_data;
+       unsigned long flags;
+
+       spin_lock_irqsave(&rp->b_lock, flags);
        rp->mmap_active++;
+       spin_unlock_irqrestore(&rp->b_lock, flags);
 }
 
 static void mon_bin_vma_close(struct vm_area_struct *vma)
 {
+       unsigned long flags;
+
        struct mon_reader_bin *rp = vma->vm_private_data;
+       spin_lock_irqsave(&rp->b_lock, flags);
        rp->mmap_active--;
+       spin_unlock_irqrestore(&rp->b_lock, flags);
 }
 
 /*
@@ -1234,16 +1248,12 @@ static vm_fault_t mon_bin_vma_fault(struct vm_fault *vmf)
        unsigned long offset, chunk_idx;
        struct page *pageptr;
 
-       mutex_lock(&rp->fetch_lock);
        offset = vmf->pgoff << PAGE_SHIFT;
-       if (offset >= rp->b_size) {
-               mutex_unlock(&rp->fetch_lock);
+       if (offset >= rp->b_size)
                return VM_FAULT_SIGBUS;
-       }
        chunk_idx = offset / CHUNK_SIZE;
        pageptr = rp->b_vec[chunk_idx].pg;
        get_page(pageptr);
-       mutex_unlock(&rp->fetch_lock);
        vmf->page = pageptr;
        return 0;
 }
index 8273126ffdf4bb03edfae115973ca3562a3a7104..63a00ff26655e3e4614ce9e745b40d0ee4d03b39 100644 (file)
@@ -169,8 +169,8 @@ EXPORT_SYMBOL_GPL(fwnode_usb_role_switch_get);
 void usb_role_switch_put(struct usb_role_switch *sw)
 {
        if (!IS_ERR_OR_NULL(sw)) {
-               put_device(&sw->dev);
                module_put(sw->dev.parent->driver->owner);
+               put_device(&sw->dev);
        }
 }
 EXPORT_SYMBOL_GPL(usb_role_switch_put);
index 48a439298a68fa8533df50f6e65f0aa7809c1b18..9690a5f4b9d611b26680f767310e5bcc34892b5c 100644 (file)
@@ -2901,16 +2901,18 @@ static int edge_startup(struct usb_serial *serial)
        response = 0;
 
        if (edge_serial->is_epic) {
+               struct usb_host_interface *alt;
+
+               alt = serial->interface->cur_altsetting;
+
                /* EPIC thing, set up our interrupt polling now and our read
                 * urb, so that the device knows it really is connected. */
                interrupt_in_found = bulk_in_found = bulk_out_found = false;
-               for (i = 0; i < serial->interface->altsetting[0]
-                                               .desc.bNumEndpoints; ++i) {
+               for (i = 0; i < alt->desc.bNumEndpoints; ++i) {
                        struct usb_endpoint_descriptor *endpoint;
                        int buffer_size;
 
-                       endpoint = &serial->interface->altsetting[0].
-                                                       endpoint[i].desc;
+                       endpoint = &alt->endpoint[i].desc;
                        buffer_size = usb_endpoint_maxp(endpoint);
                        if (!interrupt_in_found &&
                            (usb_endpoint_is_int_in(endpoint))) {
index 66a4dcbbb1fc9de2c5f160497926848ace8bb37a..f4c2359abb1b0015af491daff990b5dd9d83846c 100644 (file)
@@ -135,7 +135,8 @@ static int slave_configure(struct scsi_device *sdev)
         * For such controllers we need to make sure the block layer sets
         * up bounce buffers in addressable memory.
         */
-       if (!hcd_uses_dma(bus_to_hcd(us->pusb_dev->bus)))
+       if (!hcd_uses_dma(bus_to_hcd(us->pusb_dev->bus)) ||
+                       (bus_to_hcd(us->pusb_dev->bus)->localmem_pool != NULL))
                blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH);
 
        /*
index 7ece6ca6e690b23e88348e55e4c38b710dd5515d..91d62276b56fe4d883fafb00587c2a8d76d2ef98 100644 (file)
@@ -1612,14 +1612,16 @@ struct typec_port *typec_register_port(struct device *parent,
 
        port->sw = typec_switch_get(&port->dev);
        if (IS_ERR(port->sw)) {
+               ret = PTR_ERR(port->sw);
                put_device(&port->dev);
-               return ERR_CAST(port->sw);
+               return ERR_PTR(ret);
        }
 
        port->mux = typec_mux_get(&port->dev, NULL);
        if (IS_ERR(port->mux)) {
+               ret = PTR_ERR(port->mux);
                put_device(&port->dev);
-               return ERR_CAST(port->mux);
+               return ERR_PTR(ret);
        }
 
        ret = device_add(&port->dev);
index e05679c478e2b3b22b3d9048d0c5f866ef2ac5ed..93f995f6cf3645bab73cfe6def29c83a54b2e1d7 100644 (file)
 #define VIRTIO_BALLOON_FREE_PAGE_ALLOC_FLAG (__GFP_NORETRY | __GFP_NOWARN | \
                                             __GFP_NOMEMALLOC)
 /* The order of free page blocks to report to host */
-#define VIRTIO_BALLOON_FREE_PAGE_ORDER (MAX_ORDER - 1)
+#define VIRTIO_BALLOON_HINT_BLOCK_ORDER (MAX_ORDER - 1)
 /* The size of a free page block in bytes */
-#define VIRTIO_BALLOON_FREE_PAGE_SIZE \
-       (1 << (VIRTIO_BALLOON_FREE_PAGE_ORDER + PAGE_SHIFT))
+#define VIRTIO_BALLOON_HINT_BLOCK_BYTES \
+       (1 << (VIRTIO_BALLOON_HINT_BLOCK_ORDER + PAGE_SHIFT))
+#define VIRTIO_BALLOON_HINT_BLOCK_PAGES (1 << VIRTIO_BALLOON_HINT_BLOCK_ORDER)
 
 #ifdef CONFIG_BALLOON_COMPACTION
 static struct vfsmount *balloon_mnt;
@@ -380,7 +381,7 @@ static unsigned long return_free_pages_to_mm(struct virtio_balloon *vb,
                if (!page)
                        break;
                free_pages((unsigned long)page_address(page),
-                          VIRTIO_BALLOON_FREE_PAGE_ORDER);
+                          VIRTIO_BALLOON_HINT_BLOCK_ORDER);
        }
        vb->num_free_page_blocks -= num_returned;
        spin_unlock_irq(&vb->free_page_list_lock);
@@ -582,7 +583,7 @@ static int get_free_page_and_send(struct virtio_balloon *vb)
                ;
 
        page = alloc_pages(VIRTIO_BALLOON_FREE_PAGE_ALLOC_FLAG,
-                          VIRTIO_BALLOON_FREE_PAGE_ORDER);
+                          VIRTIO_BALLOON_HINT_BLOCK_ORDER);
        /*
         * When the allocation returns NULL, it indicates that we have got all
         * the possible free pages, so return -EINTR to stop.
@@ -591,13 +592,13 @@ static int get_free_page_and_send(struct virtio_balloon *vb)
                return -EINTR;
 
        p = page_address(page);
-       sg_init_one(&sg, p, VIRTIO_BALLOON_FREE_PAGE_SIZE);
+       sg_init_one(&sg, p, VIRTIO_BALLOON_HINT_BLOCK_BYTES);
        /* There is always 1 entry reserved for the cmd id to use. */
        if (vq->num_free > 1) {
                err = virtqueue_add_inbuf(vq, &sg, 1, p, GFP_KERNEL);
                if (unlikely(err)) {
                        free_pages((unsigned long)p,
-                                  VIRTIO_BALLOON_FREE_PAGE_ORDER);
+                                  VIRTIO_BALLOON_HINT_BLOCK_ORDER);
                        return err;
                }
                virtqueue_kick(vq);
@@ -610,7 +611,7 @@ static int get_free_page_and_send(struct virtio_balloon *vb)
                 * The vq has no available entry to add this page block, so
                 * just free it.
                 */
-               free_pages((unsigned long)p, VIRTIO_BALLOON_FREE_PAGE_ORDER);
+               free_pages((unsigned long)p, VIRTIO_BALLOON_HINT_BLOCK_ORDER);
        }
 
        return 0;
@@ -721,6 +722,17 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info,
 
        get_page(newpage); /* balloon reference */
 
+       /*
+         * When we migrate a page to a different zone and adjusted the
+         * managed page count when inflating, we have to fixup the count of
+         * both involved zones.
+         */
+       if (!virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM) &&
+           page_zone(page) != page_zone(newpage)) {
+               adjust_managed_page_count(page, 1);
+               adjust_managed_page_count(newpage, -1);
+       }
+
        /* balloon's page migration 1st step  -- inflate "newpage" */
        spin_lock_irqsave(&vb_dev_info->pages_lock, flags);
        balloon_page_insert(vb_dev_info, newpage);
@@ -765,11 +777,11 @@ static unsigned long shrink_free_pages(struct virtio_balloon *vb,
        unsigned long blocks_to_free, blocks_freed;
 
        pages_to_free = round_up(pages_to_free,
-                                1 << VIRTIO_BALLOON_FREE_PAGE_ORDER);
-       blocks_to_free = pages_to_free >> VIRTIO_BALLOON_FREE_PAGE_ORDER;
+                                VIRTIO_BALLOON_HINT_BLOCK_PAGES);
+       blocks_to_free = pages_to_free / VIRTIO_BALLOON_HINT_BLOCK_PAGES;
        blocks_freed = return_free_pages_to_mm(vb, blocks_to_free);
 
-       return blocks_freed << VIRTIO_BALLOON_FREE_PAGE_ORDER;
+       return blocks_freed * VIRTIO_BALLOON_HINT_BLOCK_PAGES;
 }
 
 static unsigned long leak_balloon_pages(struct virtio_balloon *vb,
@@ -826,7 +838,7 @@ static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker,
        unsigned long count;
 
        count = vb->num_pages / VIRTIO_BALLOON_PAGES_PER_PAGE;
-       count += vb->num_free_page_blocks << VIRTIO_BALLOON_FREE_PAGE_ORDER;
+       count += vb->num_free_page_blocks * VIRTIO_BALLOON_HINT_BLOCK_PAGES;
 
        return count;
 }
index 4f2e78a5e4dbee31147978a228646b30e6ed8d28..0c142bcab79d61d50e67a97862aecabe7c0542a2 100644 (file)
@@ -394,7 +394,8 @@ static struct notifier_block xen_memory_nb = {
 #else
 static enum bp_state reserve_additional_memory(void)
 {
-       balloon_stats.target_pages = balloon_stats.current_pages;
+       balloon_stats.target_pages = balloon_stats.current_pages +
+                                    balloon_stats.target_unpopulated;
        return BP_ECANCELED;
 }
 #endif /* CONFIG_XEN_BALLOON_MEMORY_HOTPLUG */
index 4150280509fff56775318ec3007a4f03c5b95454..7503899c0a1b52e2806dc7c76aebbeb4b6e667ee 100644 (file)
@@ -136,6 +136,9 @@ static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentr
 
        ASSERTCMP(d_inode(dentry), ==, NULL);
 
+       if (flags & LOOKUP_CREATE)
+               return ERR_PTR(-EOPNOTSUPP);
+
        if (dentry->d_name.len >= AFSNAMEMAX) {
                _leave(" = -ENAMETOOLONG");
                return ERR_PTR(-ENAMETOOLONG);
index f532d6d3bd28c176b69fd42ad431bdea579adfad..79bc5f1338edfb51e98f67ca47e167c32c903f18 100644 (file)
@@ -126,7 +126,7 @@ static int afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)
                if (src_as->cell)
                        ctx->cell = afs_get_cell(src_as->cell);
 
-               if (size > PAGE_SIZE - 1)
+               if (size < 2 || size > PAGE_SIZE - 1)
                        return -EINVAL;
 
                page = read_mapping_page(d_inode(mntpt)->i_mapping, 0, NULL);
@@ -140,7 +140,9 @@ static int afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)
                }
 
                buf = kmap(page);
-               ret = vfs_parse_fs_string(fc, "source", buf, size);
+               ret = -EINVAL;
+               if (buf[size - 1] == '.')
+                       ret = vfs_parse_fs_string(fc, "source", buf, size - 1);
                kunmap(page);
                put_page(page);
                if (ret < 0)
index fba2ec3a3a9c904a8d592c3a4141e9f9214eb385..468e1713bce13944719bdae1cc13611d0693c343 100644 (file)
@@ -213,13 +213,14 @@ static int afs_proc_cell_volumes_show(struct seq_file *m, void *v)
 
        /* Display header on line 1 */
        if (v == &cell->proc_volumes) {
-               seq_puts(m, "USE VID      TY\n");
+               seq_puts(m, "USE VID      TY NAME\n");
                return 0;
        }
 
-       seq_printf(m, "%3d %08llx %s\n",
+       seq_printf(m, "%3d %08llx %s %s\n",
                   atomic_read(&vol->usage), vol->vid,
-                  afs_vol_types[vol->type]);
+                  afs_vol_types[vol->type],
+                  vol->name);
 
        return 0;
 }
index 1686bf188ccd056c7453db63557efddceaf08833..b7f3cb2130caee38a6458d3d81422f83637698f7 100644 (file)
@@ -32,18 +32,11 @@ static void afs_dec_servers_outstanding(struct afs_net *net)
 struct afs_server *afs_find_server(struct afs_net *net,
                                   const struct sockaddr_rxrpc *srx)
 {
-       const struct sockaddr_in6 *a = &srx->transport.sin6, *b;
        const struct afs_addr_list *alist;
        struct afs_server *server = NULL;
        unsigned int i;
-       bool ipv6 = true;
        int seq = 0, diff;
 
-       if (srx->transport.sin6.sin6_addr.s6_addr32[0] == 0 ||
-           srx->transport.sin6.sin6_addr.s6_addr32[1] == 0 ||
-           srx->transport.sin6.sin6_addr.s6_addr32[2] == htonl(0xffff))
-               ipv6 = false;
-
        rcu_read_lock();
 
        do {
@@ -52,7 +45,8 @@ struct afs_server *afs_find_server(struct afs_net *net,
                server = NULL;
                read_seqbegin_or_lock(&net->fs_addr_lock, &seq);
 
-               if (ipv6) {
+               if (srx->transport.family == AF_INET6) {
+                       const struct sockaddr_in6 *a = &srx->transport.sin6, *b;
                        hlist_for_each_entry_rcu(server, &net->fs_addresses6, addr6_link) {
                                alist = rcu_dereference(server->addresses);
                                for (i = alist->nr_ipv4; i < alist->nr_addrs; i++) {
@@ -68,15 +62,16 @@ struct afs_server *afs_find_server(struct afs_net *net,
                                }
                        }
                } else {
+                       const struct sockaddr_in *a = &srx->transport.sin, *b;
                        hlist_for_each_entry_rcu(server, &net->fs_addresses4, addr4_link) {
                                alist = rcu_dereference(server->addresses);
                                for (i = 0; i < alist->nr_ipv4; i++) {
-                                       b = &alist->addrs[i].transport.sin6;
-                                       diff = ((u16 __force)a->sin6_port -
-                                               (u16 __force)b->sin6_port);
+                                       b = &alist->addrs[i].transport.sin;
+                                       diff = ((u16 __force)a->sin_port -
+                                               (u16 __force)b->sin_port);
                                        if (diff == 0)
-                                               diff = ((u32 __force)a->sin6_addr.s6_addr32[3] -
-                                                       (u32 __force)b->sin6_addr.s6_addr32[3]);
+                                               diff = ((u32 __force)a->sin_addr.s_addr -
+                                                       (u32 __force)b->sin_addr.s_addr);
                                        if (diff == 0)
                                                goto found;
                                }
index 488641b1a418d1b0f27aa3d17925b9e5a1a2cff2..7f8a9b3137bff33f24ff4eb058a5f77cf01c4244 100644 (file)
@@ -404,6 +404,7 @@ static int afs_test_super(struct super_block *sb, struct fs_context *fc)
        return (as->net_ns == fc->net_ns &&
                as->volume &&
                as->volume->vid == ctx->volume->vid &&
+               as->cell == ctx->cell &&
                !as->dyn_root);
 }
 
@@ -448,7 +449,6 @@ static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx)
        /* allocate the root inode and dentry */
        if (as->dyn_root) {
                inode = afs_iget_pseudo_dir(sb, true);
-               sb->s_flags     |= SB_RDONLY;
        } else {
                sprintf(sb->s_id, "%llu", as->volume->vid);
                afs_activate_volume(as->volume);
index 75b6d10c984560c437a91ebed744b9f3d5510c4b..575636f6491ef6d887180f9fc3c36740d410083c 100644 (file)
@@ -7,6 +7,7 @@ config BTRFS_FS
        select LIBCRC32C
        select CRYPTO_XXHASH
        select CRYPTO_SHA256
+       select CRYPTO_BLAKE2B
        select ZLIB_INFLATE
        select ZLIB_DEFLATE
        select LZO_COMPRESS
index f5a38910a82bfb94d71ceab28af196b3d0165c6f..9d09bb53c1ab4a36268eb583690ef37b2f08387c 100644 (file)
@@ -1011,18 +1011,13 @@ static int __ceph_is_single_caps(struct ceph_inode_info *ci)
        return rb_first(&ci->i_caps) == rb_last(&ci->i_caps);
 }
 
-static int __ceph_is_any_caps(struct ceph_inode_info *ci)
-{
-       return !RB_EMPTY_ROOT(&ci->i_caps);
-}
-
 int ceph_is_any_caps(struct inode *inode)
 {
        struct ceph_inode_info *ci = ceph_inode(inode);
        int ret;
 
        spin_lock(&ci->i_ceph_lock);
-       ret = __ceph_is_any_caps(ci);
+       ret = __ceph_is_any_real_caps(ci);
        spin_unlock(&ci->i_ceph_lock);
 
        return ret;
@@ -1099,15 +1094,16 @@ void __ceph_remove_cap(struct ceph_cap *cap, bool queue_release)
        if (removed)
                ceph_put_cap(mdsc, cap);
 
-       /* when reconnect denied, we remove session caps forcibly,
-        * i_wr_ref can be non-zero. If there are ongoing write,
-        * keep i_snap_realm.
-        */
-       if (!__ceph_is_any_caps(ci) && ci->i_wr_ref == 0 && ci->i_snap_realm)
-               drop_inode_snap_realm(ci);
+       if (!__ceph_is_any_real_caps(ci)) {
+               /* when reconnect denied, we remove session caps forcibly,
+                * i_wr_ref can be non-zero. If there are ongoing write,
+                * keep i_snap_realm.
+                */
+               if (ci->i_wr_ref == 0 && ci->i_snap_realm)
+                       drop_inode_snap_realm(ci);
 
-       if (!__ceph_is_any_real_caps(ci))
                __cap_delay_cancel(mdsc, ci);
+       }
 }
 
 struct cap_msg_args {
@@ -2764,7 +2760,19 @@ int ceph_get_caps(struct file *filp, int need, int want,
                if (ret == -EAGAIN)
                        continue;
                if (!ret) {
+                       struct ceph_mds_client *mdsc = fsc->mdsc;
+                       struct cap_wait cw;
                        DEFINE_WAIT_FUNC(wait, woken_wake_function);
+
+                       cw.ino = inode->i_ino;
+                       cw.tgid = current->tgid;
+                       cw.need = need;
+                       cw.want = want;
+
+                       spin_lock(&mdsc->caps_list_lock);
+                       list_add(&cw.list, &mdsc->cap_wait_list);
+                       spin_unlock(&mdsc->caps_list_lock);
+
                        add_wait_queue(&ci->i_cap_wq, &wait);
 
                        flags |= NON_BLOCKING;
@@ -2778,6 +2786,11 @@ int ceph_get_caps(struct file *filp, int need, int want,
                        }
 
                        remove_wait_queue(&ci->i_cap_wq, &wait);
+
+                       spin_lock(&mdsc->caps_list_lock);
+                       list_del(&cw.list);
+                       spin_unlock(&mdsc->caps_list_lock);
+
                        if (ret == -EAGAIN)
                                continue;
                }
@@ -2928,7 +2941,7 @@ void ceph_put_cap_refs(struct ceph_inode_info *ci, int had)
                                ci->i_head_snapc = NULL;
                        }
                        /* see comment in __ceph_remove_cap() */
-                       if (!__ceph_is_any_caps(ci) && ci->i_snap_realm)
+                       if (!__ceph_is_any_real_caps(ci) && ci->i_snap_realm)
                                drop_inode_snap_realm(ci);
                }
        spin_unlock(&ci->i_ceph_lock);
index facb387c27356f99864f25e0c0016752c70261fb..c281f32b54f7b6121de9dda389bca07fb9395042 100644 (file)
@@ -139,6 +139,7 @@ static int caps_show(struct seq_file *s, void *p)
        struct ceph_fs_client *fsc = s->private;
        struct ceph_mds_client *mdsc = fsc->mdsc;
        int total, avail, used, reserved, min, i;
+       struct cap_wait *cw;
 
        ceph_reservation_status(fsc, &total, &avail, &used, &reserved, &min);
        seq_printf(s, "total\t\t%d\n"
@@ -166,6 +167,18 @@ static int caps_show(struct seq_file *s, void *p)
        }
        mutex_unlock(&mdsc->mutex);
 
+       seq_printf(s, "\n\nWaiters:\n--------\n");
+       seq_printf(s, "tgid         ino                need             want\n");
+       seq_printf(s, "-----------------------------------------------------\n");
+
+       spin_lock(&mdsc->caps_list_lock);
+       list_for_each_entry(cw, &mdsc->cap_wait_list, list) {
+               seq_printf(s, "%-13d0x%-17lx%-17s%-17s\n", cw->tgid, cw->ino,
+                               ceph_cap_string(cw->need),
+                               ceph_cap_string(cw->want));
+       }
+       spin_unlock(&mdsc->caps_list_lock);
+
        return 0;
 }
 
index 068b029cf07390d1495ae3feffa1fb16d3c5872d..374db1bd57d10b8ca74c7081c31744a850fad612 100644 (file)
@@ -2015,7 +2015,7 @@ void ceph_reclaim_caps_nr(struct ceph_mds_client *mdsc, int nr)
        if (!nr)
                return;
        val = atomic_add_return(nr, &mdsc->cap_reclaim_pending);
-       if (!(val % CEPH_CAPS_PER_RELEASE)) {
+       if ((val % CEPH_CAPS_PER_RELEASE) < nr) {
                atomic_set(&mdsc->cap_reclaim_pending, 0);
                ceph_queue_cap_reclaim_work(mdsc);
        }
@@ -2032,12 +2032,13 @@ int ceph_alloc_readdir_reply_buffer(struct ceph_mds_request *req,
        struct ceph_mds_reply_info_parsed *rinfo = &req->r_reply_info;
        struct ceph_mount_options *opt = req->r_mdsc->fsc->mount_options;
        size_t size = sizeof(struct ceph_mds_reply_dir_entry);
-       int order, num_entries;
+       unsigned int num_entries;
+       int order;
 
        spin_lock(&ci->i_ceph_lock);
        num_entries = ci->i_files + ci->i_subdirs;
        spin_unlock(&ci->i_ceph_lock);
-       num_entries = max(num_entries, 1);
+       num_entries = max(num_entries, 1U);
        num_entries = min(num_entries, opt->max_readdir);
 
        order = get_order(size * num_entries);
@@ -4168,6 +4169,7 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc)
        INIT_DELAYED_WORK(&mdsc->delayed_work, delayed_work);
        mdsc->last_renew_caps = jiffies;
        INIT_LIST_HEAD(&mdsc->cap_delay_list);
+       INIT_LIST_HEAD(&mdsc->cap_wait_list);
        spin_lock_init(&mdsc->cap_delay_lock);
        INIT_LIST_HEAD(&mdsc->snap_flush_list);
        spin_lock_init(&mdsc->snap_flush_lock);
index 5cd131b41d84f4842bf11ed3084d6700dae5112b..14c7e8c49970adb914ff311c14906e4c84cda1d4 100644 (file)
@@ -340,6 +340,14 @@ struct ceph_quotarealm_inode {
        struct inode *inode;
 };
 
+struct cap_wait {
+       struct list_head        list;
+       unsigned long           ino;
+       pid_t                   tgid;
+       int                     need;
+       int                     want;
+};
+
 /*
  * mds client state
  */
@@ -416,6 +424,7 @@ struct ceph_mds_client {
        spinlock_t      caps_list_lock;
        struct          list_head caps_list; /* unused (reserved or
                                                unreserved) */
+       struct          list_head cap_wait_list;
        int             caps_total_count;    /* total caps allocated */
        int             caps_use_count;      /* in use */
        int             caps_use_max;        /* max used caps */
index aeec1d6e3769e41819cb6a46cb593a4bee68d2d0..471bac335fae6ed51b8db1f289e7ec3b94244450 100644 (file)
@@ -158,6 +158,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
                void *pexport_targets = NULL;
                struct ceph_timespec laggy_since;
                struct ceph_mds_info *info;
+               bool laggy;
 
                ceph_decode_need(p, end, sizeof(u64) + 1, bad);
                global_id = ceph_decode_64(p);
@@ -190,6 +191,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
                if (err)
                        goto corrupt;
                ceph_decode_copy(p, &laggy_since, sizeof(laggy_since));
+               laggy = laggy_since.tv_sec != 0 || laggy_since.tv_nsec != 0;
                *p += sizeof(u32);
                ceph_decode_32_safe(p, end, namelen, bad);
                *p += namelen;
@@ -207,10 +209,11 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
                        *p = info_end;
                }
 
-               dout("mdsmap_decode %d/%d %lld mds%d.%d %s %s\n",
+               dout("mdsmap_decode %d/%d %lld mds%d.%d %s %s%s\n",
                     i+1, n, global_id, mds, inc,
                     ceph_pr_addr(&addr),
-                    ceph_mds_state_name(state));
+                    ceph_mds_state_name(state),
+                    laggy ? "(laggy)" : "");
 
                if (mds < 0 || state <= 0)
                        continue;
@@ -230,8 +233,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
                info->global_id = global_id;
                info->state = state;
                info->addr = addr;
-               info->laggy = (laggy_since.tv_sec != 0 ||
-                              laggy_since.tv_nsec != 0);
+               info->laggy = laggy;
                info->num_export_targets = num_export_targets;
                if (num_export_targets) {
                        info->export_targets = kcalloc(num_export_targets,
@@ -355,6 +357,8 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
                m->m_damaged = false;
        }
 bad_ext:
+       dout("mdsmap_decode m_enabled: %d, m_damaged: %d, m_num_laggy: %d\n",
+            !!m->m_enabled, !!m->m_damaged, m->m_num_laggy);
        *p = end;
        dout("mdsmap_decode success epoch %u\n", m->m_epoch);
        return m;
index 9c9a7c68eea3be1191aaa6e0616138c0e6b10d3a..29a795f975dfa346e62aa29b004c792a9d830ace 100644 (file)
@@ -172,10 +172,10 @@ static const struct fs_parameter_enum ceph_mount_param_enums[] = {
 static const struct fs_parameter_spec ceph_mount_param_specs[] = {
        fsparam_flag_no ("acl",                         Opt_acl),
        fsparam_flag_no ("asyncreaddir",                Opt_asyncreaddir),
-       fsparam_u32     ("caps_max",                    Opt_caps_max),
+       fsparam_s32     ("caps_max",                    Opt_caps_max),
        fsparam_u32     ("caps_wanted_delay_max",       Opt_caps_wanted_delay_max),
        fsparam_u32     ("caps_wanted_delay_min",       Opt_caps_wanted_delay_min),
-       fsparam_s32     ("write_congestion_kb",         Opt_congestion_kb),
+       fsparam_u32     ("write_congestion_kb",         Opt_congestion_kb),
        fsparam_flag_no ("copyfrom",                    Opt_copyfrom),
        fsparam_flag_no ("dcache",                      Opt_dcache),
        fsparam_flag_no ("dirstat",                     Opt_dirstat),
@@ -187,8 +187,8 @@ static const struct fs_parameter_spec ceph_mount_param_specs[] = {
        fsparam_flag_no ("quotadf",                     Opt_quotadf),
        fsparam_u32     ("rasize",                      Opt_rasize),
        fsparam_flag_no ("rbytes",                      Opt_rbytes),
-       fsparam_s32     ("readdir_max_bytes",           Opt_readdir_max_bytes),
-       fsparam_s32     ("readdir_max_entries",         Opt_readdir_max_entries),
+       fsparam_u32     ("readdir_max_bytes",           Opt_readdir_max_bytes),
+       fsparam_u32     ("readdir_max_entries",         Opt_readdir_max_entries),
        fsparam_enum    ("recover_session",             Opt_recover_session),
        fsparam_flag_no ("require_active_mds",          Opt_require_active_mds),
        fsparam_u32     ("rsize",                       Opt_rsize),
@@ -328,7 +328,9 @@ static int ceph_parse_mount_param(struct fs_context *fc,
                fsopt->caps_wanted_delay_max = result.uint_32;
                break;
        case Opt_caps_max:
-               fsopt->caps_max = result.uint_32;
+               if (result.int_32 < 0)
+                       goto out_of_range;
+               fsopt->caps_max = result.int_32;
                break;
        case Opt_readdir_max_entries:
                if (result.uint_32 < 1)
@@ -547,25 +549,25 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
                seq_show_option(m, "recover_session", "clean");
 
        if (fsopt->wsize != CEPH_MAX_WRITE_SIZE)
-               seq_printf(m, ",wsize=%d", fsopt->wsize);
+               seq_printf(m, ",wsize=%u", fsopt->wsize);
        if (fsopt->rsize != CEPH_MAX_READ_SIZE)
-               seq_printf(m, ",rsize=%d", fsopt->rsize);
+               seq_printf(m, ",rsize=%u", fsopt->rsize);
        if (fsopt->rasize != CEPH_RASIZE_DEFAULT)
-               seq_printf(m, ",rasize=%d", fsopt->rasize);
+               seq_printf(m, ",rasize=%u", fsopt->rasize);
        if (fsopt->congestion_kb != default_congestion_kb())
-               seq_printf(m, ",write_congestion_kb=%d", fsopt->congestion_kb);
+               seq_printf(m, ",write_congestion_kb=%u", fsopt->congestion_kb);
        if (fsopt->caps_max)
                seq_printf(m, ",caps_max=%d", fsopt->caps_max);
        if (fsopt->caps_wanted_delay_min != CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT)
-               seq_printf(m, ",caps_wanted_delay_min=%d",
+               seq_printf(m, ",caps_wanted_delay_min=%u",
                         fsopt->caps_wanted_delay_min);
        if (fsopt->caps_wanted_delay_max != CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT)
-               seq_printf(m, ",caps_wanted_delay_max=%d",
+               seq_printf(m, ",caps_wanted_delay_max=%u",
                           fsopt->caps_wanted_delay_max);
        if (fsopt->max_readdir != CEPH_MAX_READDIR_DEFAULT)
-               seq_printf(m, ",readdir_max_entries=%d", fsopt->max_readdir);
+               seq_printf(m, ",readdir_max_entries=%u", fsopt->max_readdir);
        if (fsopt->max_readdir_bytes != CEPH_MAX_READDIR_BYTES_DEFAULT)
-               seq_printf(m, ",readdir_max_bytes=%d", fsopt->max_readdir_bytes);
+               seq_printf(m, ",readdir_max_bytes=%u", fsopt->max_readdir_bytes);
        if (strcmp(fsopt->snapdir_name, CEPH_SNAPDIRNAME_DEFAULT))
                seq_show_option(m, "snapdirname", fsopt->snapdir_name);
 
index f0f9cb7447ac9bfd6c7cb6bd312c2676b6aaa543..3bf1a01cd536dcf1330fec6d7d8a89102c5f6c77 100644 (file)
 #define CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT     60  /* cap release delay */
 
 struct ceph_mount_options {
-       int flags;
+       unsigned int flags;
 
-       int wsize;            /* max write size */
-       int rsize;            /* max read size */
-       int rasize;           /* max readahead */
-       int congestion_kb;    /* max writeback in flight */
-       int caps_wanted_delay_min, caps_wanted_delay_max;
+       unsigned int wsize;            /* max write size */
+       unsigned int rsize;            /* max read size */
+       unsigned int rasize;           /* max readahead */
+       unsigned int congestion_kb;    /* max writeback in flight */
+       unsigned int caps_wanted_delay_min, caps_wanted_delay_max;
        int caps_max;
-       int max_readdir;       /* max readdir result (entires) */
-       int max_readdir_bytes; /* max readdir result (bytes) */
+       unsigned int max_readdir;       /* max readdir result (entries) */
+       unsigned int max_readdir_bytes; /* max readdir result (bytes) */
 
        /*
         * everything above this point can be memcmp'd; everything below
index fd0262ce5ad5b8ec55960c271ad72c960a2763c1..ce9bac756c2a1a5a36ba0b3d8a4715fded4d3bff 100644 (file)
@@ -1061,7 +1061,7 @@ cap_unix(struct cifs_ses *ses)
 struct cached_fid {
        bool is_valid:1;        /* Do we have a useable root fid */
        bool file_all_info_is_valid:1;
-
+       bool has_lease:1;
        struct kref refcount;
        struct cifs_fid *fid;
        struct mutex fid_mutex;
index 4f554f019a98984fe3a2914d2f1365da6e82a6d6..cc86a67225d1b87fc56f57dbd6e0ad700edb18ce 100644 (file)
@@ -42,6 +42,7 @@
 #include "cifsproto.h"
 #include "cifs_unicode.h"
 #include "cifs_debug.h"
+#include "smb2proto.h"
 #include "fscache.h"
 #include "smbdirect.h"
 #ifdef CONFIG_CIFS_DFS_UPCALL
@@ -112,6 +113,8 @@ cifs_mark_open_files_invalid(struct cifs_tcon *tcon)
 
        mutex_lock(&tcon->crfid.fid_mutex);
        tcon->crfid.is_valid = false;
+       /* cached handle is not valid, so SMB2_CLOSE won't be sent below */
+       close_shroot_lease_locked(&tcon->crfid);
        memset(tcon->crfid.fid, 0, sizeof(struct cifs_fid));
        mutex_unlock(&tcon->crfid.fid_mutex);
 
index 18c7a33adcebf36b7908566897de44a1de683c46..5ef5e97a6d13eb8171c5b49ce2f02096dc18a391 100644 (file)
@@ -95,6 +95,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
                goto finished;
        }
 
+       memset(&oparms, 0, sizeof(struct cifs_open_parms));
        oparms.tcon = tcon;
        oparms.desired_access = desired_access;
        oparms.disposition = create_disposition;
index a5c96bc522cb3e3afaf2f8e582aa586f5325cfc0..6250370c11702b1346abeec4a971b8ff6d07fa16 100644 (file)
@@ -616,6 +616,7 @@ smb2_close_cached_fid(struct kref *ref)
                           cfid->fid->volatile_fid);
                cfid->is_valid = false;
                cfid->file_all_info_is_valid = false;
+               cfid->has_lease = false;
        }
 }
 
@@ -626,13 +627,28 @@ void close_shroot(struct cached_fid *cfid)
        mutex_unlock(&cfid->fid_mutex);
 }
 
+void close_shroot_lease_locked(struct cached_fid *cfid)
+{
+       if (cfid->has_lease) {
+               cfid->has_lease = false;
+               kref_put(&cfid->refcount, smb2_close_cached_fid);
+       }
+}
+
+void close_shroot_lease(struct cached_fid *cfid)
+{
+       mutex_lock(&cfid->fid_mutex);
+       close_shroot_lease_locked(cfid);
+       mutex_unlock(&cfid->fid_mutex);
+}
+
 void
 smb2_cached_lease_break(struct work_struct *work)
 {
        struct cached_fid *cfid = container_of(work,
                                struct cached_fid, lease_break);
 
-       close_shroot(cfid);
+       close_shroot_lease(cfid);
 }
 
 /*
@@ -773,6 +789,7 @@ int open_shroot(unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid *pfid)
        /* BB TBD check to see if oplock level check can be removed below */
        if (o_rsp->OplockLevel == SMB2_OPLOCK_LEVEL_LEASE) {
                kref_get(&tcon->crfid.refcount);
+               tcon->crfid.has_lease = true;
                smb2_parse_contexts(server, o_rsp,
                                &oparms.fid->epoch,
                                oparms.fid->lease_key, &oplock, NULL);
index 0ab6b1200288e304b0e9b724985d8ac3015292b4..9434f6dd8df327a104a2c427dda36bfc1f553718 100644 (file)
@@ -1847,7 +1847,7 @@ SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon)
        if ((tcon->need_reconnect) || (tcon->ses->need_reconnect))
                return 0;
 
-       close_shroot(&tcon->crfid);
+       close_shroot_lease(&tcon->crfid);
 
        rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, (void **) &req,
                             &total_len);
index a18272c987fed92ebbc0347c3e68a5565499ff23..27d29f2eb6c82f619331ab44b169460b777a86d7 100644 (file)
@@ -70,6 +70,8 @@ extern int smb3_handle_read_data(struct TCP_Server_Info *server,
 extern int open_shroot(unsigned int xid, struct cifs_tcon *tcon,
                        struct cifs_fid *pfid);
 extern void close_shroot(struct cached_fid *cfid);
+extern void close_shroot_lease(struct cached_fid *cfid);
+extern void close_shroot_lease_locked(struct cached_fid *cfid);
 extern void move_smb2_info_to_cifs(FILE_ALL_INFO *dst,
                                   struct smb2_file_all_info *src);
 extern int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
index 040df1f5e1c8b1d1f6f0bcc766b1e4918ab6e839..40cca351273f4c79a093a1c8aa5117cb6ca2f8eb 100644 (file)
@@ -151,7 +151,7 @@ static struct key *search_fscrypt_keyring(struct key *keyring,
 }
 
 #define FSCRYPT_FS_KEYRING_DESCRIPTION_SIZE    \
-       (CONST_STRLEN("fscrypt-") + FIELD_SIZEOF(struct super_block, s_id))
+       (CONST_STRLEN("fscrypt-") + sizeof_field(struct super_block, s_id))
 
 #define FSCRYPT_MK_DESCRIPTION_SIZE    (2 * FSCRYPT_KEY_IDENTIFIER_SIZE + 1)
 
index a13a78725c571372e2af4ebd9dc204eed8a1cadb..b766c3ee5fa8cbf955d0364687cb9cab97a92eac 100644 (file)
@@ -649,6 +649,8 @@ ssize_t erofs_listxattr(struct dentry *dentry,
        struct listxattr_iter it;
 
        ret = init_inode_xattrs(d_inode(dentry));
+       if (ret == -ENOATTR)
+               return 0;
        if (ret)
                return ret;
 
index 3da91a112babe874af392635a32e971d8885937f..2f4fcf985079d52400e7d58b732b7b189133b36c 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -960,7 +960,7 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
        return ksys_dup3(oldfd, newfd, 0);
 }
 
-int ksys_dup(unsigned int fildes)
+SYSCALL_DEFINE1(dup, unsigned int, fildes)
 {
        int ret = -EBADF;
        struct file *file = fget_raw(fildes);
@@ -975,11 +975,6 @@ int ksys_dup(unsigned int fildes)
        return ret;
 }
 
-SYSCALL_DEFINE1(dup, unsigned int, fildes)
-{
-       return ksys_dup(fildes);
-}
-
 int f_dupfd(unsigned int from, struct file *file, unsigned flags)
 {
        int err;
index 74b40506c5d916324404af2087395a72c2e73fee..90c4978781fb5fb48885a682ab89db72f3c780c6 100644 (file)
@@ -49,7 +49,6 @@ struct io_worker {
        struct hlist_nulls_node nulls_node;
        struct list_head all_list;
        struct task_struct *task;
-       wait_queue_head_t wait;
        struct io_wqe *wqe;
 
        struct io_wq_work *cur_work;
@@ -258,7 +257,7 @@ static bool io_wqe_activate_free_worker(struct io_wqe *wqe)
 
        worker = hlist_nulls_entry(n, struct io_worker, nulls_node);
        if (io_worker_get(worker)) {
-               wake_up(&worker->wait);
+               wake_up_process(worker->task);
                io_worker_release(worker);
                return true;
        }
@@ -492,28 +491,46 @@ next:
        } while (1);
 }
 
+static inline void io_worker_spin_for_work(struct io_wqe *wqe)
+{
+       int i = 0;
+
+       while (++i < 1000) {
+               if (io_wqe_run_queue(wqe))
+                       break;
+               if (need_resched())
+                       break;
+               cpu_relax();
+       }
+}
+
 static int io_wqe_worker(void *data)
 {
        struct io_worker *worker = data;
        struct io_wqe *wqe = worker->wqe;
        struct io_wq *wq = wqe->wq;
-       DEFINE_WAIT(wait);
+       bool did_work;
 
        io_worker_start(wqe, worker);
 
+       did_work = false;
        while (!test_bit(IO_WQ_BIT_EXIT, &wq->state)) {
-               prepare_to_wait(&worker->wait, &wait, TASK_INTERRUPTIBLE);
-
+               set_current_state(TASK_INTERRUPTIBLE);
+loop:
+               if (did_work)
+                       io_worker_spin_for_work(wqe);
                spin_lock_irq(&wqe->lock);
                if (io_wqe_run_queue(wqe)) {
                        __set_current_state(TASK_RUNNING);
                        io_worker_handle_work(worker);
-                       continue;
+                       did_work = true;
+                       goto loop;
                }
+               did_work = false;
                /* drops the lock on success, retry */
                if (__io_worker_idle(wqe, worker)) {
                        __release(&wqe->lock);
-                       continue;
+                       goto loop;
                }
                spin_unlock_irq(&wqe->lock);
                if (signal_pending(current))
@@ -526,8 +543,6 @@ static int io_wqe_worker(void *data)
                        break;
        }
 
-       finish_wait(&worker->wait, &wait);
-
        if (test_bit(IO_WQ_BIT_EXIT, &wq->state)) {
                spin_lock_irq(&wqe->lock);
                if (!wq_list_empty(&wqe->work_list))
@@ -589,7 +604,6 @@ static bool create_io_worker(struct io_wq *wq, struct io_wqe *wqe, int index)
 
        refcount_set(&worker->ref, 1);
        worker->nulls_node.pprev = NULL;
-       init_waitqueue_head(&worker->wait);
        worker->wqe = wqe;
        spin_lock_init(&worker->lock);
 
index 7c333a28e2a7e9874f27c85492b943b5d33fc935..fb993b2bd0ef019e76438bc5483b2995ba49fc8a 100644 (file)
@@ -35,7 +35,8 @@ static inline void wq_list_add_tail(struct io_wq_work_node *node,
                                    struct io_wq_work_list *list)
 {
        if (!list->first) {
-               list->first = list->last = node;
+               list->last = node;
+               WRITE_ONCE(list->first, node);
        } else {
                list->last->next = node;
                list->last = node;
@@ -47,7 +48,7 @@ static inline void wq_node_del(struct io_wq_work_list *list,
                               struct io_wq_work_node *prev)
 {
        if (node == list->first)
-               list->first = node->next;
+               WRITE_ONCE(list->first, node->next);
        if (node == list->last)
                list->last = prev;
        if (prev)
@@ -58,7 +59,7 @@ static inline void wq_node_del(struct io_wq_work_list *list,
 #define wq_list_for_each(pos, prv, head)                       \
        for (pos = (head)->first, prv = NULL; pos; prv = pos, pos = (pos)->next)
 
-#define wq_list_empty(list)    ((list)->first == NULL)
+#define wq_list_empty(list)    (READ_ONCE((list)->first) == NULL)
 #define INIT_WQ_LIST(list)     do {                            \
        (list)->first = NULL;                                   \
        (list)->last = NULL;                                    \
index 405be10da73d4bb37b2fea9a3ca9f9247e01a5b4..9b1833fedc5ccc3ca829df39e0dc1cbed6b9999e 100644 (file)
@@ -293,7 +293,7 @@ struct io_poll_iocb {
        __poll_t                        events;
        bool                            done;
        bool                            canceled;
-       struct wait_queue_entry         *wait;
+       struct wait_queue_entry         wait;
 };
 
 struct io_timeout_data {
@@ -377,6 +377,7 @@ struct io_kiocb {
 #define REQ_F_TIMEOUT_NOSEQ    8192    /* no timeout sequence */
 #define REQ_F_INFLIGHT         16384   /* on inflight list */
 #define REQ_F_COMP_LOCKED      32768   /* completion under lock */
+#define REQ_F_HARDLINK         65536   /* doesn't sever on completion < 0 */
        u64                     user_data;
        u32                     result;
        u32                     sequence;
@@ -580,7 +581,9 @@ static inline bool io_prep_async_work(struct io_kiocb *req,
                switch (req->sqe->opcode) {
                case IORING_OP_WRITEV:
                case IORING_OP_WRITE_FIXED:
-                       do_hashed = true;
+                       /* only regular files should be hashed for writes */
+                       if (req->flags & REQ_F_ISREG)
+                               do_hashed = true;
                        /* fall-through */
                case IORING_OP_READV:
                case IORING_OP_READ_FIXED:
@@ -1292,6 +1295,12 @@ static void kiocb_end_write(struct io_kiocb *req)
        file_end_write(req->file);
 }
 
+static inline void req_set_fail_links(struct io_kiocb *req)
+{
+       if ((req->flags & (REQ_F_LINK | REQ_F_HARDLINK)) == REQ_F_LINK)
+               req->flags |= REQ_F_FAIL_LINK;
+}
+
 static void io_complete_rw_common(struct kiocb *kiocb, long res)
 {
        struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw);
@@ -1299,8 +1308,8 @@ static void io_complete_rw_common(struct kiocb *kiocb, long res)
        if (kiocb->ki_flags & IOCB_WRITE)
                kiocb_end_write(req);
 
-       if ((req->flags & REQ_F_LINK) && res != req->result)
-               req->flags |= REQ_F_FAIL_LINK;
+       if (res != req->result)
+               req_set_fail_links(req);
        io_cqring_add_event(req, res);
 }
 
@@ -1330,8 +1339,8 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long res2)
        if (kiocb->ki_flags & IOCB_WRITE)
                kiocb_end_write(req);
 
-       if ((req->flags & REQ_F_LINK) && res != req->result)
-               req->flags |= REQ_F_FAIL_LINK;
+       if (res != req->result)
+               req_set_fail_links(req);
        req->result = res;
        if (res != -EAGAIN)
                req->flags |= REQ_F_IOPOLL_COMPLETED;
@@ -1422,7 +1431,7 @@ static bool io_file_supports_async(struct file *file)
 {
        umode_t mode = file_inode(file)->i_mode;
 
-       if (S_ISBLK(mode) || S_ISCHR(mode))
+       if (S_ISBLK(mode) || S_ISCHR(mode) || S_ISSOCK(mode))
                return true;
        if (S_ISREG(mode) && file->f_op != &io_uring_fops)
                return true;
@@ -1858,7 +1867,9 @@ static int io_write(struct io_kiocb *req, struct io_kiocb **nxt,
                goto copy_iov;
        }
 
-       if (force_nonblock && !(kiocb->ki_flags & IOCB_DIRECT))
+       /* file path doesn't support NOWAIT for non-direct_IO */
+       if (force_nonblock && !(kiocb->ki_flags & IOCB_DIRECT) &&
+           (req->flags & REQ_F_ISREG))
                goto copy_iov;
 
        iov_count = iov_iter_count(&iter);
@@ -1956,8 +1967,8 @@ static int io_fsync(struct io_kiocb *req, const struct io_uring_sqe *sqe,
                                end > 0 ? end : LLONG_MAX,
                                fsync_flags & IORING_FSYNC_DATASYNC);
 
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_cqring_add_event(req, ret);
        io_put_req_find_next(req, nxt);
        return 0;
@@ -2003,8 +2014,8 @@ static int io_sync_file_range(struct io_kiocb *req,
 
        ret = sync_file_range(req->rw.ki_filp, sqe_off, sqe_len, flags);
 
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_cqring_add_event(req, ret);
        io_put_req_find_next(req, nxt);
        return 0;
@@ -2019,6 +2030,7 @@ static int io_sendmsg_prep(struct io_kiocb *req, struct io_async_ctx *io)
 
        flags = READ_ONCE(sqe->msg_flags);
        msg = (struct user_msghdr __user *)(unsigned long) READ_ONCE(sqe->addr);
+       io->msg.iov = io->msg.fast_iov;
        return sendmsg_copy_msghdr(&io->msg.msg, msg, flags, &io->msg.iov);
 #else
        return 0;
@@ -2054,7 +2066,6 @@ static int io_sendmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe,
                } else {
                        kmsg = &io.msg.msg;
                        kmsg->msg_name = &addr;
-                       io.msg.iov = io.msg.fast_iov;
                        ret = io_sendmsg_prep(req, &io);
                        if (ret)
                                goto out;
@@ -2079,8 +2090,8 @@ static int io_sendmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe,
 
 out:
        io_cqring_add_event(req, ret);
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_put_req_find_next(req, nxt);
        return 0;
 #else
@@ -2097,6 +2108,7 @@ static int io_recvmsg_prep(struct io_kiocb *req, struct io_async_ctx *io)
 
        flags = READ_ONCE(sqe->msg_flags);
        msg = (struct user_msghdr __user *)(unsigned long) READ_ONCE(sqe->addr);
+       io->msg.iov = io->msg.fast_iov;
        return recvmsg_copy_msghdr(&io->msg.msg, msg, flags, &io->msg.uaddr,
                                        &io->msg.iov);
 #else
@@ -2136,7 +2148,6 @@ static int io_recvmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe,
                } else {
                        kmsg = &io.msg.msg;
                        kmsg->msg_name = &addr;
-                       io.msg.iov = io.msg.fast_iov;
                        ret = io_recvmsg_prep(req, &io);
                        if (ret)
                                goto out;
@@ -2161,8 +2172,8 @@ static int io_recvmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe,
 
 out:
        io_cqring_add_event(req, ret);
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_put_req_find_next(req, nxt);
        return 0;
 #else
@@ -2196,8 +2207,8 @@ static int io_accept(struct io_kiocb *req, const struct io_uring_sqe *sqe,
        }
        if (ret == -ERESTARTSYS)
                ret = -EINTR;
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_cqring_add_event(req, ret);
        io_put_req_find_next(req, nxt);
        return 0;
@@ -2263,8 +2274,8 @@ static int io_connect(struct io_kiocb *req, const struct io_uring_sqe *sqe,
        if (ret == -ERESTARTSYS)
                ret = -EINTR;
 out:
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_cqring_add_event(req, ret);
        io_put_req_find_next(req, nxt);
        return 0;
@@ -2279,8 +2290,8 @@ static void io_poll_remove_one(struct io_kiocb *req)
 
        spin_lock(&poll->head->lock);
        WRITE_ONCE(poll->canceled, true);
-       if (!list_empty(&poll->wait->entry)) {
-               list_del_init(&poll->wait->entry);
+       if (!list_empty(&poll->wait.entry)) {
+               list_del_init(&poll->wait.entry);
                io_queue_async_work(req);
        }
        spin_unlock(&poll->head->lock);
@@ -2340,8 +2351,8 @@ static int io_poll_remove(struct io_kiocb *req, const struct io_uring_sqe *sqe)
        spin_unlock_irq(&ctx->completion_lock);
 
        io_cqring_add_event(req, ret);
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_put_req(req);
        return 0;
 }
@@ -2351,7 +2362,6 @@ static void io_poll_complete(struct io_kiocb *req, __poll_t mask, int error)
        struct io_ring_ctx *ctx = req->ctx;
 
        req->poll.done = true;
-       kfree(req->poll.wait);
        if (error)
                io_cqring_fill_event(req, error);
        else
@@ -2389,7 +2399,7 @@ static void io_poll_complete_work(struct io_wq_work **workptr)
         */
        spin_lock_irq(&ctx->completion_lock);
        if (!mask && ret != -ECANCELED) {
-               add_wait_queue(poll->head, poll->wait);
+               add_wait_queue(poll->head, &poll->wait);
                spin_unlock_irq(&ctx->completion_lock);
                return;
        }
@@ -2399,8 +2409,8 @@ static void io_poll_complete_work(struct io_wq_work **workptr)
 
        io_cqring_ev_posted(ctx);
 
-       if (ret < 0 && req->flags & REQ_F_LINK)
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_put_req_find_next(req, &nxt);
        if (nxt)
                *workptr = &nxt->work;
@@ -2419,7 +2429,7 @@ static int io_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync,
        if (mask && !(mask & poll->events))
                return 0;
 
-       list_del_init(&poll->wait->entry);
+       list_del_init(&poll->wait.entry);
 
        /*
         * Run completion inline if we can. We're using trylock here because
@@ -2460,7 +2470,7 @@ static void io_poll_queue_proc(struct file *file, struct wait_queue_head *head,
 
        pt->error = 0;
        pt->req->poll.head = head;
-       add_wait_queue(head, pt->req->poll.wait);
+       add_wait_queue(head, &pt->req->poll.wait);
 }
 
 static void io_poll_req_insert(struct io_kiocb *req)
@@ -2489,10 +2499,6 @@ static int io_poll_add(struct io_kiocb *req, const struct io_uring_sqe *sqe,
        if (!poll->file)
                return -EBADF;
 
-       poll->wait = kmalloc(sizeof(*poll->wait), GFP_KERNEL);
-       if (!poll->wait)
-               return -ENOMEM;
-
        req->io = NULL;
        INIT_IO_WORK(&req->work, io_poll_complete_work);
        events = READ_ONCE(sqe->poll_events);
@@ -2509,9 +2515,9 @@ static int io_poll_add(struct io_kiocb *req, const struct io_uring_sqe *sqe,
        ipt.error = -EINVAL; /* same as no support for IOCB_CMD_POLL */
 
        /* initialized the list so that we can do list_empty checks */
-       INIT_LIST_HEAD(&poll->wait->entry);
-       init_waitqueue_func_entry(poll->wait, io_poll_wake);
-       poll->wait->private = poll;
+       INIT_LIST_HEAD(&poll->wait.entry);
+       init_waitqueue_func_entry(&poll->wait, io_poll_wake);
+       poll->wait.private = poll;
 
        INIT_LIST_HEAD(&req->list);
 
@@ -2520,14 +2526,14 @@ static int io_poll_add(struct io_kiocb *req, const struct io_uring_sqe *sqe,
        spin_lock_irq(&ctx->completion_lock);
        if (likely(poll->head)) {
                spin_lock(&poll->head->lock);
-               if (unlikely(list_empty(&poll->wait->entry))) {
+               if (unlikely(list_empty(&poll->wait.entry))) {
                        if (ipt.error)
                                cancel = true;
                        ipt.error = 0;
                        mask = 0;
                }
                if (mask || ipt.error)
-                       list_del_init(&poll->wait->entry);
+                       list_del_init(&poll->wait.entry);
                else if (cancel)
                        WRITE_ONCE(poll->canceled, true);
                else if (!poll->done) /* actually waiting for an event */
@@ -2582,8 +2588,7 @@ static enum hrtimer_restart io_timeout_fn(struct hrtimer *timer)
        spin_unlock_irqrestore(&ctx->completion_lock, flags);
 
        io_cqring_ev_posted(ctx);
-       if (req->flags & REQ_F_LINK)
-               req->flags |= REQ_F_FAIL_LINK;
+       req_set_fail_links(req);
        io_put_req(req);
        return HRTIMER_NORESTART;
 }
@@ -2608,8 +2613,7 @@ static int io_timeout_cancel(struct io_ring_ctx *ctx, __u64 user_data)
        if (ret == -1)
                return -EALREADY;
 
-       if (req->flags & REQ_F_LINK)
-               req->flags |= REQ_F_FAIL_LINK;
+       req_set_fail_links(req);
        io_cqring_fill_event(req, -ECANCELED);
        io_put_req(req);
        return 0;
@@ -2640,8 +2644,8 @@ static int io_timeout_remove(struct io_kiocb *req,
        io_commit_cqring(ctx);
        spin_unlock_irq(&ctx->completion_lock);
        io_cqring_ev_posted(ctx);
-       if (ret < 0 && req->flags & REQ_F_LINK)
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_put_req(req);
        return 0;
 }
@@ -2822,8 +2826,8 @@ done:
        spin_unlock_irqrestore(&ctx->completion_lock, flags);
        io_cqring_ev_posted(ctx);
 
-       if (ret < 0 && (req->flags & REQ_F_LINK))
-               req->flags |= REQ_F_FAIL_LINK;
+       if (ret < 0)
+               req_set_fail_links(req);
        io_put_req_find_next(req, nxt);
 }
 
@@ -2991,12 +2995,7 @@ static int io_issue_sqe(struct io_kiocb *req, struct io_kiocb **nxt,
                if (req->result == -EAGAIN)
                        return -EAGAIN;
 
-               /* workqueue context doesn't hold uring_lock, grab it now */
-               if (req->in_async)
-                       mutex_lock(&ctx->uring_lock);
                io_iopoll_req_issued(req);
-               if (req->in_async)
-                       mutex_unlock(&ctx->uring_lock);
        }
 
        return 0;
@@ -3044,8 +3043,7 @@ static void io_wq_submit_work(struct io_wq_work **workptr)
        io_put_req(req);
 
        if (ret) {
-               if (req->flags & REQ_F_LINK)
-                       req->flags |= REQ_F_FAIL_LINK;
+               req_set_fail_links(req);
                io_cqring_add_event(req, ret);
                io_put_req(req);
        }
@@ -3064,7 +3062,12 @@ static void io_wq_submit_work(struct io_wq_work **workptr)
        }
 }
 
-static bool io_op_needs_file(const struct io_uring_sqe *sqe)
+static bool io_req_op_valid(int op)
+{
+       return op >= IORING_OP_NOP && op < IORING_OP_LAST;
+}
+
+static int io_op_needs_file(const struct io_uring_sqe *sqe)
 {
        int op = READ_ONCE(sqe->opcode);
 
@@ -3075,9 +3078,11 @@ static bool io_op_needs_file(const struct io_uring_sqe *sqe)
        case IORING_OP_TIMEOUT_REMOVE:
        case IORING_OP_ASYNC_CANCEL:
        case IORING_OP_LINK_TIMEOUT:
-               return false;
+               return 0;
        default:
-               return true;
+               if (io_req_op_valid(op))
+                       return 1;
+               return -EINVAL;
        }
 }
 
@@ -3094,7 +3099,7 @@ static int io_req_set_file(struct io_submit_state *state, struct io_kiocb *req)
 {
        struct io_ring_ctx *ctx = req->ctx;
        unsigned flags;
-       int fd;
+       int fd, ret;
 
        flags = READ_ONCE(req->sqe->flags);
        fd = READ_ONCE(req->sqe->fd);
@@ -3102,8 +3107,9 @@ static int io_req_set_file(struct io_submit_state *state, struct io_kiocb *req)
        if (flags & IOSQE_IO_DRAIN)
                req->flags |= REQ_F_IO_DRAIN;
 
-       if (!io_op_needs_file(req->sqe))
-               return 0;
+       ret = io_op_needs_file(req->sqe);
+       if (ret <= 0)
+               return ret;
 
        if (flags & IOSQE_FIXED_FILE) {
                if (unlikely(!ctx->file_table ||
@@ -3179,8 +3185,7 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
        spin_unlock_irqrestore(&ctx->completion_lock, flags);
 
        if (prev) {
-               if (prev->flags & REQ_F_LINK)
-                       prev->flags |= REQ_F_FAIL_LINK;
+               req_set_fail_links(prev);
                io_async_find_and_cancel(ctx, req, prev->user_data, NULL,
                                                -ETIME);
                io_put_req(prev);
@@ -3231,13 +3236,14 @@ static struct io_kiocb *io_prep_linked_timeout(struct io_kiocb *req)
 
 static void __io_queue_sqe(struct io_kiocb *req)
 {
-       struct io_kiocb *linked_timeout = io_prep_linked_timeout(req);
+       struct io_kiocb *linked_timeout;
        struct io_kiocb *nxt = NULL;
        int ret;
 
+again:
+       linked_timeout = io_prep_linked_timeout(req);
+
        ret = io_issue_sqe(req, &nxt, true);
-       if (nxt)
-               io_queue_async_work(nxt);
 
        /*
         * We async punt it if the file wasn't marked NOWAIT, or if the file
@@ -3256,7 +3262,7 @@ static void __io_queue_sqe(struct io_kiocb *req)
                 * submit reference when the iocb is actually submitted.
                 */
                io_queue_async_work(req);
-               return;
+               goto done_req;
        }
 
 err:
@@ -3273,10 +3279,15 @@ err:
        /* and drop final reference, if we failed */
        if (ret) {
                io_cqring_add_event(req, ret);
-               if (req->flags & REQ_F_LINK)
-                       req->flags |= REQ_F_FAIL_LINK;
+               req_set_fail_links(req);
                io_put_req(req);
        }
+done_req:
+       if (nxt) {
+               req = nxt;
+               nxt = NULL;
+               goto again;
+       }
 }
 
 static void io_queue_sqe(struct io_kiocb *req)
@@ -3293,8 +3304,7 @@ static void io_queue_sqe(struct io_kiocb *req)
        if (ret) {
                if (ret != -EIOCBQUEUED) {
                        io_cqring_add_event(req, ret);
-                       if (req->flags & REQ_F_LINK)
-                               req->flags |= REQ_F_FAIL_LINK;
+                       req_set_fail_links(req);
                        io_double_put_req(req);
                }
        } else
@@ -3310,8 +3320,8 @@ static inline void io_queue_link_head(struct io_kiocb *req)
                io_queue_sqe(req);
 }
 
-
-#define SQE_VALID_FLAGS        (IOSQE_FIXED_FILE|IOSQE_IO_DRAIN|IOSQE_IO_LINK)
+#define SQE_VALID_FLAGS        (IOSQE_FIXED_FILE|IOSQE_IO_DRAIN|IOSQE_IO_LINK| \
+                               IOSQE_IO_HARDLINK)
 
 static bool io_submit_sqe(struct io_kiocb *req, struct io_submit_state *state,
                          struct io_kiocb **link)
@@ -3349,6 +3359,9 @@ err_req:
                if (req->sqe->flags & IOSQE_IO_DRAIN)
                        (*link)->flags |= REQ_F_DRAIN_LINK | REQ_F_IO_DRAIN;
 
+               if (req->sqe->flags & IOSQE_IO_HARDLINK)
+                       req->flags |= REQ_F_HARDLINK;
+
                io = kmalloc(sizeof(*io), GFP_KERNEL);
                if (!io) {
                        ret = -EAGAIN;
@@ -3358,13 +3371,16 @@ err_req:
                ret = io_req_defer_prep(req, io);
                if (ret) {
                        kfree(io);
+                       /* fail even hard links since we don't submit */
                        prev->flags |= REQ_F_FAIL_LINK;
                        goto err_req;
                }
                trace_io_uring_link(ctx, req, prev);
                list_add_tail(&req->link_list, &prev->link_list);
-       } else if (req->sqe->flags & IOSQE_IO_LINK) {
+       } else if (req->sqe->flags & (IOSQE_IO_LINK|IOSQE_IO_HARDLINK)) {
                req->flags |= REQ_F_LINK;
+               if (req->sqe->flags & IOSQE_IO_HARDLINK)
+                       req->flags |= REQ_F_HARDLINK;
 
                INIT_LIST_HEAD(&req->link_list);
                *link = req;
@@ -3647,7 +3663,9 @@ static int io_sq_thread(void *data)
                }
 
                to_submit = min(to_submit, ctx->sq_entries);
+               mutex_lock(&ctx->uring_lock);
                ret = io_submit_sqes(ctx, to_submit, NULL, -1, &cur_mm, true);
+               mutex_unlock(&ctx->uring_lock);
                if (ret > 0)
                        inflight += ret;
        }
index 2fd0c8bcb8c147f28d83ddd883402e8a40a3b7cd..be601d3a800807360a0272c713d4abfc25795687 100644 (file)
@@ -3325,8 +3325,8 @@ struct dentry *mount_subtree(struct vfsmount *m, const char *name)
 }
 EXPORT_SYMBOL(mount_subtree);
 
-int ksys_mount(const char __user *dev_name, const char __user *dir_name,
-              const char __user *type, unsigned long flags, void __user *data)
+SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name,
+               char __user *, type, unsigned long, flags, void __user *, data)
 {
        int ret;
        char *kernel_type;
@@ -3359,12 +3359,6 @@ out_type:
        return ret;
 }
 
-SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name,
-               char __user *, type, unsigned long, flags, void __user *, data)
-{
-       return ksys_mount(dev_name, dir_name, type, flags, data);
-}
-
 /*
  * Create a kernel mount representation for a new, prepared superblock
  * (specified by fs_fd) and attach to an open_tree-like file descriptor.
index b801c635310098bae2ba074bd66d8056c2764140..6220642fe113b69e6303877898bf53b04330dd90 100644 (file)
@@ -227,13 +227,17 @@ int ovl_set_attr(struct dentry *upperdentry, struct kstat *stat)
 struct ovl_fh *ovl_encode_real_fh(struct dentry *real, bool is_upper)
 {
        struct ovl_fh *fh;
-       int fh_type, fh_len, dwords;
-       void *buf;
+       int fh_type, dwords;
        int buflen = MAX_HANDLE_SZ;
        uuid_t *uuid = &real->d_sb->s_uuid;
+       int err;
 
-       buf = kmalloc(buflen, GFP_KERNEL);
-       if (!buf)
+       /* Make sure the real fid stays 32bit aligned */
+       BUILD_BUG_ON(OVL_FH_FID_OFFSET % 4);
+       BUILD_BUG_ON(MAX_HANDLE_SZ + OVL_FH_FID_OFFSET > 255);
+
+       fh = kzalloc(buflen + OVL_FH_FID_OFFSET, GFP_KERNEL);
+       if (!fh)
                return ERR_PTR(-ENOMEM);
 
        /*
@@ -242,27 +246,19 @@ struct ovl_fh *ovl_encode_real_fh(struct dentry *real, bool is_upper)
         * the price or reconnecting the dentry.
         */
        dwords = buflen >> 2;
-       fh_type = exportfs_encode_fh(real, buf, &dwords, 0);
+       fh_type = exportfs_encode_fh(real, (void *)fh->fb.fid, &dwords, 0);
        buflen = (dwords << 2);
 
-       fh = ERR_PTR(-EIO);
+       err = -EIO;
        if (WARN_ON(fh_type < 0) ||
            WARN_ON(buflen > MAX_HANDLE_SZ) ||
            WARN_ON(fh_type == FILEID_INVALID))
-               goto out;
+               goto out_err;
 
-       BUILD_BUG_ON(MAX_HANDLE_SZ + offsetof(struct ovl_fh, fid) > 255);
-       fh_len = offsetof(struct ovl_fh, fid) + buflen;
-       fh = kmalloc(fh_len, GFP_KERNEL);
-       if (!fh) {
-               fh = ERR_PTR(-ENOMEM);
-               goto out;
-       }
-
-       fh->version = OVL_FH_VERSION;
-       fh->magic = OVL_FH_MAGIC;
-       fh->type = fh_type;
-       fh->flags = OVL_FH_FLAG_CPU_ENDIAN;
+       fh->fb.version = OVL_FH_VERSION;
+       fh->fb.magic = OVL_FH_MAGIC;
+       fh->fb.type = fh_type;
+       fh->fb.flags = OVL_FH_FLAG_CPU_ENDIAN;
        /*
         * When we will want to decode an overlay dentry from this handle
         * and all layers are on the same fs, if we get a disconncted real
@@ -270,14 +266,15 @@ struct ovl_fh *ovl_encode_real_fh(struct dentry *real, bool is_upper)
         * it to upperdentry or to lowerstack is by checking this flag.
         */
        if (is_upper)
-               fh->flags |= OVL_FH_FLAG_PATH_UPPER;
-       fh->len = fh_len;
-       fh->uuid = *uuid;
-       memcpy(fh->fid, buf, buflen);
+               fh->fb.flags |= OVL_FH_FLAG_PATH_UPPER;
+       fh->fb.len = sizeof(fh->fb) + buflen;
+       fh->fb.uuid = *uuid;
 
-out:
-       kfree(buf);
        return fh;
+
+out_err:
+       kfree(fh);
+       return ERR_PTR(err);
 }
 
 int ovl_set_origin(struct dentry *dentry, struct dentry *lower,
@@ -300,8 +297,8 @@ int ovl_set_origin(struct dentry *dentry, struct dentry *lower,
        /*
         * Do not fail when upper doesn't support xattrs.
         */
-       err = ovl_check_setxattr(dentry, upper, OVL_XATTR_ORIGIN, fh,
-                                fh ? fh->len : 0, 0);
+       err = ovl_check_setxattr(dentry, upper, OVL_XATTR_ORIGIN, fh->buf,
+                                fh ? fh->fb.len : 0, 0);
        kfree(fh);
 
        return err;
@@ -317,7 +314,7 @@ static int ovl_set_upper_fh(struct dentry *upper, struct dentry *index)
        if (IS_ERR(fh))
                return PTR_ERR(fh);
 
-       err = ovl_do_setxattr(index, OVL_XATTR_UPPER, fh, fh->len, 0);
+       err = ovl_do_setxattr(index, OVL_XATTR_UPPER, fh->buf, fh->fb.len, 0);
 
        kfree(fh);
        return err;
index 702aa63f6774d75416b245656887394914cb26f4..29abdb1d3b5c6cf235e99e81948ee55b6d676636 100644 (file)
@@ -1170,7 +1170,7 @@ static int ovl_rename(struct inode *olddir, struct dentry *old,
        if (newdentry == trap)
                goto out_dput;
 
-       if (WARN_ON(olddentry->d_inode == newdentry->d_inode))
+       if (olddentry->d_inode == newdentry->d_inode)
                goto out_dput;
 
        err = 0;
index 73c9775215b33ba043468f57d6cb618fbcffe477..70e55588aedc74d966208f1b819335f6750970f3 100644 (file)
@@ -211,10 +211,11 @@ static int ovl_check_encode_origin(struct dentry *dentry)
        return 1;
 }
 
-static int ovl_d_to_fh(struct dentry *dentry, char *buf, int buflen)
+static int ovl_dentry_to_fid(struct dentry *dentry, u32 *fid, int buflen)
 {
        struct ovl_fh *fh = NULL;
        int err, enc_lower;
+       int len;
 
        /*
         * Check if we should encode a lower or upper file handle and maybe
@@ -231,11 +232,12 @@ static int ovl_d_to_fh(struct dentry *dentry, char *buf, int buflen)
                return PTR_ERR(fh);
 
        err = -EOVERFLOW;
-       if (fh->len > buflen)
+       len = OVL_FH_LEN(fh);
+       if (len > buflen)
                goto fail;
 
-       memcpy(buf, (char *)fh, fh->len);
-       err = fh->len;
+       memcpy(fid, fh, len);
+       err = len;
 
 out:
        kfree(fh);
@@ -243,31 +245,16 @@ out:
 
 fail:
        pr_warn_ratelimited("overlayfs: failed to encode file handle (%pd2, err=%i, buflen=%d, len=%d, type=%d)\n",
-                           dentry, err, buflen, fh ? (int)fh->len : 0,
-                           fh ? fh->type : 0);
+                           dentry, err, buflen, fh ? (int)fh->fb.len : 0,
+                           fh ? fh->fb.type : 0);
        goto out;
 }
 
-static int ovl_dentry_to_fh(struct dentry *dentry, u32 *fid, int *max_len)
-{
-       int res, len = *max_len << 2;
-
-       res = ovl_d_to_fh(dentry, (char *)fid, len);
-       if (res <= 0)
-               return FILEID_INVALID;
-
-       len = res;
-
-       /* Round up to dwords */
-       *max_len = (len + 3) >> 2;
-       return OVL_FILEID;
-}
-
 static int ovl_encode_fh(struct inode *inode, u32 *fid, int *max_len,
                         struct inode *parent)
 {
        struct dentry *dentry;
-       int type;
+       int bytes = *max_len << 2;
 
        /* TODO: encode connectable file handles */
        if (parent)
@@ -277,10 +264,14 @@ static int ovl_encode_fh(struct inode *inode, u32 *fid, int *max_len,
        if (WARN_ON(!dentry))
                return FILEID_INVALID;
 
-       type = ovl_dentry_to_fh(dentry, fid, max_len);
-
+       bytes = ovl_dentry_to_fid(dentry, fid, bytes);
        dput(dentry);
-       return type;
+       if (bytes <= 0)
+               return FILEID_INVALID;
+
+       *max_len = bytes >> 2;
+
+       return OVL_FILEID_V1;
 }
 
 /*
@@ -777,24 +768,45 @@ out_err:
        goto out;
 }
 
+static struct ovl_fh *ovl_fid_to_fh(struct fid *fid, int buflen, int fh_type)
+{
+       struct ovl_fh *fh;
+
+       /* If on-wire inner fid is aligned - nothing to do */
+       if (fh_type == OVL_FILEID_V1)
+               return (struct ovl_fh *)fid;
+
+       if (fh_type != OVL_FILEID_V0)
+               return ERR_PTR(-EINVAL);
+
+       fh = kzalloc(buflen, GFP_KERNEL);
+       if (!fh)
+               return ERR_PTR(-ENOMEM);
+
+       /* Copy unaligned inner fh into aligned buffer */
+       memcpy(&fh->fb, fid, buflen - OVL_FH_WIRE_OFFSET);
+       return fh;
+}
+
 static struct dentry *ovl_fh_to_dentry(struct super_block *sb, struct fid *fid,
                                       int fh_len, int fh_type)
 {
        struct dentry *dentry = NULL;
-       struct ovl_fh *fh = (struct ovl_fh *) fid;
+       struct ovl_fh *fh = NULL;
        int len = fh_len << 2;
        unsigned int flags = 0;
        int err;
 
-       err = -EINVAL;
-       if (fh_type != OVL_FILEID)
+       fh = ovl_fid_to_fh(fid, len, fh_type);
+       err = PTR_ERR(fh);
+       if (IS_ERR(fh))
                goto out_err;
 
        err = ovl_check_fh_len(fh, len);
        if (err)
                goto out_err;
 
-       flags = fh->flags;
+       flags = fh->fb.flags;
        dentry = (flags & OVL_FH_FLAG_PATH_UPPER) ?
                 ovl_upper_fh_to_d(sb, fh) :
                 ovl_lower_fh_to_d(sb, fh);
@@ -802,12 +814,18 @@ static struct dentry *ovl_fh_to_dentry(struct super_block *sb, struct fid *fid,
        if (IS_ERR(dentry) && err != -ESTALE)
                goto out_err;
 
+out:
+       /* We may have needed to re-align OVL_FILEID_V0 */
+       if (!IS_ERR_OR_NULL(fh) && fh != (void *)fid)
+               kfree(fh);
+
        return dentry;
 
 out_err:
        pr_warn_ratelimited("overlayfs: failed to decode file handle (len=%d, type=%d, flags=%x, err=%i)\n",
-                           len, fh_type, flags, err);
-       return ERR_PTR(err);
+                           fh_len, fh_type, flags, err);
+       dentry = ERR_PTR(err);
+       goto out;
 }
 
 static struct dentry *ovl_fh_to_parent(struct super_block *sb, struct fid *fid,
index bc14781886bf0735fe9cf32681ab87a3f2703efc..b045cf1826fc4cb26d577d05916ab3545577061f 100644 (file)
@@ -200,8 +200,14 @@ int ovl_getattr(const struct path *path, struct kstat *stat,
                        if (ovl_test_flag(OVL_INDEX, d_inode(dentry)) ||
                            (!ovl_verify_lower(dentry->d_sb) &&
                             (is_dir || lowerstat.nlink == 1))) {
-                               stat->ino = lowerstat.ino;
                                lower_layer = ovl_layer_lower(dentry);
+                               /*
+                                * Cannot use origin st_dev;st_ino because
+                                * origin inode content may differ from overlay
+                                * inode content.
+                                */
+                               if (samefs || lower_layer->fsid)
+                                       stat->ino = lowerstat.ino;
                        }
 
                        /*
index c269d603352532057d278e88bcdcd2cf6ec33861..76ff6633917350672caa413964da6700811e9af1 100644 (file)
@@ -84,21 +84,21 @@ static int ovl_acceptable(void *ctx, struct dentry *dentry)
  * Return -ENODATA for "origin unknown".
  * Return <0 for an invalid file handle.
  */
-int ovl_check_fh_len(struct ovl_fh *fh, int fh_len)
+int ovl_check_fb_len(struct ovl_fb *fb, int fb_len)
 {
-       if (fh_len < sizeof(struct ovl_fh) || fh_len < fh->len)
+       if (fb_len < sizeof(struct ovl_fb) || fb_len < fb->len)
                return -EINVAL;
 
-       if (fh->magic != OVL_FH_MAGIC)
+       if (fb->magic != OVL_FH_MAGIC)
                return -EINVAL;
 
        /* Treat larger version and unknown flags as "origin unknown" */
-       if (fh->version > OVL_FH_VERSION || fh->flags & ~OVL_FH_FLAG_ALL)
+       if (fb->version > OVL_FH_VERSION || fb->flags & ~OVL_FH_FLAG_ALL)
                return -ENODATA;
 
        /* Treat endianness mismatch as "origin unknown" */
-       if (!(fh->flags & OVL_FH_FLAG_ANY_ENDIAN) &&
-           (fh->flags & OVL_FH_FLAG_BIG_ENDIAN) != OVL_FH_FLAG_CPU_ENDIAN)
+       if (!(fb->flags & OVL_FH_FLAG_ANY_ENDIAN) &&
+           (fb->flags & OVL_FH_FLAG_BIG_ENDIAN) != OVL_FH_FLAG_CPU_ENDIAN)
                return -ENODATA;
 
        return 0;
@@ -119,15 +119,15 @@ static struct ovl_fh *ovl_get_fh(struct dentry *dentry, const char *name)
        if (res == 0)
                return NULL;
 
-       fh = kzalloc(res, GFP_KERNEL);
+       fh = kzalloc(res + OVL_FH_WIRE_OFFSET, GFP_KERNEL);
        if (!fh)
                return ERR_PTR(-ENOMEM);
 
-       res = vfs_getxattr(dentry, name, fh, res);
+       res = vfs_getxattr(dentry, name, fh->buf, res);
        if (res < 0)
                goto fail;
 
-       err = ovl_check_fh_len(fh, res);
+       err = ovl_check_fb_len(&fh->fb, res);
        if (err < 0) {
                if (err == -ENODATA)
                        goto out;
@@ -158,12 +158,12 @@ struct dentry *ovl_decode_real_fh(struct ovl_fh *fh, struct vfsmount *mnt,
         * Make sure that the stored uuid matches the uuid of the lower
         * layer where file handle will be decoded.
         */
-       if (!uuid_equal(&fh->uuid, &mnt->mnt_sb->s_uuid))
+       if (!uuid_equal(&fh->fb.uuid, &mnt->mnt_sb->s_uuid))
                return NULL;
 
-       bytes = (fh->len - offsetof(struct ovl_fh, fid));
-       real = exportfs_decode_fh(mnt, (struct fid *)fh->fid,
-                                 bytes >> 2, (int)fh->type,
+       bytes = (fh->fb.len - offsetof(struct ovl_fb, fid));
+       real = exportfs_decode_fh(mnt, (struct fid *)fh->fb.fid,
+                                 bytes >> 2, (int)fh->fb.type,
                                  connected ? ovl_acceptable : NULL, mnt);
        if (IS_ERR(real)) {
                /*
@@ -173,7 +173,7 @@ struct dentry *ovl_decode_real_fh(struct ovl_fh *fh, struct vfsmount *mnt,
                 * index entries correctly.
                 */
                if (real == ERR_PTR(-ESTALE) &&
-                   !(fh->flags & OVL_FH_FLAG_PATH_UPPER))
+                   !(fh->fb.flags & OVL_FH_FLAG_PATH_UPPER))
                        real = NULL;
                return real;
        }
@@ -323,6 +323,14 @@ int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected,
        int i;
 
        for (i = 0; i < ofs->numlower; i++) {
+               /*
+                * If lower fs uuid is not unique among lower fs we cannot match
+                * fh->uuid to layer.
+                */
+               if (ofs->lower_layers[i].fsid &&
+                   ofs->lower_layers[i].fs->bad_uuid)
+                       continue;
+
                origin = ovl_decode_real_fh(fh, ofs->lower_layers[i].mnt,
                                            connected);
                if (origin)
@@ -400,7 +408,7 @@ static int ovl_verify_fh(struct dentry *dentry, const char *name,
        if (IS_ERR(ofh))
                return PTR_ERR(ofh);
 
-       if (fh->len != ofh->len || memcmp(fh, ofh, fh->len))
+       if (fh->fb.len != ofh->fb.len || memcmp(&fh->fb, &ofh->fb, fh->fb.len))
                err = -ESTALE;
 
        kfree(ofh);
@@ -431,7 +439,7 @@ int ovl_verify_set_fh(struct dentry *dentry, const char *name,
 
        err = ovl_verify_fh(dentry, name, fh);
        if (set && err == -ENODATA)
-               err = ovl_do_setxattr(dentry, name, fh, fh->len, 0);
+               err = ovl_do_setxattr(dentry, name, fh->buf, fh->fb.len, 0);
        if (err)
                goto fail;
 
@@ -505,20 +513,20 @@ int ovl_verify_index(struct ovl_fs *ofs, struct dentry *index)
                goto fail;
 
        err = -EINVAL;
-       if (index->d_name.len < sizeof(struct ovl_fh)*2)
+       if (index->d_name.len < sizeof(struct ovl_fb)*2)
                goto fail;
 
        err = -ENOMEM;
        len = index->d_name.len / 2;
-       fh = kzalloc(len, GFP_KERNEL);
+       fh = kzalloc(len + OVL_FH_WIRE_OFFSET, GFP_KERNEL);
        if (!fh)
                goto fail;
 
        err = -EINVAL;
-       if (hex2bin((u8 *)fh, index->d_name.name, len))
+       if (hex2bin(fh->buf, index->d_name.name, len))
                goto fail;
 
-       err = ovl_check_fh_len(fh, len);
+       err = ovl_check_fb_len(&fh->fb, len);
        if (err)
                goto fail;
 
@@ -597,11 +605,11 @@ static int ovl_get_index_name_fh(struct ovl_fh *fh, struct qstr *name)
 {
        char *n, *s;
 
-       n = kcalloc(fh->len, 2, GFP_KERNEL);
+       n = kcalloc(fh->fb.len, 2, GFP_KERNEL);
        if (!n)
                return -ENOMEM;
 
-       s  = bin2hex(n, fh, fh->len);
+       s  = bin2hex(n, fh->buf, fh->fb.len);
        *name = (struct qstr) QSTR_INIT(n, s - n);
 
        return 0;
index 6934bcf030f0b53ff7292561cb25fe14b7295158..f283b1d69a9ede9f33e65b61177c27fd9dd049ef 100644 (file)
@@ -71,20 +71,36 @@ enum ovl_entry_flag {
 #error Endianness not defined
 #endif
 
-/* The type returned by overlay exportfs ops when encoding an ovl_fh handle */
-#define OVL_FILEID     0xfb
+/* The type used to be returned by overlay exportfs for misaligned fid */
+#define OVL_FILEID_V0  0xfb
+/* The type returned by overlay exportfs for 32bit aligned fid */
+#define OVL_FILEID_V1  0xf8
 
-/* On-disk and in-memeory format for redirect by file handle */
-struct ovl_fh {
+/* On-disk format for "origin" file handle */
+struct ovl_fb {
        u8 version;     /* 0 */
        u8 magic;       /* 0xfb */
        u8 len;         /* size of this header + size of fid */
        u8 flags;       /* OVL_FH_FLAG_* */
        u8 type;        /* fid_type of fid */
        uuid_t uuid;    /* uuid of filesystem */
-       u8 fid[0];      /* file identifier */
+       u32 fid[0];     /* file identifier should be 32bit aligned in-memory */
 } __packed;
 
+/* In-memory and on-wire format for overlay file handle */
+struct ovl_fh {
+       u8 padding[3];  /* make sure fb.fid is 32bit aligned */
+       union {
+               struct ovl_fb fb;
+               u8 buf[0];
+       };
+} __packed;
+
+#define OVL_FH_WIRE_OFFSET     offsetof(struct ovl_fh, fb)
+#define OVL_FH_LEN(fh)         (OVL_FH_WIRE_OFFSET + (fh)->fb.len)
+#define OVL_FH_FID_OFFSET      (OVL_FH_WIRE_OFFSET + \
+                                offsetof(struct ovl_fb, fid))
+
 static inline int ovl_do_rmdir(struct inode *dir, struct dentry *dentry)
 {
        int err = vfs_rmdir(dir, dentry);
@@ -302,7 +318,13 @@ static inline void ovl_inode_unlock(struct inode *inode)
 
 
 /* namei.c */
-int ovl_check_fh_len(struct ovl_fh *fh, int fh_len);
+int ovl_check_fb_len(struct ovl_fb *fb, int fb_len);
+
+static inline int ovl_check_fh_len(struct ovl_fh *fh, int fh_len)
+{
+       return ovl_check_fb_len(&fh->fb, fh_len - OVL_FH_WIRE_OFFSET);
+}
+
 struct dentry *ovl_decode_real_fh(struct ovl_fh *fh, struct vfsmount *mnt,
                                  bool connected);
 int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected,
index a8279280e88dd89a5acdbda5f7acd179d5b81569..28348c44ea5b2a808277598bc6206168955d4c50 100644 (file)
@@ -22,6 +22,8 @@ struct ovl_config {
 struct ovl_sb {
        struct super_block *sb;
        dev_t pseudo_dev;
+       /* Unusable (conflicting) uuid */
+       bool bad_uuid;
 };
 
 struct ovl_layer {
index afbcb116a7f1b8d1f26eafcd94c7064bd58b56ef..7621ff176d15ce6920170f6c5064e63f07816522 100644 (file)
@@ -1255,7 +1255,7 @@ static bool ovl_lower_uuid_ok(struct ovl_fs *ofs, const uuid_t *uuid)
 {
        unsigned int i;
 
-       if (!ofs->config.nfs_export && !(ofs->config.index && ofs->upper_mnt))
+       if (!ofs->config.nfs_export && !ofs->upper_mnt)
                return true;
 
        for (i = 0; i < ofs->numlowerfs; i++) {
@@ -1263,9 +1263,13 @@ static bool ovl_lower_uuid_ok(struct ovl_fs *ofs, const uuid_t *uuid)
                 * We use uuid to associate an overlay lower file handle with a
                 * lower layer, so we can accept lower fs with null uuid as long
                 * as all lower layers with null uuid are on the same fs.
+                * if we detect multiple lower fs with the same uuid, we
+                * disable lower file handle decoding on all of them.
                 */
-               if (uuid_equal(&ofs->lower_fs[i].sb->s_uuid, uuid))
+               if (uuid_equal(&ofs->lower_fs[i].sb->s_uuid, uuid)) {
+                       ofs->lower_fs[i].bad_uuid = true;
                        return false;
+               }
        }
        return true;
 }
@@ -1277,6 +1281,7 @@ static int ovl_get_fsid(struct ovl_fs *ofs, const struct path *path)
        unsigned int i;
        dev_t dev;
        int err;
+       bool bad_uuid = false;
 
        /* fsid 0 is reserved for upper fs even with non upper overlay */
        if (ofs->upper_mnt && ofs->upper_mnt->mnt_sb == sb)
@@ -1288,11 +1293,15 @@ static int ovl_get_fsid(struct ovl_fs *ofs, const struct path *path)
        }
 
        if (!ovl_lower_uuid_ok(ofs, &sb->s_uuid)) {
-               ofs->config.index = false;
-               ofs->config.nfs_export = false;
-               pr_warn("overlayfs: %s uuid detected in lower fs '%pd2', falling back to index=off,nfs_export=off.\n",
-                       uuid_is_null(&sb->s_uuid) ? "null" : "conflicting",
-                       path->dentry);
+               bad_uuid = true;
+               if (ofs->config.index || ofs->config.nfs_export) {
+                       ofs->config.index = false;
+                       ofs->config.nfs_export = false;
+                       pr_warn("overlayfs: %s uuid detected in lower fs '%pd2', falling back to index=off,nfs_export=off.\n",
+                               uuid_is_null(&sb->s_uuid) ? "null" :
+                                                           "conflicting",
+                               path->dentry);
+               }
        }
 
        err = get_anon_bdev(&dev);
@@ -1303,6 +1312,7 @@ static int ovl_get_fsid(struct ovl_fs *ofs, const struct path *path)
 
        ofs->lower_fs[ofs->numlowerfs].sb = sb;
        ofs->lower_fs[ofs->numlowerfs].pseudo_dev = dev;
+       ofs->lower_fs[ofs->numlowerfs].bad_uuid = bad_uuid;
        ofs->numlowerfs++;
 
        return ofs->numlowerfs;
index 87109e761fa5e3f8e994612e774bda07ef5c58c6..04d004ee2e8c645b079373eb9cf2abda15bc0529 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -364,17 +364,39 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to)
                        ret = -EAGAIN;
                        break;
                }
-               if (signal_pending(current)) {
-                       if (!ret)
-                               ret = -ERESTARTSYS;
-                       break;
-               }
                __pipe_unlock(pipe);
-               if (was_full) {
+
+               /*
+                * We only get here if we didn't actually read anything.
+                *
+                * However, we could have seen (and removed) a zero-sized
+                * pipe buffer, and might have made space in the buffers
+                * that way.
+                *
+                * You can't make zero-sized pipe buffers by doing an empty
+                * write (not even in packet mode), but they can happen if
+                * the writer gets an EFAULT when trying to fill a buffer
+                * that already got allocated and inserted in the buffer
+                * array.
+                *
+                * So we still need to wake up any pending writers in the
+                * _very_ unlikely case that the pipe was full, but we got
+                * no data.
+                */
+               if (unlikely(was_full)) {
                        wake_up_interruptible_sync_poll(&pipe->wait, EPOLLOUT | EPOLLWRNORM);
                        kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
                }
-               wait_event_interruptible(pipe->wait, pipe_readable(pipe));
+
+               /*
+                * But because we didn't read anything, at this point we can
+                * just return directly with -ERESTARTSYS if we're interrupted,
+                * since we've done any required wakeups and there's no need
+                * to mark anything accessed. And we've dropped the lock.
+                */
+               if (wait_event_interruptible(pipe->wait, pipe_readable(pipe)) < 0)
+                       return -ERESTARTSYS;
+
                __pipe_lock(pipe);
                was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage);
        }
index eabc6ac1990641fc6b4c54108d32328a9bee95c6..b79e3fd19d1152388c1972191f0a525a71a8c7f6 100644 (file)
@@ -315,7 +315,7 @@ int fsverity_ioctl_enable(struct file *filp, const void __user *uarg)
        if (arg.block_size != PAGE_SIZE)
                return -EINVAL;
 
-       if (arg.salt_size > FIELD_SIZEOF(struct fsverity_descriptor, salt))
+       if (arg.salt_size > sizeof_field(struct fsverity_descriptor, salt))
                return -EMSGSIZE;
 
        if (arg.sig_size > FS_VERITY_MAX_SIGNATURE_SIZE)
index e785c6eb35613f7b8d05600ea645a5adef58bc26..4b1a7724f20d7aeeba10504e3c826386f7b36192 100644 (file)
@@ -72,6 +72,8 @@
 #define MMP2_CLK_CCIC1_PHY             118
 #define MMP2_CLK_CCIC1_SPHY            119
 #define MMP2_CLK_DISP0_LCDC            120
+#define MMP2_CLK_USBHSIC0              121
+#define MMP2_CLK_USBHSIC1              122
 
 #define MMP2_NR_CLKS                   200
 #endif
index 19394c77ed9955ac0b949f8a536f9ed4fbbace08..e4a6949fd17165979616c4f361d2cf4948703007 100644 (file)
@@ -188,7 +188,6 @@ struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg,
 struct blkcg_gq *blkg_lookup_create(struct blkcg *blkcg,
                                    struct request_queue *q);
 int blkcg_init_queue(struct request_queue *q);
-void blkcg_drain_queue(struct request_queue *q);
 void blkcg_exit_queue(struct request_queue *q);
 
 /* Blkio controller policy registration */
@@ -720,7 +719,6 @@ static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { ret
 static inline struct blkcg_gq *blk_queue_root_blkg(struct request_queue *q)
 { return NULL; }
 static inline int blkcg_init_queue(struct request_queue *q) { return 0; }
-static inline void blkcg_drain_queue(struct request_queue *q) { }
 static inline void blkcg_exit_queue(struct request_queue *q) { }
 static inline int blkcg_policy_register(struct blkcg_policy *pol) { return 0; }
 static inline void blkcg_policy_unregister(struct blkcg_policy *pol) { }
index 2bae9ed3c7831cfe1a22e1e33e411165c520d87a..fb376b5b728190807fc5fa3c30dd10cea6577041 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/device.h>
 #include <linux/notifier.h>
 #include <linux/pm_opp.h>
+#include <linux/pm_qos.h>
 
 #define DEVFREQ_NAME_LEN 16
 
@@ -123,8 +124,8 @@ struct devfreq_dev_profile {
  * @previous_freq:     previously configured frequency value.
  * @data:      Private data of the governor. The devfreq framework does not
  *             touch this.
- * @min_freq:  Limit minimum frequency requested by user (0: none)
- * @max_freq:  Limit maximum frequency requested by user (0: none)
+ * @user_min_freq_req: PM QoS minimum frequency request from user (via sysfs)
+ * @user_max_freq_req: PM QoS maximum frequency request from user (via sysfs)
  * @scaling_min_freq:  Limit minimum frequency requested by OPP interface
  * @scaling_max_freq:  Limit maximum frequency requested by OPP interface
  * @stop_polling:       devfreq polling status of a device.
@@ -136,6 +137,8 @@ struct devfreq_dev_profile {
  * @time_in_state:     Statistics of devfreq states
  * @last_stat_updated: The last time stat updated
  * @transition_notifier_list: list head of DEVFREQ_TRANSITION_NOTIFIER notifier
+ * @nb_min:            Notifier block for DEV_PM_QOS_MIN_FREQUENCY
+ * @nb_max:            Notifier block for DEV_PM_QOS_MAX_FREQUENCY
  *
  * This structure stores the devfreq information for a give device.
  *
@@ -161,8 +164,8 @@ struct devfreq {
 
        void *data; /* private data for governors */
 
-       unsigned long min_freq;
-       unsigned long max_freq;
+       struct dev_pm_qos_request user_min_freq_req;
+       struct dev_pm_qos_request user_max_freq_req;
        unsigned long scaling_min_freq;
        unsigned long scaling_max_freq;
        bool stop_polling;
@@ -178,6 +181,9 @@ struct devfreq {
        unsigned long last_stat_updated;
 
        struct srcu_notifier_head transition_notifier_list;
+
+       struct notifier_block nb_min;
+       struct notifier_block nb_max;
 };
 
 struct devfreq_freqs {
index e226030c1df3c3f1c333f2acba8955a116921cf6..96ff76731e93df766d09394f8936254849e5b9b8 100644 (file)
@@ -1666,11 +1666,11 @@ extern bool kill_device(struct device *dev);
 #ifdef CONFIG_DEVTMPFS
 extern int devtmpfs_create_node(struct device *dev);
 extern int devtmpfs_delete_node(struct device *dev);
-extern int devtmpfs_mount(const char *mntdir);
+extern int devtmpfs_mount(void);
 #else
 static inline int devtmpfs_create_node(struct device *dev) { return 0; }
 static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
-static inline int devtmpfs_mount(const char *mountpoint) { return 0; }
+static inline int devtmpfs_mount(void) { return 0; }
 #endif
 
 /* drivers/base/power/shutdown.c */
index a141cb07e76a7f1a4abaf4793d66459718c65462..345f3748e0fb7b090b78632a22a39ca8a5f72077 100644 (file)
@@ -420,7 +420,7 @@ static inline bool insn_is_zext(const struct bpf_insn *insn)
 
 #define BPF_FIELD_SIZEOF(type, field)                          \
        ({                                                      \
-               const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
+               const int __size = bytes_to_bpf_size(sizeof_field(type, field)); \
                BUILD_BUG_ON(__size < 0);                       \
                __size;                                         \
        })
@@ -497,7 +497,7 @@ static inline bool insn_is_zext(const struct bpf_insn *insn)
 
 #define bpf_target_off(TYPE, MEMBER, SIZE, PTR_SIZE)                           \
        ({                                                                      \
-               BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE));             \
+               BUILD_BUG_ON(sizeof_field(TYPE, MEMBER) != (SIZE));             \
                *(PTR_SIZE) = (SIZE);                                           \
                offsetof(TYPE, MEMBER);                                         \
        })
@@ -608,7 +608,7 @@ static inline void bpf_compute_data_pointers(struct sk_buff *skb)
 {
        struct bpf_skb_data_end *cb = (struct bpf_skb_data_end *)skb->cb;
 
-       BUILD_BUG_ON(sizeof(*cb) > FIELD_SIZEOF(struct sk_buff, cb));
+       BUILD_BUG_ON(sizeof(*cb) > sizeof_field(struct sk_buff, cb));
        cb->data_meta = skb->data - skb_metadata_len(skb);
        cb->data_end  = skb->data + skb_headlen(skb);
 }
@@ -646,9 +646,9 @@ static inline u8 *bpf_skb_cb(struct sk_buff *skb)
         * attached to sockets, we need to clear the bpf_skb_cb() area
         * to not leak previous contents to user space.
         */
-       BUILD_BUG_ON(FIELD_SIZEOF(struct __sk_buff, cb) != BPF_SKB_CB_LEN);
-       BUILD_BUG_ON(FIELD_SIZEOF(struct __sk_buff, cb) !=
-                    FIELD_SIZEOF(struct qdisc_skb_cb, data));
+       BUILD_BUG_ON(sizeof_field(struct __sk_buff, cb) != BPF_SKB_CB_LEN);
+       BUILD_BUG_ON(sizeof_field(struct __sk_buff, cb) !=
+                    sizeof_field(struct qdisc_skb_cb, data));
 
        return qdisc_skb_cb(skb)->data;
 }
index 7247d35c3d160af210f35e07393fd04da361326b..db95244a62d44db0b7d921e4a3f66ec5cf2acb39 100644 (file)
@@ -264,6 +264,7 @@ int ftrace_modify_direct_caller(struct ftrace_func_entry *entry,
                                struct dyn_ftrace *rec,
                                unsigned long old_addr,
                                unsigned long new_addr);
+unsigned long ftrace_find_rec_direct(unsigned long ip);
 #else
 # define ftrace_direct_func_count 0
 static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
@@ -290,6 +291,10 @@ static inline int ftrace_modify_direct_caller(struct ftrace_func_entry *entry,
 {
        return -ENODEV;
 }
+static inline unsigned long ftrace_find_rec_direct(unsigned long ip)
+{
+       return 0;
+}
 #endif /* CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS */
 
 #ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
index d2f786706657b1f075f9091761aff0191248e9cf..582ef05ec07ed8fbc69e38a69c714420c72f9066 100644 (file)
@@ -300,6 +300,7 @@ struct i2c_driver {
  *     generic enough to hide second-sourcing and compatible revisions.
  * @adapter: manages the bus segment hosting this I2C device
  * @dev: Driver model device node for the slave.
+ * @init_irq: IRQ that was set at initialization
  * @irq: indicates the IRQ generated by this device (if any)
  * @detected: member of an i2c_driver.clients list or i2c-core's
  *     userspace_devices list
@@ -466,12 +467,6 @@ i2c_new_probed_device(struct i2c_adapter *adap,
 /* Common custom probe functions */
 extern int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr);
 
-/* For devices that use several addresses, use i2c_new_dummy() to make
- * client handles for the extra addresses.
- */
-extern struct i2c_client *
-i2c_new_dummy(struct i2c_adapter *adap, u16 address);
-
 extern struct i2c_client *
 i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address);
 
@@ -856,6 +851,11 @@ extern void i2c_del_driver(struct i2c_driver *driver);
 #define i2c_add_driver(driver) \
        i2c_register_driver(THIS_MODULE, driver)
 
+static inline bool i2c_client_has_driver(struct i2c_client *client)
+{
+       return !IS_ERR_OR_NULL(client) && client->dev.driver;
+}
+
 /* call the i2c_client->command() of all attached clients with
  * the given arguments */
 extern void i2c_clients_command(struct i2c_adapter *adap,
index d77fe34fb00a0c23b36d6698ab385ea9553d282e..aa5914355728686ff76b31a014cbbab9d619683a 100644 (file)
@@ -28,3 +28,5 @@ extern unsigned int real_root_dev;
 
 extern char __initramfs_start[];
 extern unsigned long __initramfs_size;
+
+void console_on_rootfs(void);
index 7ed1e2f8641e2f2d2d7f17266480b35450338f22..538c25e778c07eec9d26fdd1585247fe81de4544 100644 (file)
@@ -149,7 +149,7 @@ static inline bool is_error_page(struct page *page)
 #define KVM_REQUEST_ARCH_BASE     8
 
 #define KVM_ARCH_REQ_FLAGS(nr, flags) ({ \
-       BUILD_BUG_ON((unsigned)(nr) >= (FIELD_SIZEOF(struct kvm_vcpu, requests) * 8) - KVM_REQUEST_ARCH_BASE); \
+       BUILD_BUG_ON((unsigned)(nr) >= (sizeof_field(struct kvm_vcpu, requests) * 8) - KVM_REQUEST_ARCH_BASE); \
        (unsigned)(((nr) + KVM_REQUEST_ARCH_BASE) | (flags)); \
 })
 #define KVM_ARCH_REQ(nr)           KVM_ARCH_REQ_FLAGS(nr, 0)
index 10f81629b9cecc71fbf3bb0d906f6389b2d4b963..6d0d70f3219c5b80fccb2314acf0d2bc8de7f129 100644 (file)
@@ -270,6 +270,8 @@ struct nvme_fc_remote_port {
  *
  * Host/Initiator Transport Entrypoints/Parameters:
  *
+ * @module:  The LLDD module using the interface
+ *
  * @localport_delete:  The LLDD initiates deletion of a localport via
  *       nvme_fc_deregister_localport(). However, the teardown is
  *       asynchronous. This routine is called upon the completion of the
@@ -383,6 +385,8 @@ struct nvme_fc_remote_port {
  *       Value is Mandatory. Allowed to be zero.
  */
 struct nvme_fc_port_template {
+       struct module   *module;
+
        /* initiator-based functions */
        void    (*localport_delete)(struct nvme_fc_local_port *);
        void    (*remoteport_delete)(struct nvme_fc_remote_port *);
index ba3cfbb5231204c1d7f4cdc7288b3375a782eb8a..5c5c93ad6b500bfcfb165d9ebe3307e9bdde5689 100644 (file)
 #define IS_WORD_16                     BIT(0xd)
 #define ENABLE_16XX_MODE               BIT(0xe)
 #define HS_CHANNELS_RESERVED           BIT(0xf)
-#define DMA_ENGINE_HANDLE_IRQ          BIT(0x10)
 
 /* Defines for DMA Capabilities */
 #define DMA_HAS_TRANSPARENT_CAPS       (0x1 << 18)
@@ -239,9 +238,6 @@ struct omap_dma_lch {
        void (*callback)(int lch, u16 ch_status, void *data);
        void *data;
        long flags;
-       /* required for Dynamic chaining */
-       int prev_linked_ch;
-       int next_linked_ch;
        int state;
        int chain_id;
        int status;
@@ -303,7 +299,6 @@ extern void omap_set_dma_priority(int lch, int dst_port, int priority);
 extern int omap_request_dma(int dev_id, const char *dev_name,
                        void (*callback)(int lch, u16 ch_status, void *data),
                        void *data, int *dma_ch);
-extern void omap_enable_dma_irq(int ch, u16 irq_bits);
 extern void omap_disable_dma_irq(int ch, u16 irq_bits);
 extern void omap_free_dma(int ch);
 extern void omap_start_dma(int lch);
@@ -312,7 +307,6 @@ extern void omap_set_dma_transfer_params(int lch, int data_type,
                                         int elem_count, int frame_count,
                                         int sync_mode,
                                         int dma_trigger, int src_or_dst_synch);
-extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode);
 extern void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode mode);
 
 extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
@@ -329,22 +323,10 @@ extern void omap_set_dma_dest_data_pack(int lch, int enable);
 extern void omap_set_dma_dest_burst_mode(int lch,
                                         enum omap_dma_burst_mode burst_mode);
 
-extern void omap_set_dma_params(int lch,
-                               struct omap_dma_channel_params *params);
-
-extern void omap_dma_link_lch(int lch_head, int lch_queue);
-
-extern int omap_set_dma_callback(int lch,
-                       void (*callback)(int lch, u16 ch_status, void *data),
-                       void *data);
 extern dma_addr_t omap_get_dma_src_pos(int lch);
 extern dma_addr_t omap_get_dma_dst_pos(int lch);
 extern int omap_get_dma_active_status(int lch);
 extern int omap_dma_running(void);
-extern void omap_dma_set_global_params(int arb_rate, int max_fifo_depth,
-                                      int tparams);
-void omap_dma_global_context_save(void);
-void omap_dma_global_context_restore(void);
 
 #if defined(CONFIG_ARCH_OMAP1) && IS_ENABLED(CONFIG_FB_OMAP)
 #include <mach/lcd_dma.h>
index 3d507a8a698929f6a2cbab4ebace6bfa9f21847d..5c4d7a7551011da675fd47f996ab73201a988a7b 100644 (file)
@@ -14,7 +14,7 @@ struct phy_device;
 #define PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE      11
 
 #define PHY_LINK_LED_TRIGGER_NAME_SIZE (MII_BUS_ID_SIZE + \
-                                      FIELD_SIZEOF(struct mdio_device, addr)+\
+                                      sizeof_field(struct mdio_device, addr)+\
                                       PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE)
 
 struct phy_led_trigger {
index 0b938047514445e3b017f93589ee1e55d74b4555..8cfe570fdece617e997da7ce3950544e6e4d9c7a 100644 (file)
@@ -49,6 +49,7 @@ struct sysc_regbits {
        s8 emufree_shift;
 };
 
+#define SYSC_QUIRK_FORCE_MSTANDBY      BIT(20)
 #define SYSC_MODULE_QUIRK_AESS         BIT(19)
 #define SYSC_MODULE_QUIRK_SGX          BIT(18)
 #define SYSC_MODULE_QUIRK_HDQ1W                BIT(17)
index c09d67edda3a108eb507e02a0b1f7b0c1d68410f..1e6108b8d15fc22a2dd93a69d02028606996d831 100644 (file)
@@ -302,9 +302,8 @@ extern int kptr_restrict;
        printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
 #define pr_err(fmt, ...) \
        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_warning(fmt, ...) \
+#define pr_warn(fmt, ...) \
        printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_warn pr_warning
 #define pr_notice(fmt, ...) \
        printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
 #define pr_info(fmt, ...) \
index d0391cc2dae90611d9ec91187342202300efc01c..2960dedcfde8a25ad53ed7f15d133d7c9fdb4757 100644 (file)
@@ -1231,10 +1231,7 @@ asmlinkage long sys_ni_syscall(void);
  * the ksys_xyzyyz() functions prototyped below.
  */
 
-int ksys_mount(const char __user *dev_name, const char __user *dir_name,
-              const char __user *type, unsigned long flags, void __user *data);
 int ksys_umount(char __user *name, int flags);
-int ksys_dup(unsigned int fildes);
 int ksys_chroot(const char __user *filename);
 ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
 int ksys_chdir(const char __user *filename);
index c41833bd4590c10f556a94cf93b1a6f1338ccd96..4d9a0c6a2e5f35caf95727449b898c0f832bb0eb 100644 (file)
@@ -37,7 +37,7 @@ struct garp_skb_cb {
 static inline struct garp_skb_cb *garp_cb(struct sk_buff *skb)
 {
        BUILD_BUG_ON(sizeof(struct garp_skb_cb) >
-                    FIELD_SIZEOF(struct sk_buff, cb));
+                    sizeof_field(struct sk_buff, cb));
        return (struct garp_skb_cb *)skb->cb;
 }
 
index af645604f3289957c420ef2d9d0fdbaebc84c0f2..236503a50759a7229b9e9ee31ac99a0f2a7a012e 100644 (file)
@@ -33,8 +33,8 @@
 /* Used to memset ipv4 address padding. */
 #define IP_TUNNEL_KEY_IPV4_PAD offsetofend(struct ip_tunnel_key, u.ipv4.dst)
 #define IP_TUNNEL_KEY_IPV4_PAD_LEN                             \
-       (FIELD_SIZEOF(struct ip_tunnel_key, u) -                \
-        FIELD_SIZEOF(struct ip_tunnel_key, u.ipv4))
+       (sizeof_field(struct ip_tunnel_key, u) -                \
+        sizeof_field(struct ip_tunnel_key, u.ipv4))
 
 struct ip_tunnel_key {
        __be64                  tun_id;
@@ -63,7 +63,7 @@ struct ip_tunnel_key {
 
 /* Maximum tunnel options length. */
 #define IP_TUNNEL_OPTS_MAX                                     \
-       GENMASK((FIELD_SIZEOF(struct ip_tunnel_info,            \
+       GENMASK((sizeof_field(struct ip_tunnel_info,            \
                              options_len) * BITS_PER_BYTE) - 1, 0)
 
 struct ip_tunnel_info {
index ef58b4a071900777170685221cb6d3f261cf709c..1c308c034e1a6835cd9e4cf9b2f4069a58060a04 100644 (file)
@@ -39,7 +39,7 @@ struct mrp_skb_cb {
 static inline struct mrp_skb_cb *mrp_cb(struct sk_buff *skb)
 {
        BUILD_BUG_ON(sizeof(struct mrp_skb_cb) >
-                    FIELD_SIZEOF(struct sk_buff, cb));
+                    sizeof_field(struct sk_buff, cb));
        return (struct mrp_skb_cb *)skb->cb;
 }
 
index 44b5a00a9c64c8150c8eea2616a0a5b0e69223f3..37f0fbefb060f3dd9773978991fe131e80dadf97 100644 (file)
@@ -81,7 +81,7 @@ struct nf_conn_help {
 };
 
 #define NF_CT_HELPER_BUILD_BUG_ON(structsize) \
-       BUILD_BUG_ON((structsize) > FIELD_SIZEOF(struct nf_conn_help, data))
+       BUILD_BUG_ON((structsize) > sizeof_field(struct nf_conn_help, data))
 
 struct nf_conntrack_helper *__nf_conntrack_helper_find(const char *name,
                                                       u16 l3num, u8 protonum);
index 7281895fa6d999ba1fe2b67cd0ff676cb7fbcc22..2656155b40697846db4b8f8f6fda49e5f242d7c3 100644 (file)
@@ -41,7 +41,7 @@ struct nft_immediate_expr {
  */
 static inline u32 nft_cmp_fast_mask(unsigned int len)
 {
-       return cpu_to_le32(~0U >> (FIELD_SIZEOF(struct nft_cmp_fast_expr,
+       return cpu_to_le32(~0U >> (sizeof_field(struct nft_cmp_fast_expr,
                                                data) * BITS_PER_BYTE - len));
 }
 
index 87d54ef57f0040fd7bbd4344db0d3af7e6f6d992..80f996406bba898d849da5080b9494c97e18ebb6 100644 (file)
@@ -2305,7 +2305,7 @@ struct sock_skb_cb {
  * using skb->cb[] would keep using it directly and utilize its
  * alignement guarantee.
  */
-#define SOCK_SKB_CB_OFFSET ((FIELD_SIZEOF(struct sk_buff, cb) - \
+#define SOCK_SKB_CB_OFFSET ((sizeof_field(struct sk_buff, cb) - \
                            sizeof(struct sock_skb_cb)))
 
 #define SOCK_SKB_CB(__skb) ((struct sock_skb_cb *)((__skb)->cb + \
index cacb48faf670690f67fe5c45c79fa242c4c7fc38..5608e14e3aadf893570e4189c81cb5472a27e184 100644 (file)
@@ -2832,6 +2832,11 @@ int rdma_user_mmap_io(struct ib_ucontext *ucontext, struct vm_area_struct *vma,
 int rdma_user_mmap_entry_insert(struct ib_ucontext *ucontext,
                                struct rdma_user_mmap_entry *entry,
                                size_t length);
+int rdma_user_mmap_entry_insert_range(struct ib_ucontext *ucontext,
+                                     struct rdma_user_mmap_entry *entry,
+                                     size_t length, u32 min_pgoff,
+                                     u32 max_pgoff);
+
 struct rdma_user_mmap_entry *
 rdma_user_mmap_entry_get_pgoff(struct ib_ucontext *ucontext,
                               unsigned long pgoff);
diff --git a/include/sound/aess.h b/include/sound/aess.h
deleted file mode 100644 (file)
index cee0d09..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * AESS IP block reset
- *
- * Copyright (C) 2012 Texas Instruments, Inc.
- * Paul Walmsley
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-#ifndef __SOUND_AESS_H__
-#define __SOUND_AESS_H__
-
-#include <linux/kernel.h>
-#include <linux/io.h>
-
-/*
- * AESS_AUTO_GATING_ENABLE_OFFSET: offset in bytes of the AESS IP
- *     block's AESS_AUTO_GATING_ENABLE__1 register from the IP block's
- *     base address
- */
-#define AESS_AUTO_GATING_ENABLE_OFFSET                 0x07c
-
-/* Register bitfields in the AESS_AUTO_GATING_ENABLE__1 register */
-#define AESS_AUTO_GATING_ENABLE_SHIFT                  0
-
-/**
- * aess_enable_autogating - enable AESS internal autogating
- * @oh: struct omap_hwmod *
- *
- * Enable internal autogating on the AESS.  This allows the AESS to
- * indicate that it is idle to the OMAP PRCM.  Returns 0.
- */
-static inline void aess_enable_autogating(void __iomem *base)
-{
-       u32 v;
-
-       /* Set AESS_AUTO_GATING_ENABLE__1.ENABLE to allow idle entry */
-       v = 1 << AESS_AUTO_GATING_ENABLE_SHIFT;
-       writel(v, base + AESS_AUTO_GATING_ENABLE_OFFSET);
-}
-
-#endif /* __SOUND_AESS_H__ */
index eabccb46edd1264250320891f180ed7243ae990d..a3300e1b9a0100ab8660d5e127eae12ab13c93c6 100644 (file)
@@ -48,6 +48,7 @@ struct io_uring_sqe {
 #define IOSQE_FIXED_FILE       (1U << 0)       /* use fixed fileset */
 #define IOSQE_IO_DRAIN         (1U << 1)       /* issue after inflight IO */
 #define IOSQE_IO_LINK          (1U << 2)       /* links next sqe */
+#define IOSQE_IO_HARDLINK      (1U << 3)       /* like LINK, but stronger */
 
 /*
  * io_uring_setup() flags
@@ -57,23 +58,28 @@ struct io_uring_sqe {
 #define IORING_SETUP_SQ_AFF    (1U << 2)       /* sq_thread_cpu is valid */
 #define IORING_SETUP_CQSIZE    (1U << 3)       /* app defines CQ size */
 
-#define IORING_OP_NOP          0
-#define IORING_OP_READV                1
-#define IORING_OP_WRITEV       2
-#define IORING_OP_FSYNC                3
-#define IORING_OP_READ_FIXED   4
-#define IORING_OP_WRITE_FIXED  5
-#define IORING_OP_POLL_ADD     6
-#define IORING_OP_POLL_REMOVE  7
-#define IORING_OP_SYNC_FILE_RANGE      8
-#define IORING_OP_SENDMSG      9
-#define IORING_OP_RECVMSG      10
-#define IORING_OP_TIMEOUT      11
-#define IORING_OP_TIMEOUT_REMOVE       12
-#define IORING_OP_ACCEPT       13
-#define IORING_OP_ASYNC_CANCEL 14
-#define IORING_OP_LINK_TIMEOUT 15
-#define IORING_OP_CONNECT      16
+enum {
+       IORING_OP_NOP,
+       IORING_OP_READV,
+       IORING_OP_WRITEV,
+       IORING_OP_FSYNC,
+       IORING_OP_READ_FIXED,
+       IORING_OP_WRITE_FIXED,
+       IORING_OP_POLL_ADD,
+       IORING_OP_POLL_REMOVE,
+       IORING_OP_SYNC_FILE_RANGE,
+       IORING_OP_SENDMSG,
+       IORING_OP_RECVMSG,
+       IORING_OP_TIMEOUT,
+       IORING_OP_TIMEOUT_REMOVE,
+       IORING_OP_ACCEPT,
+       IORING_OP_ASYNC_CANCEL,
+       IORING_OP_LINK_TIMEOUT,
+       IORING_OP_CONNECT,
+
+       /* this goes last, obviously */
+       IORING_OP_LAST,
+};
 
 /*
  * sqe->fsync_flags
index af9cda887a23f32d64b989ced85f8ca2928b0950..f55cbd9cb8183f9a36b4da4e2f59c5a1720621c3 100644 (file)
@@ -387,12 +387,25 @@ static void __init get_fs_names(char *page)
        *s = '\0';
 }
 
-static int __init do_mount_root(char *name, char *fs, int flags, void *data)
+static int __init do_mount_root(const char *name, const char *fs,
+                                const int flags, const void *data)
 {
        struct super_block *s;
-       int err = ksys_mount(name, "/root", fs, flags, data);
-       if (err)
-               return err;
+       char *data_page;
+       struct page *p;
+       int ret;
+
+       /* do_mount() requires a full page as fifth argument */
+       p = alloc_page(GFP_KERNEL);
+       if (!p)
+               return -ENOMEM;
+
+       data_page = page_address(p);
+       strncpy(data_page, data, PAGE_SIZE - 1);
+
+       ret = do_mount(name, "/root", fs, flags, data_page);
+       if (ret)
+               goto out;
 
        ksys_chdir("/root");
        s = current->fs->pwd.dentry->d_sb;
@@ -402,7 +415,10 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
               s->s_type->name,
               sb_rdonly(s) ? " readonly" : "",
               MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
-       return 0;
+
+out:
+       put_page(p);
+       return ret;
 }
 
 void __init mount_block_root(char *name, int flags)
@@ -670,8 +686,8 @@ void __init prepare_namespace(void)
 
        mount_root();
 out:
-       devtmpfs_mount("dev");
-       ksys_mount(".", "/", NULL, MS_MOVE, NULL);
+       devtmpfs_mount();
+       do_mount(".", "/", NULL, MS_MOVE, NULL);
        ksys_chroot(".");
 }
 
index a9c6cc56f505e6210356b0c8d94e8aa90dbc2aa7..dab8b1151b5698719cc9bbb072cead21c8773181 100644 (file)
@@ -48,13 +48,10 @@ early_param("initrd", early_initrd);
 static int init_linuxrc(struct subprocess_info *info, struct cred *new)
 {
        ksys_unshare(CLONE_FS | CLONE_FILES);
-       /* stdin/stdout/stderr for /linuxrc */
-       ksys_open("/dev/console", O_RDWR, 0);
-       ksys_dup(0);
-       ksys_dup(0);
+       console_on_rootfs();
        /* move initrd over / and chdir/chroot in initrd root */
        ksys_chdir("/root");
-       ksys_mount(".", "/", NULL, MS_MOVE, NULL);
+       do_mount(".", "/", NULL, MS_MOVE, NULL);
        ksys_chroot(".");
        ksys_setsid();
        return 0;
@@ -89,7 +86,7 @@ static void __init handle_initrd(void)
        current->flags &= ~PF_FREEZER_SKIP;
 
        /* move initrd to rootfs' /old */
-       ksys_mount("..", ".", NULL, MS_MOVE, NULL);
+       do_mount("..", ".", NULL, MS_MOVE, NULL);
        /* switch root and cwd back to / of rootfs */
        ksys_chroot("..");
 
@@ -103,7 +100,7 @@ static void __init handle_initrd(void)
        mount_root();
 
        printk(KERN_NOTICE "Trying to move old root to /initrd ... ");
-       error = ksys_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL);
+       error = do_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL);
        if (!error)
                printk("okay\n");
        else {
index 91f6ebb30ef041a8667c18b949ccf42e976174e1..ec3a1463ac692a7ad15661ab65a52f30e50256df 100644 (file)
@@ -93,6 +93,7 @@
 #include <linux/rodata_test.h>
 #include <linux/jump_label.h>
 #include <linux/mem_encrypt.h>
+#include <linux/file.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -1155,6 +1156,30 @@ static int __ref kernel_init(void *unused)
              "See Linux Documentation/admin-guide/init.rst for guidance.");
 }
 
+void console_on_rootfs(void)
+{
+       struct file *file;
+       unsigned int i;
+
+       /* Open /dev/console in kernelspace, this should never fail */
+       file = filp_open("/dev/console", O_RDWR, 0);
+       if (!file)
+               goto err_out;
+
+       /* create stdin/stdout/stderr, this should never fail */
+       for (i = 0; i < 3; i++) {
+               if (f_dupfd(i, file, 0) != i)
+                       goto err_out;
+       }
+
+       return;
+
+err_out:
+       /* no panic -- this might not be fatal */
+       pr_err("Warning: unable to open an initial console.\n");
+       return;
+}
+
 static noinline void __init kernel_init_freeable(void)
 {
        /*
@@ -1190,12 +1215,8 @@ static noinline void __init kernel_init_freeable(void)
 
        do_basic_setup();
 
-       /* Open the /dev/console on the rootfs, this should never fail */
-       if (ksys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
-               pr_err("Warning: unable to open an initial console.\n");
+       console_on_rootfs();
 
-       (void) ksys_dup(0);
-       (void) ksys_dup(0);
        /*
         * check if there is an early userspace init.  If yes, let it do all
         * the work
index d126d156efc64e7d2d710197cf50377c12ad620d..915eacb9c059dd778c5ec6c19a66328db0a61968 100644 (file)
@@ -100,7 +100,7 @@ device_initcall(ipc_init);
 static const struct rhashtable_params ipc_kht_params = {
        .head_offset            = offsetof(struct kern_ipc_perm, khtnode),
        .key_offset             = offsetof(struct kern_ipc_perm, key),
-       .key_len                = FIELD_SIZEOF(struct kern_ipc_perm, key),
+       .key_len                = sizeof_field(struct kern_ipc_perm, key),
        .automatic_shrinking    = true,
 };
 
index 9f90d3c92bdaca011f5645aa326fab4b09166d70..4fb20ab179feea2dbd155caa386389ed6144c129 100644 (file)
@@ -1341,7 +1341,7 @@ static u32 sysctl_convert_ctx_access(enum bpf_access_type type,
                *insn++ = BPF_LDX_MEM(
                        BPF_SIZE(si->code), si->dst_reg, si->src_reg,
                        bpf_target_off(struct bpf_sysctl_kern, write,
-                                      FIELD_SIZEOF(struct bpf_sysctl_kern,
+                                      sizeof_field(struct bpf_sysctl_kern,
                                                    write),
                                       target_size));
                break;
index 2ba750725cb26d18fe19cac08a30e0e6f48a9e86..6bd22f6d9f416b3f34224bf982c4b65dd2989619 100644 (file)
@@ -357,7 +357,7 @@ static int cgroup_storage_check_btf(const struct bpf_map *map,
         * The first field must be a 64 bit integer at 0 offset.
         */
        m = (struct btf_member *)(key_type + 1);
-       size = FIELD_SIZEOF(struct bpf_cgroup_storage_key, cgroup_inode_id);
+       size = sizeof_field(struct bpf_cgroup_storage_key, cgroup_inode_id);
        if (!btf_member_is_reg_int(btf, key_type, m, 0, size))
                return -EINVAL;
 
@@ -366,7 +366,7 @@ static int cgroup_storage_check_btf(const struct bpf_map *map,
         */
        m++;
        offset = offsetof(struct bpf_cgroup_storage_key, attach_type);
-       size = FIELD_SIZEOF(struct bpf_cgroup_storage_key, attach_type);
+       size = sizeof_field(struct bpf_cgroup_storage_key, attach_type);
        if (!btf_member_is_reg_int(btf, key_type, m, offset, size))
                return -EINVAL;
 
index 3a486f8262249b1be38a01461d2329732bde11ab..b56f3224b161b3f01f181bba97fd57e7eb04773d 100644 (file)
@@ -3730,6 +3730,7 @@ static int complete_formation(struct module *mod, struct load_info *info)
 
        module_enable_ro(mod, false);
        module_enable_nx(mod);
+       module_enable_x(mod);
 
        /* Mark state as coming so strong_try_module_get() ignores us,
         * but kallsyms etc. can see us. */
@@ -3752,11 +3753,6 @@ static int prepare_coming_module(struct module *mod)
        if (err)
                return err;
 
-       /* Make module executable after ftrace is enabled */
-       mutex_lock(&module_mutex);
-       module_enable_x(mod);
-       mutex_unlock(&module_mutex);
-
        blocking_notifier_call_chain(&module_notify_list,
                                     MODULE_STATE_COMING, mod);
        return 0;
index 67e0c462b059cb3fcf036ccf2d7962c2b61290e8..a2659735db73b99623e1a53d0b2a1f11843c4577 100644 (file)
@@ -101,6 +101,15 @@ int function_graph_enter(unsigned long ret, unsigned long func,
 {
        struct ftrace_graph_ent trace;
 
+       /*
+        * Skip graph tracing if the return location is served by direct trampoline,
+        * since call sequence and return addresses is unpredicatable anymore.
+        * Ex: BPF trampoline may call original function and may skip frame
+        * depending on type of BPF programs attached.
+        */
+       if (ftrace_direct_func_count &&
+           ftrace_find_rec_direct(ret - MCOUNT_INSN_SIZE))
+               return -EBUSY;
        trace.func = func;
        trace.depth = ++current->curr_ret_depth;
 
index 74439ab5c2b660cb05302176cd56ee8489579749..ac99a3500076ab9f8de3609f3ab8aeff4b19c344 100644 (file)
@@ -2364,7 +2364,7 @@ int ftrace_direct_func_count;
  * Search the direct_functions hash to see if the given instruction pointer
  * has a direct caller attached to it.
  */
-static unsigned long find_rec_direct(unsigned long ip)
+unsigned long ftrace_find_rec_direct(unsigned long ip)
 {
        struct ftrace_func_entry *entry;
 
@@ -2380,7 +2380,7 @@ static void call_direct_funcs(unsigned long ip, unsigned long pip,
 {
        unsigned long addr;
 
-       addr = find_rec_direct(ip);
+       addr = ftrace_find_rec_direct(ip);
        if (!addr)
                return;
 
@@ -2393,11 +2393,6 @@ struct ftrace_ops direct_ops = {
                          | FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_REGS
                          | FTRACE_OPS_FL_PERMANENT,
 };
-#else
-static inline unsigned long find_rec_direct(unsigned long ip)
-{
-       return 0;
-}
 #endif /* CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS */
 
 /**
@@ -2417,7 +2412,7 @@ unsigned long ftrace_get_addr_new(struct dyn_ftrace *rec)
 
        if ((rec->flags & FTRACE_FL_DIRECT) &&
            (ftrace_rec_count(rec) == 1)) {
-               addr = find_rec_direct(rec->ip);
+               addr = ftrace_find_rec_direct(rec->ip);
                if (addr)
                        return addr;
                WARN_ON_ONCE(1);
@@ -2458,7 +2453,7 @@ unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec)
 
        /* Direct calls take precedence over trampolines */
        if (rec->flags & FTRACE_FL_DIRECT_EN) {
-               addr = find_rec_direct(rec->ip);
+               addr = ftrace_find_rec_direct(rec->ip);
                if (addr)
                        return addr;
                WARN_ON_ONCE(1);
@@ -3604,7 +3599,7 @@ static int t_show(struct seq_file *m, void *v)
                if (rec->flags & FTRACE_FL_DIRECT) {
                        unsigned long direct;
 
-                       direct = find_rec_direct(rec->ip);
+                       direct = ftrace_find_rec_direct(rec->ip);
                        if (direct)
                                seq_printf(m, "\n\tdirect-->%pS", (void *)direct);
                }
@@ -5008,7 +5003,7 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
        mutex_lock(&direct_mutex);
 
        /* See if there's a direct function at @ip already */
-       if (find_rec_direct(ip))
+       if (ftrace_find_rec_direct(ip))
                goto out_unlock;
 
        ret = -ENODEV;
@@ -5027,7 +5022,7 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
        if (ip != rec->ip) {
                ip = rec->ip;
                /* Need to check this ip for a direct. */
-               if (find_rec_direct(ip))
+               if (ftrace_find_rec_direct(ip))
                        goto out_unlock;
        }
 
index 4bf050fcfe3be6deed57d1c7687d8985f4c71c56..3f655371eaf6ba4fe7d87b6cb10f39fb35192f9f 100644 (file)
@@ -5070,7 +5070,7 @@ static __init int test_ringbuffer(void)
        int ret = 0;
 
        if (security_locked_down(LOCKDOWN_TRACEFS)) {
-               pr_warning("Lockdown is enabled, skipping ring buffer tests\n");
+               pr_warn("Lockdown is enabled, skipping ring buffer tests\n");
                return 0;
        }
 
index 23459d53d57698b150e206a66ebd49beb8b44beb..6c75410f96988fa887d10a2bbb933890211fcde5 100644 (file)
@@ -1889,7 +1889,7 @@ int __init register_tracer(struct tracer *type)
        }
 
        if (security_locked_down(LOCKDOWN_TRACEFS)) {
-               pr_warning("Can not register tracer %s due to lockdown\n",
+               pr_warn("Can not register tracer %s due to lockdown\n",
                           type->name);
                return -EPERM;
        }
@@ -8796,7 +8796,7 @@ struct dentry *tracing_init_dentry(void)
        struct trace_array *tr = &global_trace;
 
        if (security_locked_down(LOCKDOWN_TRACEFS)) {
-               pr_warning("Tracing disabled due to lockdown\n");
+               pr_warn("Tracing disabled due to lockdown\n");
                return ERR_PTR(-EPERM);
        }
 
@@ -9244,7 +9244,7 @@ __init static int tracer_alloc_buffers(void)
 
 
        if (security_locked_down(LOCKDOWN_TRACEFS)) {
-               pr_warning("Tracing disabled due to lockdown\n");
+               pr_warn("Tracing disabled due to lockdown\n");
                return -EPERM;
        }
 
index d43710718ee592a660ef679f48a75c0ffe4ecd81..d45079ee62f8d9a75e53c616dd8b498d9ecbdd11 100644 (file)
@@ -17,12 +17,10 @@ static int
 trace_inject_entry(struct trace_event_file *file, void *rec, int len)
 {
        struct trace_event_buffer fbuffer;
-       struct ring_buffer *buffer;
        int written = 0;
        void *entry;
 
        rcu_read_lock_sched();
-       buffer = file->tr->trace_buffer.buffer;
        entry = trace_event_buffer_reserve(&fbuffer, file, len);
        if (entry) {
                memcpy(entry, rec, len);
index bc88fd939f4e72c43de15ad96c42aa2fdce4a996..cfc923558e04de32f603525343d9548128ca25cd 100644 (file)
@@ -4374,8 +4374,8 @@ void destroy_workqueue(struct workqueue_struct *wq)
        for_each_pwq(pwq, wq) {
                spin_lock_irq(&pwq->pool->lock);
                if (WARN_ON(pwq_busy(pwq))) {
-                       pr_warning("%s: %s has the following busy pwq\n",
-                                  __func__, wq->name);
+                       pr_warn("%s: %s has the following busy pwq\n",
+                               __func__, wq->name);
                        show_pwq(pwq);
                        spin_unlock_irq(&pwq->pool->lock);
                        mutex_unlock(&wq->mutex);
index c6aa03631df86d7837ea56d28d6059799803ef5b..0809805a7e231809387902b825fb2d89e7c43bd0 100644 (file)
@@ -13,7 +13,7 @@ BEGIN {
        for (i = 0; i < rep; ++i) {
                tmp = $0
                gsub(/\$\$/, i, tmp)
-               gsub(/\$\#/, n, tmp)
+               gsub(/\$#/, n, tmp)
                gsub(/\$\*/, "$", tmp)
                print tmp
        }
index 2cfdfbfbb2edbddd4d441539e468c2ca0fd0d8f3..bea6e43d45a0ddb5356ab369acec71e4b93bc188 100644 (file)
@@ -523,7 +523,7 @@ int mrp_request_join(const struct net_device *dev,
        struct mrp_attr *attr;
 
        if (sizeof(struct mrp_skb_cb) + len >
-           FIELD_SIZEOF(struct sk_buff, cb))
+           sizeof_field(struct sk_buff, cb))
                return -ENOMEM;
 
        spin_lock_bh(&app->lock);
@@ -548,7 +548,7 @@ void mrp_request_leave(const struct net_device *dev,
        struct mrp_attr *attr;
 
        if (sizeof(struct mrp_skb_cb) + len >
-           FIELD_SIZEOF(struct sk_buff, cb))
+           sizeof_field(struct sk_buff, cb))
                return;
 
        spin_lock_bh(&app->lock);
@@ -692,7 +692,7 @@ static int mrp_pdu_parse_vecattr(struct mrp_applicant *app,
         * advance to the next event in its Vector.
         */
        if (sizeof(struct mrp_skb_cb) + mrp_cb(skb)->mh->attrlen >
-           FIELD_SIZEOF(struct sk_buff, cb))
+           sizeof_field(struct sk_buff, cb))
                return -1;
        if (skb_copy_bits(skb, *offset, mrp_cb(skb)->attrvalue,
                          mrp_cb(skb)->mh->attrlen) < 0)
index 4a89177def647db602edb96634f45cf1cfbcfd5f..4811ec65bc434d012c76bf0e55fb1ec2fec574a1 100644 (file)
@@ -548,7 +548,7 @@ static void batadv_recv_handler_init(void)
        BUILD_BUG_ON(sizeof(struct batadv_tvlv_tt_change) != 12);
        BUILD_BUG_ON(sizeof(struct batadv_tvlv_roam_adv) != 8);
 
-       i = FIELD_SIZEOF(struct sk_buff, cb);
+       i = sizeof_field(struct sk_buff, cb);
        BUILD_BUG_ON(sizeof(struct batadv_skb_cb) > i);
 
        /* broadcast packet */
index 915c2d6f7fb9dad0790233d4c0268dc3cb07bf9f..f79205d4444f5fccf9244f4619c33709ee7cd464 100644 (file)
@@ -253,21 +253,21 @@ static int convert___skb_to_skb(struct sk_buff *skb, struct __sk_buff *__skb)
        /* priority is allowed */
 
        if (!range_is_zero(__skb, offsetof(struct __sk_buff, priority) +
-                          FIELD_SIZEOF(struct __sk_buff, priority),
+                          sizeof_field(struct __sk_buff, priority),
                           offsetof(struct __sk_buff, cb)))
                return -EINVAL;
 
        /* cb is allowed */
 
        if (!range_is_zero(__skb, offsetof(struct __sk_buff, cb) +
-                          FIELD_SIZEOF(struct __sk_buff, cb),
+                          sizeof_field(struct __sk_buff, cb),
                           offsetof(struct __sk_buff, tstamp)))
                return -EINVAL;
 
        /* tstamp is allowed */
 
        if (!range_is_zero(__skb, offsetof(struct __sk_buff, tstamp) +
-                          FIELD_SIZEOF(struct __sk_buff, tstamp),
+                          sizeof_field(struct __sk_buff, tstamp),
                           sizeof(struct __sk_buff)))
                return -EINVAL;
 
@@ -438,7 +438,7 @@ static int verify_user_bpf_flow_keys(struct bpf_flow_keys *ctx)
        /* flags is allowed */
 
        if (!range_is_zero(ctx, offsetof(struct bpf_flow_keys, flags) +
-                          FIELD_SIZEOF(struct bpf_flow_keys, flags),
+                          sizeof_field(struct bpf_flow_keys, flags),
                           sizeof(struct bpf_flow_keys)))
                return -EINVAL;
 
index 8a8f9e5f264f2a70b246094fa7c31f1be8c0deef..b6fe30e3768f8a6d212cd1a3e92f63cf582a47a7 100644 (file)
@@ -312,7 +312,7 @@ static int __init br_init(void)
 {
        int err;
 
-       BUILD_BUG_ON(sizeof(struct br_input_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
+       BUILD_BUG_ON(sizeof(struct br_input_skb_cb) > sizeof_field(struct sk_buff, cb));
 
        err = stp_proto_register(&br_stp_proto);
        if (err < 0) {
index 2c277b8aba38bf348093967a0fe7dd1d0aca4796..0ad39c87b7fd20e199af9f4b49d5f9598dcef222 100644 (file)
@@ -10165,7 +10165,7 @@ static struct hlist_head * __net_init netdev_create_hash(void)
 static int __net_init netdev_init(struct net *net)
 {
        BUILD_BUG_ON(GRO_HASH_BUCKETS >
-                    8 * FIELD_SIZEOF(struct napi_struct, gro_bitmask));
+                    8 * sizeof_field(struct napi_struct, gro_bitmask));
 
        if (net != &init_net)
                INIT_LIST_HEAD(&net->dev_base_head);
index f1e703eed3d22d226550c153b6636e6a9b13174b..c19dd0973e0cc4453c43e7b8fce1dd8f96c2838a 100644 (file)
@@ -274,7 +274,7 @@ static u32 convert_skb_access(int skb_field, int dst_reg, int src_reg,
 
        switch (skb_field) {
        case SKF_AD_MARK:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sk_buff, mark) != 4);
 
                *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg,
                                      offsetof(struct sk_buff, mark));
@@ -289,14 +289,14 @@ static u32 convert_skb_access(int skb_field, int dst_reg, int src_reg,
                break;
 
        case SKF_AD_QUEUE:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, queue_mapping) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sk_buff, queue_mapping) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg,
                                      offsetof(struct sk_buff, queue_mapping));
                break;
 
        case SKF_AD_VLAN_TAG:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sk_buff, vlan_tci) != 2);
 
                /* dst_reg = *(u16 *) (src_reg + offsetof(vlan_tci)) */
                *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg,
@@ -322,7 +322,7 @@ static bool convert_bpf_extensions(struct sock_filter *fp,
 
        switch (fp->k) {
        case SKF_AD_OFF + SKF_AD_PROTOCOL:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, protocol) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sk_buff, protocol) != 2);
 
                /* A = *(u16 *) (CTX + offsetof(protocol)) */
                *insn++ = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_CTX,
@@ -338,8 +338,8 @@ static bool convert_bpf_extensions(struct sock_filter *fp,
 
        case SKF_AD_OFF + SKF_AD_IFINDEX:
        case SKF_AD_OFF + SKF_AD_HATYPE:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, ifindex) != 4);
-               BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, type) != 2);
+               BUILD_BUG_ON(sizeof_field(struct net_device, ifindex) != 4);
+               BUILD_BUG_ON(sizeof_field(struct net_device, type) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, dev),
                                      BPF_REG_TMP, BPF_REG_CTX,
@@ -361,7 +361,7 @@ static bool convert_bpf_extensions(struct sock_filter *fp,
                break;
 
        case SKF_AD_OFF + SKF_AD_RXHASH:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sk_buff, hash) != 4);
 
                *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_CTX,
                                    offsetof(struct sk_buff, hash));
@@ -385,7 +385,7 @@ static bool convert_bpf_extensions(struct sock_filter *fp,
                break;
 
        case SKF_AD_OFF + SKF_AD_VLAN_TPID:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_proto) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sk_buff, vlan_proto) != 2);
 
                /* A = *(u16 *) (CTX + offsetof(vlan_proto)) */
                *insn++ = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_CTX,
@@ -5589,8 +5589,8 @@ u32 bpf_tcp_sock_convert_ctx_access(enum bpf_access_type type,
 
 #define BPF_TCP_SOCK_GET_COMMON(FIELD)                                 \
        do {                                                            \
-               BUILD_BUG_ON(FIELD_SIZEOF(struct tcp_sock, FIELD) >     \
-                            FIELD_SIZEOF(struct bpf_tcp_sock, FIELD)); \
+               BUILD_BUG_ON(sizeof_field(struct tcp_sock, FIELD) >     \
+                            sizeof_field(struct bpf_tcp_sock, FIELD)); \
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct tcp_sock, FIELD),\
                                      si->dst_reg, si->src_reg,         \
                                      offsetof(struct tcp_sock, FIELD)); \
@@ -5598,9 +5598,9 @@ u32 bpf_tcp_sock_convert_ctx_access(enum bpf_access_type type,
 
 #define BPF_INET_SOCK_GET_COMMON(FIELD)                                        \
        do {                                                            \
-               BUILD_BUG_ON(FIELD_SIZEOF(struct inet_connection_sock,  \
+               BUILD_BUG_ON(sizeof_field(struct inet_connection_sock,  \
                                          FIELD) >                      \
-                            FIELD_SIZEOF(struct bpf_tcp_sock, FIELD)); \
+                            sizeof_field(struct bpf_tcp_sock, FIELD)); \
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(                 \
                                        struct inet_connection_sock,    \
                                        FIELD),                         \
@@ -5615,7 +5615,7 @@ u32 bpf_tcp_sock_convert_ctx_access(enum bpf_access_type type,
 
        switch (si->off) {
        case offsetof(struct bpf_tcp_sock, rtt_min):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct tcp_sock, rtt_min) !=
+               BUILD_BUG_ON(sizeof_field(struct tcp_sock, rtt_min) !=
                             sizeof(struct minmax));
                BUILD_BUG_ON(sizeof(struct minmax) <
                             sizeof(struct minmax_sample));
@@ -5780,8 +5780,8 @@ u32 bpf_xdp_sock_convert_ctx_access(enum bpf_access_type type,
 
 #define BPF_XDP_SOCK_GET(FIELD)                                                \
        do {                                                            \
-               BUILD_BUG_ON(FIELD_SIZEOF(struct xdp_sock, FIELD) >     \
-                            FIELD_SIZEOF(struct bpf_xdp_sock, FIELD)); \
+               BUILD_BUG_ON(sizeof_field(struct xdp_sock, FIELD) >     \
+                            sizeof_field(struct bpf_xdp_sock, FIELD)); \
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_sock, FIELD),\
                                      si->dst_reg, si->src_reg,         \
                                      offsetof(struct xdp_sock, FIELD)); \
@@ -7344,7 +7344,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
 
        case offsetof(struct __sk_buff, cb[0]) ...
             offsetofend(struct __sk_buff, cb[4]) - 1:
-               BUILD_BUG_ON(FIELD_SIZEOF(struct qdisc_skb_cb, data) < 20);
+               BUILD_BUG_ON(sizeof_field(struct qdisc_skb_cb, data) < 20);
                BUILD_BUG_ON((offsetof(struct sk_buff, cb) +
                              offsetof(struct qdisc_skb_cb, data)) %
                             sizeof(__u64));
@@ -7363,7 +7363,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct __sk_buff, tc_classid):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct qdisc_skb_cb, tc_classid) != 2);
+               BUILD_BUG_ON(sizeof_field(struct qdisc_skb_cb, tc_classid) != 2);
 
                off  = si->off;
                off -= offsetof(struct __sk_buff, tc_classid);
@@ -7434,7 +7434,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
 #endif
                break;
        case offsetof(struct __sk_buff, family):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_family) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_family) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk),
                                      si->dst_reg, si->src_reg,
@@ -7445,7 +7445,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
                                                     2, target_size));
                break;
        case offsetof(struct __sk_buff, remote_ip4):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_daddr) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_daddr) != 4);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk),
                                      si->dst_reg, si->src_reg,
@@ -7456,7 +7456,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
                                                     4, target_size));
                break;
        case offsetof(struct __sk_buff, local_ip4):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_rcv_saddr) != 4);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk),
@@ -7470,7 +7470,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
        case offsetof(struct __sk_buff, remote_ip6[0]) ...
             offsetof(struct __sk_buff, remote_ip6[3]):
 #if IS_ENABLED(CONFIG_IPV6)
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_v6_daddr.s6_addr32[0]) != 4);
 
                off = si->off;
@@ -7490,7 +7490,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
        case offsetof(struct __sk_buff, local_ip6[0]) ...
             offsetof(struct __sk_buff, local_ip6[3]):
 #if IS_ENABLED(CONFIG_IPV6)
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_v6_rcv_saddr.s6_addr32[0]) != 4);
 
                off = si->off;
@@ -7509,7 +7509,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct __sk_buff, remote_port):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_dport) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_dport) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk),
                                      si->dst_reg, si->src_reg,
@@ -7524,7 +7524,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct __sk_buff, local_port):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_num) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_num) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk),
                                      si->dst_reg, si->src_reg,
@@ -7535,7 +7535,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct __sk_buff, tstamp):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, tstamp) != 8);
+               BUILD_BUG_ON(sizeof_field(struct sk_buff, tstamp) != 8);
 
                if (type == BPF_WRITE)
                        *insn++ = BPF_STX_MEM(BPF_DW,
@@ -7573,7 +7573,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
                                                     target_size));
                break;
        case offsetof(struct __sk_buff, wire_len):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct qdisc_skb_cb, pkt_len) != 4);
+               BUILD_BUG_ON(sizeof_field(struct qdisc_skb_cb, pkt_len) != 4);
 
                off = si->off;
                off -= offsetof(struct __sk_buff, wire_len);
@@ -7603,7 +7603,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
 
        switch (si->off) {
        case offsetof(struct bpf_sock, bound_dev_if):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock, sk_bound_dev_if) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sock, sk_bound_dev_if) != 4);
 
                if (type == BPF_WRITE)
                        *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg,
@@ -7614,7 +7614,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock, mark):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock, sk_mark) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sock, sk_mark) != 4);
 
                if (type == BPF_WRITE)
                        *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg,
@@ -7625,7 +7625,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock, priority):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock, sk_priority) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sock, sk_priority) != 4);
 
                if (type == BPF_WRITE)
                        *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg,
@@ -7641,7 +7641,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                        si->dst_reg, si->src_reg,
                        bpf_target_off(struct sock_common,
                                       skc_family,
-                                      FIELD_SIZEOF(struct sock_common,
+                                      sizeof_field(struct sock_common,
                                                    skc_family),
                                       target_size));
                break;
@@ -7668,7 +7668,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                *insn++ = BPF_LDX_MEM(
                        BPF_SIZE(si->code), si->dst_reg, si->src_reg,
                        bpf_target_off(struct sock_common, skc_rcv_saddr,
-                                      FIELD_SIZEOF(struct sock_common,
+                                      sizeof_field(struct sock_common,
                                                    skc_rcv_saddr),
                                       target_size));
                break;
@@ -7677,7 +7677,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                *insn++ = BPF_LDX_MEM(
                        BPF_SIZE(si->code), si->dst_reg, si->src_reg,
                        bpf_target_off(struct sock_common, skc_daddr,
-                                      FIELD_SIZEOF(struct sock_common,
+                                      sizeof_field(struct sock_common,
                                                    skc_daddr),
                                       target_size));
                break;
@@ -7691,7 +7691,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                        bpf_target_off(
                                struct sock_common,
                                skc_v6_rcv_saddr.s6_addr32[0],
-                               FIELD_SIZEOF(struct sock_common,
+                               sizeof_field(struct sock_common,
                                             skc_v6_rcv_saddr.s6_addr32[0]),
                                target_size) + off);
 #else
@@ -7708,7 +7708,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                        BPF_SIZE(si->code), si->dst_reg, si->src_reg,
                        bpf_target_off(struct sock_common,
                                       skc_v6_daddr.s6_addr32[0],
-                                      FIELD_SIZEOF(struct sock_common,
+                                      sizeof_field(struct sock_common,
                                                    skc_v6_daddr.s6_addr32[0]),
                                       target_size) + off);
 #else
@@ -7722,7 +7722,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                        BPF_FIELD_SIZEOF(struct sock_common, skc_num),
                        si->dst_reg, si->src_reg,
                        bpf_target_off(struct sock_common, skc_num,
-                                      FIELD_SIZEOF(struct sock_common,
+                                      sizeof_field(struct sock_common,
                                                    skc_num),
                                       target_size));
                break;
@@ -7732,7 +7732,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                        BPF_FIELD_SIZEOF(struct sock_common, skc_dport),
                        si->dst_reg, si->src_reg,
                        bpf_target_off(struct sock_common, skc_dport,
-                                      FIELD_SIZEOF(struct sock_common,
+                                      sizeof_field(struct sock_common,
                                                    skc_dport),
                                       target_size));
                break;
@@ -7742,7 +7742,7 @@ u32 bpf_sock_convert_ctx_access(enum bpf_access_type type,
                        BPF_FIELD_SIZEOF(struct sock_common, skc_state),
                        si->dst_reg, si->src_reg,
                        bpf_target_off(struct sock_common, skc_state,
-                                      FIELD_SIZEOF(struct sock_common,
+                                      sizeof_field(struct sock_common,
                                                    skc_state),
                                       target_size));
                break;
@@ -7837,7 +7837,7 @@ static u32 xdp_convert_ctx_access(enum bpf_access_type type,
                                      si->src_reg, offsetof(S, F));            \
                *insn++ = BPF_LDX_MEM(                                         \
                        SIZE, si->dst_reg, si->dst_reg,                        \
-                       bpf_target_off(NS, NF, FIELD_SIZEOF(NS, NF),           \
+                       bpf_target_off(NS, NF, sizeof_field(NS, NF),           \
                                       target_size)                            \
                                + OFF);                                        \
        } while (0)
@@ -7868,7 +7868,7 @@ static u32 xdp_convert_ctx_access(enum bpf_access_type type,
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), tmp_reg,         \
                                      si->dst_reg, offsetof(S, F));            \
                *insn++ = BPF_STX_MEM(SIZE, tmp_reg, si->src_reg,              \
-                       bpf_target_off(NS, NF, FIELD_SIZEOF(NS, NF),           \
+                       bpf_target_off(NS, NF, sizeof_field(NS, NF),           \
                                       target_size)                            \
                                + OFF);                                        \
                *insn++ = BPF_LDX_MEM(BPF_DW, tmp_reg, si->dst_reg,            \
@@ -7930,8 +7930,8 @@ static u32 sock_addr_convert_ctx_access(enum bpf_access_type type,
                 */
                BUILD_BUG_ON(offsetof(struct sockaddr_in, sin_port) !=
                             offsetof(struct sockaddr_in6, sin6_port));
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sockaddr_in, sin_port) !=
-                            FIELD_SIZEOF(struct sockaddr_in6, sin6_port));
+               BUILD_BUG_ON(sizeof_field(struct sockaddr_in, sin_port) !=
+                            sizeof_field(struct sockaddr_in6, sin6_port));
                SOCK_ADDR_LOAD_OR_STORE_NESTED_FIELD(struct bpf_sock_addr_kern,
                                                     struct sockaddr_in6, uaddr,
                                                     sin6_port, tmp_reg);
@@ -7997,8 +7997,8 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
 /* Helper macro for adding read access to tcp_sock or sock fields. */
 #define SOCK_OPS_GET_FIELD(BPF_FIELD, OBJ_FIELD, OBJ)                        \
        do {                                                                  \
-               BUILD_BUG_ON(FIELD_SIZEOF(OBJ, OBJ_FIELD) >                   \
-                            FIELD_SIZEOF(struct bpf_sock_ops, BPF_FIELD));   \
+               BUILD_BUG_ON(sizeof_field(OBJ, OBJ_FIELD) >                   \
+                            sizeof_field(struct bpf_sock_ops, BPF_FIELD));   \
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(                       \
                                                struct bpf_sock_ops_kern,     \
                                                is_fullsock),                 \
@@ -8031,8 +8031,8 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
 #define SOCK_OPS_SET_FIELD(BPF_FIELD, OBJ_FIELD, OBJ)                        \
        do {                                                                  \
                int reg = BPF_REG_9;                                          \
-               BUILD_BUG_ON(FIELD_SIZEOF(OBJ, OBJ_FIELD) >                   \
-                            FIELD_SIZEOF(struct bpf_sock_ops, BPF_FIELD));   \
+               BUILD_BUG_ON(sizeof_field(OBJ, OBJ_FIELD) >                   \
+                            sizeof_field(struct bpf_sock_ops, BPF_FIELD));   \
                if (si->dst_reg == reg || si->src_reg == reg)                 \
                        reg--;                                                \
                if (si->dst_reg == reg || si->src_reg == reg)                 \
@@ -8073,12 +8073,12 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
        switch (si->off) {
        case offsetof(struct bpf_sock_ops, op) ...
             offsetof(struct bpf_sock_ops, replylong[3]):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct bpf_sock_ops, op) !=
-                            FIELD_SIZEOF(struct bpf_sock_ops_kern, op));
-               BUILD_BUG_ON(FIELD_SIZEOF(struct bpf_sock_ops, reply) !=
-                            FIELD_SIZEOF(struct bpf_sock_ops_kern, reply));
-               BUILD_BUG_ON(FIELD_SIZEOF(struct bpf_sock_ops, replylong) !=
-                            FIELD_SIZEOF(struct bpf_sock_ops_kern, replylong));
+               BUILD_BUG_ON(sizeof_field(struct bpf_sock_ops, op) !=
+                            sizeof_field(struct bpf_sock_ops_kern, op));
+               BUILD_BUG_ON(sizeof_field(struct bpf_sock_ops, reply) !=
+                            sizeof_field(struct bpf_sock_ops_kern, reply));
+               BUILD_BUG_ON(sizeof_field(struct bpf_sock_ops, replylong) !=
+                            sizeof_field(struct bpf_sock_ops_kern, replylong));
                off = si->off;
                off -= offsetof(struct bpf_sock_ops, op);
                off += offsetof(struct bpf_sock_ops_kern, op);
@@ -8091,7 +8091,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock_ops, family):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_family) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_family) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                              struct bpf_sock_ops_kern, sk),
@@ -8102,7 +8102,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock_ops, remote_ip4):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_daddr) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_daddr) != 4);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                                struct bpf_sock_ops_kern, sk),
@@ -8113,7 +8113,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock_ops, local_ip4):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_rcv_saddr) != 4);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
@@ -8128,7 +8128,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
        case offsetof(struct bpf_sock_ops, remote_ip6[0]) ...
             offsetof(struct bpf_sock_ops, remote_ip6[3]):
 #if IS_ENABLED(CONFIG_IPV6)
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_v6_daddr.s6_addr32[0]) != 4);
 
                off = si->off;
@@ -8149,7 +8149,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
        case offsetof(struct bpf_sock_ops, local_ip6[0]) ...
             offsetof(struct bpf_sock_ops, local_ip6[3]):
 #if IS_ENABLED(CONFIG_IPV6)
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_v6_rcv_saddr.s6_addr32[0]) != 4);
 
                off = si->off;
@@ -8168,7 +8168,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock_ops, remote_port):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_dport) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_dport) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                                struct bpf_sock_ops_kern, sk),
@@ -8182,7 +8182,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock_ops, local_port):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_num) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_num) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                                struct bpf_sock_ops_kern, sk),
@@ -8202,7 +8202,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock_ops, state):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_state) != 1);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_state) != 1);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                                struct bpf_sock_ops_kern, sk),
@@ -8213,7 +8213,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct bpf_sock_ops, rtt_min):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct tcp_sock, rtt_min) !=
+               BUILD_BUG_ON(sizeof_field(struct tcp_sock, rtt_min) !=
                             sizeof(struct minmax));
                BUILD_BUG_ON(sizeof(struct minmax) <
                             sizeof(struct minmax_sample));
@@ -8224,7 +8224,7 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
                                      offsetof(struct bpf_sock_ops_kern, sk));
                *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg,
                                      offsetof(struct tcp_sock, rtt_min) +
-                                     FIELD_SIZEOF(struct minmax_sample, t));
+                                     sizeof_field(struct minmax_sample, t));
                break;
 
        case offsetof(struct bpf_sock_ops, bpf_sock_ops_cb_flags):
@@ -8366,7 +8366,7 @@ static u32 sk_msg_convert_ctx_access(enum bpf_access_type type,
                                      offsetof(struct sk_msg, data_end));
                break;
        case offsetof(struct sk_msg_md, family):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_family) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_family) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                              struct sk_msg, sk),
@@ -8377,7 +8377,7 @@ static u32 sk_msg_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct sk_msg_md, remote_ip4):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_daddr) != 4);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_daddr) != 4);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                                struct sk_msg, sk),
@@ -8388,7 +8388,7 @@ static u32 sk_msg_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct sk_msg_md, local_ip4):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_rcv_saddr) != 4);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
@@ -8403,7 +8403,7 @@ static u32 sk_msg_convert_ctx_access(enum bpf_access_type type,
        case offsetof(struct sk_msg_md, remote_ip6[0]) ...
             offsetof(struct sk_msg_md, remote_ip6[3]):
 #if IS_ENABLED(CONFIG_IPV6)
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_v6_daddr.s6_addr32[0]) != 4);
 
                off = si->off;
@@ -8424,7 +8424,7 @@ static u32 sk_msg_convert_ctx_access(enum bpf_access_type type,
        case offsetof(struct sk_msg_md, local_ip6[0]) ...
             offsetof(struct sk_msg_md, local_ip6[3]):
 #if IS_ENABLED(CONFIG_IPV6)
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common,
+               BUILD_BUG_ON(sizeof_field(struct sock_common,
                                          skc_v6_rcv_saddr.s6_addr32[0]) != 4);
 
                off = si->off;
@@ -8443,7 +8443,7 @@ static u32 sk_msg_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct sk_msg_md, remote_port):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_dport) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_dport) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                                struct sk_msg, sk),
@@ -8457,7 +8457,7 @@ static u32 sk_msg_convert_ctx_access(enum bpf_access_type type,
                break;
 
        case offsetof(struct sk_msg_md, local_port):
-               BUILD_BUG_ON(FIELD_SIZEOF(struct sock_common, skc_num) != 2);
+               BUILD_BUG_ON(sizeof_field(struct sock_common, skc_num) != 2);
 
                *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(
                                                struct sk_msg, sk),
@@ -8847,7 +8847,7 @@ sk_reuseport_is_valid_access(int off, int size,
 
        /* Fields that allow narrowing */
        case bpf_ctx_range(struct sk_reuseport_md, eth_protocol):
-               if (size < FIELD_SIZEOF(struct sk_buff, protocol))
+               if (size < sizeof_field(struct sk_buff, protocol))
                        return false;
                /* fall through */
        case bpf_ctx_range(struct sk_reuseport_md, ip_protocol):
@@ -8865,7 +8865,7 @@ sk_reuseport_is_valid_access(int off, int size,
        *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \
                              si->dst_reg, si->src_reg,                 \
                              bpf_target_off(struct sk_reuseport_kern, F, \
-                                            FIELD_SIZEOF(struct sk_reuseport_kern, F), \
+                                            sizeof_field(struct sk_reuseport_kern, F), \
                                             target_size));             \
        })
 
index d524a693e00faa4e37572984fb4db357b9a0879a..2dbbb030fbedfa65698b2fa19cbd8c7c57f639ac 100644 (file)
@@ -599,8 +599,8 @@ __skb_flow_dissect_gre(const struct sk_buff *skb,
        offset += sizeof(struct gre_base_hdr);
 
        if (hdr->flags & GRE_CSUM)
-               offset += FIELD_SIZEOF(struct gre_full_hdr, csum) +
-                         FIELD_SIZEOF(struct gre_full_hdr, reserved1);
+               offset += sizeof_field(struct gre_full_hdr, csum) +
+                         sizeof_field(struct gre_full_hdr, reserved1);
 
        if (hdr->flags & GRE_KEY) {
                const __be32 *keyid;
@@ -622,11 +622,11 @@ __skb_flow_dissect_gre(const struct sk_buff *skb,
                        else
                                key_keyid->keyid = *keyid & GRE_PPTP_KEY_MASK;
                }
-               offset += FIELD_SIZEOF(struct gre_full_hdr, key);
+               offset += sizeof_field(struct gre_full_hdr, key);
        }
 
        if (hdr->flags & GRE_SEQ)
-               offset += FIELD_SIZEOF(struct pptp_gre_header, seq);
+               offset += sizeof_field(struct pptp_gre_header, seq);
 
        if (gre_ver == 0) {
                if (*p_proto == htons(ETH_P_TEB)) {
@@ -653,7 +653,7 @@ __skb_flow_dissect_gre(const struct sk_buff *skb,
                u8 *ppp_hdr;
 
                if (hdr->flags & GRE_ACK)
-                       offset += FIELD_SIZEOF(struct pptp_gre_header, ack);
+                       offset += sizeof_field(struct pptp_gre_header, ack);
 
                ppp_hdr = __skb_header_pointer(skb, *p_nhoff + offset,
                                               sizeof(_ppp_hdr),
index 7c8390ad4dc613bf67b4845c37a7ed97360dd2a7..8310714c47fd7af0877dcf531ad46d0d2fef2903 100644 (file)
@@ -36,7 +36,7 @@ static u32 xdp_mem_id_hashfn(const void *data, u32 len, u32 seed)
        const u32 *k = data;
        const u32 key = *k;
 
-       BUILD_BUG_ON(FIELD_SIZEOF(struct xdp_mem_allocator, mem.id)
+       BUILD_BUG_ON(sizeof_field(struct xdp_mem_allocator, mem.id)
                     != sizeof(u32));
 
        /* Use cyclic increasing ID as direct hash key */
@@ -56,7 +56,7 @@ static const struct rhashtable_params mem_id_rht_params = {
        .nelem_hint = 64,
        .head_offset = offsetof(struct xdp_mem_allocator, node),
        .key_offset  = offsetof(struct xdp_mem_allocator, mem.id),
-       .key_len = FIELD_SIZEOF(struct xdp_mem_allocator, mem.id),
+       .key_len = sizeof_field(struct xdp_mem_allocator, mem.id),
        .max_size = MEM_ID_MAX,
        .min_size = 8,
        .automatic_shrinking = true,
index a52e8ba1ced046b178fa069b1e0d690c537c6bc0..4af8a98fe7846bcb508352a0bd1947f8b8998cb5 100644 (file)
@@ -1132,7 +1132,7 @@ static int __init dccp_init(void)
        int rc;
 
        BUILD_BUG_ON(sizeof(struct dccp_skb_cb) >
-                    FIELD_SIZEOF(struct sk_buff, cb));
+                    sizeof_field(struct sk_buff, cb));
        rc = percpu_counter_init(&dccp_orphan_count, 0, GFP_KERNEL);
        if (rc)
                goto out_fail;
index 572b6307a2dff1a29c6686fb963aeb4a51410447..8274f98c511cc0ca0cfe721f46941680aa9c7378 100644 (file)
@@ -1464,8 +1464,8 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
        [IFLA_GRE_OFLAGS]       = { .type = NLA_U16 },
        [IFLA_GRE_IKEY]         = { .type = NLA_U32 },
        [IFLA_GRE_OKEY]         = { .type = NLA_U32 },
-       [IFLA_GRE_LOCAL]        = { .len = FIELD_SIZEOF(struct iphdr, saddr) },
-       [IFLA_GRE_REMOTE]       = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
+       [IFLA_GRE_LOCAL]        = { .len = sizeof_field(struct iphdr, saddr) },
+       [IFLA_GRE_REMOTE]       = { .len = sizeof_field(struct iphdr, daddr) },
        [IFLA_GRE_TTL]          = { .type = NLA_U8 },
        [IFLA_GRE_TOS]          = { .type = NLA_U8 },
        [IFLA_GRE_PMTUDISC]     = { .type = NLA_U8 },
index cfb0256067936839888b9c910997ff1a784021d1..9b153c7fcbb4d8ecd786bbe2349258eeebd8e693 100644 (file)
@@ -580,8 +580,8 @@ static const struct nla_policy vti_policy[IFLA_VTI_MAX + 1] = {
        [IFLA_VTI_LINK]         = { .type = NLA_U32 },
        [IFLA_VTI_IKEY]         = { .type = NLA_U32 },
        [IFLA_VTI_OKEY]         = { .type = NLA_U32 },
-       [IFLA_VTI_LOCAL]        = { .len = FIELD_SIZEOF(struct iphdr, saddr) },
-       [IFLA_VTI_REMOTE]       = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
+       [IFLA_VTI_LOCAL]        = { .len = sizeof_field(struct iphdr, saddr) },
+       [IFLA_VTI_REMOTE]       = { .len = sizeof_field(struct iphdr, daddr) },
        [IFLA_VTI_FWMARK]       = { .type = NLA_U32 },
 };
 
index 8a39ee79489192c02385aaadc8d1ae969fb55d23..3e50ac24fe410953e2c2e3ae21084c7cf3f1fb60 100644 (file)
@@ -3949,7 +3949,7 @@ void __init tcp_init(void)
 
        BUILD_BUG_ON(TCP_MIN_SND_MSS <= MAX_TCP_OPTION_SPACE);
        BUILD_BUG_ON(sizeof(struct tcp_skb_cb) >
-                    FIELD_SIZEOF(struct sk_buff, cb));
+                    sizeof_field(struct sk_buff, cb));
 
        percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL);
        percpu_counter_init(&tcp_orphan_count, 0, GFP_KERNEL);
index 923034c52ce40d85c91a54d1b107e2088d31bb85..9d0965252ddf723a0f4e64b8f4ef18675bdd55a3 100644 (file)
@@ -2170,8 +2170,8 @@ static const struct nla_policy ip6gre_policy[IFLA_GRE_MAX + 1] = {
        [IFLA_GRE_OFLAGS]      = { .type = NLA_U16 },
        [IFLA_GRE_IKEY]        = { .type = NLA_U32 },
        [IFLA_GRE_OKEY]        = { .type = NLA_U32 },
-       [IFLA_GRE_LOCAL]       = { .len = FIELD_SIZEOF(struct ipv6hdr, saddr) },
-       [IFLA_GRE_REMOTE]      = { .len = FIELD_SIZEOF(struct ipv6hdr, daddr) },
+       [IFLA_GRE_LOCAL]       = { .len = sizeof_field(struct ipv6hdr, saddr) },
+       [IFLA_GRE_REMOTE]      = { .len = sizeof_field(struct ipv6hdr, daddr) },
        [IFLA_GRE_TTL]         = { .type = NLA_U8 },
        [IFLA_GRE_ENCAP_LIMIT] = { .type = NLA_U8 },
        [IFLA_GRE_FLOWINFO]    = { .type = NLA_U32 },
index ebb62a4ebe30d3bd6347f72711b23655cddc00c5..c4bdcbc84b07f0fd8516ccc46416aa801e4b6dfa 100644 (file)
@@ -50,7 +50,7 @@ static struct iucv_interface *pr_iucv;
 static const u8 iprm_shutdown[8] =
        {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
 
-#define TRGCLS_SIZE    FIELD_SIZEOF(struct iucv_message, class)
+#define TRGCLS_SIZE    sizeof_field(struct iucv_message, class)
 
 #define __iucv_sock_wait(sk, condition, timeo, ret)                    \
 do {                                                                   \
index 062b73a83af0efd2537669ec515312f50815d041..c26a5663795ef20728aabcd3b5d9db93409abb0b 100644 (file)
@@ -7595,7 +7595,7 @@ int nft_validate_register_load(enum nft_registers reg, unsigned int len)
                return -EINVAL;
        if (len == 0)
                return -EINVAL;
-       if (reg * NFT_REG32_SIZE + len > FIELD_SIZEOF(struct nft_regs, data))
+       if (reg * NFT_REG32_SIZE + len > sizeof_field(struct nft_regs, data))
                return -ERANGE;
 
        return 0;
@@ -7643,7 +7643,7 @@ int nft_validate_register_store(const struct nft_ctx *ctx,
                if (len == 0)
                        return -EINVAL;
                if (reg * NFT_REG32_SIZE + len >
-                   FIELD_SIZEOF(struct nft_regs, data))
+                   sizeof_field(struct nft_regs, data))
                        return -ERANGE;
 
                if (data != NULL && type != NFT_DATA_VALUE)
index 7525063c25f5f998ee26bd1a8289670dc258ab9c..de3a9596b7f1bca045b8683bc48f66230fb65e75 100644 (file)
@@ -236,7 +236,7 @@ nfnl_cthelper_create(const struct nlattr * const tb[],
        nla_strlcpy(helper->name,
                    tb[NFCTH_NAME], NF_CT_HELPER_NAME_LEN);
        size = ntohl(nla_get_be32(tb[NFCTH_PRIV_DATA_LEN]));
-       if (size > FIELD_SIZEOF(struct nf_conn_help, data)) {
+       if (size > sizeof_field(struct nf_conn_help, data)) {
                ret = -ENOMEM;
                goto err2;
        }
index 46ca8bcca1bd5c31f900b4d89f11ee55b27098d9..faea72c2df328f6f691e1027a28a532364a5ea1e 100644 (file)
@@ -440,12 +440,12 @@ static int nft_ct_get_init(const struct nft_ctx *ctx,
 
                switch (ctx->family) {
                case NFPROTO_IPV4:
-                       len = FIELD_SIZEOF(struct nf_conntrack_tuple,
+                       len = sizeof_field(struct nf_conntrack_tuple,
                                           src.u3.ip);
                        break;
                case NFPROTO_IPV6:
                case NFPROTO_INET:
-                       len = FIELD_SIZEOF(struct nf_conntrack_tuple,
+                       len = sizeof_field(struct nf_conntrack_tuple,
                                           src.u3.ip6);
                        break;
                default:
@@ -457,20 +457,20 @@ static int nft_ct_get_init(const struct nft_ctx *ctx,
                if (tb[NFTA_CT_DIRECTION] == NULL)
                        return -EINVAL;
 
-               len = FIELD_SIZEOF(struct nf_conntrack_tuple, src.u3.ip);
+               len = sizeof_field(struct nf_conntrack_tuple, src.u3.ip);
                break;
        case NFT_CT_SRC_IP6:
        case NFT_CT_DST_IP6:
                if (tb[NFTA_CT_DIRECTION] == NULL)
                        return -EINVAL;
 
-               len = FIELD_SIZEOF(struct nf_conntrack_tuple, src.u3.ip6);
+               len = sizeof_field(struct nf_conntrack_tuple, src.u3.ip6);
                break;
        case NFT_CT_PROTO_SRC:
        case NFT_CT_PROTO_DST:
                if (tb[NFTA_CT_DIRECTION] == NULL)
                        return -EINVAL;
-               len = FIELD_SIZEOF(struct nf_conntrack_tuple, src.u.all);
+               len = sizeof_field(struct nf_conntrack_tuple, src.u.all);
                break;
        case NFT_CT_BYTES:
        case NFT_CT_PKTS:
@@ -551,7 +551,7 @@ static int nft_ct_set_init(const struct nft_ctx *ctx,
        case NFT_CT_MARK:
                if (tb[NFTA_CT_DIRECTION])
                        return -EINVAL;
-               len = FIELD_SIZEOF(struct nf_conn, mark);
+               len = sizeof_field(struct nf_conn, mark);
                break;
 #endif
 #ifdef CONFIG_NF_CONNTRACK_LABELS
index 39dc94f2491e305f9ef8bdbb91b320dca0b52017..bc9fd98c5d6d9db92e0d982dce6f93ceb893224a 100644 (file)
@@ -43,7 +43,7 @@ static int nft_masq_init(const struct nft_ctx *ctx,
                         const struct nft_expr *expr,
                         const struct nlattr * const tb[])
 {
-       u32 plen = FIELD_SIZEOF(struct nf_nat_range, min_addr.all);
+       u32 plen = sizeof_field(struct nf_nat_range, min_addr.all);
        struct nft_masq *priv = nft_expr_priv(expr);
        int err;
 
index c3c93e95b46e78c7f8d32673b86b1b862a0d4167..8b44a4de53294f25f85eb84bd3d5d4aac568d109 100644 (file)
@@ -141,10 +141,10 @@ static int nft_nat_init(const struct nft_ctx *ctx, const struct nft_expr *expr,
 
        switch (family) {
        case NFPROTO_IPV4:
-               alen = FIELD_SIZEOF(struct nf_nat_range, min_addr.ip);
+               alen = sizeof_field(struct nf_nat_range, min_addr.ip);
                break;
        case NFPROTO_IPV6:
-               alen = FIELD_SIZEOF(struct nf_nat_range, min_addr.ip6);
+               alen = sizeof_field(struct nf_nat_range, min_addr.ip6);
                break;
        default:
                return -EAFNOSUPPORT;
@@ -171,7 +171,7 @@ static int nft_nat_init(const struct nft_ctx *ctx, const struct nft_expr *expr,
                }
        }
 
-       plen = FIELD_SIZEOF(struct nf_nat_range, min_addr.all);
+       plen = sizeof_field(struct nf_nat_range, min_addr.all);
        if (tb[NFTA_NAT_REG_PROTO_MIN]) {
                priv->sreg_proto_min =
                        nft_parse_register(tb[NFTA_NAT_REG_PROTO_MIN]);
index 43eeb1f609f135ab7db6033e067c032b48c8a49a..5b779171565c1b2eb441ff1420cc31a97398beab 100644 (file)
@@ -48,7 +48,7 @@ static int nft_redir_init(const struct nft_ctx *ctx,
        unsigned int plen;
        int err;
 
-       plen = FIELD_SIZEOF(struct nf_nat_range, min_addr.all);
+       plen = sizeof_field(struct nf_nat_range, min_addr.all);
        if (tb[NFTA_REDIR_REG_PROTO_MIN]) {
                priv->sreg_proto_min =
                        nft_parse_register(tb[NFTA_REDIR_REG_PROTO_MIN]);
index f92a82c73880807bfa1be1d65b483049b2378b3c..4c33dfc9dab5058333366b90c730a43cddd5d32c 100644 (file)
@@ -218,14 +218,14 @@ static int nft_tproxy_init(const struct nft_ctx *ctx,
 
        switch (priv->family) {
        case NFPROTO_IPV4:
-               alen = FIELD_SIZEOF(union nf_inet_addr, in);
+               alen = sizeof_field(union nf_inet_addr, in);
                err = nf_defrag_ipv4_enable(ctx->net);
                if (err)
                        return err;
                break;
 #if IS_ENABLED(CONFIG_NF_TABLES_IPV6)
        case NFPROTO_IPV6:
-               alen = FIELD_SIZEOF(union nf_inet_addr, in6);
+               alen = sizeof_field(union nf_inet_addr, in6);
                err = nf_defrag_ipv6_enable(ctx->net);
                if (err)
                        return err;
index 2236455b10a3671b25547f048c26863fd651a70a..37253d399c6b8dd3ef1da16ab2ed78fd5567e2c6 100644 (file)
@@ -30,7 +30,7 @@ static unsigned int jhash_rnd __read_mostly;
 
 static unsigned int xt_rateest_hash(const char *name)
 {
-       return jhash(name, FIELD_SIZEOF(struct xt_rateest, name), jhash_rnd) &
+       return jhash(name, sizeof_field(struct xt_rateest, name), jhash_rnd) &
               (RATEEST_HSIZE - 1);
 }
 
index 90b2ab9dd449555260b2578d73539b2712a4a1f4..4e31721e729360c8bf555186ab6d4aa67cb00280 100644 (file)
@@ -2755,7 +2755,7 @@ static int __init netlink_proto_init(void)
        if (err != 0)
                goto out;
 
-       BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
+       BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof_field(struct sk_buff, cb));
 
        nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
        if (!nl_table)
index 1047e8043084fdacb53b685027ea23e0697716aa..e3a37d22539c061ef946e648a44911a5edf4d42d 100644 (file)
@@ -2497,7 +2497,7 @@ static int __init dp_init(void)
 {
        int err;
 
-       BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
+       BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > sizeof_field(struct sk_buff, cb));
 
        pr_info("Open vSwitch switching datapath\n");
 
index fd8ed766bdd17100ef8076af653905e9a8e3ae31..758a8c77f7361110268a756c001abe7dfbfa406f 100644 (file)
@@ -37,7 +37,7 @@ enum sw_flow_mac_proto {
  * matching for small options.
  */
 #define TUN_METADATA_OFFSET(opt_len) \
-       (FIELD_SIZEOF(struct sw_flow_key, tun_opts) - opt_len)
+       (sizeof_field(struct sw_flow_key, tun_opts) - opt_len)
 #define TUN_METADATA_OPTS(flow_key, opt_len) \
        ((void *)((flow_key)->tun_opts + TUN_METADATA_OFFSET(opt_len)))
 
@@ -52,7 +52,7 @@ struct vlan_head {
 
 #define OVS_SW_FLOW_KEY_METADATA_SIZE                  \
        (offsetof(struct sw_flow_key, recirc_id) +      \
-       FIELD_SIZEOF(struct sw_flow_key, recirc_id))
+       sizeof_field(struct sw_flow_key, recirc_id))
 
 struct ovs_key_nsh {
        struct ovs_nsh_key_base base;
index d72ddb67bb742a0f6db6db765dd0035c94f636e8..9d3c4d2d893ab2372af651704efdc512494733a2 100644 (file)
@@ -972,7 +972,7 @@ static int __init af_rxrpc_init(void)
        int ret = -1;
        unsigned int tmp;
 
-       BUILD_BUG_ON(sizeof(struct rxrpc_skb_priv) > FIELD_SIZEOF(struct sk_buff, cb));
+       BUILD_BUG_ON(sizeof(struct rxrpc_skb_priv) > sizeof_field(struct sk_buff, cb));
 
        get_random_bytes(&tmp, sizeof(tmp));
        tmp &= 0x3fffffff;
index bf2d69335d4b963e254da4c1c93b6706438eb8d4..f685c0d737086d5a0317f87cbfeb890e2f4f2a9b 100644 (file)
@@ -312,7 +312,7 @@ static void tcf_ct_act_set_labels(struct nf_conn *ct,
                                  u32 *labels_m)
 {
 #if IS_ENABLED(CONFIG_NF_CONNTRACK_LABELS)
-       size_t labels_sz = FIELD_SIZEOF(struct tcf_ct_params, labels);
+       size_t labels_sz = sizeof_field(struct tcf_ct_params, labels);
 
        if (!memchr_inv(labels_m, 0, labels_sz))
                return;
@@ -936,7 +936,7 @@ static struct tc_action_ops act_ct_ops = {
 
 static __net_init int ct_init_net(struct net *net)
 {
-       unsigned int n_bits = FIELD_SIZEOF(struct tcf_ct_params, labels) * 8;
+       unsigned int n_bits = sizeof_field(struct tcf_ct_params, labels) * 8;
        struct tc_ct_action_net *tn = net_generic(net, ct_net_id);
 
        if (nf_connlabels_get(net, n_bits - 1)) {
index 6c68971d99df702d79d651f38b6b5c1257c332e9..0d125de54285058591dcff0a6b400690a94679af 100644 (file)
@@ -1481,7 +1481,7 @@ static int fl_init_mask_hashtable(struct fl_flow_mask *mask)
 }
 
 #define FL_KEY_MEMBER_OFFSET(member) offsetof(struct fl_flow_key, member)
-#define FL_KEY_MEMBER_SIZE(member) FIELD_SIZEOF(struct fl_flow_key, member)
+#define FL_KEY_MEMBER_SIZE(member) sizeof_field(struct fl_flow_key, member)
 
 #define FL_KEY_IS_MASKED(mask, member)                                         \
        memchr_inv(((char *)mask) + FL_KEY_MEMBER_OFFSET(member),               \
index 4d38d49d6ad91508d4d6cccbc79318c6a5f3f73e..50623218747f067c0ecf33a51d8d6b61e39ce139 100644 (file)
@@ -957,7 +957,7 @@ static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to)
                             .msg_iocb = iocb};
        ssize_t res;
 
-       if (file->f_flags & O_NONBLOCK)
+       if (file->f_flags & O_NONBLOCK || (iocb->ki_flags & IOCB_NOWAIT))
                msg.msg_flags = MSG_DONTWAIT;
 
        if (iocb->ki_pos != 0)
@@ -982,7 +982,7 @@ static ssize_t sock_write_iter(struct kiocb *iocb, struct iov_iter *from)
        if (iocb->ki_pos != 0)
                return -ESPIPE;
 
-       if (file->f_flags & O_NONBLOCK)
+       if (file->f_flags & O_NONBLOCK || (iocb->ki_flags & IOCB_NOWAIT))
                msg.msg_flags = MSG_DONTWAIT;
 
        if (sock->type == SOCK_SEQPACKET)
index 7cfdce10de36b70104229e122d76aea272d80a05..774babbee045ff2649a078d212487c92c0932c1a 100644 (file)
@@ -2865,7 +2865,7 @@ static int __init af_unix_init(void)
 {
        int rc = -1;
 
-       BUILD_BUG_ON(sizeof(struct unix_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
+       BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof_field(struct sk_buff, cb));
 
        rc = proto_register(&unix_proto, 1);
        if (rc != 0) {
index 7cbe6e72e363b79e8d464c68a73f4892a8382feb..a63380c6b0d20f8f2fd9c73b715343177f607bb7 100755 (executable)
@@ -4125,15 +4125,6 @@ sub process {
                             "Prefer [subsystem eg: netdev]_$level2([subsystem]dev, ... then dev_$level2(dev, ... then pr_$level(...  to printk(KERN_$orig ...\n" . $herecurr);
                }
 
-               if ($line =~ /\bpr_warning\s*\(/) {
-                       if (WARN("PREFER_PR_LEVEL",
-                                "Prefer pr_warn(... to pr_warning(...\n" . $herecurr) &&
-                           $fix) {
-                               $fixed[$fixlinenr] =~
-                                   s/\bpr_warning\b/pr_warn/;
-                       }
-               }
-
                if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
                        my $orig = $1;
                        my $level = lc($orig);
index f19a895ad7cdf6c9bf24e05ffc6ee394ab3363ab..ef8dfd47c7e391328e2b1e7886b74c1ea87a231b 100644 (file)
@@ -45,7 +45,7 @@
 #define DONT_HASH      0x0200
 
 #define INVALID_PCR(a) (((a) < 0) || \
-       (a) >= (FIELD_SIZEOF(struct integrity_iint_cache, measured_pcrs) * 8))
+       (a) >= (sizeof_field(struct integrity_iint_cache, measured_pcrs) * 8))
 
 int ima_policy_flag;
 static int temp_ima_appraise;
@@ -274,7 +274,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry)
         * lsm rules can change
         */
        memcpy(nentry, entry, sizeof(*nentry));
-       memset(nentry->lsm, 0, FIELD_SIZEOF(struct ima_rule_entry, lsm));
+       memset(nentry->lsm, 0, sizeof_field(struct ima_rule_entry, lsm));
 
        for (i = 0; i < MAX_LSM_RULES; i++) {
                if (!entry->lsm[i].rule)
index 4e3bd9a2bec0656c7337817c9af71bd93fba7a98..bd91c6ecb1123bf755b7952d3ffc0e3f50943738 100644 (file)
@@ -247,7 +247,7 @@ static int pcm_hw_params(struct snd_pcm_substream *substream,
                mutex_unlock(&ff->mutex);
        }
 
-       return 0;
+       return err;
 }
 
 static int pcm_hw_free(struct snd_pcm_substream *substream)
index 349b4d09e84f6f885dd3a9bff2b0e29b127795e8..0059709310303c07a11bce1c04a551ac6502cdce 100644 (file)
@@ -177,18 +177,14 @@ static int pcm_open(struct snd_pcm_substream *substream)
                        err = snd_pcm_hw_constraint_minmax(substream->runtime,
                                        SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
                                        frames_per_period, frames_per_period);
-                       if (err < 0) {
-                               mutex_unlock(&motu->mutex);
+                       if (err < 0)
                                goto err_locked;
-                       }
 
                        err = snd_pcm_hw_constraint_minmax(substream->runtime,
                                        SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
                                        frames_per_buffer, frames_per_buffer);
-                       if (err < 0) {
-                               mutex_unlock(&motu->mutex);
+                       if (err < 0)
                                goto err_locked;
-                       }
                }
        }
 
index 9124603edabe58690d90562f0aa00d9413909d84..67fd3e844dd6aca2a1a0e4045e8d35f749a8b0fc 100644 (file)
@@ -285,7 +285,7 @@ static int pcm_playback_hw_params(struct snd_pcm_substream *substream,
                mutex_unlock(&oxfw->mutex);
        }
 
-       return 0;
+       return err;
 }
 
 static int pcm_capture_hw_free(struct snd_pcm_substream *substream)
index 50d4a87a6bb34b57ead7cee72a5e2ceb0924b74f..f02f5b1568dee6f5e083e11417f9b67e7d355073 100644 (file)
@@ -635,36 +635,30 @@ This function assumes there are no more than 16 in/out busses or pipes
 Meters is an array [3][16][2] of long. */
 static void get_audio_meters(struct echoaudio *chip, long *meters)
 {
-       int i, m, n;
+       unsigned int i, m, n;
 
-       m = 0;
-       n = 0;
-       for (i = 0; i < num_busses_out(chip); i++, m++) {
+       for (i = 0 ; i < 96; i++)
+               meters[i] = 0;
+
+       for (m = 0, n = 0, i = 0; i < num_busses_out(chip); i++, m++) {
                meters[n++] = chip->comm_page->vu_meter[m];
                meters[n++] = chip->comm_page->peak_meter[m];
        }
-       for (; n < 32; n++)
-               meters[n] = 0;
 
 #ifdef ECHOCARD_ECHO3G
        m = E3G_MAX_OUTPUTS;    /* Skip unused meters */
 #endif
 
-       for (i = 0; i < num_busses_in(chip); i++, m++) {
+       for (n = 32, i = 0; i < num_busses_in(chip); i++, m++) {
                meters[n++] = chip->comm_page->vu_meter[m];
                meters[n++] = chip->comm_page->peak_meter[m];
        }
-       for (; n < 64; n++)
-               meters[n] = 0;
-
 #ifdef ECHOCARD_HAS_VMIXER
-       for (i = 0; i < num_pipes_out(chip); i++, m++) {
+       for (n = 64, i = 0; i < num_pipes_out(chip); i++, m++) {
                meters[n++] = chip->comm_page->vu_meter[m];
                meters[n++] = chip->comm_page->peak_meter[m];
        }
 #endif
-       for (; n < 96; n++)
-               meters[n] = 0;
 }
 
 
index 35b4526f0d287a582da079a9af63f9db070e3fab..b856b89378ac556d1dead5ec23b875542ac6d736 100644 (file)
@@ -1419,7 +1419,6 @@ static bool atpx_present(void)
                                return true;
                        }
                }
-               pci_dev_put(pdev);
        }
        return false;
 }
index 6d6e34b3b3aa5c091f52248d5b79d07d084f8ecf..dbfafee97931a42952dd33690bc4f80209e39cde 100644 (file)
@@ -7643,11 +7643,6 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
                {0x1a, 0x90a70130},
                {0x1b, 0x90170110},
                {0x21, 0x03211020}),
-       SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
-               {0x12, 0xb7a60130},
-               {0x13, 0xb8a61140},
-               {0x16, 0x90170110},
-               {0x21, 0x04211020}),
        SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
                {0x12, 0x90a60130},
                {0x14, 0x90170110},
@@ -7841,6 +7836,9 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
        SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
                {0x19, 0x40000000},
                {0x1a, 0x40000000}),
+       SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
+               {0x19, 0x40000000},
+               {0x1a, 0x40000000}),
        {}
 };
 
index f8b5b960e5970ef3182aaa14b528f09fab6f50be..4eaa2b5b20a58b41ff075e9977acaeba4644ad0f 100644 (file)
@@ -292,7 +292,7 @@ static int hdmi_eld_ctl_info(struct snd_kcontrol *kcontrol,
                             struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
-       uinfo->count = FIELD_SIZEOF(struct hdmi_codec_priv, eld);
+       uinfo->count = sizeof_field(struct hdmi_codec_priv, eld);
 
        return 0;
 }