]> Git Repo - linux.git/commitdiff
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
authorLinus Torvalds <[email protected]>
Sat, 20 Jul 2019 00:13:56 +0000 (17:13 -0700)
committerLinus Torvalds <[email protected]>
Sat, 20 Jul 2019 00:13:56 +0000 (17:13 -0700)
Pull ARM SoC-related driver updates from Olof Johansson:
 "Various driver updates for platforms and a couple of the small driver
  subsystems we merge through our tree:

   - A driver for SCU (system control) on NXP i.MX8QXP

   - Qualcomm Always-on Subsystem messaging driver (AOSS QMP)

   - Qualcomm PM support for MSM8998

   - Support for a newer version of DRAM PHY driver for Broadcom (DPFE)

   - Reset controller support for Bitmain BM1880

   - TI SCI (System Control Interface) support for CPU control on AM654
     processors

   - More TI sysc refactoring and rework"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (84 commits)
  reset: remove redundant null check on pointer dev
  soc: rockchip: work around clang warning
  dt-bindings: reset: imx7: Fix the spelling of 'indices'
  soc: imx: Add i.MX8MN SoC driver support
  soc: aspeed: lpc-ctrl: Fix probe error handling
  soc: qcom: geni: Add support for ACPI
  firmware: ti_sci: Fix gcc unused-but-set-variable warning
  firmware: ti_sci: Use the correct style for SPDX License Identifier
  soc: imx8: Use existing of_root directly
  soc: imx8: Fix potential kernel dump in error path
  firmware/psci: psci_checker: Park kthreads before stopping them
  memory: move jedec_ddr.h from include/memory to drivers/memory/
  memory: move jedec_ddr_data.c from lib/ to drivers/memory/
  MAINTAINERS: Remove myself as qcom maintainer
  soc: aspeed: lpc-ctrl: make parameter optional
  soc: qcom: apr: Don't use reg for domain id
  soc: qcom: fix QCOM_AOSS_QMP dependency and build errors
  memory: tegra: Fix -Wunused-const-variable
  firmware: tegra: Early resume BPMP
  soc/tegra: Select pinctrl for Tegra194
  ...

17 files changed:
1  2 
MAINTAINERS
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/pdata-quirks.c
drivers/firmware/ti_sci.c
drivers/firmware/ti_sci.h
drivers/memory/Kconfig
drivers/memory/brcmstb_dpfe.c
drivers/memory/emif.c
drivers/memory/jedec_ddr.h
drivers/memory/jedec_ddr_data.c
drivers/memory/tegra/tegra124.c
drivers/soc/imx/soc-imx8.c
drivers/soc/rockchip/pm_domains.c
drivers/soc/tegra/pmc.c
include/linux/soc/ti/ti_sci_protocol.h
lib/Kconfig
lib/Makefile

diff --combined MAINTAINERS
index 9bd4c3b154e85bc174acb79aa39b38dbdc4b0408,78d83690f07e55b36c10a643112fe1145aaf09fd..bd3fe4fe13c4c7d39d93b6864d2512be06c488bf
@@@ -321,7 -321,7 +321,7 @@@ F: drivers/pnp/pnpacpi
  F:    include/linux/acpi.h
  F:    include/linux/fwnode.h
  F:    include/acpi/
 -F:    Documentation/acpi/
 +F:    Documentation/firmware-guide/acpi/
  F:    Documentation/ABI/testing/sysfs-bus-acpi
  F:    Documentation/ABI/testing/configfs-acpi
  F:    drivers/pci/*acpi*
@@@ -364,7 -364,7 +364,7 @@@ F: drivers/acpi/fan.
  
  ACPI FOR ARM64 (ACPI/arm64)
  M:    Lorenzo Pieralisi <[email protected]>
 -M:    Hanjun Guo <[email protected]>
 +M:    Hanjun Guo <[email protected]>
  M:    Sudeep Holla <[email protected]>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
@@@ -551,7 -551,6 +551,7 @@@ W: http://wiki.analog.com/ADXL34
  W:    http://ez.analog.com/community/linux-device-drivers
  S:    Supported
  F:    drivers/input/misc/adxl34x.c
 +F:    Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
  
  ADXL372 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
  M:    Stefan Popa <[email protected]>
@@@ -560,7 -559,7 +560,7 @@@ S: Supporte
  F:    drivers/iio/accel/adxl372.c
  F:    drivers/iio/accel/adxl372_spi.c
  F:    drivers/iio/accel/adxl372_i2c.c
 -F:    Documentation/devicetree/bindings/iio/accel/adxl372.txt
 +F:    Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
  
  AF9013 MEDIA DRIVER
  M:    Antti Palosaari <[email protected]>
@@@ -669,13 -668,6 +669,13 @@@ S:       Maintaine
  F:    Documentation/i2c/busses/i2c-ali1563
  F:    drivers/i2c/busses/i2c-ali1563.c
  
 +ALLEGRO DVT VIDEO IP CORE DRIVER
 +M:    Michael Tretter <[email protected]>
 +R:    Pengutronix Kernel Team <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/staging/media/allegro-dvt/
 +
  ALLWINNER SECURITY SYSTEM
  M:    Corentin Labbe <[email protected]>
  L:    [email protected]
@@@ -917,17 -909,8 +917,17 @@@ S:       Supporte
  F:    drivers/iio/adc/ad7768-1.c
  F:    Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt
  
 +ANALOG DEVICES INC AD7780 DRIVER
 +M:    Michael Hennerich <[email protected]>
 +M:    Renato Lui Geh <[email protected]>
 +L:    [email protected]
 +W:    http://ez.analog.com/community/linux-device-drivers
 +S:    Supported
 +F:    drivers/iio/adc/ad7780.c
 +F:    Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml
 +
  ANALOG DEVICES INC AD9389B DRIVER
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/media/i2c/ad9389b*
@@@ -938,13 -921,6 +938,13 @@@ S:       Supporte
  F:    drivers/mux/adgs1408.c
  F:    Documentation/devicetree/bindings/mux/adi,adgs1408.txt
  
 +ANALOG DEVICES INC ADIS DRIVER LIBRARY
 +M:    Alexandru Ardelean <[email protected]>
 +S:    Supported
 +L:    [email protected]
 +F:    include/linux/iio/imu/adis.h
 +F:    drivers/iio/imu/adis.c
 +
  ANALOG DEVICES INC ADP5061 DRIVER
  M:    Stefan Popa <[email protected]>
  L:    [email protected]
@@@ -966,19 -942,19 +966,19 @@@ S:      Maintaine
  F:    drivers/media/i2c/adv748x/*
  
  ANALOG DEVICES INC ADV7511 DRIVER
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/media/i2c/adv7511*
  
  ANALOG DEVICES INC ADV7604 DRIVER
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/media/i2c/adv7604*
  
  ANALOG DEVICES INC ADV7842 DRIVER
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/media/i2c/adv7842*
@@@ -1155,7 -1131,7 +1155,7 @@@ APPLIED MICRO (APM) X-GENE SOC PM
  M:    Khuong Dinh <[email protected]>
  S:    Supported
  F:    drivers/perf/xgene_pmu.c
 -F:    Documentation/perf/xgene-pmu.txt
 +F:    Documentation/admin-guide/perf/xgene-pmu.rst
  F:    Documentation/devicetree/bindings/perf/apm-xgene-pmu.txt
  
  APTINA CAMERA SENSOR PLL
  S:    Maintained
  F:    drivers/media/i2c/aptina-pll.*
  
 +AQUANTIA ETHERNET DRIVER (atlantic)
 +M:    Igor Russkikh <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +W:    http://www.aquantia.com
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +F:    drivers/net/ethernet/aquantia/atlantic/
 +F:    Documentation/networking/device_drivers/aquantia/atlantic.txt
 +
  ARC FRAMEBUFFER DRIVER
  M:    Jaya Kumar <[email protected]>
  S:    Maintained
@@@ -1236,7 -1203,7 +1236,7 @@@ M:      James (Qian) Wang <james.qian.wang@a
  M:    Liviu Dudau <[email protected]>
  L:    Mali DP Maintainers <[email protected]>
  S:    Supported
 -T:    git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    drivers/gpu/drm/arm/display/include/
  F:    drivers/gpu/drm/arm/display/komeda/
  F:    Documentation/devicetree/bindings/display/arm,komeda.txt
@@@ -1247,7 -1214,7 +1247,7 @@@ M:      Liviu Dudau <[email protected]
  M:    Brian Starkey <[email protected]>
  L:    Mali DP Maintainers <[email protected]>
  S:    Supported
 -T:    git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    drivers/gpu/drm/arm/
  F:    Documentation/devicetree/bindings/display/arm,malidp.txt
  F:    Documentation/gpu/afbc.rst
@@@ -1264,11 -1231,11 +1264,11 @@@ F:   include/uapi/drm/panfrost_drm.
  ARM MFM AND FLOPPY DRIVERS
  M:    Ian Molton <[email protected]>
  S:    Maintained
 -F:    arch/arm/lib/floppydma.S
 +F:    arch/arm/mach-rpc/floppydma.S
  F:    arch/arm/include/asm/floppy.h
  
  ARM PMU PROFILING AND DEBUGGING
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  M:    Mark Rutland <[email protected]>
  S:    Maintained
  L:    [email protected] (moderated for non-subscribers)
@@@ -1323,7 -1290,7 +1323,7 @@@ ARM PRIMECELL SSP PL022 SPI DRIVE
  M:    Linus Walleij <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    Documentation/devicetree/bindings/spi/spi_pl022.txt
 +F:    Documentation/devicetree/bindings/spi/spi-pl022.yaml
  F:    drivers/spi/spi-pl022.c
  
  ARM PRIMECELL UART PL010 AND PL011 DRIVERS
@@@ -1339,14 -1306,8 +1339,14 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt
  F:    drivers/irqchip/irq-vic.c
  
 +AMAZON ANNAPURNA LABS FIC DRIVER
 +M:    Talel Shenhar <[email protected]>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/interrupt-controller/amazon,al-fic.txt
 +F:    drivers/irqchip/irq-al-fic.c
 +
  ARM SMMU DRIVERS
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  R:    Robin Murphy <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
@@@ -1863,7 -1824,6 +1863,7 @@@ F:      arch/arm/mach-orion5x
  F:    arch/arm/plat-orion/
  F:    arch/arm/boot/dts/dove*
  F:    arch/arm/boot/dts/orion5x*
 +T:    git git://git.infradead.org/linux-mvebu.git
  
  ARM/Marvell Kirkwood and Armada 370, 375, 38x, 39x, XP, 3700, 7K/8K SOC support
  M:    Jason Cooper <[email protected]>
@@@ -1884,7 -1844,6 +1884,7 @@@ F:      drivers/irqchip/irq-armada-370-xp.
  F:    drivers/irqchip/irq-mvebu-*
  F:    drivers/pinctrl/mvebu/
  F:    drivers/rtc/rtc-armada38x.c
 +T:    git git://git.infradead.org/linux-mvebu.git
  
  ARM/Mediatek RTC DRIVER
  M:    Eddie Huang <[email protected]>
@@@ -2091,7 -2050,6 +2091,6 @@@ S:      Maintaine
  
  ARM/QUALCOMM SUPPORT
  M:    Andy Gross <[email protected]>
- M:    David Brown <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/soc/qcom/
@@@ -2113,7 -2071,7 +2112,7 @@@ F:      drivers/i2c/busses/i2c-qup.
  F:    drivers/i2c/busses/i2c-qcom-geni.c
  F:    drivers/mfd/ssbi.c
  F:    drivers/mmc/host/mmci_qcom*
- F:    drivers/mmc/host/sdhci_msm.c
+ F:    drivers/mmc/host/sdhci-msm.c
  F:    drivers/pci/controller/dwc/pcie-qcom.c
  F:    drivers/phy/qualcomm/
  F:    drivers/power/*/msm*
@@@ -2126,7 -2084,7 +2125,7 @@@ F:      drivers/tty/serial/msm_serial.
  F:    drivers/usb/dwc3/dwc3-qcom.c
  F:    include/dt-bindings/*/qcom*
  F:    include/linux/*/qcom*
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
  
  ARM/RADISYS ENP2611 MACHINE SUPPORT
  M:    Lennert Buytenhek <[email protected]>
@@@ -2142,7 -2100,7 +2141,7 @@@ F:      arch/arm/boot/dts/rda8810pl-
  F:    drivers/clocksource/timer-rda.c
  F:    drivers/irqchip/irq-rda-intc.c
  F:    drivers/tty/serial/rda-uart.c
 -F:    Documentation/devicetree/bindings/arm/rda.txt
 +F:    Documentation/devicetree/bindings/arm/rda.yaml
  F:    Documentation/devicetree/bindings/interrupt-controller/rda,8810pl-intc.txt
  F:    Documentation/devicetree/bindings/serial/rda,8810pl-uart.txt
  F:    Documentation/devicetree/bindings/timer/rda,8810pl-timer.txt
@@@ -2220,7 -2178,7 +2219,7 @@@ F:      drivers/*/*s3c64xx
  F:    drivers/*/*s5pv210*
  F:    drivers/memory/samsung/*
  F:    drivers/soc/samsung/*
 -F:    Documentation/arm/Samsung/
 +F:    Documentation/arm/samsung/
  F:    Documentation/devicetree/bindings/arm/samsung/
  F:    Documentation/devicetree/bindings/sram/samsung-sram.txt
  F:    Documentation/devicetree/bindings/power/pd-samsung.txt
@@@ -2385,7 -2343,7 +2384,7 @@@ L:      [email protected]
  S:    Maintained
  
  ARM/TEGRA HDMI CEC SUBSYSTEM SUPPORT
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
@@@ -2591,7 -2549,7 +2590,7 @@@ F:      drivers/i2c/busses/i2c-xiic.
  
  ARM64 PORT (AARCH64 ARCHITECTURE)
  M:    Catalin Marinas <[email protected]>
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
  S:    Maintained
@@@ -2627,15 -2585,6 +2626,15 @@@ S:    Maintaine
  F:    Documentation/hwmon/asc7621.rst
  F:    drivers/hwmon/asc7621.c
  
 +ASPEED PINCTRL DRIVERS
 +M:    Andrew Jeffery <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +L:    [email protected] (moderated for non-subscribers)
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/pinctrl/aspeed/
 +F:    Documentation/devicetree/bindings/pinctrl/aspeed,*
 +
  ASPEED VIDEO ENGINE DRIVER
  M:    Eddie James <[email protected]>
  L:    [email protected]
@@@ -2691,7 -2640,7 +2690,7 @@@ ATA OVER ETHERNET (AOE) DRIVE
  M:    "Justin Sanders" <[email protected]>
  W:    http://www.openaoe.org/
  S:    Supported
 -F:    Documentation/aoe/
 +F:    Documentation/admin-guide/aoe/
  F:    drivers/block/aoe/
  
  ATHEROS 71XX/9XXX GPIO DRIVER
@@@ -2784,7 -2733,7 +2783,7 @@@ S:      Maintaine
  F:    drivers/net/wireless/atmel/atmel*
  
  ATOMIC INFRASTRUCTURE
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  M:    Peter Zijlstra <[email protected]>
  R:    Boqun Feng <[email protected]>
  L:    [email protected]
@@@ -2970,7 -2919,7 +2969,7 @@@ M:      Jens Axboe <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    block/bfq-*
 -F:    Documentation/block/bfq-iosched.txt
 +F:    Documentation/block/bfq-iosched.rst
  
  BFS FILE SYSTEM
  M:    "Tigran A. Aivazian" <[email protected]>
@@@ -3110,9 -3059,9 +3109,9 @@@ S:      Maintaine
  F:    arch/riscv/net/
  
  BPF JIT for S390
 +M:    Ilya Leoshkevich <[email protected]>
  M:    Heiko Carstens <[email protected]>
  M:    Vasily Gorbik <[email protected]>
 -M:    Christian Borntraeger <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
@@@ -3171,8 -3120,7 +3170,8 @@@ F:      arch/arm/mach-bcm
  
  BROADCOM BCM2835 ARM ARCHITECTURE
  M:    Eric Anholt <[email protected]>
 -M:    Stefan Wahren <[email protected]>
 +M:    Stefan Wahren <[email protected]>
 +L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://github.com/anholt/linux
@@@ -3202,7 -3150,6 +3201,7 @@@ F:      arch/arm/boot/dts/bcm953012
  
  BROADCOM BCM53573 ARM ARCHITECTURE
  M:    RafaÅ‚ MiÅ‚ecki <[email protected]>
 +L:    [email protected]
  L:    [email protected]
  S:    Maintained
  F:    arch/arm/boot/dts/bcm53573*
@@@ -3729,7 -3676,7 +3728,7 @@@ F:      drivers/crypto/ccree
  W:    https://developer.arm.com/products/system-ip/trustzone-cryptocell/cryptocell-700-family
  
  CEC FRAMEWORK
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
  W:    http://linuxtv.org
@@@ -3746,7 -3693,7 +3745,7 @@@ F:      Documentation/devicetree/bindings/me
  F:    Documentation/ABI/testing/debugfs-cec-error-inj
  
  CEC GPIO DRIVER
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
  W:    http://linuxtv.org
@@@ -3767,7 -3714,7 +3766,7 @@@ F:      arch/powerpc/platforms/cell
  
  CEPH COMMON CODE (LIBCEPH)
  M:    Ilya Dryomov <[email protected]>
 -M:    "Yan, Zheng" <[email protected]>
 +M:    Jeff Layton <[email protected]>
  M:    Sage Weil <[email protected]>
  L:    [email protected]
  W:    http://ceph.com/
@@@ -3779,7 -3726,7 +3778,7 @@@ F:      include/linux/ceph
  F:    include/linux/crush/
  
  CEPH DISTRIBUTED FILE SYSTEM CLIENT (CEPH)
 -M:    "Yan, Zheng" <[email protected]>
 +M:    Jeff Layton <[email protected]>
  M:    Sage Weil <[email protected]>
  M:    Ilya Dryomov <[email protected]>
  L:    [email protected]
@@@ -3803,7 -3750,7 +3802,7 @@@ F:      scripts/extract-cert.
  CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM:
  L:    [email protected]
  S:    Orphan
 -F:    Documentation/usb/WUSB-Design-overview.txt
 +F:    Documentation/usb/wusb-design-overview.rst
  F:    Documentation/usb/wusb-cbaf
  F:    drivers/usb/host/hwa-hc.c
  F:    drivers/usb/host/whci/
@@@ -3938,7 -3885,7 +3937,7 @@@ F:      Documentation/devicetree/bindings/hw
  F:    Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt
  F:    Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt
  F:    Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt
 -F:    Documentation/hwmon/lochnagar
 +F:    Documentation/hwmon/lochnagar.rst
  
  CISCO FCOE HBA DRIVER
  M:    Satish Kharat <[email protected]>
@@@ -3979,32 -3926,19 +3978,32 @@@ W:   https://github.com/CirrusLogic/linux
  S:    Supported
  F:    Documentation/devicetree/bindings/mfd/madera.txt
  F:    Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt
 +F:    Documentation/devicetree/bindings/sound/madera.txt
 +F:    include/dt-bindings/sound/madera*
  F:    include/linux/irqchip/irq-madera*
  F:    include/linux/mfd/madera/*
 +F:    include/sound/madera*
  F:    drivers/gpio/gpio-madera*
  F:    drivers/irqchip/irq-madera*
  F:    drivers/mfd/madera*
  F:    drivers/mfd/cs47l*
  F:    drivers/pinctrl/cirrus/*
 +F:    sound/soc/codecs/cs47l*
 +F:    sound/soc/codecs/madera*
  
  CLANG-FORMAT FILE
  M:    Miguel Ojeda <[email protected]>
  S:    Maintained
  F:    .clang-format
  
 +CLANG/LLVM BUILD SUPPORT
 +L:    [email protected]
 +W:    https://clangbuiltlinux.github.io/
 +B:    https://github.com/ClangBuiltLinux/linux/issues
 +C:    irc://chat.freenode.net/clangbuiltlinux
 +S:    Supported
 +K:    \b(?i:clang|llvm)\b
 +
  CLEANCACHE API
  M:    Konrad Rzeszutek Wilk <[email protected]>
  L:    [email protected]
@@@ -4035,7 -3969,7 +4034,7 @@@ S:      Supporte
  F:    drivers/platform/x86/classmate-laptop.c
  
  COBALT MEDIA DRIVER
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
  W:    https://linuxtv.org
@@@ -4160,7 -4094,7 +4159,7 @@@ L:      [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
  S:    Maintained
  F:    Documentation/admin-guide/cgroup-v2.rst
 -F:    Documentation/cgroup-v1/
 +F:    Documentation/admin-guide/cgroup-v1/
  F:    include/linux/cgroup*
  F:    kernel/cgroup/
  
@@@ -4171,7 -4105,7 +4170,7 @@@ W:      http://www.bullopensource.org/cpuset
  W:    http://oss.sgi.com/projects/cpusets/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
  S:    Maintained
 -F:    Documentation/cgroup-v1/cpusets.txt
 +F:    Documentation/admin-guide/cgroup-v1/cpusets.rst
  F:    include/linux/cpuset.h
  F:    kernel/cgroup/cpuset.c
  
@@@ -4185,19 -4119,6 +4184,19 @@@ S:    Maintaine
  F:    mm/memcontrol.c
  F:    mm/swap_cgroup.c
  
 +CONTROL GROUP - BLOCK IO CONTROLLER (BLKIO)
 +M:    Tejun Heo <[email protected]>
 +M:    Jens Axboe <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +T:    git git://git.kernel.dk/linux-block
 +F:    Documentation/cgroup-v1/blkio-controller.rst
 +F:    block/blk-cgroup.c
 +F:    include/linux/blk-cgroup.h
 +F:    block/blk-throttle.c
 +F:    block/blk-iolatency.c
 +F:    block/bfq-cgroup.c
 +
  CORETEMP HARDWARE MONITORING DRIVER
  M:    Fenghua Yu <[email protected]>
  L:    [email protected]
@@@ -4319,7 -4240,6 +4318,7 @@@ F:      crypto
  F:    drivers/crypto/
  F:    include/crypto/
  F:    include/linux/crypto*
 +F:    lib/crypto/
  
  CRYPTOGRAPHIC RANDOM NUMBER GENERATOR
  M:    Neil Horman <[email protected]>
@@@ -4657,7 -4577,7 +4656,7 @@@ DELL SYSTEMS MANAGEMENT BASE DRIVER (dc
  M:    Stuart Hayes <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/dcdbas.txt
 +F:    Documentation/driver-api/dcdbas.rst
  F:    drivers/platform/x86/dcdbas.*
  
  DELL WMI NOTIFICATIONS DRIVER
  S:    Supported
  F:    drivers/mtd/nand/raw/denali*
  
 +DESIGNWARE EDMA CORE IP DRIVER
 +M:    Gustavo Pimentel <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/dma/dw-edma/
 +F:    include/linux/dma/edma.h
 +
  DESIGNWARE USB2 DRD IP DRIVER
  M:    Minas Harutyunyan <[email protected]>
  L:    [email protected]
@@@ -4757,7 -4670,7 +4756,7 @@@ Q:      http://patchwork.kernel.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
  T:    quilt http://people.redhat.com/agk/patches/linux/editing/
  S:    Maintained
 -F:    Documentation/device-mapper/
 +F:    Documentation/admin-guide/device-mapper/
  F:    drivers/md/Makefile
  F:    drivers/md/Kconfig
  F:    drivers/md/dm*
@@@ -4783,7 -4696,6 +4782,7 @@@ F:      Documentation/devicetree/bindings/mf
  F:    Documentation/devicetree/bindings/input/da90??-onkey.txt
  F:    Documentation/devicetree/bindings/thermal/da90??-thermal.txt
  F:    Documentation/devicetree/bindings/regulator/da92*.txt
 +F:    Documentation/devicetree/bindings/regulator/slg51000.txt
  F:    Documentation/devicetree/bindings/watchdog/da90??-wdt.txt
  F:    Documentation/devicetree/bindings/sound/da[79]*.txt
  F:    drivers/gpio/gpio-da90??.c
@@@ -4799,7 -4711,6 +4798,7 @@@ F:      drivers/power/supply/da9052-battery.
  F:    drivers/power/supply/da91??-*.c
  F:    drivers/regulator/da903x.c
  F:    drivers/regulator/da9???-regulator.[ch]
 +F:    drivers/regulator/slg51000-regulator.[ch]
  F:    drivers/thermal/da90??-thermal.c
  F:    drivers/rtc/rtc-da90??.c
  F:    drivers/video/backlight/da90??_bl.c
@@@ -4877,7 -4788,7 +4876,7 @@@ S:      Maintaine
  W:    http://plugable.com/category/projects/udlfb/
  F:    drivers/video/fbdev/udlfb.c
  F:    include/video/udlfb.h
 -F:    Documentation/fb/udlfb.txt
 +F:    Documentation/fb/udlfb.rst
  
  DISTRIBUTED LOCK MANAGER (DLM)
  M:    Christine Caulfield <[email protected]>
@@@ -4950,7 -4861,7 +4949,7 @@@ S:      Maintaine
  F:    Documentation/
  F:    scripts/kernel-doc
  X:    Documentation/ABI/
 -X:    Documentation/acpi/
 +X:    Documentation/firmware-guide/acpi/
  X:    Documentation/devicetree/
  X:    Documentation/i2c/
  X:    Documentation/media/
  S:    Maintained
  F:    drivers/staging/fsl-dpaa2/ethsw
  
 -DPAA2 PTP CLOCK DRIVER
 -M:    Yangbo Lu <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp*
 -F:    drivers/net/ethernet/freescale/dpaa2/dprtc*
 -
  DPT_I2O SCSI RAID DRIVER
  M:    Adaptec OEM Raid Solutions <[email protected]>
  L:    [email protected]
@@@ -5028,7 -4946,7 +5027,7 @@@ T:      git git://git.linbit.com/drbd-8.4.gi
  S:    Supported
  F:    drivers/block/drbd/
  F:    lib/lru_cache.c
 -F:    Documentation/blockdev/drbd/
 +F:    Documentation/admin-guide/blockdev/
  
  DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
  M:    Greg Kroah-Hartman <[email protected]>
@@@ -5221,13 -5139,6 +5220,13 @@@ S:    Maintaine
  F:    drivers/gpu/drm/tinydrm/st7735r.c
  F:    Documentation/devicetree/bindings/display/sitronix,st7735r.txt
  
 +DRM DRIVER FOR ST-ERICSSON MCDE
 +M:    Linus Walleij <[email protected]>
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +S:    Maintained
 +F:    drivers/gpu/drm/mcde/
 +F:    Documentation/devicetree/bindings/display/ste,mcde.txt
 +
  DRM DRIVER FOR TDFX VIDEO CARDS
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/tdfx/
@@@ -5513,7 -5424,6 +5512,7 @@@ T:      git git://anongit.freedesktop.org/dr
  
  DRM PANEL DRIVERS
  M:    Thierry Reding <[email protected]>
 +R:    Sam Ravnborg <[email protected]>
  L:    [email protected]
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  S:    Maintained
@@@ -5542,6 -5452,7 +5541,6 @@@ F:      Documentation/gpu/xen-front.rs
  DRM TTM SUBSYSTEM
  M:    Christian Koenig <[email protected]>
  M:    Huang Rui <[email protected]>
 -M:    Junwei Zhang <[email protected]>
  T:    git git://people.freedesktop.org/~agd5f/linux
  S:    Maintained
  L:    [email protected]
@@@ -5688,8 -5599,7 +5687,8 @@@ F:      include/linux/dynamic_debug.
  DYNAMIC INTERRUPT MODERATION
  M:    Tal Gilboa <[email protected]>
  S:    Maintained
 -F:    include/linux/net_dim.h
 +F:    include/linux/dim.h
 +F:    lib/dim/
  
  DZ DECSTATION DZ11 SERIAL DRIVER
  M:    "Maciej W. Rozycki" <[email protected]>
  S:    Maintained
  F:    drivers/edac/sb_edac.c
  
 +EDAC-SIFIVE
 +M:    Yash Shah <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/edac/sifive_edac.c
 +
  EDAC-SKYLAKE
  M:    Tony Luck <[email protected]>
  L:    [email protected]
@@@ -6063,7 -5967,6 +6062,7 @@@ M:      Heiner Kallweit <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-mdio
 +F:    Documentation/devicetree/bindings/net/ethernet-phy.yaml
  F:    Documentation/devicetree/bindings/net/mdio*
  F:    Documentation/networking/phy.rst
  F:    drivers/net/phy/
@@@ -6109,7 -6012,7 +6108,7 @@@ M:      Ard Biesheuvel <ard.biesheuvel@linar
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
  S:    Maintained
 -F:    Documentation/efi-stub.txt
 +F:    Documentation/admin-guide/efi-stub.rst
  F:    arch/*/kernel/efi.c
  F:    arch/x86/boot/compressed/eboot.[ch]
  F:    arch/*/include/asm/efi.h
@@@ -6128,7 -6031,7 +6127,7 @@@ S:      Maintaine
  F:    drivers/extcon/
  F:    include/linux/extcon/
  F:    include/linux/extcon.h
 -F:    Documentation/extcon/
 +F:    Documentation/firmware-guide/acpi/extcon-intel-int3496.rst
  F:    Documentation/devicetree/bindings/extcon/
  
  EXYNOS DP DRIVER
@@@ -6314,17 -6217,10 +6313,17 @@@ M:   Philip Kelleher <[email protected]
  S:    Maintained
  F:    drivers/block/rsxx/
  
 +FLEXTIMER FTM-QUADDEC DRIVER
 +M:    Patrick Havelange <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-bus-counter-ftm-quadddec
 +F:    Documentation/devicetree/bindings/counter/ftm-quaddec.txt
 +F:    drivers/counter/ftm-quaddec.c
 +
  FLOPPY DRIVER
 -M:    Jiri Kosina <[email protected]>
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/floppy.git
 -S:    Odd fixes
 +S:    Orphan
 +L:    [email protected]
  F:    drivers/block/floppy.c
  
  FMC SUBSYSTEM
@@@ -6337,6 -6233,7 +6336,6 @@@ F:      include/linux/ipmi-fru.
  K:    fmc_d.*register
  
  FPGA MANAGER FRAMEWORK
 -M:    Alan Tull <[email protected]>
  M:    Moritz Fischer <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -6353,7 -6250,7 +6352,7 @@@ FPGA DFL DRIVER
  M:    Wu Hao <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/fpga/dfl.txt
 +F:    Documentation/fpga/dfl.rst
  F:    include/uapi/linux/fpga-dfl.h
  F:    drivers/fpga/dfl*
  
  S:    Maintained
  F:    drivers/i2c/busses/i2c-cpm.c
  
 +FREESCALE IMX DDR PMU DRIVER
 +M:    Frank Li <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/perf/fsl_imx8_ddr_perf.c
 +F:    Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
 +
  FREESCALE IMX LPI2C DRIVER
  M:    Dong Aisheng <[email protected]>
  L:    [email protected]
@@@ -6480,8 -6370,6 +6479,8 @@@ FREESCALE QORIQ PTP CLOCK DRIVE
  M:    Yangbo Lu <[email protected]>
  L:    [email protected]
  S:    Maintained
 +F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp*
 +F:    drivers/net/ethernet/freescale/dpaa2/dprtc*
  F:    drivers/net/ethernet/freescale/enetc/enetc_ptp.c
  F:    drivers/ptp/ptp_qoriq.c
  F:    drivers/ptp/ptp_qoriq_debugfs.c
@@@ -6527,6 -6415,7 +6526,7 @@@ M:      Li Yang <[email protected]
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
+ F:    Documentation/devicetree/bindings/misc/fsl,dpaa2-console.txt
  F:    Documentation/devicetree/bindings/soc/fsl/
  F:    drivers/soc/fsl/
  F:    include/linux/fsl/
@@@ -6569,7 -6458,7 +6569,7 @@@ M:      "Rafael J. Wysocki" <[email protected]
  M:    Pavel Machek <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/power/freezing-of-tasks.txt
 +F:    Documentation/power/freezing-of-tasks.rst
  F:    include/linux/freezer.h
  F:    kernel/freezer.c
  
@@@ -6600,19 -6489,6 +6600,19 @@@ F:    fs/crypto
  F:    include/linux/fscrypt*.h
  F:    Documentation/filesystems/fscrypt.rst
  
 +FSI SUBSYSTEM
 +M:    Jeremy Kerr <[email protected]>
 +M:    Joel Stanley <[email protected]>
 +R:    Alistar Popple <[email protected]>
 +R:    Eddie James <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi.git
 +Q:    http://patchwork.ozlabs.org/project/linux-fsi/list/
 +S:    Supported
 +F:    drivers/fsi/
 +F:    include/linux/fsi*.h
 +F:    include/trace/events/fsi*.h
 +
  FSI-ATTACHED I2C DRIVER
  M:    Eddie James <[email protected]>
  L:    [email protected]
@@@ -6683,7 -6559,7 +6683,7 @@@ S:      Maintaine
  F:    scripts/gcc-plugins/
  F:    scripts/gcc-plugin.sh
  F:    scripts/Makefile.gcc-plugins
 -F:    Documentation/gcc-plugins.txt
 +F:    Documentation/core-api/gcc-plugins.rst
  
  GASKET DRIVER FRAMEWORK
  M:    Rob Springer <[email protected]>
  S:    Supported
  F:    drivers/uio/uio_pci_generic.c
  
 +GENERIC VDSO LIBRARY:
 +M:    Andy Lutomirski <[email protected]>
 +M:    Thomas Gleixner <[email protected]>
 +M:    Vincenzo Frascino <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
 +S:    Maintained
 +F:    lib/vdso/
 +F:    kernel/time/vsyscall.c
 +F:    include/vdso/
 +F:    include/asm-generic/vdso/vsyscall.h
 +
  GENWQE (IBM Generic Workqueue Card)
  M:    Frank Haverkamp <[email protected]>
  S:    Supported
@@@ -6827,7 -6691,9 +6827,7 @@@ M:      Paul Bolle <[email protected]
  L:    [email protected]
  W:    http://gigaset307x.sourceforge.net/
  S:    Odd Fixes
 -F:    Documentation/isdn/README.gigaset
 -F:    drivers/isdn/gigaset/
 -F:    include/uapi/linux/gigaset_dev.h
 +F:    drivers/staging/isdn/gigaset/
  
  GNSS SUBSYSTEM
  M:    Johan Hovold <[email protected]>
@@@ -6839,7 -6705,7 +6839,7 @@@ F:      drivers/gnss
  F:    include/linux/gnss.h
  
  GO7007 MPEG CODEC
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/media/usb/go7007/
  S:    Maintained
  F:    drivers/input/touchscreen/goodix.c
  
 +GOOGLE ETHERNET DRIVERS
 +M:    Catherine Sullivan <[email protected]>
 +R:    Sagi Shahar <[email protected]>
 +R:    Jon Olson <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    Documentation/networking/device_drivers/google/gve.txt
 +F:    drivers/net/ethernet/google
 +
  GPD POCKET FAN DRIVER
  M:    Hans de Goede <[email protected]>
  L:    [email protected]
@@@ -6895,7 -6752,7 +6895,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    Documentation/devicetree/bindings/gpio/
  F:    Documentation/driver-api/gpio/
 -F:    Documentation/gpio/
 +F:    Documentation/admin-guide/gpio/
  F:    Documentation/ABI/testing/gpio-cdev
  F:    Documentation/ABI/obsolete/sysfs-gpio
  F:    drivers/gpio/
@@@ -7116,7 -6973,7 +7116,7 @@@ M:      Herbert Xu <[email protected]
  L:    [email protected]
  S:    Odd fixes
  F:    Documentation/devicetree/bindings/rng/
 -F:    Documentation/hw_random.txt
 +F:    Documentation/admin-guide/hw_random.rst
  F:    drivers/char/hw_random/
  F:    include/linux/hw_random.h
  
@@@ -7152,7 -7009,7 +7152,7 @@@ F:      drivers/media/usb/hdpvr
  HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER
  M:    Jerry Hoemann <[email protected]>
  S:    Supported
 -F:    Documentation/watchdog/hpwdt.txt
 +F:    Documentation/watchdog/hpwdt.rst
  F:    drivers/watchdog/hpwdt.c
  
  HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa)
@@@ -7290,7 -7147,7 +7290,7 @@@ M:      Shaokun Zhang <zhangshaokun@hisilico
  W:    http://www.hisilicon.com
  S:    Supported
  F:    drivers/perf/hisilicon
 -F:    Documentation/perf/hisi-pmu.txt
 +F:    Documentation/admin-guide/perf/hisi-pmu.rst
  
  HISILICON ROCE DRIVER
  M:    Lijun Ou <[email protected]>
@@@ -7335,7 -7192,7 +7335,7 @@@ F:      drivers/net/ethernet/hp/hp100.
  HPET: High Precision Event Timers driver
  M:    Clemens Ladisch <[email protected]>
  S:    Maintained
 -F:    Documentation/timers/hpet.txt
 +F:    Documentation/timers/hpet.rst
  F:    drivers/char/hpet.c
  F:    include/linux/hpet.h
  F:    include/uapi/linux/hpet.h
@@@ -7445,7 -7302,6 +7445,7 @@@ F:      arch/x86/include/asm/trace/hyperv.
  F:    arch/x86/include/asm/hyperv-tlfs.h
  F:    arch/x86/kernel/cpu/mshyperv.c
  F:    arch/x86/hyperv
 +F:    drivers/clocksource/hyperv_timer.c
  F:    drivers/hid/hid-hyperv.c
  F:    drivers/hv/
  F:    drivers/input/serio/hyperv-keyboard.c
@@@ -7456,21 -7312,11 +7456,21 @@@ F:   drivers/uio/uio_hv_generic.
  F:    drivers/video/fbdev/hyperv_fb.c
  F:    drivers/iommu/hyperv_iommu.c
  F:    net/vmw_vsock/hyperv_transport.c
 +F:    include/clocksource/hyperv_timer.h
  F:    include/linux/hyperv.h
  F:    include/uapi/linux/hyperv.h
 +F:    include/asm-generic/mshyperv.h
  F:    tools/hv/
  F:    Documentation/ABI/stable/sysfs-bus-vmbus
  
 +HYPERBUS SUPPORT
 +M:    Vignesh Raghavendra <[email protected]>
 +S:    Supported
 +F:    drivers/mtd/hyperbus/
 +F:    include/linux/mtd/hyperbus.h
 +F:    Documentation/devicetree/bindings/mtd/cypress,hyperflash.txt
 +F:    Documentation/devicetree/bindings/mtd/ti,am654-hbmc.txt
 +
  HYPERVISOR VIRTUAL CONSOLE DRIVER
  L:    [email protected]
  S:    Odd Fixes
@@@ -7764,7 -7610,7 +7764,7 @@@ IDE/ATAPI DRIVER
  M:    Borislav Petkov <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/cdrom/ide-cd
 +F:    Documentation/cdrom/ide-cd.rst
  F:    drivers/ide/ide-cd*
  
  IDEAPAD LAPTOP EXTRAS DRIVER
@@@ -7927,12 -7773,6 +7927,12 @@@ W:    http://industrypack.sourceforge.ne
  S:    Maintained
  F:    drivers/ipack/
  
 +INFINEON DPS310 Driver
 +M:    Eddie James <[email protected]>
 +L:    [email protected]
 +F:    drivers/iio/pressure/dps310.c
 +S:    Maintained
 +
  INFINIBAND SUBSYSTEM
  M:    Doug Ledford <[email protected]>
  M:    Jason Gunthorpe <[email protected]>
@@@ -7961,34 -7801,7 +7961,34 @@@ INGENIC JZ4780 NAND DRIVE
  M:    Harvey Hunt <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/mtd/nand/raw/jz4780_*
 +F:    drivers/mtd/nand/raw/ingenic/
 +
 +INGENIC JZ47xx SoCs
 +M:    Paul Cercueil <[email protected]>
 +S:    Maintained
 +F:    arch/mips/boot/dts/ingenic/
 +F:    arch/mips/include/asm/mach-jz4740/
 +F:    arch/mips/jz4740/
 +F:    drivers/clk/ingenic/
 +F:    drivers/dma/dma-jz4780.c
 +F:    drivers/gpu/drm/ingenic/
 +F:    drivers/i2c/busses/i2c-jz4780.c
 +F:    drivers/iio/adc/ingenic-adc.c
 +F:    drivers/irqchip/irq-ingenic.c
 +F:    drivers/memory/jz4780-nemc.c
 +F:    drivers/mmc/host/jz4740_mmc.c
 +F:    drivers/mtd/nand/raw/ingenic/
 +F:    drivers/pinctrl/pinctrl-ingenic.c
 +F:    drivers/power/supply/ingenic-battery.c
 +F:    drivers/pwm/pwm-jz4740.c
 +F:    drivers/rtc/rtc-jz4740.c
 +F:    drivers/tty/serial/8250/8250_ingenic.c
 +F:    drivers/usb/musb/jz4740.c
 +F:    drivers/watchdog/jz4740_wdt.c
 +F:    include/dt-bindings/iio/adc/ingenic,adc.h
 +F:    include/linux/mfd/ingenic-tcu.h
 +F:    sound/soc/jz4740/
 +F:    sound/soc/codecs/jz47*
  
  INOTIFY
  M:    Jan Kara <[email protected]>
@@@ -8110,7 -7923,7 +8110,7 @@@ INTEL FRAMEBUFFER DRIVER (excluding 81
  M:    Maik Broemme <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/fb/intelfb.txt
 +F:    Documentation/fb/intelfb.rst
  F:    drivers/video/fbdev/intelfb/
  
  INTEL GPIO DRIVERS
@@@ -8221,7 -8034,7 +8221,7 @@@ F:      include/uapi/linux/mei.
  F:    include/linux/mei_cl_bus.h
  F:    drivers/misc/mei/*
  F:    drivers/watchdog/mei_wdt.c
 -F:    Documentation/misc-devices/mei/*
 +F:    Documentation/driver-api/mei/*
  F:    samples/mei/*
  
  INTEL MENLOW THERMAL DRIVER
@@@ -8270,7 -8083,7 +8270,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  F:    drivers/gpio/gpio-*cove.c
  F:    drivers/gpio/gpio-msic.c
  
 -INTEL MULTIFUNCTION PMIC DEVICE DRIVERS
 +INTEL PMIC MULTIFUNCTION DEVICE DRIVERS
  R:    Andy Shevchenko <[email protected]>
  S:    Maintained
  F:    drivers/mfd/intel_msic.c
@@@ -8301,14 -8114,6 +8301,14 @@@ S:    Supporte
  F:    drivers/infiniband/hw/i40iw/
  F:    include/uapi/rdma/i40iw-abi.h
  
 +INTEL SPEED SELECT TECHNOLOGY
 +M:    Srinivas Pandruvada <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/platform/x86/intel_speed_select_if/
 +F:    tools/power/x86/intel-speed-select/
 +F:    include/uapi/linux/isst_if.h
 +
  INTEL TELEMETRY DRIVER
  M:    Rajneesh Bhardwaj <[email protected]>
  M:    "David E. Box" <[email protected]>
@@@ -8367,7 -8172,7 +8367,7 @@@ L:      [email protected]
  W:    http://tboot.sourceforge.net
  T:    hg http://tboot.hg.sourceforge.net:8000/hgroot/tboot/tboot
  S:    Supported
 -F:    Documentation/intel_txt.txt
 +F:    Documentation/x86/intel_txt.rst
  F:    include/linux/tboot.h
  F:    arch/x86/kernel/tboot.c
  
@@@ -8381,7 -8186,7 +8381,7 @@@ INTERCONNECT AP
  M:    Georgi Djakov <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/interconnect/
 +F:    Documentation/driver-api/interconnect.rst
  F:    Documentation/devicetree/bindings/interconnect/
  F:    drivers/interconnect/
  F:    include/dt-bindings/interconnect/
@@@ -8417,7 -8222,6 +8417,7 @@@ L:      [email protected]
  T:    git git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
  S:    Supported
  F:    fs/iomap.c
 +F:    fs/iomap/
  F:    include/linux/iomap.h
  
  IOMMU DRIVERS
@@@ -8518,7 -8322,7 +8518,7 @@@ F:      drivers/irqchip
  ISA
  M:    William Breathitt Gray <[email protected]>
  S:    Maintained
 -F:    Documentation/isa.txt
 +F:    Documentation/driver-api/isa.rst
  F:    drivers/base/isa.c
  F:    include/linux/isa.h
  
@@@ -8533,7 -8337,7 +8533,7 @@@ F:      drivers/media/radio/radio-isa
  ISAPNP
  M:    Jaroslav Kysela <[email protected]>
  S:    Maintained
 -F:    Documentation/isapnp.txt
 +F:    Documentation/driver-api/isapnp.rst
  F:    drivers/pnp/isapnp/
  F:    include/linux/isapnp.h
  
@@@ -8571,26 -8375,18 +8571,26 @@@ S:   Supporte
  W:    http://www.linux-iscsi.org
  F:    drivers/infiniband/ulp/isert
  
 -ISDN SUBSYSTEM
 +ISDN/mISDN SUBSYSTEM
  M:    Karsten Keil <[email protected]>
  L:    [email protected] (subscribers-only)
  L:    [email protected]
  W:    http://www.isdn4linux.de
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/isdn-2.6.git
  S:    Maintained
 +F:    drivers/isdn/mISDN
 +F:    drivers/isdn/hardware
 +
 +ISDN/CAPI SUBSYSTEM
 +M:    Karsten Keil <[email protected]>
 +L:    [email protected] (subscribers-only)
 +L:    [email protected]
 +W:    http://www.isdn4linux.de
 +S:    Odd Fixes
  F:    Documentation/isdn/
 -F:    drivers/isdn/
 -F:    include/linux/isdn.h
 +F:    drivers/isdn/capi/
 +F:    drivers/staging/isdn/
 +F:    net/bluetooth/cmtp/
  F:    include/linux/isdn/
 -F:    include/uapi/linux/isdn.h
  F:    include/uapi/linux/isdn/
  
  IT87 HARDWARE MONITORING DRIVER
@@@ -8731,7 -8527,7 +8731,7 @@@ R:      Vivek Goyal <[email protected]
  L:    [email protected]
  W:    http://lse.sourceforge.net/kdump/
  S:    Maintained
 -F:    Documentation/kdump/
 +F:    Documentation/admin-guide/kdump/
  
  KEENE FM RADIO TRANSMITTER DRIVER
  M:    Hans Verkuil <[email protected]>
@@@ -8770,7 -8566,7 +8770,7 @@@ S:      Odd Fixe
  
  KERNEL NFSD, SUNRPC, AND LOCKD SERVERS
  M:    "J. Bruce Fields" <[email protected]>
 -M:    Jeff Layton <[email protected]>
 +M:    Chuck Lever <[email protected]>
  L:    [email protected]
  W:    http://nfs.sourceforge.net/
  T:    git git://linux-nfs.org/~bfields/linux.git
@@@ -9063,7 -8859,7 +9063,7 @@@ F:      include/linux/leds.
  LEGACY EEPROM DRIVER
  M:    Jean Delvare <[email protected]>
  S:    Maintained
 -F:    Documentation/misc-devices/eeprom
 +F:    Documentation/misc-devices/eeprom.rst
  F:    drivers/misc/eeprom/eeprom.c
  
  LEGO MINDSTORMS EV3
@@@ -9085,7 -8881,7 +9085,7 @@@ M:      Matan Ziv-Av <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-platform-lg-laptop
 -F:    Documentation/laptops/lg-laptop.rst
 +F:    Documentation/admin-guide/laptops/lg-laptop.rst
  F:    drivers/platform/x86/lg-laptop.c
  
  LG2160 MEDIA DRIVER
@@@ -9325,7 -9121,7 +9325,7 @@@ F:      drivers/misc/lkdtm/
  LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
  M:    Alan Stern <[email protected]>
  M:    Andrea Parri <[email protected]>
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  M:    Peter Zijlstra <[email protected]>
  M:    Boqun Feng <[email protected]>
  M:    Nicholas Piggin <[email protected]>
@@@ -9349,7 -9145,7 +9349,7 @@@ F:      Documentation/memory-barriers.tx
  LIS3LV02D ACCELEROMETER DRIVER
  M:    Eric Piel <[email protected]>
  S:    Maintained
 -F:    Documentation/misc-devices/lis3lv02d
 +F:    Documentation/misc-devices/lis3lv02d.rst
  F:    drivers/misc/lis3lv02d/
  F:    drivers/platform/x86/hp_accel.c
  
@@@ -9433,7 -9229,7 +9433,7 @@@ F:      Documentation/admin-guide/LSM/LoadPi
  LOCKING PRIMITIVES
  M:    Peter Zijlstra <[email protected]>
  M:    Ingo Molnar <[email protected]>
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
  S:    Maintained
@@@ -9454,7 -9250,7 +9454,7 @@@ M:      "Richard Russon (FlatCap)" <ldm@flat
  L:    [email protected]
  W:    http://www.linux-ntfs.org/content/view/19/37/
  S:    Maintained
 -F:    Documentation/ldm.txt
 +F:    Documentation/admin-guide/ldm.rst
  F:    block/partitions/ldm.*
  
  LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
  S:    Maintained
  F:    drivers/iio/dac/cio-dac.c
  
 +MEDIA CONTROLLER FRAMEWORK
 +M:    Sakari Ailus <[email protected]>
 +M:    Laurent Pinchart <[email protected]>
 +L:    [email protected]
 +W:    https://www.linuxtv.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Supported
 +F:    drivers/media/mc/
 +F:    include/media/media-*.h
 +F:    include/uapi/linux/media.h
 +
  MEDIA DRIVERS FOR ASCOT2E
  M:    Sergey Kozlov <[email protected]>
  M:    Abylay Ospan <[email protected]>
  S:    Maintained
  F:    drivers/net/wireless/mediatek/mt7601u/
  
 +MEDIATEK MT7621/28/88 I2C DRIVER
 +M:    Stefan Roese <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/i2c/busses/i2c-mt7621.c
 +F:    Documentation/devicetree/bindings/i2c/i2c-mt7621.txt
 +
  MEDIATEK NAND CONTROLLER DRIVER
  M:    Xiaolei Li <[email protected]>
  L:    [email protected]
@@@ -10324,7 -10102,6 +10324,7 @@@ Q:   http://patchwork.ozlabs.org/project/
  S:    Supported
  F:    drivers/net/ethernet/mellanox/mlx5/core/
  F:    include/linux/mlx5/
 +F:    Documentation/networking/device_drivers/mellanox/
  
  MELLANOX MLX5 IB driver
  M:    Leon Romanovsky <[email protected]>
  S:    Supported
  F:    drivers/leds/leds-mlxcpld.c
  F:    drivers/leds/leds-mlxreg.c
 -F:    Documentation/leds/leds-mlxcpld.txt
 +F:    Documentation/leds/leds-mlxcpld.rst
  
  MELLANOX PLATFORM DRIVER
  M:    Vadim Pasternak <[email protected]>
@@@ -10416,7 -10193,7 +10416,7 @@@ M:   Johannes Thumshirn <morbidrsa@gmail.
  S:    Maintained
  F:    drivers/mcb/
  F:    include/linux/mcb.h
 -F:    Documentation/men-chameleon-bus.txt
 +F:    Documentation/driver-api/men-chameleon-bus.rst
  
  MEN F21BMC (Board Management Controller)
  M:    Andreas Werner <[email protected]>
@@@ -10435,7 -10212,7 +10435,7 @@@ F:   drivers/watchdog/menz69_wdt.
  
  MESON AO CEC DRIVER FOR AMLOGIC SOCS
  M:    Neil Armstrong <[email protected]>
 -L:    linux-media@lists.freedesktop.org
 +L:    linux-media@vger.kernel.org
  L:    [email protected]
  W:    http://linux-meson.com/
  S:    Supported
@@@ -10451,14 -10228,6 +10451,14 @@@ S: Maintaine
  F:    drivers/mtd/nand/raw/meson_*
  F:    Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt
  
 +MESON VIDEO DECODER DRIVER FOR AMLOGIC SOCS
 +M:    Maxime Jourdan <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/staging/media/meson/vdec/
 +T:    git git://linuxtv.org/media_tree.git
 +
  METHODE UDPU SUPPORT
  M:    Vladimir Vid <[email protected]>
  S:    Maintained
@@@ -10512,9 -10281,7 +10512,9 @@@ MICROCHIP ISC DRIVE
  M:    Eugen Hristev <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    drivers/media/platform/atmel/atmel-isc.c
 +F:    drivers/media/platform/atmel/atmel-sama5d2-isc.c
 +F:    drivers/media/platform/atmel/atmel-isc.h
 +F:    drivers/media/platform/atmel/atmel-isc-base.c
  F:    drivers/media/platform/atmel/atmel-isc-regs.h
  F:    Documentation/devicetree/bindings/media/atmel-isc.txt
  
@@@ -10783,7 -10550,7 +10783,7 @@@ F:   arch/arm/boot/dts/mmp
  F:    arch/arm/mach-mmp/
  
  MMU GATHER AND TLB INVALIDATION
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  M:    "Aneesh Kumar K.V" <[email protected]>
  M:    Andrew Morton <[email protected]>
  M:    Nick Piggin <[email protected]>
@@@ -10830,7 -10597,7 +10830,7 @@@ F:   include/uapi/linux/meye.
  MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
  M:    Jiri Slaby <[email protected]>
  S:    Maintained
 -F:    Documentation/serial/moxa-smartio.rst
 +F:    Documentation/driver-api/serial/moxa-smartio.rst
  F:    drivers/tty/mxser.*
  
  MR800 AVERMEDIA USB FM RADIO DRIVER
@@@ -11074,6 -10841,14 +11074,6 @@@ F:  driver/net/net_failover.
  F:    include/net/net_failover.h
  F:    Documentation/networking/net_failover.rst
  
 -NETEFFECT IWARP RNIC DRIVER (IW_NES)
 -M:    Faisal Latif <[email protected]>
 -L:    [email protected]
 -W:    http://www.intel.com/Products/Server/Adapters/Server-Cluster/Server-Cluster-overview.htm
 -S:    Supported
 -F:    drivers/infiniband/hw/nes/
 -F:    include/uapi/rdma/nes-abi.h
 -
  NETEM NETWORK EMULATOR
  M:    Stephen Hemminger <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -11090,7 -10865,7 +11090,7 @@@ F:   drivers/net/ethernet/neterion
  
  NETFILTER
  M:    Pablo Neira Ayuso <[email protected]>
 -M:    Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
 +M:    Jozsef Kadlecsik <kadlec@netfilter.org>
  M:    Florian Westphal <[email protected]>
  L:    [email protected]
  L:    [email protected]
@@@ -11131,7 -10906,7 +11131,7 @@@ M:   Josef Bacik <[email protected]
  S:    Maintained
  L:    [email protected]
  L:    [email protected]
 -F:    Documentation/blockdev/nbd.txt
 +F:    Documentation/admin-guide/blockdev/nbd.rst
  F:    drivers/block/nbd.c
  F:    include/trace/events/nbd.h
  F:    include/uapi/linux/nbd.h
  S:    Supported
  F:    drivers/net/ethernet/qlogic/netxen/
  
 +NEXTHOP
 +M:    David Ahern <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    include/net/nexthop.h
 +F:    include/uapi/linux/nexthop.h
 +F:    include/net/netns/nexthop.h
 +F:    net/ipv4/nexthop.c
 +
  NFC SUBSYSTEM
  L:    [email protected]
  S:    Orphan
@@@ -11341,7 -11107,7 +11341,7 @@@ F:   include/uapi/linux/nfs
  F:    include/uapi/linux/sunrpc/
  
  NILFS2 FILESYSTEM
 -M:    Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
 +M:    Ryusuke Konishi <konishi.ryusuke@gmail.com>
  L:    [email protected]
  W:    https://nilfs.sourceforge.io/
  W:    https://nilfs.osdn.jp/
@@@ -11515,7 -11281,7 +11515,7 @@@ NXP FXAS21002C DRIVE
  M:    Rui Miguel Silva <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/devicetree/bindings/iio/gyroscope/fxas21002c.txt
 +F:    Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt
  F:    drivers/iio/gyro/fxas21002c_core.c
  F:    drivers/iio/gyro/fxas21002c.h
  F:    drivers/iio/gyro/fxas21002c_i2c.c
@@@ -11590,7 -11356,7 +11590,7 @@@ F:   arch/powerpc/include/asm/pnv-ocxl.
  F:    drivers/misc/ocxl/
  F:    include/misc/ocxl*
  F:    include/uapi/misc/ocxl.h
 -F:    Documentation/accelerators/ocxl.rst
 +F:    Documentation/userspace-api/accelerators/ocxl.rst
  
  OMAP AUDIO SUPPORT
  M:    Peter Ujfalusi <[email protected]>
  L:    [email protected]
  S:    Orphan
  F:    drivers/video/fbdev/omap2/
 -F:    Documentation/arm/OMAP/DSS
 +F:    Documentation/arm/omap/dss.rst
  
  OMAP FRAMEBUFFER SUPPORT
  L:    [email protected]
@@@ -11905,13 -11671,25 +11905,15 @@@ S:        Maintaine
  F:    drivers/mtd/nand/onenand/
  F:    include/linux/mtd/onenand*.h
  
 -ONSTREAM SCSI TAPE DRIVER
 -M:    Willem Riede <[email protected]>
 -L:    [email protected]
 -L:    [email protected]
 -S:    Maintained
 -F:    Documentation/scsi/osst.txt
 -F:    drivers/scsi/osst.*
 -F:    drivers/scsi/osst_*.h
 -F:    drivers/scsi/st.h
 -
  OP-TEE DRIVER
  M:    Jens Wiklander <[email protected]>
+ L:    [email protected]
  S:    Maintained
  F:    drivers/tee/optee/
  
  OP-TEE RANDOM NUMBER GENERATOR (RNG) DRIVER
  M:    Sumit Garg <[email protected]>
+ L:    [email protected]
  S:    Maintained
  F:    drivers/char/hw_random/optee-rng.c
  
@@@ -11998,7 -11776,7 +12000,7 @@@ S:   Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
  F:    drivers/opp/
  F:    include/linux/pm_opp.h
 -F:    Documentation/power/opp.txt
 +F:    Documentation/power/opp.rst
  F:    Documentation/devicetree/bindings/opp/
  
  OPL4 DRIVER
@@@ -12095,14 -11873,6 +12097,14 @@@ F: kernel/padata.
  F:    include/linux/padata.h
  F:    Documentation/padata.txt
  
 +PAGE POOL
 +M:    Jesper Dangaard Brouer <[email protected]>
 +M:    Ilias Apalodimas <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    net/core/page_pool.c
 +F:    include/net/page_pool.h
 +
  PANASONIC LAPTOP ACPI EXTRAS DRIVER
  M:    Harald Welte <[email protected]>
  L:    [email protected]
@@@ -12113,7 -11883,7 +12115,7 @@@ PARALLEL LCD/KEYPAD PANEL DRIVE
  M:    Willy Tarreau <[email protected]>
  M:    Ksenija Stanojevic <[email protected]>
  S:    Odd Fixes
 -F:    Documentation/auxdisplay/lcd-panel-cgram.txt
 +F:    Documentation/admin-guide/lcd-panel-cgram.rst
  F:    drivers/auxdisplay/panel.c
  
  PARALLEL PORT SUBSYSTEM
@@@ -12125,7 -11895,7 +12127,7 @@@ F:   drivers/parport
  F:    include/linux/parport*.h
  F:    drivers/char/ppdev.c
  F:    include/uapi/linux/ppdev.h
 -F:    Documentation/parport*.txt
 +F:    Documentation/driver-api/parport*.rst
  
  PARAVIRT_OPS INTERFACE
  M:    Juergen Gross <[email protected]>
@@@ -12141,7 -11911,7 +12143,7 @@@ PARIDE DRIVERS FOR PARALLEL PORT IDE DE
  M:    Tim Waugh <[email protected]>
  L:    [email protected] (subscribers-only)
  S:    Maintained
 -F:    Documentation/blockdev/paride.txt
 +F:    Documentation/admin-guide/blockdev/paride.rst
  F:    drivers/block/paride/
  
  PARISC ARCHITECTURE
@@@ -12271,7 -12041,7 +12273,7 @@@ S:   Maintaine
  F:    drivers/pci/controller/dwc/*layerscape*
  
  PCI DRIVER FOR GENERIC OF HOSTS
 -M:    Will Deacon <will[email protected]>
 +M:    Will Deacon <will@kernel.org>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
@@@ -12300,7 -12070,7 +12302,7 @@@ M:   Kurt Schwemmer <kurt.schwemmer@micro
  M:    Logan Gunthorpe <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/switchtec.txt
 +F:    Documentation/driver-api/switchtec.rst
  F:    Documentation/ABI/testing/sysfs-class-switchtec
  F:    drivers/pci/switch/switchtec*
  F:    include/uapi/linux/switchtec_ioctl.h
@@@ -12385,7 -12155,7 +12387,7 @@@ M:   Sam Bobroff <[email protected]
  M:    Oliver O'Halloran <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/PCI/pci-error-recovery.txt
 +F:    Documentation/PCI/pci-error-recovery.rst
  F:    drivers/pci/pcie/aer.c
  F:    drivers/pci/pcie/dpc.c
  F:    drivers/pci/pcie/err.c
@@@ -12398,7 -12168,7 +12400,7 @@@ PCI ERROR RECOVER
  M:    Linas Vepstas <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/PCI/pci-error-recovery.txt
 +F:    Documentation/PCI/pci-error-recovery.rst
  
  PCI MSI DRIVER FOR ALTERA MSI IP
  M:    Ley Foon Tan <[email protected]>
@@@ -12647,17 -12417,6 +12649,17 @@@ F: arch/arm/boot/dts/picoxcell
  F:    arch/arm/mach-picoxcell/
  F:    drivers/crypto/picoxcell*
  
 +PIDFD API
 +M:    Christian Brauner <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
 +F:    samples/pidfd/
 +F:    tools/testing/selftests/pidfd/
 +K:    (?i)pidfd
 +K:    (?i)clone3
 +K:    \b(clone_args|kernel_clone_args)\b
 +
  PIN CONTROL SUBSYSTEM
  M:    Linus Walleij <[email protected]>
  L:    [email protected]
@@@ -12807,7 -12566,8 +12809,7 @@@ S:   Orpha
  F:    drivers/scsi/pmcraid.*
  
  PMC SIERRA PM8001 DRIVER
 -M:    Jack Wang <[email protected]>
 -M:    [email protected]
 +M:    Jack Wang <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/scsi/pm8001/
@@@ -12843,7 -12603,6 +12845,7 @@@ F:   drivers/base/power
  F:    include/linux/pm.h
  F:    include/linux/pm_*
  F:    include/linux/powercap.h
 +F:    include/linux/intel_rapl.h
  F:    drivers/powercap/
  F:    kernel/configs/nopm.config
  
@@@ -12902,7 -12661,7 +12904,7 @@@ M:   Rodolfo Giometti <giometti@enneenne.
  W:    http://wiki.enneenne.com/index.php/LinuxPPS_support
  L:    [email protected] (subscribers-only)
  S:    Maintained
 -F:    Documentation/pps/
 +F:    Documentation/driver-api/pps.rst
  F:    Documentation/devicetree/bindings/pps/pps-gpio.txt
  F:    Documentation/ABI/testing/sysfs-pps
  F:    drivers/pps/
  S:    Maintained
  W:    http://linuxptp.sourceforge.net/
  F:    Documentation/ABI/testing/sysfs-ptp
 -F:    Documentation/ptp/*
 +F:    Documentation/driver-api/ptp.rst
  F:    drivers/net/phy/dp83640*
  F:    drivers/ptp/*
  F:    include/linux/ptp_cl*
@@@ -13022,6 -12781,7 +13024,6 @@@ F:   include/linux/regset.
  F:    include/linux/tracehook.h
  F:    include/uapi/linux/ptrace.h
  F:    include/uapi/linux/ptrace.h
 -F:    include/asm-generic/ptrace.h
  F:    kernel/ptrace.c
  F:    arch/*/ptrace*.c
  F:    arch/*/*/ptrace*.c
@@@ -13073,7 -12833,7 +13075,7 @@@ M:   Thierry Reding <thierry.reding@gmail
  L:    [email protected]
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git
 -F:    Documentation/pwm.txt
 +F:    Documentation/driver-api/pwm.rst
  F:    Documentation/devicetree/bindings/pwm/
  F:    include/linux/pwm.h
  F:    drivers/pwm/
@@@ -13295,7 -13055,7 +13297,7 @@@ M:   Niklas Cassel <niklas.cassel@linaro.
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
- F:    Documentation/devicetree/bindings/net/qcom,dwmac.txt
+ F:    Documentation/devicetree/bindings/net/qcom,ethqos.txt
  
  QUALCOMM GENERIC INTERFACE I2C DRIVER
  M:    Alok Chauhan <[email protected]>
@@@ -13434,7 -13194,7 +13436,7 @@@ F:   drivers/net/wireless/ralink/rt2x00
  RAMDISK RAM BLOCK DEVICE DRIVER
  M:    Jens Axboe <[email protected]>
  S:    Maintained
 -F:    Documentation/blockdev/ramdisk.txt
 +F:    Documentation/admin-guide/blockdev/ramdisk.rst
  F:    drivers/block/brd.c
  
  RANCHU VIRTUAL BOARD FOR MIPS
@@@ -13543,7 -13303,7 +13545,7 @@@ Q:   http://patchwork.ozlabs.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git
  S:    Maintained
  F:    Documentation/devicetree/bindings/rtc/
 -F:    Documentation/rtc.txt
 +F:    Documentation/admin-guide/rtc.rst
  F:    drivers/rtc/
  F:    include/linux/rtc.h
  F:    include/uapi/linux/rtc.h
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc.git
  S:    Maintained
  F:    Documentation/devicetree/bindings/remoteproc/
 +F:    Documentation/ABI/testing/sysfs-class-remoteproc
  F:    Documentation/remoteproc.txt
  F:    drivers/remoteproc/
  F:    include/linux/remoteproc.h
 +F:    include/linux/remoteproc/
  
  REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM
  M:    Ohad Ben-Cohen <[email protected]>
@@@ -13607,11 -13365,8 +13609,11 @@@ T: git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    drivers/rpmsg/
  F:    Documentation/rpmsg.txt
 +F:    Documentation/ABI/testing/sysfs-bus-rpmsg
  F:    include/linux/rpmsg.h
  F:    include/linux/rpmsg/
 +F:    include/uapi/linux/rpmsg.h
 +F:    samples/rpmsg/
  
  RENESAS CLOCK DRIVERS
  M:    Geert Uytterhoeven <[email protected]>
@@@ -13692,7 -13447,7 +13694,7 @@@ W:   http://wireless.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
  S:    Maintained
 -F:    Documentation/rfkill.txt
 +F:    Documentation/driver-api/rfkill.rst
  F:    Documentation/ABI/stable/sysfs-class-rfkill
  F:    net/rfkill/
  F:    include/linux/rfkill.h
@@@ -13723,7 -13478,7 +13725,7 @@@ RISC-V ARCHITECTUR
  M:    Palmer Dabbelt <[email protected]>
  M:    Albert Ou <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
  S:    Supported
  F:    arch/riscv/
  K:    riscv
@@@ -13744,11 -13499,11 +13746,11 @@@ S:        Maintaine
  F:    drivers/media/platform/rockchip/rga/
  F:    Documentation/devicetree/bindings/media/rockchip-rga.txt
  
 -ROCKCHIP VPU CODEC DRIVER
 +HANTRO VPU CODEC DRIVER
  M:    Ezequiel Garcia <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/staging/media/platform/rockchip/vpu/
 +F:    drivers/staging/media/platform/hantro/
  F:    Documentation/devicetree/bindings/media/rockchip-vpu.txt
  
  ROCKER DRIVER
@@@ -13761,7 -13516,7 +13763,7 @@@ ROCKETPORT DRIVE
  P:    Comtrol Corp.
  W:    http://www.comtrol.com
  S:    Maintained
 -F:    Documentation/serial/rocket.rst
 +F:    Documentation/driver-api/serial/rocket.rst
  F:    drivers/tty/rocket*
  
  ROCKETPORT EXPRESS/INFINITY DRIVER
  L:    [email protected]
  S:    Supported
  F:    drivers/s390/cio/vfio_ccw*
 -F:    Documentation/s390/vfio-ccw.txt
 +F:    Documentation/s390/vfio-ccw.rst
  F:    include/uapi/linux/vfio_ccw.h
  
  S390 ZCRYPT DRIVER
@@@ -13969,7 -13724,7 +13971,7 @@@ S:   Supporte
  F:    drivers/s390/crypto/vfio_ap_drv.c
  F:    drivers/s390/crypto/vfio_ap_private.h
  F:    drivers/s390/crypto/vfio_ap_ops.c
 -F:    Documentation/s390/vfio-ap.txt
 +F:    Documentation/s390/vfio-ap.rst
  
  S390 ZFCP DRIVER
  M:    Steffen Maier <[email protected]>
@@@ -14155,7 -13910,7 +14157,7 @@@ M:   Sylwester Nawrocki <s.nawrocki@samsu
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/phy/samsung-phy.txt
 -F:    Documentation/phy/samsung-usb2.txt
 +F:    Documentation/driver-api/phy/samsung-usb2.rst
  F:    drivers/phy/samsung/phy-exynos4210-usb2.c
  F:    drivers/phy/samsung/phy-exynos4x12-usb2.c
  F:    drivers/phy/samsung/phy-exynos5250-usb2.c
@@@ -14408,12 -14163,6 +14410,12 @@@ S: Maintaine
  F:    drivers/misc/phantom.c
  F:    include/uapi/linux/phantom.h
  
 +SENSIRION SPS30 AIR POLLUTION SENSOR DRIVER
 +M:    Tomasz Duszynski <[email protected]>
 +S:    Maintained
 +F:    drivers/iio/chemical/sps30.c
 +F:    Documentation/devicetree/bindings/iio/chemical/sensirion,sps30.yaml
 +
  SERIAL DEVICE BUS
  M:    Rob Herring <[email protected]>
  L:    [email protected]
@@@ -14461,7 -14210,7 +14463,7 @@@ SGI SN-IA64 (Altix) SERIAL CONSOLE DRIV
  M:    Pat Gefre <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/ia64/serial.txt
 +F:    Documentation/ia64/serial.rst
  F:    drivers/tty/serial/ioc?_serial.c
  F:    include/linux/ioc?.h
  
@@@ -14585,18 -14334,9 +14587,18 @@@ M: Paul Walmsley <paul.walmsley@sifive.
  L:    [email protected]
  T:    git git://github.com/sifive/riscv-linux.git
  S:    Supported
 -K:    sifive
 +K:    [^@]sifive
  N:    sifive
  
 +SIFIVE FU540 SYSTEM-ON-CHIP
 +M:    Paul Walmsley <[email protected]>
 +M:    Palmer Dabbelt <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pjw/sifive.git
 +S:    Supported
 +K:    fu540
 +N:    fu540
 +
  SILEAD TOUCHSCREEN DRIVER
  M:    Hans de Goede <[email protected]>
  L:    [email protected]
@@@ -14612,7 -14352,7 +14614,7 @@@ M:   Sudip Mukherjee <sudip.mukherjee@cod
  L:    [email protected]
  S:    Maintained
  F:    drivers/video/fbdev/sm712*
 -F:    Documentation/fb/sm712fb.txt
 +F:    Documentation/fb/sm712fb.rst
  
  SIMPLE FIRMWARE INTERFACE (SFI)
  M:    Len Brown <[email protected]>
@@@ -14657,7 -14397,7 +14659,7 @@@ F:   lib/test_siphash.
  F:    include/linux/siphash.h
  
  SIOX
 -M:    Gavin Schenk <g.schenk@eckelmann.de>
 +M:    Thorsten Scherer <t.scherer@eckelmann.de>
  M:    Uwe Kleine-König <[email protected]>
  R:    Pengutronix Kernel Team <[email protected]>
  S:    Supported
@@@ -14682,7 -14422,7 +14684,7 @@@ SIS FRAMEBUFFER DRIVE
  M:    Thomas Winischhofer <[email protected]>
  W:    http://www.winischhofer.net/linuxsisvga.shtml
  S:    Maintained
 -F:    Documentation/fb/sisfb.txt
 +F:    Documentation/fb/sisfb.rst
  F:    drivers/video/fbdev/sis/
  F:    include/video/sisfb.h
  
@@@ -14820,13 -14560,6 +14822,13 @@@ M: Chris Boot <[email protected]
  S:    Maintained
  F:    drivers/leds/leds-net48xx.c
  
 +SOFT-IWARP DRIVER (siw)
 +M:    Bernard Metzler <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/infiniband/sw/siw/
 +F:    include/uapi/rdma/siw-abi.h
 +
  SOFT-ROCE DRIVER (rxe)
  M:    Moni Shoua <[email protected]>
  L:    [email protected]
@@@ -14876,20 -14609,11 +14878,20 @@@ F:        Documentation/devicetree/bindings/ne
  
  SOCIONEXT (SNI) NETSEC NETWORK DRIVER
  M:    Jassi Brar <[email protected]>
 +M:    Ilias Apalodimas <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/socionext/netsec.c
  F:    Documentation/devicetree/bindings/net/socionext-netsec.txt
  
 +SOCIONEXT (SNI) Synquacer SPI DRIVER
 +M:    Masahisa Kojima <[email protected]>
 +M:    Jassi Brar <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/spi/spi-synquacer.c
 +F:    Documentation/devicetree/bindings/spi/spi-synquacer.txt
 +
  SOLIDRUN CLEARFOG SUPPORT
  M:    Russell King <[email protected]>
  S:    Maintained
@@@ -14968,7 -14692,7 +14970,7 @@@ M:   Mattia Dongili <[email protected]
  L:    [email protected]
  W:    http://www.linux.it/~malattia/wiki/index.php/Sony_drivers
  S:    Maintained
 -F:    Documentation/laptops/sony-laptop.txt
 +F:    Documentation/admin-guide/laptops/sony-laptop.rst
  F:    drivers/char/sonypi.c
  F:    drivers/platform/x86/sony-laptop.c
  F:    include/linux/sony-laptop.h
  S:    Maintained
  F:    drivers/staging/erofs/
  
 +STAGING - FIELDBUS SUBSYSTEM
 +M:    Sven Van Asbroeck <[email protected]>
 +S:    Maintained
 +F:    drivers/staging/fieldbus/*
 +F:    drivers/staging/fieldbus/Documentation/
 +
 +STAGING - HMS ANYBUS-S BUS
 +M:    Sven Van Asbroeck <[email protected]>
 +S:    Maintained
 +F:    drivers/staging/fieldbus/anybuss/
 +
  STAGING - INDUSTRIAL IO
  M:    Jonathan Cameron <[email protected]>
  L:    [email protected]
@@@ -15386,7 -15099,7 +15388,7 @@@ SVGA HANDLIN
  M:    Martin Mares <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/svga.txt
 +F:    Documentation/admin-guide/svga.rst
  F:    arch/x86/boot/video*
  
  SWIOTLB SUBSYSTEM
@@@ -15423,7 -15136,7 +15425,7 @@@ F:   drivers/dma-buf/dma-fence
  F:    drivers/dma-buf/sw_sync.c
  F:    include/linux/sync_file.h
  F:    include/uapi/linux/sync_file.h
 -F:    Documentation/sync_file.txt
 +F:    Documentation/driver-api/sync_file.rst
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  SYNOPSYS ARC ARCHITECTURE
@@@ -15745,6 -15458,7 +15747,7 @@@ F:   include/media/i2c/tw9910.
  
  TEE SUBSYSTEM
  M:    Jens Wiklander <[email protected]>
+ L:    [email protected]
  S:    Maintained
  F:    include/linux/tee_drv.h
  F:    include/uapi/linux/tee.h
@@@ -15774,7 -15488,6 +15777,7 @@@ F:   drivers/dma/tegra
  
  TEGRA I2C DRIVER
  M:    Laxman Dewangan <[email protected]>
 +R:    Dmitry Osipenko <[email protected]>
  S:    Supported
  F:    drivers/i2c/busses/i2c-tegra.c
  
@@@ -15900,7 -15613,7 +15903,7 @@@ M:   Viresh Kumar <[email protected]
  M:    Javi Merino <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/thermal/cpu-cooling-api.txt
 +F:    Documentation/thermal/cpu-cooling-api.rst
  F:    drivers/thermal/cpu_cooling.c
  F:    include/linux/cpu_cooling.h
  
@@@ -16044,7 -15757,7 +16047,7 @@@ F:   sound/soc/codecs/isabelle
  TI LP855x BACKLIGHT DRIVER
  M:    Milo Kim <[email protected]>
  S:    Maintained
 -F:    Documentation/backlight/lp855x-driver.txt
 +F:    Documentation/driver-api/backlight/lp855x-driver.rst
  F:    drivers/video/backlight/lp855x_bl.c
  F:    include/linux/platform_data/lp855x.h
  
@@@ -16308,7 -16021,7 +16311,7 @@@ M:   Greg Kroah-Hartman <gregkh@linuxfoun
  M:    Jiri Slaby <[email protected]>
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
 -F:    Documentation/serial/
 +F:    Documentation/driver-api/serial/
  F:    drivers/tty/
  F:    drivers/tty/serial/serial_core.c
  F:    include/linux/serial_core.h
@@@ -16528,7 -16241,7 +16531,7 @@@ USB ACM DRIVE
  M:    Oliver Neukum <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/usb/acm.txt
 +F:    Documentation/usb/acm.rst
  F:    drivers/usb/class/cdc-acm.*
  
  USB AR5523 WIRELESS DRIVER
@@@ -16581,7 -16294,7 +16584,7 @@@ USB EHCI DRIVE
  M:    Alan Stern <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/usb/ehci.txt
 +F:    Documentation/usb/ehci.rst
  F:    drivers/usb/host/ehci*
  
  USB GADGET/PERIPHERAL SUBSYSTEM
@@@ -16599,7 -16312,7 +16602,7 @@@ M:   Benjamin Tissoires <benjamin.tissoir
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
  S:    Maintained
 -F:    Documentation/hid/hiddev.txt
 +F:    Documentation/hid/hiddev.rst
  F:    drivers/hid/usbhid/
  
  USB INTEL XHCI ROLE MUX DRIVER
@@@ -16655,7 -16368,7 +16658,7 @@@ USB OHCI DRIVE
  M:    Alan Stern <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/usb/ohci.txt
 +F:    Documentation/usb/ohci.rst
  F:    drivers/usb/host/ohci*
  
  USB OTG FSM (Finite State Machine)
@@@ -16671,7 -16384,7 +16674,7 @@@ M:   Shuah Khan <[email protected]
  M:    Shuah Khan <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/usb/usbip_protocol.txt
 +F:    Documentation/usb/usbip_protocol.rst
  F:    drivers/usb/usbip/
  F:    tools/usb/usbip/
  F:    tools/testing/selftests/drivers/usb/usbip/
@@@ -16719,7 -16432,7 +16722,7 @@@ M:   Johan Hovold <[email protected]
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git
  S:    Maintained
 -F:    Documentation/usb/usb-serial.txt
 +F:    Documentation/usb/usb-serial.rst
  F:    drivers/usb/serial/
  F:    include/linux/usb/serial.h
  
@@@ -16898,7 -16611,7 +16901,7 @@@ M:   Michal Januszewski <[email protected]
  L:    [email protected]
  W:    https://github.com/mjanusz/v86d
  S:    Maintained
 -F:    Documentation/fb/uvesafb.txt
 +F:    Documentation/fb/uvesafb.rst
  F:    drivers/video/fbdev/uvesafb.*
  
  VF610 NAND DRIVER
@@@ -16919,7 -16632,7 +16922,7 @@@ R:   Cornelia Huck <[email protected]
  L:    [email protected]
  T:    git git://github.com/awilliam/linux-vfio.git
  S:    Maintained
 -F:    Documentation/vfio.txt
 +F:    Documentation/driver-api/vfio.rst
  F:    drivers/vfio/
  F:    include/linux/vfio.h
  F:    include/uapi/linux/vfio.h
@@@ -16928,7 -16641,7 +16931,7 @@@ VFIO MEDIATED DEVICE DRIVER
  M:    Kirti Wankhede <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/vfio-mediated-device.txt
 +F:    Documentation/driver-api/vfio-mediated-device.rst
  F:    drivers/vfio/mdev/
  F:    include/linux/mdev.h
  F:    samples/vfio-mdev/
@@@ -16973,7 -16686,7 +16976,7 @@@ S:   Maintaine
  F:    drivers/net/ethernet/via/via-velocity.*
  
  VICODEC VIRTUAL CODEC DRIVER
 -M:    Hans Verkuil <h[email protected]>
 +M:    Hans Verkuil <h[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
  W:    https://linuxtv.org
@@@ -16996,7 -16709,6 +16999,7 @@@ VIDEOBUF2 FRAMEWOR
  M:    Pawel Osciak <[email protected]>
  M:    Marek Szyprowski <[email protected]>
  M:    Kyungmin Park <[email protected]>
 +R:    Tomasz Figa <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/media/common/videobuf2/*
@@@ -17116,13 -16828,6 +17119,13 @@@ S: Maintaine
  F:    drivers/virtio/virtio_input.c
  F:    include/uapi/linux/virtio_input.h
  
 +VIRTIO IOMMU DRIVER
 +M:    Jean-Philippe Brucker <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/iommu/virtio-iommu.c
 +F:    include/uapi/linux/virtio_iommu.h
 +
  VIRTUAL BOX GUEST DEVICE DRIVER
  M:    Hans de Goede <[email protected]>
  M:    Arnd Bergmann <[email protected]>
@@@ -17562,7 -17267,6 +17565,7 @@@ N:   xd
  XDP SOCKETS (AF_XDP)
  M:    Björn Töpel <[email protected]>
  M:    Magnus Karlsson <[email protected]>
 +R:    Jonathan Lemon <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
  W:    http://xfs.org/
  T:    git git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
  S:    Supported
 -F:    Documentation/filesystems/xfs.txt
 +F:    Documentation/admin-guide/xfs.rst
 +F:    Documentation/ABI/testing/sysfs-fs-xfs
 +F:    Documentation/filesystems/xfs-delayed-logging-design.txt
 +F:    Documentation/filesystems/xfs-self-describing-metadata.txt
  F:    fs/xfs/
 +F:    include/uapi/linux/dqblk_xfs.h
 +F:    include/uapi/linux/fsmap.h
  
  XILINX AXI ETHERNET DRIVER
  M:    Anirudha Sarangi <[email protected]>
@@@ -17781,12 -17480,6 +17784,12 @@@ Q: https://patchwork.linuxtv.org/projec
  S:    Maintained
  F:    drivers/media/dvb-frontends/zd1301_demod*
  
 +ZHAOXIN PROCESSOR SUPPORT
 +M:    Tony W Wang-oc <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    arch/x86/kernel/cpu/zhaoxin.c
 +
  ZPOOL COMPRESSED PAGE STORAGE API
  M:    Dan Streetman <[email protected]>
  L:    [email protected]
@@@ -17809,7 -17502,7 +17812,7 @@@ R:   Sergey Senozhatsky <sergey.senozhats
  L:    [email protected]
  S:    Maintained
  F:    drivers/block/zram/
 -F:    Documentation/blockdev/zram.txt
 +F:    Documentation/admin-guide/blockdev/zram.rst
  
  ZS DECSTATION Z85C30 SERIAL DRIVER
  M:    "Maciej W. Rozycki" <[email protected]>
index e0350476feaad3a8bbe4300e9d5457a02bc33ccc,932ba221e8e71a4abae1676728cfcfe8733465d4..203664c40d3d2de2728ef48abbec2b0ccbc6226f
@@@ -1,4 -1,3 +1,4 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * omap_hwmod implementation for OMAP2/3/4
   *
   * Tony Lindgren, Rajendra Nayak, Vikram Pandita, Sakari Poussa, Anand
   * Sawant, Santosh Shilimkar, Richard Woodruff
   *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
 - *
   * Introduction
   * ------------
   * One way to view an OMAP SoC is as a collection of largely unrelated
@@@ -3442,6 -3445,7 +3442,7 @@@ static int omap_hwmod_check_module(stru
   * @dev: struct device
   * @oh: module
   * @sysc_fields: sysc register bits
+  * @clockdomain: clockdomain
   * @rev_offs: revision register offset
   * @sysc_offs: sysconfig register offset
   * @syss_offs: sysstatus register offset
  static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh,
                                      const struct ti_sysc_module_data *data,
                                      struct sysc_regbits *sysc_fields,
+                                     struct clockdomain *clkdm,
                                      s32 rev_offs, s32 sysc_offs,
                                      s32 syss_offs, u32 sysc_flags,
                                      u32 idlemodes)
        struct omap_hwmod_class_sysconfig *sysc;
        struct omap_hwmod_class *class = NULL;
        struct omap_hwmod_ocp_if *oi = NULL;
-       struct clockdomain *clkdm = NULL;
-       struct clk *clk = NULL;
        void __iomem *regs = NULL;
        unsigned long flags;
  
                oi->user = OCP_USER_MPU | OCP_USER_SDMA;
        }
  
-       if (!oh->_clk) {
-               struct clk_hw_omap *hwclk;
-               clk = of_clk_get_by_name(dev->of_node, "fck");
-               if (!IS_ERR(clk))
-                       clk_prepare(clk);
-               else
-                       clk = NULL;
-               /*
-                * Populate clockdomain based on dts clock. It is needed for
-                * clkdm_deny_idle() and clkdm_allow_idle() until we have have
-                * interconnect driver and reset driver capable of blocking
-                * clockdomain idle during reset, enable and idle.
-                */
-               if (clk) {
-                       hwclk = to_clk_hw_omap(__clk_get_hw(clk));
-                       if (hwclk && hwclk->clkdm_name)
-                               clkdm = clkdm_lookup(hwclk->clkdm_name);
-               }
-               /*
-                * Note that we assume interconnect driver manages the clocks
-                * and do not need to populate oh->_clk for dynamically
-                * allocated modules.
-                */
-               clk_unprepare(clk);
-               clk_put(clk);
-       }
        spin_lock_irqsave(&oh->_lock, flags);
        if (regs)
                oh->_mpu_rt_va = regs;
@@@ -3623,7 -3596,7 +3593,7 @@@ int omap_hwmod_init_module(struct devic
        u32 sysc_flags, idlemodes;
        int error;
  
-       if (!dev || !data)
+       if (!dev || !data || !data->name || !cookie)
                return -EINVAL;
  
        oh = _lookup(data->name);
                return error;
  
        return omap_hwmod_allocate_module(dev, oh, data, sysc_fields,
-                                         rev_offs, sysc_offs, syss_offs,
+                                         cookie->clkdm, rev_offs,
+                                         sysc_offs, syss_offs,
                                          sysc_flags, idlemodes);
  }
  
index b0f8c9a70c6899d456558c1802bd498e5de504db,b09cc4e8d240585c497bfcb7263796f69a6d4cf7..6c6f8fce854e2040276ab85b01419930940895bd
@@@ -1,8 -1,11 +1,8 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Legacy platform_data quirks
   *
   * Copyright (C) 2013 Texas Instruments
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  #include <linux/clk.h>
  #include <linux/davinci_emac.h>
@@@ -26,6 -29,7 +26,7 @@@
  #include <linux/platform_data/wkup_m3.h>
  #include <linux/platform_data/asoc-ti-mcbsp.h>
  
+ #include "clockdomain.h"
  #include "common.h"
  #include "common-board-devices.h"
  #include "control.h"
@@@ -460,6 -464,62 +461,62 @@@ static void __init dra7x_evm_mmc_quirk(
  }
  #endif
  
+ static struct clockdomain *ti_sysc_find_one_clockdomain(struct clk *clk)
+ {
+       struct clockdomain *clkdm = NULL;
+       struct clk_hw_omap *hwclk;
+       hwclk = to_clk_hw_omap(__clk_get_hw(clk));
+       if (hwclk && hwclk->clkdm_name)
+               clkdm = clkdm_lookup(hwclk->clkdm_name);
+       return clkdm;
+ }
+ /**
+  * ti_sysc_clkdm_init - find clockdomain based on clock
+  * @fck: device functional clock
+  * @ick: device interface clock
+  * @dev: struct device
+  *
+  * Populate clockdomain based on clock. It is needed for
+  * clkdm_deny_idle() and clkdm_allow_idle() for blocking clockdomain
+  * clockdomain idle during reset, enable and idle.
+  *
+  * Note that we assume interconnect driver manages the clocks
+  * and do not need to populate oh->_clk for dynamically
+  * allocated modules.
+  */
+ static int ti_sysc_clkdm_init(struct device *dev,
+                             struct clk *fck, struct clk *ick,
+                             struct ti_sysc_cookie *cookie)
+ {
+       if (fck)
+               cookie->clkdm = ti_sysc_find_one_clockdomain(fck);
+       if (cookie->clkdm)
+               return 0;
+       if (ick)
+               cookie->clkdm = ti_sysc_find_one_clockdomain(ick);
+       if (cookie->clkdm)
+               return 0;
+       return -ENODEV;
+ }
+ static void ti_sysc_clkdm_deny_idle(struct device *dev,
+                                   const struct ti_sysc_cookie *cookie)
+ {
+       if (cookie->clkdm)
+               clkdm_deny_idle(cookie->clkdm);
+ }
+ static void ti_sysc_clkdm_allow_idle(struct device *dev,
+                                    const struct ti_sysc_cookie *cookie)
+ {
+       if (cookie->clkdm)
+               clkdm_allow_idle(cookie->clkdm);
+ }
  static int ti_sysc_enable_module(struct device *dev,
                                 const struct ti_sysc_cookie *cookie)
  {
@@@ -491,6 -551,9 +548,9 @@@ static struct of_dev_auxdata omap_auxda
  
  static struct ti_sysc_platform_data ti_sysc_pdata = {
        .auxdata = omap_auxdata_lookup,
+       .init_clockdomain = ti_sysc_clkdm_init,
+       .clkdm_deny_idle = ti_sysc_clkdm_deny_idle,
+       .clkdm_allow_idle = ti_sysc_clkdm_allow_idle,
        .init_module = omap_hwmod_init_module,
        .enable_module = ti_sysc_enable_module,
        .idle_module = ti_sysc_idle_module,
index 7696c692ad5a557848767450d02d070e7d9507f5,c8da6e2a7e03cf54f7e536495f8f0eb3cdf2a0c6..cdee0b45943d2bfb3103736b9a80b66d878c4e97
@@@ -466,9 -466,9 +466,9 @@@ static int ti_sci_cmd_get_revision(stru
        struct ti_sci_xfer *xfer;
        int ret;
  
-       /* No need to setup flags since it is expected to respond */
        xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
-                                  0x0, sizeof(struct ti_sci_msg_hdr),
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(struct ti_sci_msg_hdr),
                                   sizeof(*rev_info));
        if (IS_ERR(xfer)) {
                ret = PTR_ERR(xfer);
@@@ -596,9 -596,9 +596,9 @@@ static int ti_sci_get_device_state(cons
        info = handle_to_ti_sci_info(handle);
        dev = info->dev;
  
-       /* Response is expected, so need of any flags */
        xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
-                                  0, sizeof(*req), sizeof(*resp));
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
        if (IS_ERR(xfer)) {
                ret = PTR_ERR(xfer);
                dev_err(dev, "Message alloc failed(%d)\n", ret);
@@@ -916,7 -916,7 +916,7 @@@ static int ti_sci_cmd_get_device_resets
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_set_clock_state(const struct ti_sci_handle *handle,
 -                                u32 dev_id, u8 clk_id,
 +                                u32 dev_id, u32 clk_id,
                                  u32 flags, u8 state)
  {
        struct ti_sci_info *info;
        }
        req = (struct ti_sci_msg_req_set_clock_state *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
        req->request_state = state;
  
        ret = ti_sci_do_xfer(info, xfer);
@@@ -981,7 -976,7 +981,7 @@@ fail
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_get_clock_state(const struct ti_sci_handle *handle,
 -                                    u32 dev_id, u8 clk_id,
 +                                    u32 dev_id, u32 clk_id,
                                      u8 *programmed_state, u8 *current_state)
  {
        struct ti_sci_info *info;
        }
        req = (struct ti_sci_msg_req_get_clock_state *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
  
        ret = ti_sci_do_xfer(info, xfer);
        if (ret) {
@@@ -1057,8 -1047,8 +1057,8 @@@ fail
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_get_clock(const struct ti_sci_handle *handle, u32 dev_id,
 -                              u8 clk_id, bool needs_ssc, bool can_change_freq,
 -                              bool enable_input_term)
 +                              u32 clk_id, bool needs_ssc,
 +                              bool can_change_freq, bool enable_input_term)
  {
        u32 flags = 0;
  
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_idle_clock(const struct ti_sci_handle *handle,
 -                               u32 dev_id, u8 clk_id)
 +                               u32 dev_id, u32 clk_id)
  {
        return ti_sci_set_clock_state(handle, dev_id, clk_id, 0,
                                      MSG_CLOCK_SW_STATE_UNREQ);
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_put_clock(const struct ti_sci_handle *handle,
 -                              u32 dev_id, u8 clk_id)
 +                              u32 dev_id, u32 clk_id)
  {
        return ti_sci_set_clock_state(handle, dev_id, clk_id, 0,
                                      MSG_CLOCK_SW_STATE_AUTO);
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_is_auto(const struct ti_sci_handle *handle,
 -                                u32 dev_id, u8 clk_id, bool *req_state)
 +                                u32 dev_id, u32 clk_id, bool *req_state)
  {
        u8 state = 0;
        int ret;
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_is_on(const struct ti_sci_handle *handle, u32 dev_id,
 -                              u8 clk_id, bool *req_state, bool *curr_state)
 +                              u32 clk_id, bool *req_state, bool *curr_state)
  {
        u8 c_state = 0, r_state = 0;
        int ret;
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_is_off(const struct ti_sci_handle *handle, u32 dev_id,
 -                               u8 clk_id, bool *req_state, bool *curr_state)
 +                               u32 clk_id, bool *req_state, bool *curr_state)
  {
        u8 c_state = 0, r_state = 0;
        int ret;
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_set_parent(const struct ti_sci_handle *handle,
 -                                   u32 dev_id, u8 clk_id, u8 parent_id)
 +                                   u32 dev_id, u32 clk_id, u32 parent_id)
  {
        struct ti_sci_info *info;
        struct ti_sci_msg_req_set_clock_parent *req;
        }
        req = (struct ti_sci_msg_req_set_clock_parent *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 -      req->parent_id = parent_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
 +      if (parent_id < 255) {
 +              req->parent_id = parent_id;
 +      } else {
 +              req->parent_id = 255;
 +              req->parent_id_32 = parent_id;
 +      }
  
        ret = ti_sci_do_xfer(info, xfer);
        if (ret) {
@@@ -1282,7 -1262,7 +1282,7 @@@ fail
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_get_parent(const struct ti_sci_handle *handle,
 -                                   u32 dev_id, u8 clk_id, u8 *parent_id)
 +                                   u32 dev_id, u32 clk_id, u32 *parent_id)
  {
        struct ti_sci_info *info;
        struct ti_sci_msg_req_get_clock_parent *req;
        }
        req = (struct ti_sci_msg_req_get_clock_parent *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
  
        ret = ti_sci_do_xfer(info, xfer);
        if (ret) {
  
        resp = (struct ti_sci_msg_resp_get_clock_parent *)xfer->xfer_buf;
  
 -      if (!ti_sci_is_response_ack(resp))
 +      if (!ti_sci_is_response_ack(resp)) {
                ret = -ENODEV;
 -      else
 -              *parent_id = resp->parent_id;
 +      } else {
 +              if (resp->parent_id < 255)
 +                      *parent_id = resp->parent_id;
 +              else
 +                      *parent_id = resp->parent_id_32;
 +      }
  
  fail:
        ti_sci_put_one_xfer(&info->minfo, xfer);
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_get_num_parents(const struct ti_sci_handle *handle,
 -                                        u32 dev_id, u8 clk_id,
 -                                        u8 *num_parents)
 +                                        u32 dev_id, u32 clk_id,
 +                                        u32 *num_parents)
  {
        struct ti_sci_info *info;
        struct ti_sci_msg_req_get_clock_num_parents *req;
        }
        req = (struct ti_sci_msg_req_get_clock_num_parents *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
  
        ret = ti_sci_do_xfer(info, xfer);
        if (ret) {
  
        resp = (struct ti_sci_msg_resp_get_clock_num_parents *)xfer->xfer_buf;
  
 -      if (!ti_sci_is_response_ack(resp))
 +      if (!ti_sci_is_response_ack(resp)) {
                ret = -ENODEV;
 -      else
 -              *num_parents = resp->num_parents;
 +      } else {
 +              if (resp->num_parents < 255)
 +                      *num_parents = resp->num_parents;
 +              else
 +                      *num_parents = resp->num_parents_32;
 +      }
  
  fail:
        ti_sci_put_one_xfer(&info->minfo, xfer);
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_get_match_freq(const struct ti_sci_handle *handle,
 -                                       u32 dev_id, u8 clk_id, u64 min_freq,
 +                                       u32 dev_id, u32 clk_id, u64 min_freq,
                                         u64 target_freq, u64 max_freq,
                                         u64 *match_freq)
  {
        }
        req = (struct ti_sci_msg_req_query_clock_freq *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
        req->min_freq_hz = min_freq;
        req->target_freq_hz = target_freq;
        req->max_freq_hz = max_freq;
@@@ -1506,7 -1463,7 +1506,7 @@@ fail
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_set_freq(const struct ti_sci_handle *handle,
 -                                 u32 dev_id, u8 clk_id, u64 min_freq,
 +                                 u32 dev_id, u32 clk_id, u64 min_freq,
                                   u64 target_freq, u64 max_freq)
  {
        struct ti_sci_info *info;
        }
        req = (struct ti_sci_msg_req_set_clock_freq *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
        req->min_freq_hz = min_freq;
        req->target_freq_hz = target_freq;
        req->max_freq_hz = max_freq;
@@@ -1572,7 -1524,7 +1572,7 @@@ fail
   * Return: 0 if all went well, else returns appropriate error value.
   */
  static int ti_sci_cmd_clk_get_freq(const struct ti_sci_handle *handle,
 -                                 u32 dev_id, u8 clk_id, u64 *freq)
 +                                 u32 dev_id, u32 clk_id, u64 *freq)
  {
        struct ti_sci_info *info;
        struct ti_sci_msg_req_get_clock_freq *req;
        }
        req = (struct ti_sci_msg_req_get_clock_freq *)xfer->xfer_buf;
        req->dev_id = dev_id;
 -      req->clk_id = clk_id;
 +      if (clk_id < 255) {
 +              req->clk_id = clk_id;
 +      } else {
 +              req->clk_id = 255;
 +              req->clk_id_32 = clk_id;
 +      }
  
        ret = ti_sci_do_xfer(info, xfer);
        if (ret) {
@@@ -2057,122 -2004,175 +2057,175 @@@ static int ti_sci_cmd_free_event_map(co
                               ia_id, vint, global_event, vint_status_bit, 0);
  }
  
- /*
-  * ti_sci_setup_ops() - Setup the operations structures
-  * @info:     pointer to TISCI pointer
+ /**
+  * ti_sci_cmd_ring_config() - configure RA ring
+  * @handle:           Pointer to TI SCI handle.
+  * @valid_params:     Bitfield defining validity of ring configuration
+  *                    parameters
+  * @nav_id:           Device ID of Navigator Subsystem from which the ring is
+  *                    allocated
+  * @index:            Ring index
+  * @addr_lo:          The ring base address lo 32 bits
+  * @addr_hi:          The ring base address hi 32 bits
+  * @count:            Number of ring elements
+  * @mode:             The mode of the ring
+  * @size:             The ring element size.
+  * @order_id:         Specifies the ring's bus order ID
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  *
+  * See @ti_sci_msg_rm_ring_cfg_req for more info.
   */
- static void ti_sci_setup_ops(struct ti_sci_info *info)
+ static int ti_sci_cmd_ring_config(const struct ti_sci_handle *handle,
+                                 u32 valid_params, u16 nav_id, u16 index,
+                                 u32 addr_lo, u32 addr_hi, u32 count,
+                                 u8 mode, u8 size, u8 order_id)
  {
-       struct ti_sci_ops *ops = &info->handle.ops;
-       struct ti_sci_core_ops *core_ops = &ops->core_ops;
-       struct ti_sci_dev_ops *dops = &ops->dev_ops;
-       struct ti_sci_clk_ops *cops = &ops->clk_ops;
-       struct ti_sci_rm_core_ops *rm_core_ops = &ops->rm_core_ops;
-       struct ti_sci_rm_irq_ops *iops = &ops->rm_irq_ops;
-       core_ops->reboot_device = ti_sci_cmd_core_reboot;
-       dops->get_device = ti_sci_cmd_get_device;
-       dops->idle_device = ti_sci_cmd_idle_device;
-       dops->put_device = ti_sci_cmd_put_device;
+       struct ti_sci_msg_rm_ring_cfg_req *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_xfer *xfer;
+       struct ti_sci_info *info;
+       struct device *dev;
+       int ret = 0;
  
-       dops->is_valid = ti_sci_cmd_dev_is_valid;
-       dops->get_context_loss_count = ti_sci_cmd_dev_get_clcnt;
-       dops->is_idle = ti_sci_cmd_dev_is_idle;
-       dops->is_stop = ti_sci_cmd_dev_is_stop;
-       dops->is_on = ti_sci_cmd_dev_is_on;
-       dops->is_transitioning = ti_sci_cmd_dev_is_trans;
-       dops->set_device_resets = ti_sci_cmd_set_device_resets;
-       dops->get_device_resets = ti_sci_cmd_get_device_resets;
+       if (IS_ERR_OR_NULL(handle))
+               return -EINVAL;
  
-       cops->get_clock = ti_sci_cmd_get_clock;
-       cops->idle_clock = ti_sci_cmd_idle_clock;
-       cops->put_clock = ti_sci_cmd_put_clock;
-       cops->is_auto = ti_sci_cmd_clk_is_auto;
-       cops->is_on = ti_sci_cmd_clk_is_on;
-       cops->is_off = ti_sci_cmd_clk_is_off;
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
  
-       cops->set_parent = ti_sci_cmd_clk_set_parent;
-       cops->get_parent = ti_sci_cmd_clk_get_parent;
-       cops->get_num_parents = ti_sci_cmd_clk_get_num_parents;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_RING_CFG,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "RM_RA:Message config failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_rm_ring_cfg_req *)xfer->xfer_buf;
+       req->valid_params = valid_params;
+       req->nav_id = nav_id;
+       req->index = index;
+       req->addr_lo = addr_lo;
+       req->addr_hi = addr_hi;
+       req->count = count;
+       req->mode = mode;
+       req->size = size;
+       req->order_id = order_id;
  
-       cops->get_best_match_freq = ti_sci_cmd_clk_get_match_freq;
-       cops->set_freq = ti_sci_cmd_clk_set_freq;
-       cops->get_freq = ti_sci_cmd_clk_get_freq;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "RM_RA:Mbox config send fail %d\n", ret);
+               goto fail;
+       }
  
-       rm_core_ops->get_range = ti_sci_cmd_get_resource_range;
-       rm_core_ops->get_range_from_shost =
-                               ti_sci_cmd_get_resource_range_from_shost;
+       resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -ENODEV;
  
-       iops->set_irq = ti_sci_cmd_set_irq;
-       iops->set_event_map = ti_sci_cmd_set_event_map;
-       iops->free_irq = ti_sci_cmd_free_irq;
-       iops->free_event_map = ti_sci_cmd_free_event_map;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       dev_dbg(dev, "RM_RA:config ring %u ret:%d\n", index, ret);
+       return ret;
  }
  
  /**
-  * ti_sci_get_handle() - Get the TI SCI handle for a device
-  * @dev:      Pointer to device for which we want SCI handle
+  * ti_sci_cmd_ring_get_config() - get RA ring configuration
+  * @handle:   Pointer to TI SCI handle.
+  * @nav_id:   Device ID of Navigator Subsystem from which the ring is
+  *            allocated
+  * @index:    Ring index
+  * @addr_lo:  Returns ring's base address lo 32 bits
+  * @addr_hi:  Returns ring's base address hi 32 bits
+  * @count:    Returns number of ring elements
+  * @mode:     Returns mode of the ring
+  * @size:     Returns ring element size
+  * @order_id: Returns ring's bus order ID
   *
-  * NOTE: The function does not track individual clients of the framework
-  * and is expected to be maintained by caller of TI SCI protocol library.
-  * ti_sci_put_handle must be balanced with successful ti_sci_get_handle
-  * Return: pointer to handle if successful, else:
-  * -EPROBE_DEFER if the instance is not ready
-  * -ENODEV if the required node handler is missing
-  * -EINVAL if invalid conditions are encountered.
+  * Return: 0 if all went well, else returns appropriate error value.
+  *
+  * See @ti_sci_msg_rm_ring_get_cfg_req for more info.
   */
- const struct ti_sci_handle *ti_sci_get_handle(struct device *dev)
+ static int ti_sci_cmd_ring_get_config(const struct ti_sci_handle *handle,
+                                     u32 nav_id, u32 index, u8 *mode,
+                                     u32 *addr_lo, u32 *addr_hi,
+                                     u32 *count, u8 *size, u8 *order_id)
  {
-       struct device_node *ti_sci_np;
-       struct list_head *p;
-       struct ti_sci_handle *handle = NULL;
+       struct ti_sci_msg_rm_ring_get_cfg_resp *resp;
+       struct ti_sci_msg_rm_ring_get_cfg_req *req;
+       struct ti_sci_xfer *xfer;
        struct ti_sci_info *info;
+       struct device *dev;
+       int ret = 0;
  
-       if (!dev) {
-               pr_err("I need a device pointer\n");
-               return ERR_PTR(-EINVAL);
-       }
-       ti_sci_np = of_get_parent(dev->of_node);
-       if (!ti_sci_np) {
-               dev_err(dev, "No OF information\n");
-               return ERR_PTR(-EINVAL);
+       if (IS_ERR_OR_NULL(handle))
+               return -EINVAL;
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_RING_GET_CFG,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev,
+                       "RM_RA:Message get config failed(%d)\n", ret);
+               return ret;
        }
+       req = (struct ti_sci_msg_rm_ring_get_cfg_req *)xfer->xfer_buf;
+       req->nav_id = nav_id;
+       req->index = index;
  
-       mutex_lock(&ti_sci_list_mutex);
-       list_for_each(p, &ti_sci_list) {
-               info = list_entry(p, struct ti_sci_info, node);
-               if (ti_sci_np == info->dev->of_node) {
-                       handle = &info->handle;
-                       info->users++;
-                       break;
-               }
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "RM_RA:Mbox get config send fail %d\n", ret);
+               goto fail;
        }
-       mutex_unlock(&ti_sci_list_mutex);
-       of_node_put(ti_sci_np);
  
-       if (!handle)
-               return ERR_PTR(-EPROBE_DEFER);
+       resp = (struct ti_sci_msg_rm_ring_get_cfg_resp *)xfer->xfer_buf;
  
-       return handle;
+       if (!ti_sci_is_response_ack(resp)) {
+               ret = -ENODEV;
+       } else {
+               if (mode)
+                       *mode = resp->mode;
+               if (addr_lo)
+                       *addr_lo = resp->addr_lo;
+               if (addr_hi)
+                       *addr_hi = resp->addr_hi;
+               if (count)
+                       *count = resp->count;
+               if (size)
+                       *size = resp->size;
+               if (order_id)
+                       *order_id = resp->order_id;
+       };
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       dev_dbg(dev, "RM_RA:get config ring %u ret:%d\n", index, ret);
+       return ret;
  }
- EXPORT_SYMBOL_GPL(ti_sci_get_handle);
  
  /**
-  * ti_sci_put_handle() - Release the handle acquired by ti_sci_get_handle
-  * @handle:   Handle acquired by ti_sci_get_handle
-  *
-  * NOTE: The function does not track individual clients of the framework
-  * and is expected to be maintained by caller of TI SCI protocol library.
-  * ti_sci_put_handle must be balanced with successful ti_sci_get_handle
+  * ti_sci_cmd_rm_psil_pair() - Pair PSI-L source to destination thread
+  * @handle:   Pointer to TI SCI handle.
+  * @nav_id:   Device ID of Navigator Subsystem which should be used for
+  *            pairing
+  * @src_thread:       Source PSI-L thread ID
+  * @dst_thread: Destination PSI-L thread ID
   *
-  * Return: 0 is successfully released
-  * if an error pointer was passed, it returns the error value back,
-  * if null was passed, it returns -EINVAL;
+  * Return: 0 if all went well, else returns appropriate error value.
   */
- int ti_sci_put_handle(const struct ti_sci_handle *handle)
+ static int ti_sci_cmd_rm_psil_pair(const struct ti_sci_handle *handle,
+                                  u32 nav_id, u32 src_thread, u32 dst_thread)
  {
+       struct ti_sci_msg_psil_pair *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_xfer *xfer;
        struct ti_sci_info *info;
+       struct device *dev;
+       int ret = 0;
  
        if (IS_ERR(handle))
                return PTR_ERR(handle);
                return -EINVAL;
  
        info = handle_to_ti_sci_info(handle);
-       mutex_lock(&ti_sci_list_mutex);
-       if (!WARN_ON(!info->users))
-               info->users--;
-       mutex_unlock(&ti_sci_list_mutex);
+       dev = info->dev;
  
-       return 0;
- }
- EXPORT_SYMBOL_GPL(ti_sci_put_handle);
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_PAIR,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "RM_PSIL:Message reconfig failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_psil_pair *)xfer->xfer_buf;
+       req->nav_id = nav_id;
+       req->src_thread = src_thread;
+       req->dst_thread = dst_thread;
  
- static void devm_ti_sci_release(struct device *dev, void *res)
- {
-       const struct ti_sci_handle **ptr = res;
-       const struct ti_sci_handle *handle = *ptr;
-       int ret;
+       ret = ti_sci_do_xfer(info, xfer);
      if (ret) {
+               dev_err(dev, "RM_PSIL:Mbox send fail %d\n", ret);
+               goto fail;
+       }
  
-       ret = ti_sci_put_handle(handle);
-       if (ret)
-               dev_err(dev, "failed to put handle %d\n", ret);
+       resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -EINVAL;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
  }
  
  /**
-  * devm_ti_sci_get_handle() - Managed get handle
-  * @dev:      device for which we want SCI handle for.
+  * ti_sci_cmd_rm_psil_unpair() - Unpair PSI-L source from destination thread
+  * @handle:   Pointer to TI SCI handle.
+  * @nav_id:   Device ID of Navigator Subsystem which should be used for
+  *            unpairing
+  * @src_thread:       Source PSI-L thread ID
+  * @dst_thread:       Destination PSI-L thread ID
   *
-  * NOTE: This releases the handle once the device resources are
-  * no longer needed. MUST NOT BE released with ti_sci_put_handle.
-  * The function does not track individual clients of the framework
-  * and is expected to be maintained by caller of TI SCI protocol library.
-  *
-  * Return: 0 if all went fine, else corresponding error.
+  * Return: 0 if all went well, else returns appropriate error value.
   */
- const struct ti_sci_handle *devm_ti_sci_get_handle(struct device *dev)
+ static int ti_sci_cmd_rm_psil_unpair(const struct ti_sci_handle *handle,
+                                    u32 nav_id, u32 src_thread, u32 dst_thread)
  {
-       const struct ti_sci_handle **ptr;
-       const struct ti_sci_handle *handle;
+       struct ti_sci_msg_psil_unpair *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_xfer *xfer;
+       struct ti_sci_info *info;
+       struct device *dev;
+       int ret = 0;
  
-       ptr = devres_alloc(devm_ti_sci_release, sizeof(*ptr), GFP_KERNEL);
-       if (!ptr)
-               return ERR_PTR(-ENOMEM);
-       handle = ti_sci_get_handle(dev);
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       if (!handle)
+               return -EINVAL;
  
-       if (!IS_ERR(handle)) {
-               *ptr = handle;
-               devres_add(dev, ptr);
-       } else {
-               devres_free(ptr);
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_UNPAIR,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "RM_PSIL:Message reconfig failed(%d)\n", ret);
+               return ret;
        }
+       req = (struct ti_sci_msg_psil_unpair *)xfer->xfer_buf;
+       req->nav_id = nav_id;
+       req->src_thread = src_thread;
+       req->dst_thread = dst_thread;
  
-       return handle;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "RM_PSIL:Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -EINVAL;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
  }
- EXPORT_SYMBOL_GPL(devm_ti_sci_get_handle);
  
  /**
-  * ti_sci_get_by_phandle() - Get the TI SCI handle using DT phandle
-  * @np:               device node
-  * @property: property name containing phandle on TISCI node
+  * ti_sci_cmd_rm_udmap_tx_ch_cfg() - Configure a UDMAP TX channel
+  * @handle:   Pointer to TI SCI handle.
+  * @params:   Pointer to ti_sci_msg_rm_udmap_tx_ch_cfg TX channel config
+  *            structure
   *
-  * NOTE: The function does not track individual clients of the framework
-  * and is expected to be maintained by caller of TI SCI protocol library.
-  * ti_sci_put_handle must be balanced with successful ti_sci_get_by_phandle
-  * Return: pointer to handle if successful, else:
-  * -EPROBE_DEFER if the instance is not ready
-  * -ENODEV if the required node handler is missing
-  * -EINVAL if invalid conditions are encountered.
+  * Return: 0 if all went well, else returns appropriate error value.
+  *
+  * See @ti_sci_msg_rm_udmap_tx_ch_cfg and @ti_sci_msg_rm_udmap_tx_ch_cfg_req for
+  * more info.
   */
const struct ti_sci_handle *ti_sci_get_by_phandle(struct device_node *np,
-                                                 const char *property)
static int ti_sci_cmd_rm_udmap_tx_ch_cfg(const struct ti_sci_handle *handle,
+                       const struct ti_sci_msg_rm_udmap_tx_ch_cfg *params)
  {
-       struct ti_sci_handle *handle = NULL;
-       struct device_node *ti_sci_np;
+       struct ti_sci_msg_rm_udmap_tx_ch_cfg_req *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_xfer *xfer;
        struct ti_sci_info *info;
-       struct list_head *p;
+       struct device *dev;
+       int ret = 0;
  
-       if (!np) {
-               pr_err("I need a device pointer\n");
+       if (IS_ERR_OR_NULL(handle))
+               return -EINVAL;
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_TX_CH_CFG,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message TX_CH_CFG alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_rm_udmap_tx_ch_cfg_req *)xfer->xfer_buf;
+       req->valid_params = params->valid_params;
+       req->nav_id = params->nav_id;
+       req->index = params->index;
+       req->tx_pause_on_err = params->tx_pause_on_err;
+       req->tx_filt_einfo = params->tx_filt_einfo;
+       req->tx_filt_pswords = params->tx_filt_pswords;
+       req->tx_atype = params->tx_atype;
+       req->tx_chan_type = params->tx_chan_type;
+       req->tx_supr_tdpkt = params->tx_supr_tdpkt;
+       req->tx_fetch_size = params->tx_fetch_size;
+       req->tx_credit_count = params->tx_credit_count;
+       req->txcq_qnum = params->txcq_qnum;
+       req->tx_priority = params->tx_priority;
+       req->tx_qos = params->tx_qos;
+       req->tx_orderid = params->tx_orderid;
+       req->fdepth = params->fdepth;
+       req->tx_sched_priority = params->tx_sched_priority;
+       req->tx_burst_size = params->tx_burst_size;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send TX_CH_CFG fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -EINVAL;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       dev_dbg(dev, "TX_CH_CFG: chn %u ret:%u\n", params->index, ret);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_rm_udmap_rx_ch_cfg() - Configure a UDMAP RX channel
+  * @handle:   Pointer to TI SCI handle.
+  * @params:   Pointer to ti_sci_msg_rm_udmap_rx_ch_cfg RX channel config
+  *            structure
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  *
+  * See @ti_sci_msg_rm_udmap_rx_ch_cfg and @ti_sci_msg_rm_udmap_rx_ch_cfg_req for
+  * more info.
+  */
+ static int ti_sci_cmd_rm_udmap_rx_ch_cfg(const struct ti_sci_handle *handle,
+                       const struct ti_sci_msg_rm_udmap_rx_ch_cfg *params)
+ {
+       struct ti_sci_msg_rm_udmap_rx_ch_cfg_req *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_xfer *xfer;
+       struct ti_sci_info *info;
+       struct device *dev;
+       int ret = 0;
+       if (IS_ERR_OR_NULL(handle))
+               return -EINVAL;
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_RX_CH_CFG,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message RX_CH_CFG alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_rm_udmap_rx_ch_cfg_req *)xfer->xfer_buf;
+       req->valid_params = params->valid_params;
+       req->nav_id = params->nav_id;
+       req->index = params->index;
+       req->rx_fetch_size = params->rx_fetch_size;
+       req->rxcq_qnum = params->rxcq_qnum;
+       req->rx_priority = params->rx_priority;
+       req->rx_qos = params->rx_qos;
+       req->rx_orderid = params->rx_orderid;
+       req->rx_sched_priority = params->rx_sched_priority;
+       req->flowid_start = params->flowid_start;
+       req->flowid_cnt = params->flowid_cnt;
+       req->rx_pause_on_err = params->rx_pause_on_err;
+       req->rx_atype = params->rx_atype;
+       req->rx_chan_type = params->rx_chan_type;
+       req->rx_ignore_short = params->rx_ignore_short;
+       req->rx_ignore_long = params->rx_ignore_long;
+       req->rx_burst_size = params->rx_burst_size;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send RX_CH_CFG fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -EINVAL;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       dev_dbg(dev, "RX_CH_CFG: chn %u ret:%d\n", params->index, ret);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_rm_udmap_rx_flow_cfg() - Configure UDMAP RX FLOW
+  * @handle:   Pointer to TI SCI handle.
+  * @params:   Pointer to ti_sci_msg_rm_udmap_flow_cfg RX FLOW config
+  *            structure
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  *
+  * See @ti_sci_msg_rm_udmap_flow_cfg and @ti_sci_msg_rm_udmap_flow_cfg_req for
+  * more info.
+  */
+ static int ti_sci_cmd_rm_udmap_rx_flow_cfg(const struct ti_sci_handle *handle,
+                       const struct ti_sci_msg_rm_udmap_flow_cfg *params)
+ {
+       struct ti_sci_msg_rm_udmap_flow_cfg_req *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_xfer *xfer;
+       struct ti_sci_info *info;
+       struct device *dev;
+       int ret = 0;
+       if (IS_ERR_OR_NULL(handle))
+               return -EINVAL;
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_FLOW_CFG,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "RX_FL_CFG: Message alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_rm_udmap_flow_cfg_req *)xfer->xfer_buf;
+       req->valid_params = params->valid_params;
+       req->nav_id = params->nav_id;
+       req->flow_index = params->flow_index;
+       req->rx_einfo_present = params->rx_einfo_present;
+       req->rx_psinfo_present = params->rx_psinfo_present;
+       req->rx_error_handling = params->rx_error_handling;
+       req->rx_desc_type = params->rx_desc_type;
+       req->rx_sop_offset = params->rx_sop_offset;
+       req->rx_dest_qnum = params->rx_dest_qnum;
+       req->rx_src_tag_hi = params->rx_src_tag_hi;
+       req->rx_src_tag_lo = params->rx_src_tag_lo;
+       req->rx_dest_tag_hi = params->rx_dest_tag_hi;
+       req->rx_dest_tag_lo = params->rx_dest_tag_lo;
+       req->rx_src_tag_hi_sel = params->rx_src_tag_hi_sel;
+       req->rx_src_tag_lo_sel = params->rx_src_tag_lo_sel;
+       req->rx_dest_tag_hi_sel = params->rx_dest_tag_hi_sel;
+       req->rx_dest_tag_lo_sel = params->rx_dest_tag_lo_sel;
+       req->rx_fdq0_sz0_qnum = params->rx_fdq0_sz0_qnum;
+       req->rx_fdq1_qnum = params->rx_fdq1_qnum;
+       req->rx_fdq2_qnum = params->rx_fdq2_qnum;
+       req->rx_fdq3_qnum = params->rx_fdq3_qnum;
+       req->rx_ps_location = params->rx_ps_location;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "RX_FL_CFG: Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -EINVAL;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       dev_dbg(info->dev, "RX_FL_CFG: %u ret:%d\n", params->flow_index, ret);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_proc_request() - Command to request a physical processor control
+  * @handle:   Pointer to TI SCI handle
+  * @proc_id:  Processor ID this request is for
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  */
+ static int ti_sci_cmd_proc_request(const struct ti_sci_handle *handle,
+                                  u8 proc_id)
+ {
+       struct ti_sci_msg_req_proc_request *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_info *info;
+       struct ti_sci_xfer *xfer;
+       struct device *dev;
+       int ret = 0;
+       if (!handle)
+               return -EINVAL;
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_REQUEST,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_req_proc_request *)xfer->xfer_buf;
+       req->processor_id = proc_id;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -ENODEV;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_proc_release() - Command to release a physical processor control
+  * @handle:   Pointer to TI SCI handle
+  * @proc_id:  Processor ID this request is for
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  */
+ static int ti_sci_cmd_proc_release(const struct ti_sci_handle *handle,
+                                  u8 proc_id)
+ {
+       struct ti_sci_msg_req_proc_release *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_info *info;
+       struct ti_sci_xfer *xfer;
+       struct device *dev;
+       int ret = 0;
+       if (!handle)
+               return -EINVAL;
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_RELEASE,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_req_proc_release *)xfer->xfer_buf;
+       req->processor_id = proc_id;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -ENODEV;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_proc_handover() - Command to handover a physical processor
+  *                            control to a host in the processor's access
+  *                            control list.
+  * @handle:   Pointer to TI SCI handle
+  * @proc_id:  Processor ID this request is for
+  * @host_id:  Host ID to get the control of the processor
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  */
+ static int ti_sci_cmd_proc_handover(const struct ti_sci_handle *handle,
+                                   u8 proc_id, u8 host_id)
+ {
+       struct ti_sci_msg_req_proc_handover *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_info *info;
+       struct ti_sci_xfer *xfer;
+       struct device *dev;
+       int ret = 0;
+       if (!handle)
+               return -EINVAL;
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_HANDOVER,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_req_proc_handover *)xfer->xfer_buf;
+       req->processor_id = proc_id;
+       req->host_id = host_id;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -ENODEV;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_proc_set_config() - Command to set the processor boot
+  *                                configuration flags
+  * @handle:           Pointer to TI SCI handle
+  * @proc_id:          Processor ID this request is for
+  * @config_flags_set: Configuration flags to be set
+  * @config_flags_clear:       Configuration flags to be cleared.
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  */
+ static int ti_sci_cmd_proc_set_config(const struct ti_sci_handle *handle,
+                                     u8 proc_id, u64 bootvector,
+                                     u32 config_flags_set,
+                                     u32 config_flags_clear)
+ {
+       struct ti_sci_msg_req_set_config *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_info *info;
+       struct ti_sci_xfer *xfer;
+       struct device *dev;
+       int ret = 0;
+       if (!handle)
+               return -EINVAL;
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CONFIG,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_req_set_config *)xfer->xfer_buf;
+       req->processor_id = proc_id;
+       req->bootvector_low = bootvector & TI_SCI_ADDR_LOW_MASK;
+       req->bootvector_high = (bootvector & TI_SCI_ADDR_HIGH_MASK) >>
+                               TI_SCI_ADDR_HIGH_SHIFT;
+       req->config_flags_set = config_flags_set;
+       req->config_flags_clear = config_flags_clear;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -ENODEV;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_proc_set_control() - Command to set the processor boot
+  *                                 control flags
+  * @handle:                   Pointer to TI SCI handle
+  * @proc_id:                  Processor ID this request is for
+  * @control_flags_set:                Control flags to be set
+  * @control_flags_clear:      Control flags to be cleared
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  */
+ static int ti_sci_cmd_proc_set_control(const struct ti_sci_handle *handle,
+                                      u8 proc_id, u32 control_flags_set,
+                                      u32 control_flags_clear)
+ {
+       struct ti_sci_msg_req_set_ctrl *req;
+       struct ti_sci_msg_hdr *resp;
+       struct ti_sci_info *info;
+       struct ti_sci_xfer *xfer;
+       struct device *dev;
+       int ret = 0;
+       if (!handle)
+               return -EINVAL;
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CTRL,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_req_set_ctrl *)xfer->xfer_buf;
+       req->processor_id = proc_id;
+       req->control_flags_set = control_flags_set;
+       req->control_flags_clear = control_flags_clear;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
+       ret = ti_sci_is_response_ack(resp) ? 0 : -ENODEV;
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
+ }
+ /**
+  * ti_sci_cmd_get_boot_status() - Command to get the processor boot status
+  * @handle:   Pointer to TI SCI handle
+  * @proc_id:  Processor ID this request is for
+  *
+  * Return: 0 if all went well, else returns appropriate error value.
+  */
+ static int ti_sci_cmd_proc_get_status(const struct ti_sci_handle *handle,
+                                     u8 proc_id, u64 *bv, u32 *cfg_flags,
+                                     u32 *ctrl_flags, u32 *sts_flags)
+ {
+       struct ti_sci_msg_resp_get_status *resp;
+       struct ti_sci_msg_req_get_status *req;
+       struct ti_sci_info *info;
+       struct ti_sci_xfer *xfer;
+       struct device *dev;
+       int ret = 0;
+       if (!handle)
+               return -EINVAL;
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       info = handle_to_ti_sci_info(handle);
+       dev = info->dev;
+       xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_STATUS,
+                                  TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+                                  sizeof(*req), sizeof(*resp));
+       if (IS_ERR(xfer)) {
+               ret = PTR_ERR(xfer);
+               dev_err(dev, "Message alloc failed(%d)\n", ret);
+               return ret;
+       }
+       req = (struct ti_sci_msg_req_get_status *)xfer->xfer_buf;
+       req->processor_id = proc_id;
+       ret = ti_sci_do_xfer(info, xfer);
+       if (ret) {
+               dev_err(dev, "Mbox send fail %d\n", ret);
+               goto fail;
+       }
+       resp = (struct ti_sci_msg_resp_get_status *)xfer->tx_message.buf;
+       if (!ti_sci_is_response_ack(resp)) {
+               ret = -ENODEV;
+       } else {
+               *bv = (resp->bootvector_low & TI_SCI_ADDR_LOW_MASK) |
+                     (((u64)resp->bootvector_high << TI_SCI_ADDR_HIGH_SHIFT) &
+                      TI_SCI_ADDR_HIGH_MASK);
+               *cfg_flags = resp->config_flags;
+               *ctrl_flags = resp->control_flags;
+               *sts_flags = resp->status_flags;
+       }
+ fail:
+       ti_sci_put_one_xfer(&info->minfo, xfer);
+       return ret;
+ }
+ /*
+  * ti_sci_setup_ops() - Setup the operations structures
+  * @info:     pointer to TISCI pointer
+  */
+ static void ti_sci_setup_ops(struct ti_sci_info *info)
+ {
+       struct ti_sci_ops *ops = &info->handle.ops;
+       struct ti_sci_core_ops *core_ops = &ops->core_ops;
+       struct ti_sci_dev_ops *dops = &ops->dev_ops;
+       struct ti_sci_clk_ops *cops = &ops->clk_ops;
+       struct ti_sci_rm_core_ops *rm_core_ops = &ops->rm_core_ops;
+       struct ti_sci_rm_irq_ops *iops = &ops->rm_irq_ops;
+       struct ti_sci_rm_ringacc_ops *rops = &ops->rm_ring_ops;
+       struct ti_sci_rm_psil_ops *psilops = &ops->rm_psil_ops;
+       struct ti_sci_rm_udmap_ops *udmap_ops = &ops->rm_udmap_ops;
+       struct ti_sci_proc_ops *pops = &ops->proc_ops;
+       core_ops->reboot_device = ti_sci_cmd_core_reboot;
+       dops->get_device = ti_sci_cmd_get_device;
+       dops->idle_device = ti_sci_cmd_idle_device;
+       dops->put_device = ti_sci_cmd_put_device;
+       dops->is_valid = ti_sci_cmd_dev_is_valid;
+       dops->get_context_loss_count = ti_sci_cmd_dev_get_clcnt;
+       dops->is_idle = ti_sci_cmd_dev_is_idle;
+       dops->is_stop = ti_sci_cmd_dev_is_stop;
+       dops->is_on = ti_sci_cmd_dev_is_on;
+       dops->is_transitioning = ti_sci_cmd_dev_is_trans;
+       dops->set_device_resets = ti_sci_cmd_set_device_resets;
+       dops->get_device_resets = ti_sci_cmd_get_device_resets;
+       cops->get_clock = ti_sci_cmd_get_clock;
+       cops->idle_clock = ti_sci_cmd_idle_clock;
+       cops->put_clock = ti_sci_cmd_put_clock;
+       cops->is_auto = ti_sci_cmd_clk_is_auto;
+       cops->is_on = ti_sci_cmd_clk_is_on;
+       cops->is_off = ti_sci_cmd_clk_is_off;
+       cops->set_parent = ti_sci_cmd_clk_set_parent;
+       cops->get_parent = ti_sci_cmd_clk_get_parent;
+       cops->get_num_parents = ti_sci_cmd_clk_get_num_parents;
+       cops->get_best_match_freq = ti_sci_cmd_clk_get_match_freq;
+       cops->set_freq = ti_sci_cmd_clk_set_freq;
+       cops->get_freq = ti_sci_cmd_clk_get_freq;
+       rm_core_ops->get_range = ti_sci_cmd_get_resource_range;
+       rm_core_ops->get_range_from_shost =
+                               ti_sci_cmd_get_resource_range_from_shost;
+       iops->set_irq = ti_sci_cmd_set_irq;
+       iops->set_event_map = ti_sci_cmd_set_event_map;
+       iops->free_irq = ti_sci_cmd_free_irq;
+       iops->free_event_map = ti_sci_cmd_free_event_map;
+       rops->config = ti_sci_cmd_ring_config;
+       rops->get_config = ti_sci_cmd_ring_get_config;
+       psilops->pair = ti_sci_cmd_rm_psil_pair;
+       psilops->unpair = ti_sci_cmd_rm_psil_unpair;
+       udmap_ops->tx_ch_cfg = ti_sci_cmd_rm_udmap_tx_ch_cfg;
+       udmap_ops->rx_ch_cfg = ti_sci_cmd_rm_udmap_rx_ch_cfg;
+       udmap_ops->rx_flow_cfg = ti_sci_cmd_rm_udmap_rx_flow_cfg;
+       pops->request = ti_sci_cmd_proc_request;
+       pops->release = ti_sci_cmd_proc_release;
+       pops->handover = ti_sci_cmd_proc_handover;
+       pops->set_config = ti_sci_cmd_proc_set_config;
+       pops->set_control = ti_sci_cmd_proc_set_control;
+       pops->get_status = ti_sci_cmd_proc_get_status;
+ }
+ /**
+  * ti_sci_get_handle() - Get the TI SCI handle for a device
+  * @dev:      Pointer to device for which we want SCI handle
+  *
+  * NOTE: The function does not track individual clients of the framework
+  * and is expected to be maintained by caller of TI SCI protocol library.
+  * ti_sci_put_handle must be balanced with successful ti_sci_get_handle
+  * Return: pointer to handle if successful, else:
+  * -EPROBE_DEFER if the instance is not ready
+  * -ENODEV if the required node handler is missing
+  * -EINVAL if invalid conditions are encountered.
+  */
+ const struct ti_sci_handle *ti_sci_get_handle(struct device *dev)
+ {
+       struct device_node *ti_sci_np;
+       struct list_head *p;
+       struct ti_sci_handle *handle = NULL;
+       struct ti_sci_info *info;
+       if (!dev) {
+               pr_err("I need a device pointer\n");
+               return ERR_PTR(-EINVAL);
+       }
+       ti_sci_np = of_get_parent(dev->of_node);
+       if (!ti_sci_np) {
+               dev_err(dev, "No OF information\n");
+               return ERR_PTR(-EINVAL);
+       }
+       mutex_lock(&ti_sci_list_mutex);
+       list_for_each(p, &ti_sci_list) {
+               info = list_entry(p, struct ti_sci_info, node);
+               if (ti_sci_np == info->dev->of_node) {
+                       handle = &info->handle;
+                       info->users++;
+                       break;
+               }
+       }
+       mutex_unlock(&ti_sci_list_mutex);
+       of_node_put(ti_sci_np);
+       if (!handle)
+               return ERR_PTR(-EPROBE_DEFER);
+       return handle;
+ }
+ EXPORT_SYMBOL_GPL(ti_sci_get_handle);
+ /**
+  * ti_sci_put_handle() - Release the handle acquired by ti_sci_get_handle
+  * @handle:   Handle acquired by ti_sci_get_handle
+  *
+  * NOTE: The function does not track individual clients of the framework
+  * and is expected to be maintained by caller of TI SCI protocol library.
+  * ti_sci_put_handle must be balanced with successful ti_sci_get_handle
+  *
+  * Return: 0 is successfully released
+  * if an error pointer was passed, it returns the error value back,
+  * if null was passed, it returns -EINVAL;
+  */
+ int ti_sci_put_handle(const struct ti_sci_handle *handle)
+ {
+       struct ti_sci_info *info;
+       if (IS_ERR(handle))
+               return PTR_ERR(handle);
+       if (!handle)
+               return -EINVAL;
+       info = handle_to_ti_sci_info(handle);
+       mutex_lock(&ti_sci_list_mutex);
+       if (!WARN_ON(!info->users))
+               info->users--;
+       mutex_unlock(&ti_sci_list_mutex);
+       return 0;
+ }
+ EXPORT_SYMBOL_GPL(ti_sci_put_handle);
+ static void devm_ti_sci_release(struct device *dev, void *res)
+ {
+       const struct ti_sci_handle **ptr = res;
+       const struct ti_sci_handle *handle = *ptr;
+       int ret;
+       ret = ti_sci_put_handle(handle);
+       if (ret)
+               dev_err(dev, "failed to put handle %d\n", ret);
+ }
+ /**
+  * devm_ti_sci_get_handle() - Managed get handle
+  * @dev:      device for which we want SCI handle for.
+  *
+  * NOTE: This releases the handle once the device resources are
+  * no longer needed. MUST NOT BE released with ti_sci_put_handle.
+  * The function does not track individual clients of the framework
+  * and is expected to be maintained by caller of TI SCI protocol library.
+  *
+  * Return: 0 if all went fine, else corresponding error.
+  */
+ const struct ti_sci_handle *devm_ti_sci_get_handle(struct device *dev)
+ {
+       const struct ti_sci_handle **ptr;
+       const struct ti_sci_handle *handle;
+       ptr = devres_alloc(devm_ti_sci_release, sizeof(*ptr), GFP_KERNEL);
+       if (!ptr)
+               return ERR_PTR(-ENOMEM);
+       handle = ti_sci_get_handle(dev);
+       if (!IS_ERR(handle)) {
+               *ptr = handle;
+               devres_add(dev, ptr);
+       } else {
+               devres_free(ptr);
+       }
+       return handle;
+ }
+ EXPORT_SYMBOL_GPL(devm_ti_sci_get_handle);
+ /**
+  * ti_sci_get_by_phandle() - Get the TI SCI handle using DT phandle
+  * @np:               device node
+  * @property: property name containing phandle on TISCI node
+  *
+  * NOTE: The function does not track individual clients of the framework
+  * and is expected to be maintained by caller of TI SCI protocol library.
+  * ti_sci_put_handle must be balanced with successful ti_sci_get_by_phandle
+  * Return: pointer to handle if successful, else:
+  * -EPROBE_DEFER if the instance is not ready
+  * -ENODEV if the required node handler is missing
+  * -EINVAL if invalid conditions are encountered.
+  */
+ const struct ti_sci_handle *ti_sci_get_by_phandle(struct device_node *np,
+                                                 const char *property)
+ {
+       struct ti_sci_handle *handle = NULL;
+       struct device_node *ti_sci_np;
+       struct ti_sci_info *info;
+       struct list_head *p;
+       if (!np) {
+               pr_err("I need a device pointer\n");
                return ERR_PTR(-EINVAL);
        }
  
@@@ -2395,6 -3180,7 +3233,7 @@@ devm_ti_sci_get_of_resource(const struc
                            struct device *dev, u32 dev_id, char *of_prop)
  {
        struct ti_sci_resource *res;
+       bool valid_set = false;
        u32 resource_subtype;
        int i, ret;
  
        if (!res)
                return ERR_PTR(-ENOMEM);
  
 -      res->sets = of_property_count_elems_of_size(dev_of_node(dev), of_prop,
 -                                                  sizeof(u32));
 -      if (res->sets < 0) {
 +      ret = of_property_count_elems_of_size(dev_of_node(dev), of_prop,
 +                                            sizeof(u32));
 +      if (ret < 0) {
                dev_err(dev, "%s resource type ids not available\n", of_prop);
 -              return ERR_PTR(res->sets);
 +              return ERR_PTR(ret);
        }
 +      res->sets = ret;
  
        res->desc = devm_kcalloc(dev, res->sets, sizeof(*res->desc),
                                 GFP_KERNEL);
                                                        &res->desc[i].start,
                                                        &res->desc[i].num);
                if (ret) {
-                       dev_err(dev, "dev = %d subtype %d not allocated for this host\n",
+                       dev_dbg(dev, "dev = %d subtype %d not allocated for this host\n",
                                dev_id, resource_subtype);
-                       return ERR_PTR(ret);
+                       res->desc[i].start = 0;
+                       res->desc[i].num = 0;
+                       continue;
                }
  
                dev_dbg(dev, "dev = %d, subtype = %d, start = %d, num = %d\n",
                        dev_id, resource_subtype, res->desc[i].start,
                        res->desc[i].num);
  
+               valid_set = true;
                res->desc[i].res_map =
                        devm_kzalloc(dev, BITS_TO_LONGS(res->desc[i].num) *
                                     sizeof(*res->desc[i].res_map), GFP_KERNEL);
        }
        raw_spin_lock_init(&res->lock);
  
-       return res;
+       if (valid_set)
+               return res;
+       return ERR_PTR(-EINVAL);
  }
  
  static int tisci_reboot_handler(struct notifier_block *nb, unsigned long mode,
index 414e0ced5409e4ca0b34a3de27070aa5d0bbe241,d7b4cd3fce8f39b360b5c111c969be24ee0efe2d..f0d068c039444a7290dd80e5ecb4476f029f78b0
  #define TI_SCI_MSG_SET_IRQ            0x1000
  #define TI_SCI_MSG_FREE_IRQ           0x1001
  
+ /* NAVSS resource management */
+ /* Ringacc requests */
+ #define TI_SCI_MSG_RM_RING_ALLOCATE           0x1100
+ #define TI_SCI_MSG_RM_RING_FREE                       0x1101
+ #define TI_SCI_MSG_RM_RING_RECONFIG           0x1102
+ #define TI_SCI_MSG_RM_RING_RESET              0x1103
+ #define TI_SCI_MSG_RM_RING_CFG                        0x1110
+ #define TI_SCI_MSG_RM_RING_GET_CFG            0x1111
+ /* PSI-L requests */
+ #define TI_SCI_MSG_RM_PSIL_PAIR                       0x1280
+ #define TI_SCI_MSG_RM_PSIL_UNPAIR             0x1281
+ #define TI_SCI_MSG_RM_UDMAP_TX_ALLOC          0x1200
+ #define TI_SCI_MSG_RM_UDMAP_TX_FREE           0x1201
+ #define TI_SCI_MSG_RM_UDMAP_RX_ALLOC          0x1210
+ #define TI_SCI_MSG_RM_UDMAP_RX_FREE           0x1211
+ #define TI_SCI_MSG_RM_UDMAP_FLOW_CFG          0x1220
+ #define TI_SCI_MSG_RM_UDMAP_OPT_FLOW_CFG      0x1221
+ #define TISCI_MSG_RM_UDMAP_TX_CH_CFG          0x1205
+ #define TISCI_MSG_RM_UDMAP_TX_CH_GET_CFG      0x1206
+ #define TISCI_MSG_RM_UDMAP_RX_CH_CFG          0x1215
+ #define TISCI_MSG_RM_UDMAP_RX_CH_GET_CFG      0x1216
+ #define TISCI_MSG_RM_UDMAP_FLOW_CFG           0x1230
+ #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG       0x1231
+ #define TISCI_MSG_RM_UDMAP_FLOW_GET_CFG               0x1232
+ #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_GET_CFG   0x1233
+ /* Processor Control requests */
+ #define TI_SCI_MSG_PROC_REQUEST               0xc000
+ #define TI_SCI_MSG_PROC_RELEASE               0xc001
+ #define TI_SCI_MSG_PROC_HANDOVER      0xc005
+ #define TI_SCI_MSG_SET_CONFIG         0xc100
+ #define TI_SCI_MSG_SET_CTRL           0xc101
+ #define TI_SCI_MSG_GET_STATUS         0xc400
  /**
   * struct ti_sci_msg_hdr - Generic Message Header for All messages and responses
   * @type:     Type of messages: One of TI_SCI_MSG* values
@@@ -202,8 -239,7 +239,8 @@@ struct ti_sci_msg_req_set_device_reset
   * @dev_id:   Device identifier this request is for
   * @clk_id:   Clock identifier for the device for this request.
   *            Each device has it's own set of clock inputs. This indexes
 - *            which clock input to modify.
 + *            which clock input to modify. Set to 255 if clock ID is
 + *            greater than or equal to 255.
   * @request_state: Request the state for the clock to be set to.
   *            MSG_CLOCK_SW_STATE_UNREQ: The IP does not require this clock,
   *            it can be disabled, regardless of the state of the device
   *            being required by the device.(default)
   *            MSG_CLOCK_SW_STATE_REQ:  Configure the clock to be enabled,
   *            regardless of the state of the device.
 + * @clk_id_32:        Clock identifier for the device for this request.
 + *            Only to be used if the clock ID is greater than or equal to
 + *            255.
   *
   * Normally, all required clocks are managed by TISCI entity, this is used
   * only for specific control *IF* required. Auto managed state is
@@@ -238,7 -271,6 +275,7 @@@ struct ti_sci_msg_req_set_clock_state 
  #define MSG_CLOCK_SW_STATE_AUTO               1
  #define MSG_CLOCK_SW_STATE_REQ                2
        u8 request_state;
 +      u32 clk_id_32;
  } __packed;
  
  /**
   * @dev_id:   Device identifier this request is for
   * @clk_id:   Clock identifier for the device for this request.
   *            Each device has it's own set of clock inputs. This indexes
 - *            which clock input to get state of.
 + *            which clock input to get state of. Set to 255 if the clock
 + *            ID is greater than or equal to 255.
 + * @clk_id_32:        Clock identifier for the device for the request.
 + *            Only to be used if the clock ID is greater than or equal to
 + *            255.
   *
   * Request type is TI_SCI_MSG_GET_CLOCK_STATE, response is state
   * of the clock
@@@ -260,7 -288,6 +297,7 @@@ struct ti_sci_msg_req_get_clock_state 
        struct ti_sci_msg_hdr hdr;
        u32 dev_id;
        u8 clk_id;
 +      u32 clk_id_32;
  } __packed;
  
  /**
@@@ -288,13 -315,9 +325,13 @@@ struct ti_sci_msg_resp_get_clock_state 
   * @dev_id:   Device identifier this request is for
   * @clk_id:   Clock identifier for the device for this request.
   *            Each device has it's own set of clock inputs. This indexes
 - *            which clock input to modify.
 + *            which clock input to modify. Set to 255 if clock ID is
 + *            greater than or equal to 255.
   * @parent_id:        The new clock parent is selectable by an index via this
 - *            parameter.
 + *            parameter. Set to 255 if clock ID is greater than or
 + *            equal to 255.
 + * @clk_id_32:        Clock identifier if @clk_id field is 255.
 + * @parent_id_32:     Parent identifier if @parent_id is 255.
   *
   * Request type is TI_SCI_MSG_SET_CLOCK_PARENT, response is generic
   * ACK / NACK message.
@@@ -304,8 -327,6 +341,8 @@@ struct ti_sci_msg_req_set_clock_parent 
        u32 dev_id;
        u8 clk_id;
        u8 parent_id;
 +      u32 clk_id_32;
 +      u32 parent_id_32;
  } __packed;
  
  /**
   * @dev_id:   Device identifier this request is for
   * @clk_id:   Clock identifier for the device for this request.
   *            Each device has it's own set of clock inputs. This indexes
 - *            which clock input to get the parent for.
 + *            which clock input to get the parent for. If this field
 + *            contains 255, the actual clock identifier is stored in
 + *            @clk_id_32.
 + * @clk_id_32:        Clock identifier if the @clk_id field contains 255.
   *
   * Request type is TI_SCI_MSG_GET_CLOCK_PARENT, response is parent information
   */
@@@ -325,32 -343,25 +362,32 @@@ struct ti_sci_msg_req_get_clock_parent 
        struct ti_sci_msg_hdr hdr;
        u32 dev_id;
        u8 clk_id;
 +      u32 clk_id_32;
  } __packed;
  
  /**
   * struct ti_sci_msg_resp_get_clock_parent - Response with clock parent
   * @hdr:      Generic Header
 - * @parent_id:        The current clock parent
 + * @parent_id:        The current clock parent. If set to 255, the current parent
 + *            ID can be found from the @parent_id_32 field.
 + * @parent_id_32:     Current clock parent if @parent_id field is set to
 + *                    255.
   *
   * Response to TI_SCI_MSG_GET_CLOCK_PARENT.
   */
  struct ti_sci_msg_resp_get_clock_parent {
        struct ti_sci_msg_hdr hdr;
        u8 parent_id;
 +      u32 parent_id_32;
  } __packed;
  
  /**
   * struct ti_sci_msg_req_get_clock_num_parents - Request to get clock parents
   * @hdr:      Generic header
   * @dev_id:   Device identifier this request is for
 - * @clk_id:   Clock identifier for the device for this request.
 + * @clk_id:   Clock identifier for the device for this request. Set to
 + *            255 if clock ID is greater than or equal to 255.
 + * @clk_id_32:        Clock identifier if the @clk_id field contains 255.
   *
   * This request provides information about how many clock parent options
   * are available for a given clock to a device. This is typically used
@@@ -363,24 -374,18 +400,24 @@@ struct ti_sci_msg_req_get_clock_num_par
        struct ti_sci_msg_hdr hdr;
        u32 dev_id;
        u8 clk_id;
 +      u32 clk_id_32;
  } __packed;
  
  /**
   * struct ti_sci_msg_resp_get_clock_num_parents - Response for get clk parents
   * @hdr:              Generic header
 - * @num_parents:      Number of clock parents
 + * @num_parents:      Number of clock parents. If set to 255, the actual
 + *                    number of parents is stored into @num_parents_32
 + *                    field instead.
 + * @num_parents_32:   Number of clock parents if @num_parents field is
 + *                    set to 255.
   *
   * Response to TI_SCI_MSG_GET_NUM_CLOCK_PARENTS
   */
  struct ti_sci_msg_resp_get_clock_num_parents {
        struct ti_sci_msg_hdr hdr;
        u8 num_parents;
 +      u32 num_parents_32;
  } __packed;
  
  /**
   * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum
   *            allowable programmed frequency and does not account for clock
   *            tolerances and jitter.
 - * @clk_id:   Clock identifier for the device for this request.
 + * @clk_id:   Clock identifier for the device for this request. Set to
 + *            255 if clock identifier is greater than or equal to 255.
 + * @clk_id_32:        Clock identifier if @clk_id is set to 255.
   *
   * NOTE: Normally clock frequency management is automatically done by TISCI
   * entity. In case of specific requests, TISCI evaluates capability to achieve
@@@ -414,7 -417,6 +451,7 @@@ struct ti_sci_msg_req_query_clock_freq 
        u64 target_freq_hz;
        u64 max_freq_hz;
        u8 clk_id;
 +      u32 clk_id_32;
  } __packed;
  
  /**
@@@ -442,9 -444,7 +479,9 @@@ struct ti_sci_msg_resp_query_clock_fre
   * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum
   *            allowable programmed frequency and does not account for clock
   *            tolerances and jitter.
 - * @clk_id:   Clock identifier for the device for this request.
 + * @clk_id:   Clock identifier for the device for this request. Set to
 + *            255 if clock ID is greater than or equal to 255.
 + * @clk_id_32:        Clock identifier if @clk_id field is set to 255.
   *
   * NOTE: Normally clock frequency management is automatically done by TISCI
   * entity. In case of specific requests, TISCI evaluates capability to achieve
@@@ -473,16 -473,13 +510,16 @@@ struct ti_sci_msg_req_set_clock_freq 
        u64 target_freq_hz;
        u64 max_freq_hz;
        u8 clk_id;
 +      u32 clk_id_32;
  } __packed;
  
  /**
   * struct ti_sci_msg_req_get_clock_freq - Request to get the clock frequency
   * @hdr:      Generic Header
   * @dev_id:   Device identifier this request is for
 - * @clk_id:   Clock identifier for the device for this request.
 + * @clk_id:   Clock identifier for the device for this request. Set to
 + *            255 if clock ID is greater than or equal to 255.
 + * @clk_id_32:        Clock identifier if @clk_id field is set to 255.
   *
   * NOTE: Normally clock frequency management is automatically done by TISCI
   * entity. In some cases, clock frequencies are configured by host.
@@@ -494,7 -491,6 +531,7 @@@ struct ti_sci_msg_req_get_clock_freq 
        struct ti_sci_msg_hdr hdr;
        u32 dev_id;
        u8 clk_id;
 +      u32 clk_id_32;
  } __packed;
  
  /**
@@@ -604,4 -600,777 +641,777 @@@ struct ti_sci_msg_req_manage_irq 
        u8 secondary_host;
  } __packed;
  
+ /**
+  * struct ti_sci_msg_rm_ring_cfg_req - Configure a Navigator Subsystem ring
+  *
+  * Configures the non-real-time registers of a Navigator Subsystem ring.
+  * @hdr:      Generic Header
+  * @valid_params: Bitfield defining validity of ring configuration parameters.
+  *    The ring configuration fields are not valid, and will not be used for
+  *    ring configuration, if their corresponding valid bit is zero.
+  *    Valid bit usage:
+  *    0 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_lo
+  *    1 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_hi
+  *    2 - Valid bit for @tisci_msg_rm_ring_cfg_req count
+  *    3 - Valid bit for @tisci_msg_rm_ring_cfg_req mode
+  *    4 - Valid bit for @tisci_msg_rm_ring_cfg_req size
+  *    5 - Valid bit for @tisci_msg_rm_ring_cfg_req order_id
+  * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated
+  * @index: ring index to be configured.
+  * @addr_lo: 32 LSBs of ring base address to be programmed into the ring's
+  *    RING_BA_LO register
+  * @addr_hi: 16 MSBs of ring base address to be programmed into the ring's
+  *    RING_BA_HI register.
+  * @count: Number of ring elements. Must be even if mode is CREDENTIALS or QM
+  *    modes.
+  * @mode: Specifies the mode the ring is to be configured.
+  * @size: Specifies encoded ring element size. To calculate the encoded size use
+  *    the formula (log2(size_bytes) - 2), where size_bytes cannot be
+  *    greater than 256.
+  * @order_id: Specifies the ring's bus order ID.
+  */
+ struct ti_sci_msg_rm_ring_cfg_req {
+       struct ti_sci_msg_hdr hdr;
+       u32 valid_params;
+       u16 nav_id;
+       u16 index;
+       u32 addr_lo;
+       u32 addr_hi;
+       u32 count;
+       u8 mode;
+       u8 size;
+       u8 order_id;
+ } __packed;
+ /**
+  * struct ti_sci_msg_rm_ring_get_cfg_req - Get RA ring's configuration
+  *
+  * Gets the configuration of the non-real-time register fields of a ring.  The
+  * host, or a supervisor of the host, who owns the ring must be the requesting
+  * host.  The values of the non-real-time registers are returned in
+  * @ti_sci_msg_rm_ring_get_cfg_resp.
+  *
+  * @hdr: Generic Header
+  * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated
+  * @index: ring index.
+  */
+ struct ti_sci_msg_rm_ring_get_cfg_req {
+       struct ti_sci_msg_hdr hdr;
+       u16 nav_id;
+       u16 index;
+ } __packed;
+ /**
+  * struct ti_sci_msg_rm_ring_get_cfg_resp -  Ring get configuration response
+  *
+  * Response received by host processor after RM has handled
+  * @ti_sci_msg_rm_ring_get_cfg_req. The response contains the ring's
+  * non-real-time register values.
+  *
+  * @hdr: Generic Header
+  * @addr_lo: Ring 32 LSBs of base address
+  * @addr_hi: Ring 16 MSBs of base address.
+  * @count: Ring number of elements.
+  * @mode: Ring mode.
+  * @size: encoded Ring element size
+  * @order_id: ing order ID.
+  */
+ struct ti_sci_msg_rm_ring_get_cfg_resp {
+       struct ti_sci_msg_hdr hdr;
+       u32 addr_lo;
+       u32 addr_hi;
+       u32 count;
+       u8 mode;
+       u8 size;
+       u8 order_id;
+ } __packed;
+ /**
+  * struct ti_sci_msg_psil_pair - Pairs a PSI-L source thread to a destination
+  *                             thread
+  * @hdr:      Generic Header
+  * @nav_id:   SoC Navigator Subsystem device ID whose PSI-L config proxy is
+  *            used to pair the source and destination threads.
+  * @src_thread:       PSI-L source thread ID within the PSI-L System thread map.
+  *
+  * UDMAP transmit channels mapped to source threads will have their
+  * TCHAN_THRD_ID register programmed with the destination thread if the pairing
+  * is successful.
+  * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
+  * PSI-L destination threads start at index 0x8000.  The request is NACK'd if
+  * the destination thread is not greater than or equal to 0x8000.
+  *
+  * UDMAP receive channels mapped to destination threads will have their
+  * RCHAN_THRD_ID register programmed with the source thread if the pairing
+  * is successful.
+  *
+  * Request type is TI_SCI_MSG_RM_PSIL_PAIR, response is a generic ACK or NACK
+  * message.
+  */
+ struct ti_sci_msg_psil_pair {
+       struct ti_sci_msg_hdr hdr;
+       u32 nav_id;
+       u32 src_thread;
+       u32 dst_thread;
+ } __packed;
+ /**
+  * struct ti_sci_msg_psil_unpair - Unpairs a PSI-L source thread from a
+  *                               destination thread
+  * @hdr:      Generic Header
+  * @nav_id:   SoC Navigator Subsystem device ID whose PSI-L config proxy is
+  *            used to unpair the source and destination threads.
+  * @src_thread:       PSI-L source thread ID within the PSI-L System thread map.
+  *
+  * UDMAP transmit channels mapped to source threads will have their
+  * TCHAN_THRD_ID register cleared if the unpairing is successful.
+  *
+  * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
+  * PSI-L destination threads start at index 0x8000.  The request is NACK'd if
+  * the destination thread is not greater than or equal to 0x8000.
+  *
+  * UDMAP receive channels mapped to destination threads will have their
+  * RCHAN_THRD_ID register cleared if the unpairing is successful.
+  *
+  * Request type is TI_SCI_MSG_RM_PSIL_UNPAIR, response is a generic ACK or NACK
+  * message.
+  */
+ struct ti_sci_msg_psil_unpair {
+       struct ti_sci_msg_hdr hdr;
+       u32 nav_id;
+       u32 src_thread;
+       u32 dst_thread;
+ } __packed;
+ /**
+  * struct ti_sci_msg_udmap_rx_flow_cfg -  UDMAP receive flow configuration
+  *                                      message
+  * @hdr: Generic Header
+  * @nav_id: SoC Navigator Subsystem device ID from which the receive flow is
+  *    allocated
+  * @flow_index: UDMAP receive flow index for non-optional configuration.
+  * @rx_ch_index: Specifies the index of the receive channel using the flow_index
+  * @rx_einfo_present: UDMAP receive flow extended packet info present.
+  * @rx_psinfo_present: UDMAP receive flow PS words present.
+  * @rx_error_handling: UDMAP receive flow error handling configuration. Valid
+  *    values are TI_SCI_RM_UDMAP_RX_FLOW_ERR_DROP/RETRY.
+  * @rx_desc_type: UDMAP receive flow descriptor type. It can be one of
+  *    TI_SCI_RM_UDMAP_RX_FLOW_DESC_HOST/MONO.
+  * @rx_sop_offset: UDMAP receive flow start of packet offset.
+  * @rx_dest_qnum: UDMAP receive flow destination queue number.
+  * @rx_ps_location: UDMAP receive flow PS words location.
+  *    0 - end of packet descriptor
+  *    1 - Beginning of the data buffer
+  * @rx_src_tag_hi: UDMAP receive flow source tag high byte constant
+  * @rx_src_tag_lo: UDMAP receive flow source tag low byte constant
+  * @rx_dest_tag_hi: UDMAP receive flow destination tag high byte constant
+  * @rx_dest_tag_lo: UDMAP receive flow destination tag low byte constant
+  * @rx_src_tag_hi_sel: UDMAP receive flow source tag high byte selector
+  * @rx_src_tag_lo_sel: UDMAP receive flow source tag low byte selector
+  * @rx_dest_tag_hi_sel: UDMAP receive flow destination tag high byte selector
+  * @rx_dest_tag_lo_sel: UDMAP receive flow destination tag low byte selector
+  * @rx_size_thresh_en: UDMAP receive flow packet size based free buffer queue
+  *    enable. If enabled, the ti_sci_rm_udmap_rx_flow_opt_cfg also need to be
+  *    configured and sent.
+  * @rx_fdq0_sz0_qnum: UDMAP receive flow free descriptor queue 0.
+  * @rx_fdq1_qnum: UDMAP receive flow free descriptor queue 1.
+  * @rx_fdq2_qnum: UDMAP receive flow free descriptor queue 2.
+  * @rx_fdq3_qnum: UDMAP receive flow free descriptor queue 3.
+  *
+  * For detailed information on the settings, see the UDMAP section of the TRM.
+  */
+ struct ti_sci_msg_udmap_rx_flow_cfg {
+       struct ti_sci_msg_hdr hdr;
+       u32 nav_id;
+       u32 flow_index;
+       u32 rx_ch_index;
+       u8 rx_einfo_present;
+       u8 rx_psinfo_present;
+       u8 rx_error_handling;
+       u8 rx_desc_type;
+       u16 rx_sop_offset;
+       u16 rx_dest_qnum;
+       u8 rx_ps_location;
+       u8 rx_src_tag_hi;
+       u8 rx_src_tag_lo;
+       u8 rx_dest_tag_hi;
+       u8 rx_dest_tag_lo;
+       u8 rx_src_tag_hi_sel;
+       u8 rx_src_tag_lo_sel;
+       u8 rx_dest_tag_hi_sel;
+       u8 rx_dest_tag_lo_sel;
+       u8 rx_size_thresh_en;
+       u16 rx_fdq0_sz0_qnum;
+       u16 rx_fdq1_qnum;
+       u16 rx_fdq2_qnum;
+       u16 rx_fdq3_qnum;
+ } __packed;
+ /**
+  * struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg - parameters for UDMAP receive
+  *                                            flow optional configuration
+  * @hdr: Generic Header
+  * @nav_id: SoC Navigator Subsystem device ID from which the receive flow is
+  *    allocated
+  * @flow_index: UDMAP receive flow index for optional configuration.
+  * @rx_ch_index: Specifies the index of the receive channel using the flow_index
+  * @rx_size_thresh0: UDMAP receive flow packet size threshold 0.
+  * @rx_size_thresh1: UDMAP receive flow packet size threshold 1.
+  * @rx_size_thresh2: UDMAP receive flow packet size threshold 2.
+  * @rx_fdq0_sz1_qnum: UDMAP receive flow free descriptor queue for size
+  *    threshold 1.
+  * @rx_fdq0_sz2_qnum: UDMAP receive flow free descriptor queue for size
+  *    threshold 2.
+  * @rx_fdq0_sz3_qnum: UDMAP receive flow free descriptor queue for size
+  *    threshold 3.
+  *
+  * For detailed information on the settings, see the UDMAP section of the TRM.
+  */
+ struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg {
+       struct ti_sci_msg_hdr hdr;
+       u32 nav_id;
+       u32 flow_index;
+       u32 rx_ch_index;
+       u16 rx_size_thresh0;
+       u16 rx_size_thresh1;
+       u16 rx_size_thresh2;
+       u16 rx_fdq0_sz1_qnum;
+       u16 rx_fdq0_sz2_qnum;
+       u16 rx_fdq0_sz3_qnum;
+ } __packed;
+ /**
+  * Configures a Navigator Subsystem UDMAP transmit channel
+  *
+  * Configures the non-real-time registers of a Navigator Subsystem UDMAP
+  * transmit channel.  The channel index must be assigned to the host defined
+  * in the TISCI header via the RM board configuration resource assignment
+  * range list.
+  *
+  * @hdr: Generic Header
+  *
+  * @valid_params: Bitfield defining validity of tx channel configuration
+  * parameters. The tx channel configuration fields are not valid, and will not
+  * be used for ch configuration, if their corresponding valid bit is zero.
+  * Valid bit usage:
+  *    0 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_pause_on_err
+  *    1 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_atype
+  *    2 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_chan_type
+  *    3 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_fetch_size
+  *    4 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::txcq_qnum
+  *    5 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_priority
+  *    6 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_qos
+  *    7 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_orderid
+  *    8 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_sched_priority
+  *    9 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_einfo
+  *   10 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_pswords
+  *   11 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_supr_tdpkt
+  *   12 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_credit_count
+  *   13 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::fdepth
+  *   14 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_burst_size
+  *
+  * @nav_id: SoC device ID of Navigator Subsystem where tx channel is located
+  *
+  * @index: UDMAP transmit channel index.
+  *
+  * @tx_pause_on_err: UDMAP transmit channel pause on error configuration to
+  * be programmed into the tx_pause_on_err field of the channel's TCHAN_TCFG
+  * register.
+  *
+  * @tx_filt_einfo: UDMAP transmit channel extended packet information passing
+  * configuration to be programmed into the tx_filt_einfo field of the
+  * channel's TCHAN_TCFG register.
+  *
+  * @tx_filt_pswords: UDMAP transmit channel protocol specific word passing
+  * configuration to be programmed into the tx_filt_pswords field of the
+  * channel's TCHAN_TCFG register.
+  *
+  * @tx_atype: UDMAP transmit channel non Ring Accelerator access pointer
+  * interpretation configuration to be programmed into the tx_atype field of
+  * the channel's TCHAN_TCFG register.
+  *
+  * @tx_chan_type: UDMAP transmit channel functional channel type and work
+  * passing mechanism configuration to be programmed into the tx_chan_type
+  * field of the channel's TCHAN_TCFG register.
+  *
+  * @tx_supr_tdpkt: UDMAP transmit channel teardown packet generation suppression
+  * configuration to be programmed into the tx_supr_tdpkt field of the channel's
+  * TCHAN_TCFG register.
+  *
+  * @tx_fetch_size: UDMAP transmit channel number of 32-bit descriptor words to
+  * fetch configuration to be programmed into the tx_fetch_size field of the
+  * channel's TCHAN_TCFG register.  The user must make sure to set the maximum
+  * word count that can pass through the channel for any allowed descriptor type.
+  *
+  * @tx_credit_count: UDMAP transmit channel transfer request credit count
+  * configuration to be programmed into the count field of the TCHAN_TCREDIT
+  * register.  Specifies how many credits for complete TRs are available.
+  *
+  * @txcq_qnum: UDMAP transmit channel completion queue configuration to be
+  * programmed into the txcq_qnum field of the TCHAN_TCQ register. The specified
+  * completion queue must be assigned to the host, or a subordinate of the host,
+  * requesting configuration of the transmit channel.
+  *
+  * @tx_priority: UDMAP transmit channel transmit priority value to be programmed
+  * into the priority field of the channel's TCHAN_TPRI_CTRL register.
+  *
+  * @tx_qos: UDMAP transmit channel transmit qos value to be programmed into the
+  * qos field of the channel's TCHAN_TPRI_CTRL register.
+  *
+  * @tx_orderid: UDMAP transmit channel bus order id value to be programmed into
+  * the orderid field of the channel's TCHAN_TPRI_CTRL register.
+  *
+  * @fdepth: UDMAP transmit channel FIFO depth configuration to be programmed
+  * into the fdepth field of the TCHAN_TFIFO_DEPTH register. Sets the number of
+  * Tx FIFO bytes which are allowed to be stored for the channel. Check the UDMAP
+  * section of the TRM for restrictions regarding this parameter.
+  *
+  * @tx_sched_priority: UDMAP transmit channel tx scheduling priority
+  * configuration to be programmed into the priority field of the channel's
+  * TCHAN_TST_SCHED register.
+  *
+  * @tx_burst_size: UDMAP transmit channel burst size configuration to be
+  * programmed into the tx_burst_size field of the TCHAN_TCFG register.
+  */
+ struct ti_sci_msg_rm_udmap_tx_ch_cfg_req {
+       struct ti_sci_msg_hdr hdr;
+       u32 valid_params;
+       u16 nav_id;
+       u16 index;
+       u8 tx_pause_on_err;
+       u8 tx_filt_einfo;
+       u8 tx_filt_pswords;
+       u8 tx_atype;
+       u8 tx_chan_type;
+       u8 tx_supr_tdpkt;
+       u16 tx_fetch_size;
+       u8 tx_credit_count;
+       u16 txcq_qnum;
+       u8 tx_priority;
+       u8 tx_qos;
+       u8 tx_orderid;
+       u16 fdepth;
+       u8 tx_sched_priority;
+       u8 tx_burst_size;
+ } __packed;
+ /**
+  * Configures a Navigator Subsystem UDMAP receive channel
+  *
+  * Configures the non-real-time registers of a Navigator Subsystem UDMAP
+  * receive channel.  The channel index must be assigned to the host defined
+  * in the TISCI header via the RM board configuration resource assignment
+  * range list.
+  *
+  * @hdr: Generic Header
+  *
+  * @valid_params: Bitfield defining validity of rx channel configuration
+  * parameters.
+  * The rx channel configuration fields are not valid, and will not be used for
+  * ch configuration, if their corresponding valid bit is zero.
+  * Valid bit usage:
+  *    0 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_pause_on_err
+  *    1 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_atype
+  *    2 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_chan_type
+  *    3 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_fetch_size
+  *    4 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rxcq_qnum
+  *    5 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_priority
+  *    6 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_qos
+  *    7 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_orderid
+  *    8 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_sched_priority
+  *    9 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_start
+  *   10 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_cnt
+  *   11 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_short
+  *   12 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_long
+  *   14 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_burst_size
+  *
+  * @nav_id: SoC device ID of Navigator Subsystem where rx channel is located
+  *
+  * @index: UDMAP receive channel index.
+  *
+  * @rx_fetch_size: UDMAP receive channel number of 32-bit descriptor words to
+  * fetch configuration to be programmed into the rx_fetch_size field of the
+  * channel's RCHAN_RCFG register.
+  *
+  * @rxcq_qnum: UDMAP receive channel completion queue configuration to be
+  * programmed into the rxcq_qnum field of the RCHAN_RCQ register.
+  * The specified completion queue must be assigned to the host, or a subordinate
+  * of the host, requesting configuration of the receive channel.
+  *
+  * @rx_priority: UDMAP receive channel receive priority value to be programmed
+  * into the priority field of the channel's RCHAN_RPRI_CTRL register.
+  *
+  * @rx_qos: UDMAP receive channel receive qos value to be programmed into the
+  * qos field of the channel's RCHAN_RPRI_CTRL register.
+  *
+  * @rx_orderid: UDMAP receive channel bus order id value to be programmed into
+  * the orderid field of the channel's RCHAN_RPRI_CTRL register.
+  *
+  * @rx_sched_priority: UDMAP receive channel rx scheduling priority
+  * configuration to be programmed into the priority field of the channel's
+  * RCHAN_RST_SCHED register.
+  *
+  * @flowid_start: UDMAP receive channel additional flows starting index
+  * configuration to program into the flow_start field of the RCHAN_RFLOW_RNG
+  * register. Specifies the starting index for flow IDs the receive channel is to
+  * make use of beyond the default flow. flowid_start and @ref flowid_cnt must be
+  * set as valid and configured together. The starting flow ID set by
+  * @ref flowid_cnt must be a flow index within the Navigator Subsystem's subset
+  * of flows beyond the default flows statically mapped to receive channels.
+  * The additional flows must be assigned to the host, or a subordinate of the
+  * host, requesting configuration of the receive channel.
+  *
+  * @flowid_cnt: UDMAP receive channel additional flows count configuration to
+  * program into the flowid_cnt field of the RCHAN_RFLOW_RNG register.
+  * This field specifies how many flow IDs are in the additional contiguous range
+  * of legal flow IDs for the channel.  @ref flowid_start and flowid_cnt must be
+  * set as valid and configured together. Disabling the valid_params field bit
+  * for flowid_cnt indicates no flow IDs other than the default are to be
+  * allocated and used by the receive channel. @ref flowid_start plus flowid_cnt
+  * cannot be greater than the number of receive flows in the receive channel's
+  * Navigator Subsystem.  The additional flows must be assigned to the host, or a
+  * subordinate of the host, requesting configuration of the receive channel.
+  *
+  * @rx_pause_on_err: UDMAP receive channel pause on error configuration to be
+  * programmed into the rx_pause_on_err field of the channel's RCHAN_RCFG
+  * register.
+  *
+  * @rx_atype: UDMAP receive channel non Ring Accelerator access pointer
+  * interpretation configuration to be programmed into the rx_atype field of the
+  * channel's RCHAN_RCFG register.
+  *
+  * @rx_chan_type: UDMAP receive channel functional channel type and work passing
+  * mechanism configuration to be programmed into the rx_chan_type field of the
+  * channel's RCHAN_RCFG register.
+  *
+  * @rx_ignore_short: UDMAP receive channel short packet treatment configuration
+  * to be programmed into the rx_ignore_short field of the RCHAN_RCFG register.
+  *
+  * @rx_ignore_long: UDMAP receive channel long packet treatment configuration to
+  * be programmed into the rx_ignore_long field of the RCHAN_RCFG register.
+  *
+  * @rx_burst_size: UDMAP receive channel burst size configuration to be
+  * programmed into the rx_burst_size field of the RCHAN_RCFG register.
+  */
+ struct ti_sci_msg_rm_udmap_rx_ch_cfg_req {
+       struct ti_sci_msg_hdr hdr;
+       u32 valid_params;
+       u16 nav_id;
+       u16 index;
+       u16 rx_fetch_size;
+       u16 rxcq_qnum;
+       u8 rx_priority;
+       u8 rx_qos;
+       u8 rx_orderid;
+       u8 rx_sched_priority;
+       u16 flowid_start;
+       u16 flowid_cnt;
+       u8 rx_pause_on_err;
+       u8 rx_atype;
+       u8 rx_chan_type;
+       u8 rx_ignore_short;
+       u8 rx_ignore_long;
+       u8 rx_burst_size;
+ } __packed;
+ /**
+  * Configures a Navigator Subsystem UDMAP receive flow
+  *
+  * Configures a Navigator Subsystem UDMAP receive flow's registers.
+  * Configuration does not include the flow registers which handle size-based
+  * free descriptor queue routing.
+  *
+  * The flow index must be assigned to the host defined in the TISCI header via
+  * the RM board configuration resource assignment range list.
+  *
+  * @hdr: Standard TISCI header
+  *
+  * @valid_params
+  * Bitfield defining validity of rx flow configuration parameters.  The
+  * rx flow configuration fields are not valid, and will not be used for flow
+  * configuration, if their corresponding valid bit is zero.  Valid bit usage:
+  *     0 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_einfo_present
+  *     1 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_psinfo_present
+  *     2 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_error_handling
+  *     3 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_desc_type
+  *     4 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_sop_offset
+  *     5 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_qnum
+  *     6 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi
+  *     7 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo
+  *     8 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi
+  *     9 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo
+  *    10 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi_sel
+  *    11 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo_sel
+  *    12 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi_sel
+  *    13 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo_sel
+  *    14 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq0_sz0_qnum
+  *    15 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq1_sz0_qnum
+  *    16 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq2_sz0_qnum
+  *    17 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq3_sz0_qnum
+  *    18 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_ps_location
+  *
+  * @nav_id: SoC device ID of Navigator Subsystem from which the receive flow is
+  * allocated
+  *
+  * @flow_index: UDMAP receive flow index for non-optional configuration.
+  *
+  * @rx_einfo_present:
+  * UDMAP receive flow extended packet info present configuration to be
+  * programmed into the rx_einfo_present field of the flow's RFLOW_RFA register.
+  *
+  * @rx_psinfo_present:
+  * UDMAP receive flow PS words present configuration to be programmed into the
+  * rx_psinfo_present field of the flow's RFLOW_RFA register.
+  *
+  * @rx_error_handling:
+  * UDMAP receive flow error handling configuration to be programmed into the
+  * rx_error_handling field of the flow's RFLOW_RFA register.
+  *
+  * @rx_desc_type:
+  * UDMAP receive flow descriptor type configuration to be programmed into the
+  * rx_desc_type field field of the flow's RFLOW_RFA register.
+  *
+  * @rx_sop_offset:
+  * UDMAP receive flow start of packet offset configuration to be programmed
+  * into the rx_sop_offset field of the RFLOW_RFA register.  See the UDMAP
+  * section of the TRM for more information on this setting.  Valid values for
+  * this field are 0-255 bytes.
+  *
+  * @rx_dest_qnum:
+  * UDMAP receive flow destination queue configuration to be programmed into the
+  * rx_dest_qnum field of the flow's RFLOW_RFA register.  The specified
+  * destination queue must be valid within the Navigator Subsystem and must be
+  * owned by the host, or a subordinate of the host, requesting allocation and
+  * configuration of the receive flow.
+  *
+  * @rx_src_tag_hi:
+  * UDMAP receive flow source tag high byte constant configuration to be
+  * programmed into the rx_src_tag_hi field of the flow's RFLOW_RFB register.
+  * See the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_src_tag_lo:
+  * UDMAP receive flow source tag low byte constant configuration to be
+  * programmed into the rx_src_tag_lo field of the flow's RFLOW_RFB register.
+  * See the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_dest_tag_hi:
+  * UDMAP receive flow destination tag high byte constant configuration to be
+  * programmed into the rx_dest_tag_hi field of the flow's RFLOW_RFB register.
+  * See the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_dest_tag_lo:
+  * UDMAP receive flow destination tag low byte constant configuration to be
+  * programmed into the rx_dest_tag_lo field of the flow's RFLOW_RFB register.
+  * See the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_src_tag_hi_sel:
+  * UDMAP receive flow source tag high byte selector configuration to be
+  * programmed into the rx_src_tag_hi_sel field of the RFLOW_RFC register.  See
+  * the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_src_tag_lo_sel:
+  * UDMAP receive flow source tag low byte selector configuration to be
+  * programmed into the rx_src_tag_lo_sel field of the RFLOW_RFC register.  See
+  * the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_dest_tag_hi_sel:
+  * UDMAP receive flow destination tag high byte selector configuration to be
+  * programmed into the rx_dest_tag_hi_sel field of the RFLOW_RFC register.  See
+  * the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_dest_tag_lo_sel:
+  * UDMAP receive flow destination tag low byte selector configuration to be
+  * programmed into the rx_dest_tag_lo_sel field of the RFLOW_RFC register.  See
+  * the UDMAP section of the TRM for more information on this setting.
+  *
+  * @rx_fdq0_sz0_qnum:
+  * UDMAP receive flow free descriptor queue 0 configuration to be programmed
+  * into the rx_fdq0_sz0_qnum field of the flow's RFLOW_RFD register.  See the
+  * UDMAP section of the TRM for more information on this setting. The specified
+  * free queue must be valid within the Navigator Subsystem and must be owned
+  * by the host, or a subordinate of the host, requesting allocation and
+  * configuration of the receive flow.
+  *
+  * @rx_fdq1_qnum:
+  * UDMAP receive flow free descriptor queue 1 configuration to be programmed
+  * into the rx_fdq1_qnum field of the flow's RFLOW_RFD register.  See the
+  * UDMAP section of the TRM for more information on this setting.  The specified
+  * free queue must be valid within the Navigator Subsystem and must be owned
+  * by the host, or a subordinate of the host, requesting allocation and
+  * configuration of the receive flow.
+  *
+  * @rx_fdq2_qnum:
+  * UDMAP receive flow free descriptor queue 2 configuration to be programmed
+  * into the rx_fdq2_qnum field of the flow's RFLOW_RFE register.  See the
+  * UDMAP section of the TRM for more information on this setting.  The specified
+  * free queue must be valid within the Navigator Subsystem and must be owned
+  * by the host, or a subordinate of the host, requesting allocation and
+  * configuration of the receive flow.
+  *
+  * @rx_fdq3_qnum:
+  * UDMAP receive flow free descriptor queue 3 configuration to be programmed
+  * into the rx_fdq3_qnum field of the flow's RFLOW_RFE register.  See the
+  * UDMAP section of the TRM for more information on this setting.  The specified
+  * free queue must be valid within the Navigator Subsystem and must be owned
+  * by the host, or a subordinate of the host, requesting allocation and
+  * configuration of the receive flow.
+  *
+  * @rx_ps_location:
+  * UDMAP receive flow PS words location configuration to be programmed into the
+  * rx_ps_location field of the flow's RFLOW_RFA register.
+  */
+ struct ti_sci_msg_rm_udmap_flow_cfg_req {
+       struct ti_sci_msg_hdr hdr;
+       u32 valid_params;
+       u16 nav_id;
+       u16 flow_index;
+       u8 rx_einfo_present;
+       u8 rx_psinfo_present;
+       u8 rx_error_handling;
+       u8 rx_desc_type;
+       u16 rx_sop_offset;
+       u16 rx_dest_qnum;
+       u8 rx_src_tag_hi;
+       u8 rx_src_tag_lo;
+       u8 rx_dest_tag_hi;
+       u8 rx_dest_tag_lo;
+       u8 rx_src_tag_hi_sel;
+       u8 rx_src_tag_lo_sel;
+       u8 rx_dest_tag_hi_sel;
+       u8 rx_dest_tag_lo_sel;
+       u16 rx_fdq0_sz0_qnum;
+       u16 rx_fdq1_qnum;
+       u16 rx_fdq2_qnum;
+       u16 rx_fdq3_qnum;
+       u8 rx_ps_location;
+ } __packed;
+ /**
+  * struct ti_sci_msg_req_proc_request - Request a processor
+  * @hdr:              Generic Header
+  * @processor_id:     ID of processor being requested
+  *
+  * Request type is TI_SCI_MSG_PROC_REQUEST, response is a generic ACK/NACK
+  * message.
+  */
+ struct ti_sci_msg_req_proc_request {
+       struct ti_sci_msg_hdr hdr;
+       u8 processor_id;
+ } __packed;
+ /**
+  * struct ti_sci_msg_req_proc_release - Release a processor
+  * @hdr:              Generic Header
+  * @processor_id:     ID of processor being released
+  *
+  * Request type is TI_SCI_MSG_PROC_RELEASE, response is a generic ACK/NACK
+  * message.
+  */
+ struct ti_sci_msg_req_proc_release {
+       struct ti_sci_msg_hdr hdr;
+       u8 processor_id;
+ } __packed;
+ /**
+  * struct ti_sci_msg_req_proc_handover - Handover a processor to a host
+  * @hdr:              Generic Header
+  * @processor_id:     ID of processor being handed over
+  * @host_id:          Host ID the control needs to be transferred to
+  *
+  * Request type is TI_SCI_MSG_PROC_HANDOVER, response is a generic ACK/NACK
+  * message.
+  */
+ struct ti_sci_msg_req_proc_handover {
+       struct ti_sci_msg_hdr hdr;
+       u8 processor_id;
+       u8 host_id;
+ } __packed;
+ /* Boot Vector masks */
+ #define TI_SCI_ADDR_LOW_MASK                  GENMASK_ULL(31, 0)
+ #define TI_SCI_ADDR_HIGH_MASK                 GENMASK_ULL(63, 32)
+ #define TI_SCI_ADDR_HIGH_SHIFT                        32
+ /**
+  * struct ti_sci_msg_req_set_config - Set Processor boot configuration
+  * @hdr:              Generic Header
+  * @processor_id:     ID of processor being configured
+  * @bootvector_low:   Lower 32 bit address (Little Endian) of boot vector
+  * @bootvector_high:  Higher 32 bit address (Little Endian) of boot vector
+  * @config_flags_set: Optional Processor specific Config Flags to set.
+  *                    Setting a bit here implies the corresponding mode
+  *                    will be set
+  * @config_flags_clear:       Optional Processor specific Config Flags to clear.
+  *                    Setting a bit here implies the corresponding mode
+  *                    will be cleared
+  *
+  * Request type is TI_SCI_MSG_PROC_HANDOVER, response is a generic ACK/NACK
+  * message.
+  */
+ struct ti_sci_msg_req_set_config {
+       struct ti_sci_msg_hdr hdr;
+       u8 processor_id;
+       u32 bootvector_low;
+       u32 bootvector_high;
+       u32 config_flags_set;
+       u32 config_flags_clear;
+ } __packed;
+ /**
+  * struct ti_sci_msg_req_set_ctrl - Set Processor boot control flags
+  * @hdr:              Generic Header
+  * @processor_id:     ID of processor being configured
+  * @control_flags_set:        Optional Processor specific Control Flags to set.
+  *                    Setting a bit here implies the corresponding mode
+  *                    will be set
+  * @control_flags_clear:Optional Processor specific Control Flags to clear.
+  *                    Setting a bit here implies the corresponding mode
+  *                    will be cleared
+  *
+  * Request type is TI_SCI_MSG_SET_CTRL, response is a generic ACK/NACK
+  * message.
+  */
+ struct ti_sci_msg_req_set_ctrl {
+       struct ti_sci_msg_hdr hdr;
+       u8 processor_id;
+       u32 control_flags_set;
+       u32 control_flags_clear;
+ } __packed;
+ /**
+  * struct ti_sci_msg_req_get_status - Processor boot status request
+  * @hdr:              Generic Header
+  * @processor_id:     ID of processor whose status is being requested
+  *
+  * Request type is TI_SCI_MSG_GET_STATUS, response is an appropriate
+  * message, or NACK in case of inability to satisfy request.
+  */
+ struct ti_sci_msg_req_get_status {
+       struct ti_sci_msg_hdr hdr;
+       u8 processor_id;
+ } __packed;
+ /**
+  * struct ti_sci_msg_resp_get_status - Processor boot status response
+  * @hdr:              Generic Header
+  * @processor_id:     ID of processor whose status is returned
+  * @bootvector_low:   Lower 32 bit address (Little Endian) of boot vector
+  * @bootvector_high:  Higher 32 bit address (Little Endian) of boot vector
+  * @config_flags:     Optional Processor specific Config Flags set currently
+  * @control_flags:    Optional Processor specific Control Flags set currently
+  * @status_flags:     Optional Processor specific Status Flags set currently
+  *
+  * Response structure to a TI_SCI_MSG_GET_STATUS request.
+  */
+ struct ti_sci_msg_resp_get_status {
+       struct ti_sci_msg_hdr hdr;
+       u8 processor_id;
+       u32 bootvector_low;
+       u32 bootvector_high;
+       u32 config_flags;
+       u32 control_flags;
+       u32 status_flags;
+ } __packed;
  #endif /* __TI_SCI_H */
diff --combined drivers/memory/Kconfig
index dbdee02bb5921cd6638582c46062700360912963,477f0f130e5b8d89c437d4b8ba9a5e71dcb98a05..9bddca292330104a92f7c697ac2d81cfb06f2801
@@@ -8,6 -8,14 +8,14 @@@ menuconfig MEMOR
  
  if MEMORY
  
+ config DDR
+       bool
+       help
+         Data from JEDEC specs for DDR SDRAM memories,
+         particularly the AC timing parameters and addressing
+         information. This data is useful for drivers handling
+         DDR SDRAM controllers.
  config ARM_PL172_MPMC
        tristate "ARM PL172 MPMC driver"
        depends on ARM_AMBA && OF
@@@ -123,7 -131,7 +131,7 @@@ config FSL_IF
  config JZ4780_NEMC
        bool "Ingenic JZ4780 SoC NEMC driver"
        default y
 -      depends on MACH_JZ4780 || COMPILE_TEST
 +      depends on MIPS || COMPILE_TEST
        depends on HAS_IOMEM && OF
        help
          This driver is for the NAND/External Memory Controller (NEMC) in
index 3065a8bc8fd6ba2026acb71265eef8d6f7a8cb9a,bc6bf263c859dff08ddfc87f5e3b4d3129733cdd..6827ed48475075b6b2569d8ed41c630e80350623
@@@ -1,8 -1,10 +1,8 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * DDR PHY Front End (DPFE) driver for Broadcom set top box SoCs
   *
   * Copyright (c) 2017 Broadcom
 - *
 - * Released under the GPLv2 only.
 - * SPDX-License-Identifier: GPL-2.0
   */
  
  /*
  #include <linux/io.h>
  #include <linux/module.h>
  #include <linux/of_address.h>
+ #include <linux/of_device.h>
  #include <linux/platform_device.h>
  
  #define DRVNAME                       "brcmstb-dpfe"
- #define FIRMWARE_NAME         "dpfe.bin"
  
  /* DCPU register offsets */
  #define REG_DCPU_RESET                0x0
@@@ -59,6 -61,7 +59,7 @@@
  #define DRAM_INFO_MR4         0x4
  #define DRAM_INFO_ERROR               0x8
  #define DRAM_INFO_MR4_MASK    0xff
+ #define DRAM_INFO_MR4_SHIFT   24      /* We need to look at byte 3 */
  
  /* DRAM MR4 Offsets & Masks */
  #define DRAM_MR4_REFRESH      0x0     /* Refresh rate */
  #define DRAM_MR4_TH_OFFS_MASK 0x3
  #define DRAM_MR4_TUF_MASK     0x1
  
- /* DRAM Vendor Offsets & Masks */
+ /* DRAM Vendor Offsets & Masks (API v2) */
  #define DRAM_VENDOR_MR5               0x0
  #define DRAM_VENDOR_MR6               0x4
  #define DRAM_VENDOR_MR7               0x8
  #define DRAM_VENDOR_MR8               0xc
  #define DRAM_VENDOR_ERROR     0x10
  #define DRAM_VENDOR_MASK      0xff
+ #define DRAM_VENDOR_SHIFT     24      /* We need to look at byte 3 */
+ /* DRAM Information Offsets & Masks (API v3) */
+ #define DRAM_DDR_INFO_MR4     0x0
+ #define DRAM_DDR_INFO_MR5     0x4
+ #define DRAM_DDR_INFO_MR6     0x8
+ #define DRAM_DDR_INFO_MR7     0xc
+ #define DRAM_DDR_INFO_MR8     0x10
+ #define DRAM_DDR_INFO_ERROR   0x14
+ #define DRAM_DDR_INFO_MASK    0xff
  
  /* Reset register bits & masks */
  #define DCPU_RESET_SHIFT      0x0
  #define DPFE_MSG_TYPE_COMMAND 1
  #define DPFE_MSG_TYPE_RESPONSE        2
  
- #define DELAY_LOOP_MAX                200000
+ #define DELAY_LOOP_MAX                1000
  
  enum dpfe_msg_fields {
        MSG_HEADER,
        MSG_ARG_COUNT,
        MSG_ARG0,
        MSG_CHKSUM,
-       MSG_FIELD_MAX /* Last entry */
+       MSG_FIELD_MAX   = 16 /* Max number of arguments */
  };
  
  enum dpfe_commands {
        DPFE_CMD_MAX /* Last entry */
  };
  
- struct dpfe_msg {
-       u32 header;
-       u32 command;
-       u32 arg_count;
-       u32 arg0;
-       u32 chksum; /* This is the sum of all other entries. */
- };
  /*
   * Format of the binary firmware file:
   *
@@@ -168,12 -173,21 +171,21 @@@ struct init_data 
        bool is_big_endian;
  };
  
+ /* API version and corresponding commands */
+ struct dpfe_api {
+       int version;
+       const char *fw_name;
+       const struct attribute_group **sysfs_attrs;
+       u32 command[DPFE_CMD_MAX][MSG_FIELD_MAX];
+ };
  /* Things we need for as long as we are active. */
  struct private_data {
        void __iomem *regs;
        void __iomem *dmem;
        void __iomem *imem;
        struct device *dev;
+       const struct dpfe_api *dpfe_api;
        struct mutex lock;
  };
  
@@@ -182,28 -196,99 +194,99 @@@ static const char *error_text[] = 
        "Incorrect checksum", "Malformed command", "Timed out",
  };
  
- /* List of supported firmware commands */
- static const u32 dpfe_commands[DPFE_CMD_MAX][MSG_FIELD_MAX] = {
-       [DPFE_CMD_GET_INFO] = {
-               [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
-               [MSG_COMMAND] = 1,
-               [MSG_ARG_COUNT] = 1,
-               [MSG_ARG0] = 1,
-               [MSG_CHKSUM] = 4,
-       },
-       [DPFE_CMD_GET_REFRESH] = {
-               [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
-               [MSG_COMMAND] = 2,
-               [MSG_ARG_COUNT] = 1,
-               [MSG_ARG0] = 1,
-               [MSG_CHKSUM] = 5,
-       },
-       [DPFE_CMD_GET_VENDOR] = {
-               [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
-               [MSG_COMMAND] = 2,
-               [MSG_ARG_COUNT] = 1,
-               [MSG_ARG0] = 2,
-               [MSG_CHKSUM] = 6,
+ /*
+  * Forward declaration of our sysfs attribute functions, so we can declare the
+  * attribute data structures early.
+  */
+ static ssize_t show_info(struct device *, struct device_attribute *, char *);
+ static ssize_t show_refresh(struct device *, struct device_attribute *, char *);
+ static ssize_t store_refresh(struct device *, struct device_attribute *,
+                         const char *, size_t);
+ static ssize_t show_vendor(struct device *, struct device_attribute *, char *);
+ static ssize_t show_dram(struct device *, struct device_attribute *, char *);
+ /*
+  * Declare our attributes early, so they can be referenced in the API data
+  * structure. We need to do this, because the attributes depend on the API
+  * version.
+  */
+ static DEVICE_ATTR(dpfe_info, 0444, show_info, NULL);
+ static DEVICE_ATTR(dpfe_refresh, 0644, show_refresh, store_refresh);
+ static DEVICE_ATTR(dpfe_vendor, 0444, show_vendor, NULL);
+ static DEVICE_ATTR(dpfe_dram, 0444, show_dram, NULL);
+ /* API v2 sysfs attributes */
+ static struct attribute *dpfe_v2_attrs[] = {
+       &dev_attr_dpfe_info.attr,
+       &dev_attr_dpfe_refresh.attr,
+       &dev_attr_dpfe_vendor.attr,
+       NULL
+ };
+ ATTRIBUTE_GROUPS(dpfe_v2);
+ /* API v3 sysfs attributes */
+ static struct attribute *dpfe_v3_attrs[] = {
+       &dev_attr_dpfe_info.attr,
+       &dev_attr_dpfe_dram.attr,
+       NULL
+ };
+ ATTRIBUTE_GROUPS(dpfe_v3);
+ /* API v2 firmware commands */
+ static const struct dpfe_api dpfe_api_v2 = {
+       .version = 2,
+       .fw_name = "dpfe.bin",
+       .sysfs_attrs = dpfe_v2_groups,
+       .command = {
+               [DPFE_CMD_GET_INFO] = {
+                       [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
+                       [MSG_COMMAND] = 1,
+                       [MSG_ARG_COUNT] = 1,
+                       [MSG_ARG0] = 1,
+                       [MSG_CHKSUM] = 4,
+               },
+               [DPFE_CMD_GET_REFRESH] = {
+                       [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
+                       [MSG_COMMAND] = 2,
+                       [MSG_ARG_COUNT] = 1,
+                       [MSG_ARG0] = 1,
+                       [MSG_CHKSUM] = 5,
+               },
+               [DPFE_CMD_GET_VENDOR] = {
+                       [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
+                       [MSG_COMMAND] = 2,
+                       [MSG_ARG_COUNT] = 1,
+                       [MSG_ARG0] = 2,
+                       [MSG_CHKSUM] = 6,
+               },
+       }
+ };
+ /* API v3 firmware commands */
+ static const struct dpfe_api dpfe_api_v3 = {
+       .version = 3,
+       .fw_name = NULL, /* We expect the firmware to have been downloaded! */
+       .sysfs_attrs = dpfe_v3_groups,
+       .command = {
+               [DPFE_CMD_GET_INFO] = {
+                       [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
+                       [MSG_COMMAND] = 0x0101,
+                       [MSG_ARG_COUNT] = 1,
+                       [MSG_ARG0] = 1,
+                       [MSG_CHKSUM] = 0x104,
+               },
+               [DPFE_CMD_GET_REFRESH] = {
+                       [MSG_HEADER] = DPFE_MSG_TYPE_COMMAND,
+                       [MSG_COMMAND] = 0x0202,
+                       [MSG_ARG_COUNT] = 0,
+                       /*
+                        * This is a bit ugly. Without arguments, the checksum
+                        * follows right after the argument count and not at
+                        * offset MSG_CHKSUM.
+                        */
+                       [MSG_ARG0] = 0x203,
+               },
+               /* There's no GET_VENDOR command in API v3. */
        },
  };
  
@@@ -248,13 -333,13 +331,13 @@@ static void __enable_dcpu(void __iomem 
        writel_relaxed(val, regs + REG_DCPU_RESET);
  }
  
- static unsigned int get_msg_chksum(const u32 msg[])
+ static unsigned int get_msg_chksum(const u32 msg[], unsigned int max)
  {
        unsigned int sum = 0;
        unsigned int i;
  
        /* Don't include the last field in the checksum. */
-       for (i = 0; i < MSG_FIELD_MAX - 1; i++)
+       for (i = 0; i < max; i++)
                sum += msg[i];
  
        return sum;
@@@ -267,6 -352,11 +350,11 @@@ static void __iomem *get_msg_ptr(struc
        unsigned int offset;
        void __iomem *ptr = NULL;
  
+       /* There is no need to use this function for API v3 or later. */
+       if (unlikely(priv->dpfe_api->version >= 3)) {
+               return NULL;
+       }
        msg_type = (response >> DRAM_MSG_TYPE_OFFSET) & DRAM_MSG_TYPE_MASK;
        offset = (response >> DRAM_MSG_ADDR_OFFSET) & DRAM_MSG_ADDR_MASK;
  
        return ptr;
  }
  
+ static void __finalize_command(struct private_data *priv)
+ {
+       unsigned int release_mbox;
+       /*
+        * It depends on the API version which MBOX register we have to write to
+        * to signal we are done.
+        */
+       release_mbox = (priv->dpfe_api->version < 3)
+                       ? REG_TO_HOST_MBOX : REG_TO_DCPU_MBOX;
+       writel_relaxed(0, priv->regs + release_mbox);
+ }
  static int __send_command(struct private_data *priv, unsigned int cmd,
                          u32 result[])
  {
-       const u32 *msg = dpfe_commands[cmd];
+       const u32 *msg = priv->dpfe_api->command[cmd];
        void __iomem *regs = priv->regs;
-       unsigned int i, chksum;
+       unsigned int i, chksum, chksum_idx;
        int ret = 0;
        u32 resp;
  
  
        mutex_lock(&priv->lock);
  
+       /* Wait for DCPU to become ready */
+       for (i = 0; i < DELAY_LOOP_MAX; i++) {
+               resp = readl_relaxed(regs + REG_TO_HOST_MBOX);
+               if (resp == 0)
+                       break;
+               msleep(1);
+       }
+       if (resp != 0) {
+               mutex_unlock(&priv->lock);
+               return -ETIMEDOUT;
+       }
        /* Write command and arguments to message area */
        for (i = 0; i < MSG_FIELD_MAX; i++)
                writel_relaxed(msg[i], regs + DCPU_MSG_RAM(i));
                resp = readl_relaxed(regs + REG_TO_HOST_MBOX);
                if (resp > 0)
                        break;
-               udelay(5);
+               msleep(1);
        }
  
        if (i == DELAY_LOOP_MAX) {
                /* Read response data */
                for (i = 0; i < MSG_FIELD_MAX; i++)
                        result[i] = readl_relaxed(regs + DCPU_MSG_RAM(i));
+               chksum_idx = result[MSG_ARG_COUNT] + MSG_ARG_COUNT + 1;
        }
  
        /* Tell DCPU we are done */
-       writel_relaxed(0, regs + REG_TO_HOST_MBOX);
+       __finalize_command(priv);
  
        mutex_unlock(&priv->lock);
  
                return ret;
  
        /* Verify response */
-       chksum = get_msg_chksum(result);
-       if (chksum != result[MSG_CHKSUM])
+       chksum = get_msg_chksum(result, chksum_idx);
+       if (chksum != result[chksum_idx])
                resp = DCPU_RET_ERR_CHKSUM;
  
        if (resp != DCPU_RET_SUCCESS) {
@@@ -484,7 -600,15 +598,15 @@@ static int brcmstb_dpfe_download_firmwa
                        return 0;
        }
  
-       ret = request_firmware(&fw, FIRMWARE_NAME, dev);
+       /*
+        * If the firmware filename is NULL it means the boot firmware has to
+        * download the DCPU firmware for us. If that didn't work, we have to
+        * bail, since downloading it ourselves wouldn't work either.
+        */
+       if (!priv->dpfe_api->fw_name)
+               return -ENODEV;
+       ret = request_firmware(&fw, priv->dpfe_api->fw_name, dev);
        /* request_firmware() prints its own error messages. */
        if (ret)
                return ret;
  }
  
  static ssize_t generic_show(unsigned int command, u32 response[],
-                           struct device *dev, char *buf)
+                           struct private_data *priv, char *buf)
  {
-       struct private_data *priv;
        int ret;
  
-       priv = dev_get_drvdata(dev);
        if (!priv)
                return sprintf(buf, "ERROR: driver private data not set\n");
  
@@@ -545,10 -667,12 +665,12 @@@ static ssize_t show_info(struct device 
                         char *buf)
  {
        u32 response[MSG_FIELD_MAX];
+       struct private_data *priv;
        unsigned int info;
        ssize_t ret;
  
-       ret = generic_show(DPFE_CMD_GET_INFO, response, dev, buf);
+       priv = dev_get_drvdata(dev);
+       ret = generic_show(DPFE_CMD_GET_INFO, response, priv, buf);
        if (ret)
                return ret;
  
@@@ -571,17 -695,17 +693,17 @@@ static ssize_t show_refresh(struct devi
        u32 mr4;
        ssize_t ret;
  
-       ret = generic_show(DPFE_CMD_GET_REFRESH, response, dev, buf);
+       priv = dev_get_drvdata(dev);
+       ret = generic_show(DPFE_CMD_GET_REFRESH, response, priv, buf);
        if (ret)
                return ret;
  
-       priv = dev_get_drvdata(dev);
        info = get_msg_ptr(priv, response[MSG_ARG0], buf, &ret);
        if (!info)
                return ret;
  
-       mr4 = readl_relaxed(info + DRAM_INFO_MR4) & DRAM_INFO_MR4_MASK;
+       mr4 = (readl_relaxed(info + DRAM_INFO_MR4) >> DRAM_INFO_MR4_SHIFT) &
+              DRAM_INFO_MR4_MASK;
  
        refresh = (mr4 >> DRAM_MR4_REFRESH) & DRAM_MR4_REFRESH_MASK;
        sr_abort = (mr4 >> DRAM_MR4_SR_ABORT) & DRAM_MR4_SR_ABORT_MASK;
@@@ -608,7 -732,6 +730,6 @@@ static ssize_t store_refresh(struct dev
                return -EINVAL;
  
        priv = dev_get_drvdata(dev);
        ret = __send_command(priv, DPFE_CMD_GET_REFRESH, response);
        if (ret)
                return ret;
  }
  
  static ssize_t show_vendor(struct device *dev, struct device_attribute *devattr,
-                        char *buf)
+                          char *buf)
  {
        u32 response[MSG_FIELD_MAX];
        struct private_data *priv;
        void __iomem *info;
        ssize_t ret;
+       u32 mr5, mr6, mr7, mr8, err;
  
-       ret = generic_show(DPFE_CMD_GET_VENDOR, response, dev, buf);
+       priv = dev_get_drvdata(dev);
+       ret = generic_show(DPFE_CMD_GET_VENDOR, response, priv, buf);
        if (ret)
                return ret;
  
-       priv = dev_get_drvdata(dev);
        info = get_msg_ptr(priv, response[MSG_ARG0], buf, &ret);
        if (!info)
                return ret;
  
-       return sprintf(buf, "%#x %#x %#x %#x %#x\n",
-                      readl_relaxed(info + DRAM_VENDOR_MR5) & DRAM_VENDOR_MASK,
-                      readl_relaxed(info + DRAM_VENDOR_MR6) & DRAM_VENDOR_MASK,
-                      readl_relaxed(info + DRAM_VENDOR_MR7) & DRAM_VENDOR_MASK,
-                      readl_relaxed(info + DRAM_VENDOR_MR8) & DRAM_VENDOR_MASK,
-                      readl_relaxed(info + DRAM_VENDOR_ERROR) &
-                                    DRAM_VENDOR_MASK);
+       mr5 = (readl_relaxed(info + DRAM_VENDOR_MR5) >> DRAM_VENDOR_SHIFT) &
+               DRAM_VENDOR_MASK;
+       mr6 = (readl_relaxed(info + DRAM_VENDOR_MR6) >> DRAM_VENDOR_SHIFT) &
+               DRAM_VENDOR_MASK;
+       mr7 = (readl_relaxed(info + DRAM_VENDOR_MR7) >> DRAM_VENDOR_SHIFT) &
+               DRAM_VENDOR_MASK;
+       mr8 = (readl_relaxed(info + DRAM_VENDOR_MR8) >> DRAM_VENDOR_SHIFT) &
+               DRAM_VENDOR_MASK;
+       err = readl_relaxed(info + DRAM_VENDOR_ERROR) & DRAM_VENDOR_MASK;
+       return sprintf(buf, "%#x %#x %#x %#x %#x\n", mr5, mr6, mr7, mr8, err);
+ }
+ static ssize_t show_dram(struct device *dev, struct device_attribute *devattr,
+                        char *buf)
+ {
+       u32 response[MSG_FIELD_MAX];
+       struct private_data *priv;
+       ssize_t ret;
+       u32 mr4, mr5, mr6, mr7, mr8, err;
+       priv = dev_get_drvdata(dev);
+       ret = generic_show(DPFE_CMD_GET_REFRESH, response, priv, buf);
+       if (ret)
+               return ret;
+       mr4 = response[MSG_ARG0 + 0] & DRAM_INFO_MR4_MASK;
+       mr5 = response[MSG_ARG0 + 1] & DRAM_DDR_INFO_MASK;
+       mr6 = response[MSG_ARG0 + 2] & DRAM_DDR_INFO_MASK;
+       mr7 = response[MSG_ARG0 + 3] & DRAM_DDR_INFO_MASK;
+       mr8 = response[MSG_ARG0 + 4] & DRAM_DDR_INFO_MASK;
+       err = response[MSG_ARG0 + 5] & DRAM_DDR_INFO_MASK;
+       return sprintf(buf, "%#x %#x %#x %#x %#x %#x\n", mr4, mr5, mr6, mr7,
+                       mr8, err);
  }
  
  static int brcmstb_dpfe_resume(struct platform_device *pdev)
        return brcmstb_dpfe_download_firmware(pdev, &init);
  }
  
- static DEVICE_ATTR(dpfe_info, 0444, show_info, NULL);
- static DEVICE_ATTR(dpfe_refresh, 0644, show_refresh, store_refresh);
- static DEVICE_ATTR(dpfe_vendor, 0444, show_vendor, NULL);
- static struct attribute *dpfe_attrs[] = {
-       &dev_attr_dpfe_info.attr,
-       &dev_attr_dpfe_refresh.attr,
-       &dev_attr_dpfe_vendor.attr,
-       NULL
- };
- ATTRIBUTE_GROUPS(dpfe);
  static int brcmstb_dpfe_probe(struct platform_device *pdev)
  {
        struct device *dev = &pdev->dev;
                return -ENOENT;
        }
  
+       priv->dpfe_api = of_device_get_match_data(dev);
+       if (unlikely(!priv->dpfe_api)) {
+               /*
+                * It should be impossible to end up here, but to be safe we
+                * check anyway.
+                */
+               dev_err(dev, "Couldn't determine API\n");
+               return -ENOENT;
+       }
        ret = brcmstb_dpfe_download_firmware(pdev, &init);
-       if (ret)
+       if (ret) {
+               dev_err(dev, "Couldn't download firmware -- %d\n", ret);
                return ret;
+       }
  
-       ret = sysfs_create_groups(&pdev->dev.kobj, dpfe_groups);
+       ret = sysfs_create_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs);
        if (!ret)
-               dev_info(dev, "registered.\n");
+               dev_info(dev, "registered with API v%d.\n",
+                        priv->dpfe_api->version);
  
        return ret;
  }
  
  static int brcmstb_dpfe_remove(struct platform_device *pdev)
  {
-       sysfs_remove_groups(&pdev->dev.kobj, dpfe_groups);
+       struct private_data *priv = dev_get_drvdata(&pdev->dev);
+       sysfs_remove_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs);
  
        return 0;
  }
  
  static const struct of_device_id brcmstb_dpfe_of_match[] = {
-       { .compatible = "brcm,dpfe-cpu", },
+       /* Use legacy API v2 for a select number of chips */
+       { .compatible = "brcm,bcm7268-dpfe-cpu", .data = &dpfe_api_v2 },
+       { .compatible = "brcm,bcm7271-dpfe-cpu", .data = &dpfe_api_v2 },
+       { .compatible = "brcm,bcm7278-dpfe-cpu", .data = &dpfe_api_v2 },
+       { .compatible = "brcm,bcm7211-dpfe-cpu", .data = &dpfe_api_v2 },
+       /* API v3 is the default going forward */
+       { .compatible = "brcm,dpfe-cpu", .data = &dpfe_api_v3 },
        {}
  };
  MODULE_DEVICE_TABLE(of, brcmstb_dpfe_of_match);
diff --combined drivers/memory/emif.c
index ee67a9a5d775acd8501da6276ea9c6a3c661caec,32cad7540d78b2411793c53f2d1d5ed594232453..402c6bc8e621d02ff69c924fe66bfb8d717c759e
@@@ -1,4 -1,3 +1,4 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * EMIF driver
   *
@@@ -6,6 -5,10 +6,6 @@@
   *
   * Aneesh V <[email protected]>
   * Santosh Shilimkar <[email protected]>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  #include <linux/err.h>
  #include <linux/kernel.h>
@@@ -23,8 -26,9 +23,9 @@@
  #include <linux/list.h>
  #include <linux/spinlock.h>
  #include <linux/pm.h>
- #include <memory/jedec_ddr.h>
  #include "emif.h"
+ #include "jedec_ddr.h"
  #include "of_memory.h"
  
  /**
index 0000000000000000000000000000000000000000,a2094a9a588efb9bed66a1ed65c66590c03b42de..4a21b5044ff88898169b8201bddfa7b7bb126b6d
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,175 +1,172 @@@
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
++/* SPDX-License-Identifier: GPL-2.0-only */
+ /*
+  * Definitions for DDR memories based on JEDEC specs
+  *
+  * Copyright (C) 2012 Texas Instruments, Inc.
+  *
+  * Aneesh V <[email protected]>
+  */
+ #ifndef __JEDEC_DDR_H
+ #define __JEDEC_DDR_H
+ #include <linux/types.h>
+ /* DDR Densities */
+ #define DDR_DENSITY_64Mb      1
+ #define DDR_DENSITY_128Mb     2
+ #define DDR_DENSITY_256Mb     3
+ #define DDR_DENSITY_512Mb     4
+ #define DDR_DENSITY_1Gb               5
+ #define DDR_DENSITY_2Gb               6
+ #define DDR_DENSITY_4Gb               7
+ #define DDR_DENSITY_8Gb               8
+ #define DDR_DENSITY_16Gb      9
+ #define DDR_DENSITY_32Gb      10
+ /* DDR type */
+ #define DDR_TYPE_DDR2         1
+ #define DDR_TYPE_DDR3         2
+ #define DDR_TYPE_LPDDR2_S4    3
+ #define DDR_TYPE_LPDDR2_S2    4
+ #define DDR_TYPE_LPDDR2_NVM   5
+ /* DDR IO width */
+ #define DDR_IO_WIDTH_4                1
+ #define DDR_IO_WIDTH_8                2
+ #define DDR_IO_WIDTH_16               3
+ #define DDR_IO_WIDTH_32               4
+ /* Number of Row bits */
+ #define R9                    9
+ #define R10                   10
+ #define R11                   11
+ #define R12                   12
+ #define R13                   13
+ #define R14                   14
+ #define R15                   15
+ #define R16                   16
+ /* Number of Column bits */
+ #define C7                    7
+ #define C8                    8
+ #define C9                    9
+ #define C10                   10
+ #define C11                   11
+ #define C12                   12
+ /* Number of Banks */
+ #define B1                    0
+ #define B2                    1
+ #define B4                    2
+ #define B8                    3
+ /* Refresh rate in nano-seconds */
+ #define T_REFI_15_6           15600
+ #define T_REFI_7_8            7800
+ #define T_REFI_3_9            3900
+ /* tRFC values */
+ #define T_RFC_90              90000
+ #define T_RFC_110             110000
+ #define T_RFC_130             130000
+ #define T_RFC_160             160000
+ #define T_RFC_210             210000
+ #define T_RFC_300             300000
+ #define T_RFC_350             350000
+ /* Mode register numbers */
+ #define DDR_MR0                       0
+ #define DDR_MR1                       1
+ #define DDR_MR2                       2
+ #define DDR_MR3                       3
+ #define DDR_MR4                       4
+ #define DDR_MR5                       5
+ #define DDR_MR6                       6
+ #define DDR_MR7                       7
+ #define DDR_MR8                       8
+ #define DDR_MR9                       9
+ #define DDR_MR10              10
+ #define DDR_MR11              11
+ #define DDR_MR16              16
+ #define DDR_MR17              17
+ #define DDR_MR18              18
+ /*
+  * LPDDR2 related defines
+  */
+ /* MR4 register fields */
+ #define MR4_SDRAM_REF_RATE_SHIFT                      0
+ #define MR4_SDRAM_REF_RATE_MASK                               7
+ #define MR4_TUF_SHIFT                                 7
+ #define MR4_TUF_MASK                                  (1 << 7)
+ /* MR4 SDRAM Refresh Rate field values */
+ #define SDRAM_TEMP_NOMINAL                            0x3
+ #define SDRAM_TEMP_RESERVED_4                         0x4
+ #define SDRAM_TEMP_HIGH_DERATE_REFRESH                        0x5
+ #define SDRAM_TEMP_HIGH_DERATE_REFRESH_AND_TIMINGS    0x6
+ #define SDRAM_TEMP_VERY_HIGH_SHUTDOWN                 0x7
+ #define NUM_DDR_ADDR_TABLE_ENTRIES                    11
+ #define NUM_DDR_TIMING_TABLE_ENTRIES                  4
+ /* Structure for DDR addressing info from the JEDEC spec */
+ struct lpddr2_addressing {
+       u32 num_banks;
+       u32 tREFI_ns;
+       u32 tRFCab_ps;
+ };
+ /*
+  * Structure for timings from the LPDDR2 datasheet
+  * All parameters are in pico seconds(ps) unless explicitly indicated
+  * with a suffix like tRAS_max_ns below
+  */
+ struct lpddr2_timings {
+       u32 max_freq;
+       u32 min_freq;
+       u32 tRPab;
+       u32 tRCD;
+       u32 tWR;
+       u32 tRAS_min;
+       u32 tRRD;
+       u32 tWTR;
+       u32 tXP;
+       u32 tRTP;
+       u32 tCKESR;
+       u32 tDQSCK_max;
+       u32 tDQSCK_max_derated;
+       u32 tFAW;
+       u32 tZQCS;
+       u32 tZQCL;
+       u32 tZQinit;
+       u32 tRAS_max_ns;
+ };
+ /*
+  * Min value for some parameters in terms of number of tCK cycles(nCK)
+  * Please set to zero parameters that are not valid for a given memory
+  * type
+  */
+ struct lpddr2_min_tck {
+       u32 tRPab;
+       u32 tRCD;
+       u32 tWR;
+       u32 tRASmin;
+       u32 tRRD;
+       u32 tWTR;
+       u32 tXP;
+       u32 tRTP;
+       u32 tCKE;
+       u32 tCKESR;
+       u32 tFAW;
+ };
+ extern const struct lpddr2_addressing
+       lpddr2_jedec_addressing_table[NUM_DDR_ADDR_TABLE_ENTRIES];
+ extern const struct lpddr2_timings
+       lpddr2_jedec_timings[NUM_DDR_TIMING_TABLE_ENTRIES];
+ extern const struct lpddr2_min_tck lpddr2_jedec_min_tck;
+ #endif /* __JEDEC_DDR_H */
index 0000000000000000000000000000000000000000,1f9ca0f23407aa534060f8aeb65821fee21aacfd..ed601d813175e7c723c2022932cc9431b13907ec
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,136 +1,133 @@@
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
++// SPDX-License-Identifier: GPL-2.0-only
+ /*
+  * DDR addressing details and AC timing parameters from JEDEC specs
+  *
+  * Copyright (C) 2012 Texas Instruments, Inc.
+  *
+  * Aneesh V <[email protected]>
+  */
+ #include <linux/export.h>
+ #include "jedec_ddr.h"
+ /* LPDDR2 addressing details from JESD209-2 section 2.4 */
+ const struct lpddr2_addressing
+       lpddr2_jedec_addressing_table[NUM_DDR_ADDR_TABLE_ENTRIES] = {
+       {B4, T_REFI_15_6, T_RFC_90}, /* 64M */
+       {B4, T_REFI_15_6, T_RFC_90}, /* 128M */
+       {B4, T_REFI_7_8,  T_RFC_90}, /* 256M */
+       {B4, T_REFI_7_8,  T_RFC_90}, /* 512M */
+       {B8, T_REFI_7_8, T_RFC_130}, /* 1GS4 */
+       {B8, T_REFI_3_9, T_RFC_130}, /* 2GS4 */
+       {B8, T_REFI_3_9, T_RFC_130}, /* 4G */
+       {B8, T_REFI_3_9, T_RFC_210}, /* 8G */
+       {B4, T_REFI_7_8, T_RFC_130}, /* 1GS2 */
+       {B4, T_REFI_3_9, T_RFC_130}, /* 2GS2 */
+ };
+ EXPORT_SYMBOL_GPL(lpddr2_jedec_addressing_table);
+ /* LPDDR2 AC timing parameters from JESD209-2 section 12 */
+ const struct lpddr2_timings
+       lpddr2_jedec_timings[NUM_DDR_TIMING_TABLE_ENTRIES] = {
+       /* Speed bin 400(200 MHz) */
+       [0] = {
+               .max_freq       = 200000000,
+               .min_freq       = 10000000,
+               .tRPab          = 21000,
+               .tRCD           = 18000,
+               .tWR            = 15000,
+               .tRAS_min       = 42000,
+               .tRRD           = 10000,
+               .tWTR           = 10000,
+               .tXP            = 7500,
+               .tRTP           = 7500,
+               .tCKESR         = 15000,
+               .tDQSCK_max     = 5500,
+               .tFAW           = 50000,
+               .tZQCS          = 90000,
+               .tZQCL          = 360000,
+               .tZQinit        = 1000000,
+               .tRAS_max_ns    = 70000,
+               .tDQSCK_max_derated = 6000,
+       },
+       /* Speed bin 533(266 MHz) */
+       [1] = {
+               .max_freq       = 266666666,
+               .min_freq       = 10000000,
+               .tRPab          = 21000,
+               .tRCD           = 18000,
+               .tWR            = 15000,
+               .tRAS_min       = 42000,
+               .tRRD           = 10000,
+               .tWTR           = 7500,
+               .tXP            = 7500,
+               .tRTP           = 7500,
+               .tCKESR         = 15000,
+               .tDQSCK_max     = 5500,
+               .tFAW           = 50000,
+               .tZQCS          = 90000,
+               .tZQCL          = 360000,
+               .tZQinit        = 1000000,
+               .tRAS_max_ns    = 70000,
+               .tDQSCK_max_derated = 6000,
+       },
+       /* Speed bin 800(400 MHz) */
+       [2] = {
+               .max_freq       = 400000000,
+               .min_freq       = 10000000,
+               .tRPab          = 21000,
+               .tRCD           = 18000,
+               .tWR            = 15000,
+               .tRAS_min       = 42000,
+               .tRRD           = 10000,
+               .tWTR           = 7500,
+               .tXP            = 7500,
+               .tRTP           = 7500,
+               .tCKESR         = 15000,
+               .tDQSCK_max     = 5500,
+               .tFAW           = 50000,
+               .tZQCS          = 90000,
+               .tZQCL          = 360000,
+               .tZQinit        = 1000000,
+               .tRAS_max_ns    = 70000,
+               .tDQSCK_max_derated = 6000,
+       },
+       /* Speed bin 1066(533 MHz) */
+       [3] = {
+               .max_freq       = 533333333,
+               .min_freq       = 10000000,
+               .tRPab          = 21000,
+               .tRCD           = 18000,
+               .tWR            = 15000,
+               .tRAS_min       = 42000,
+               .tRRD           = 10000,
+               .tWTR           = 7500,
+               .tXP            = 7500,
+               .tRTP           = 7500,
+               .tCKESR         = 15000,
+               .tDQSCK_max     = 5500,
+               .tFAW           = 50000,
+               .tZQCS          = 90000,
+               .tZQCL          = 360000,
+               .tZQinit        = 1000000,
+               .tRAS_max_ns    = 70000,
+               .tDQSCK_max_derated = 5620,
+       },
+ };
+ EXPORT_SYMBOL_GPL(lpddr2_jedec_timings);
+ const struct lpddr2_min_tck lpddr2_jedec_min_tck = {
+       .tRPab          = 3,
+       .tRCD           = 3,
+       .tWR            = 3,
+       .tRASmin        = 3,
+       .tRRD           = 2,
+       .tWTR           = 2,
+       .tXP            = 2,
+       .tRTP           = 2,
+       .tCKE           = 3,
+       .tCKESR         = 3,
+       .tFAW           = 8
+ };
+ EXPORT_SYMBOL_GPL(lpddr2_jedec_min_tck);
index 41f08b2effd2a4fdcb0224afed0c44a2ee9c23bd,6985a4e3332570689f4322ecb1adda0df6f2a915..5d0ccb2be20634b574be5366c8e766af4a93b63f
@@@ -1,6 -1,9 +1,6 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Copyright (C) 2014 NVIDIA CORPORATION.  All rights reserved.
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  
  #include <linux/of.h>
  #define MC_EMEM_ARB_MISC1                     0xdc
  #define MC_EMEM_ARB_RING1_THROTTLE            0xe0
  
- static const unsigned long tegra124_mc_emem_regs[] = {
-       MC_EMEM_ARB_CFG,
-       MC_EMEM_ARB_OUTSTANDING_REQ,
-       MC_EMEM_ARB_TIMING_RCD,
-       MC_EMEM_ARB_TIMING_RP,
-       MC_EMEM_ARB_TIMING_RC,
-       MC_EMEM_ARB_TIMING_RAS,
-       MC_EMEM_ARB_TIMING_FAW,
-       MC_EMEM_ARB_TIMING_RRD,
-       MC_EMEM_ARB_TIMING_RAP2PRE,
-       MC_EMEM_ARB_TIMING_WAP2PRE,
-       MC_EMEM_ARB_TIMING_R2R,
-       MC_EMEM_ARB_TIMING_W2W,
-       MC_EMEM_ARB_TIMING_R2W,
-       MC_EMEM_ARB_TIMING_W2R,
-       MC_EMEM_ARB_DA_TURNS,
-       MC_EMEM_ARB_DA_COVERS,
-       MC_EMEM_ARB_MISC0,
-       MC_EMEM_ARB_MISC1,
-       MC_EMEM_ARB_RING1_THROTTLE
- };
  static const struct tegra_mc_client tegra124_mc_clients[] = {
        {
                .id = 0x00,
@@@ -1046,6 -1027,28 +1024,28 @@@ static const struct tegra_mc_reset tegr
  };
  
  #ifdef CONFIG_ARCH_TEGRA_124_SOC
+ static const unsigned long tegra124_mc_emem_regs[] = {
+       MC_EMEM_ARB_CFG,
+       MC_EMEM_ARB_OUTSTANDING_REQ,
+       MC_EMEM_ARB_TIMING_RCD,
+       MC_EMEM_ARB_TIMING_RP,
+       MC_EMEM_ARB_TIMING_RC,
+       MC_EMEM_ARB_TIMING_RAS,
+       MC_EMEM_ARB_TIMING_FAW,
+       MC_EMEM_ARB_TIMING_RRD,
+       MC_EMEM_ARB_TIMING_RAP2PRE,
+       MC_EMEM_ARB_TIMING_WAP2PRE,
+       MC_EMEM_ARB_TIMING_R2R,
+       MC_EMEM_ARB_TIMING_W2W,
+       MC_EMEM_ARB_TIMING_R2W,
+       MC_EMEM_ARB_TIMING_W2R,
+       MC_EMEM_ARB_DA_TURNS,
+       MC_EMEM_ARB_DA_COVERS,
+       MC_EMEM_ARB_MISC0,
+       MC_EMEM_ARB_MISC1,
+       MC_EMEM_ARB_RING1_THROTTLE
+ };
  static const struct tegra_smmu_soc tegra124_smmu_soc = {
        .clients = tegra124_mc_clients,
        .num_clients = ARRAY_SIZE(tegra124_mc_clients),
index b1bd8e2543ac529b1c581c4617e192bf89bca1a0,9fb5293469f8ba19a117d3e722d06932d04b0f6b..f924ae8c65141a6d968e200b075123380a72a256
@@@ -16,6 -16,9 +16,9 @@@
  #define IMX8MQ_SW_INFO_B1             0x40
  #define IMX8MQ_SW_MAGIC_B1            0xff0055aa
  
+ /* Same as ANADIG_DIGPROG_IMX7D */
+ #define ANADIG_DIGPROG_IMX8MM 0x800
  struct imx8_soc_data {
        char *name;
        u32 (*soc_revision)(void);
@@@ -46,13 -49,45 +49,45 @@@ out
        return rev;
  }
  
+ static u32 __init imx8mm_soc_revision(void)
+ {
+       struct device_node *np;
+       void __iomem *anatop_base;
+       u32 rev;
+       np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-anatop");
+       if (!np)
+               return 0;
+       anatop_base = of_iomap(np, 0);
+       WARN_ON(!anatop_base);
+       rev = readl_relaxed(anatop_base + ANADIG_DIGPROG_IMX8MM);
+       iounmap(anatop_base);
+       of_node_put(np);
+       return rev;
+ }
  static const struct imx8_soc_data imx8mq_soc_data = {
        .name = "i.MX8MQ",
        .soc_revision = imx8mq_soc_revision,
  };
  
+ static const struct imx8_soc_data imx8mm_soc_data = {
+       .name = "i.MX8MM",
+       .soc_revision = imx8mm_soc_revision,
+ };
+ static const struct imx8_soc_data imx8mn_soc_data = {
+       .name = "i.MX8MN",
+       .soc_revision = imx8mm_soc_revision,
+ };
  static const struct of_device_id imx8_soc_match[] = {
        { .compatible = "fsl,imx8mq", .data = &imx8mq_soc_data, },
+       { .compatible = "fsl,imx8mm", .data = &imx8mm_soc_data, },
+       { .compatible = "fsl,imx8mn", .data = &imx8mn_soc_data, },
        { }
  };
  
@@@ -65,7 -100,6 +100,6 @@@ static int __init imx8_soc_init(void
  {
        struct soc_device_attribute *soc_dev_attr;
        struct soc_device *soc_dev;
-       struct device_node *root;
        const struct of_device_id *id;
        u32 soc_rev = 0;
        const struct imx8_soc_data *data;
  
        soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
        if (!soc_dev_attr)
-               return -ENODEV;
+               return -ENOMEM;
  
        soc_dev_attr->family = "Freescale i.MX";
  
-       root = of_find_node_by_path("/");
-       ret = of_property_read_string(root, "model", &soc_dev_attr->machine);
+       ret = of_property_read_string(of_root, "model", &soc_dev_attr->machine);
        if (ret)
                goto free_soc;
  
-       id = of_match_node(imx8_soc_match, root);
-       if (!id)
+       id = of_match_node(imx8_soc_match, of_root);
+       if (!id) {
+               ret = -ENODEV;
                goto free_soc;
-       of_node_put(root);
+       }
  
        data = id->data;
        if (data) {
        }
  
        soc_dev_attr->revision = imx8_revision(soc_rev);
-       if (!soc_dev_attr->revision)
+       if (!soc_dev_attr->revision) {
+               ret = -ENOMEM;
                goto free_soc;
+       }
  
        soc_dev = soc_device_register(soc_dev_attr);
-       if (IS_ERR(soc_dev))
+       if (IS_ERR(soc_dev)) {
+               ret = PTR_ERR(soc_dev);
                goto free_rev;
+       }
  
 +      if (IS_ENABLED(CONFIG_ARM_IMX_CPUFREQ_DT))
 +              platform_device_register_simple("imx-cpufreq-dt", -1, NULL, 0);
 +
        return 0;
  
  free_rev:
-       kfree(soc_dev_attr->revision);
+       if (strcmp(soc_dev_attr->revision, "unknown"))
+               kfree(soc_dev_attr->revision);
  free_soc:
        kfree(soc_dev_attr);
-       of_node_put(root);
-       return -ENODEV;
+       return ret;
  }
  device_initcall(imx8_soc_init);
index 3342332cc0075b37d6394f0597e8e36bf0ffbb1c,3ffa84945feca7d79c6693c52c8b67c175aaf173..54eb6cfc5d5b1b96bee2232f16abfbe39f19f23c
@@@ -1,8 -1,11 +1,8 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Rockchip Generic power domain support.
   *
   * Copyright (c) 2015 ROCKCHIP, Co. Ltd.
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  
  #include <linux/io.h>
@@@ -86,47 -89,47 +86,47 @@@ struct rockchip_pmu 
  #define to_rockchip_pd(gpd) container_of(gpd, struct rockchip_pm_domain, genpd)
  
  #define DOMAIN(pwr, status, req, idle, ack, wakeup)   \
- {                                             \
-       .pwr_mask = (pwr >= 0) ? BIT(pwr) : 0,          \
-       .status_mask = (status >= 0) ? BIT(status) : 0, \
-       .req_mask = (req >= 0) ? BIT(req) : 0,          \
-       .idle_mask = (idle >= 0) ? BIT(idle) : 0,       \
-       .ack_mask = (ack >= 0) ? BIT(ack) : 0,          \
-       .active_wakeup = wakeup,                        \
+ {                                                     \
+       .pwr_mask = (pwr),                              \
+       .status_mask = (status),                        \
+       .req_mask = (req),                              \
+       .idle_mask = (idle),                            \
+       .ack_mask = (ack),                              \
+       .active_wakeup = (wakeup),                      \
  }
  
  #define DOMAIN_M(pwr, status, req, idle, ack, wakeup) \
  {                                                     \
-       .pwr_w_mask = (pwr >= 0) ? BIT(pwr + 16) : 0,   \
-       .pwr_mask = (pwr >= 0) ? BIT(pwr) : 0,          \
-       .status_mask = (status >= 0) ? BIT(status) : 0, \
-       .req_w_mask = (req >= 0) ?  BIT(req + 16) : 0,  \
-       .req_mask = (req >= 0) ?  BIT(req) : 0,         \
-       .idle_mask = (idle >= 0) ? BIT(idle) : 0,       \
-       .ack_mask = (ack >= 0) ? BIT(ack) : 0,          \
+       .pwr_w_mask = (pwr) << 16,                      \
+       .pwr_mask = (pwr),                              \
+       .status_mask = (status),                        \
+       .req_w_mask = (req) << 16,                      \
+       .req_mask = (req),                              \
+       .idle_mask = (idle),                            \
+       .ack_mask = (ack),                              \
        .active_wakeup = wakeup,                        \
  }
  
  #define DOMAIN_RK3036(req, ack, idle, wakeup)         \
  {                                                     \
-       .req_mask = (req >= 0) ? BIT(req) : 0,          \
-       .req_w_mask = (req >= 0) ?  BIT(req + 16) : 0,  \
-       .ack_mask = (ack >= 0) ? BIT(ack) : 0,          \
-       .idle_mask = (idle >= 0) ? BIT(idle) : 0,       \
+       .req_mask = (req),                              \
+       .req_w_mask = (req) << 16,                      \
+       .ack_mask = (ack),                              \
+       .idle_mask = (idle),                            \
        .active_wakeup = wakeup,                        \
  }
  
  #define DOMAIN_PX30(pwr, status, req, wakeup)         \
-       DOMAIN_M(pwr, status, req, (req) + 16, req, wakeup)
+       DOMAIN_M(pwr, status, req, (req) << 16, req, wakeup)
  
  #define DOMAIN_RK3288(pwr, status, req, wakeup)               \
-       DOMAIN(pwr, status, req, req, (req) + 16, wakeup)
+       DOMAIN(pwr, status, req, req, (req) << 16, wakeup)
  
  #define DOMAIN_RK3328(pwr, status, req, wakeup)               \
-       DOMAIN_M(pwr, pwr, req, (req) + 10, req, wakeup)
+       DOMAIN_M(pwr, pwr, req, (req) << 10, req, wakeup)
  
  #define DOMAIN_RK3368(pwr, status, req, wakeup)               \
-       DOMAIN(pwr, status, req, (req) + 16, req, wakeup)
+       DOMAIN(pwr, status, req, (req) << 16, req, wakeup)
  
  #define DOMAIN_RK3399(pwr, status, req, wakeup)               \
        DOMAIN(pwr, status, req, req, req, wakeup)
@@@ -716,129 -719,129 +716,129 @@@ err_out
  }
  
  static const struct rockchip_domain_info px30_pm_domains[] = {
-       [PX30_PD_USB]           = DOMAIN_PX30(5, 5, 10, false),
-       [PX30_PD_SDCARD]        = DOMAIN_PX30(8, 8, 9, false),
-       [PX30_PD_GMAC]          = DOMAIN_PX30(10, 10, 6, false),
-       [PX30_PD_MMC_NAND]      = DOMAIN_PX30(11, 11, 5, false),
-       [PX30_PD_VPU]           = DOMAIN_PX30(12, 12, 14, false),
-       [PX30_PD_VO]            = DOMAIN_PX30(13, 13, 7, false),
-       [PX30_PD_VI]            = DOMAIN_PX30(14, 14, 8, false),
-       [PX30_PD_GPU]           = DOMAIN_PX30(15, 15, 2, false),
+       [PX30_PD_USB]           = DOMAIN_PX30(BIT(5),  BIT(5),  BIT(10), false),
+       [PX30_PD_SDCARD]        = DOMAIN_PX30(BIT(8),  BIT(8),  BIT(9),  false),
+       [PX30_PD_GMAC]          = DOMAIN_PX30(BIT(10), BIT(10), BIT(6),  false),
+       [PX30_PD_MMC_NAND]      = DOMAIN_PX30(BIT(11), BIT(11), BIT(5),  false),
+       [PX30_PD_VPU]           = DOMAIN_PX30(BIT(12), BIT(12), BIT(14), false),
+       [PX30_PD_VO]            = DOMAIN_PX30(BIT(13), BIT(13), BIT(7),  false),
+       [PX30_PD_VI]            = DOMAIN_PX30(BIT(14), BIT(14), BIT(8),  false),
+       [PX30_PD_GPU]           = DOMAIN_PX30(BIT(15), BIT(15), BIT(2),  false),
  };
  
  static const struct rockchip_domain_info rk3036_pm_domains[] = {
-       [RK3036_PD_MSCH]        = DOMAIN_RK3036(14, 23, 30, true),
-       [RK3036_PD_CORE]        = DOMAIN_RK3036(13, 17, 24, false),
-       [RK3036_PD_PERI]        = DOMAIN_RK3036(12, 18, 25, false),
-       [RK3036_PD_VIO]         = DOMAIN_RK3036(11, 19, 26, false),
-       [RK3036_PD_VPU]         = DOMAIN_RK3036(10, 20, 27, false),
-       [RK3036_PD_GPU]         = DOMAIN_RK3036(9, 21, 28, false),
-       [RK3036_PD_SYS]         = DOMAIN_RK3036(8, 22, 29, false),
+       [RK3036_PD_MSCH]        = DOMAIN_RK3036(BIT(14), BIT(23), BIT(30), true),
+       [RK3036_PD_CORE]        = DOMAIN_RK3036(BIT(13), BIT(17), BIT(24), false),
+       [RK3036_PD_PERI]        = DOMAIN_RK3036(BIT(12), BIT(18), BIT(25), false),
+       [RK3036_PD_VIO]         = DOMAIN_RK3036(BIT(11), BIT(19), BIT(26), false),
+       [RK3036_PD_VPU]         = DOMAIN_RK3036(BIT(10), BIT(20), BIT(27), false),
+       [RK3036_PD_GPU]         = DOMAIN_RK3036(BIT(9),  BIT(21), BIT(28), false),
+       [RK3036_PD_SYS]         = DOMAIN_RK3036(BIT(8),  BIT(22), BIT(29), false),
  };
  
  static const struct rockchip_domain_info rk3066_pm_domains[] = {
-       [RK3066_PD_GPU]         = DOMAIN(9, 9, 3, 24, 29, false),
-       [RK3066_PD_VIDEO]       = DOMAIN(8, 8, 4, 23, 28, false),
-       [RK3066_PD_VIO]         = DOMAIN(7, 7, 5, 22, 27, false),
-       [RK3066_PD_PERI]        = DOMAIN(6, 6, 2, 25, 30, false),
-       [RK3066_PD_CPU]         = DOMAIN(-1, 5, 1, 26, 31, false),
+       [RK3066_PD_GPU]         = DOMAIN(BIT(9), BIT(9), BIT(3), BIT(24), BIT(29), false),
+       [RK3066_PD_VIDEO]       = DOMAIN(BIT(8), BIT(8), BIT(4), BIT(23), BIT(28), false),
+       [RK3066_PD_VIO]         = DOMAIN(BIT(7), BIT(7), BIT(5), BIT(22), BIT(27), false),
+       [RK3066_PD_PERI]        = DOMAIN(BIT(6), BIT(6), BIT(2), BIT(25), BIT(30), false),
+       [RK3066_PD_CPU]         = DOMAIN(0,      BIT(5), BIT(1), BIT(26), BIT(31), false),
  };
  
  static const struct rockchip_domain_info rk3128_pm_domains[] = {
-       [RK3128_PD_CORE]        = DOMAIN_RK3288(0, 0, 4, false),
-       [RK3128_PD_MSCH]        = DOMAIN_RK3288(-1, -1, 6, true),
-       [RK3128_PD_VIO]         = DOMAIN_RK3288(3, 3, 2, false),
-       [RK3128_PD_VIDEO]       = DOMAIN_RK3288(2, 2, 1, false),
-       [RK3128_PD_GPU]         = DOMAIN_RK3288(1, 1, 3, false),
+       [RK3128_PD_CORE]        = DOMAIN_RK3288(BIT(0), BIT(0), BIT(4), false),
+       [RK3128_PD_MSCH]        = DOMAIN_RK3288(0,      0,      BIT(6), true),
+       [RK3128_PD_VIO]         = DOMAIN_RK3288(BIT(3), BIT(3), BIT(2), false),
+       [RK3128_PD_VIDEO]       = DOMAIN_RK3288(BIT(2), BIT(2), BIT(1), false),
+       [RK3128_PD_GPU]         = DOMAIN_RK3288(BIT(1), BIT(1), BIT(3), false),
  };
  
  static const struct rockchip_domain_info rk3188_pm_domains[] = {
-       [RK3188_PD_GPU]         = DOMAIN(9, 9, 3, 24, 29, false),
-       [RK3188_PD_VIDEO]       = DOMAIN(8, 8, 4, 23, 28, false),
-       [RK3188_PD_VIO]         = DOMAIN(7, 7, 5, 22, 27, false),
-       [RK3188_PD_PERI]        = DOMAIN(6, 6, 2, 25, 30, false),
-       [RK3188_PD_CPU]         = DOMAIN(5, 5, 1, 26, 31, false),
+       [RK3188_PD_GPU]         = DOMAIN(BIT(9), BIT(9), BIT(3), BIT(24), BIT(29), false),
+       [RK3188_PD_VIDEO]       = DOMAIN(BIT(8), BIT(8), BIT(4), BIT(23), BIT(28), false),
+       [RK3188_PD_VIO]         = DOMAIN(BIT(7), BIT(7), BIT(5), BIT(22), BIT(27), false),
+       [RK3188_PD_PERI]        = DOMAIN(BIT(6), BIT(6), BIT(2), BIT(25), BIT(30), false),
+       [RK3188_PD_CPU]         = DOMAIN(BIT(5), BIT(5), BIT(1), BIT(26), BIT(31), false),
  };
  
  static const struct rockchip_domain_info rk3228_pm_domains[] = {
-       [RK3228_PD_CORE]        = DOMAIN_RK3036(0, 0, 16, true),
-       [RK3228_PD_MSCH]        = DOMAIN_RK3036(1, 1, 17, true),
-       [RK3228_PD_BUS]         = DOMAIN_RK3036(2, 2, 18, true),
-       [RK3228_PD_SYS]         = DOMAIN_RK3036(3, 3, 19, true),
-       [RK3228_PD_VIO]         = DOMAIN_RK3036(4, 4, 20, false),
-       [RK3228_PD_VOP]         = DOMAIN_RK3036(5, 5, 21, false),
-       [RK3228_PD_VPU]         = DOMAIN_RK3036(6, 6, 22, false),
-       [RK3228_PD_RKVDEC]      = DOMAIN_RK3036(7, 7, 23, false),
-       [RK3228_PD_GPU]         = DOMAIN_RK3036(8, 8, 24, false),
-       [RK3228_PD_PERI]        = DOMAIN_RK3036(9, 9, 25, true),
-       [RK3228_PD_GMAC]        = DOMAIN_RK3036(10, 10, 26, false),
+       [RK3228_PD_CORE]        = DOMAIN_RK3036(BIT(0),  BIT(0),  BIT(16), true),
+       [RK3228_PD_MSCH]        = DOMAIN_RK3036(BIT(1),  BIT(1),  BIT(17), true),
+       [RK3228_PD_BUS]         = DOMAIN_RK3036(BIT(2),  BIT(2),  BIT(18), true),
+       [RK3228_PD_SYS]         = DOMAIN_RK3036(BIT(3),  BIT(3),  BIT(19), true),
+       [RK3228_PD_VIO]         = DOMAIN_RK3036(BIT(4),  BIT(4),  BIT(20), false),
+       [RK3228_PD_VOP]         = DOMAIN_RK3036(BIT(5),  BIT(5),  BIT(21), false),
+       [RK3228_PD_VPU]         = DOMAIN_RK3036(BIT(6),  BIT(6),  BIT(22), false),
+       [RK3228_PD_RKVDEC]      = DOMAIN_RK3036(BIT(7),  BIT(7),  BIT(23), false),
+       [RK3228_PD_GPU]         = DOMAIN_RK3036(BIT(8),  BIT(8),  BIT(24), false),
+       [RK3228_PD_PERI]        = DOMAIN_RK3036(BIT(9),  BIT(9),  BIT(25), true),
+       [RK3228_PD_GMAC]        = DOMAIN_RK3036(BIT(10), BIT(10), BIT(26), false),
  };
  
  static const struct rockchip_domain_info rk3288_pm_domains[] = {
-       [RK3288_PD_VIO]         = DOMAIN_RK3288(7, 7, 4, false),
-       [RK3288_PD_HEVC]        = DOMAIN_RK3288(14, 10, 9, false),
-       [RK3288_PD_VIDEO]       = DOMAIN_RK3288(8, 8, 3, false),
-       [RK3288_PD_GPU]         = DOMAIN_RK3288(9, 9, 2, false),
+       [RK3288_PD_VIO]         = DOMAIN_RK3288(BIT(7),  BIT(7),  BIT(4), false),
+       [RK3288_PD_HEVC]        = DOMAIN_RK3288(BIT(14), BIT(10), BIT(9), false),
+       [RK3288_PD_VIDEO]       = DOMAIN_RK3288(BIT(8),  BIT(8),  BIT(3), false),
+       [RK3288_PD_GPU]         = DOMAIN_RK3288(BIT(9),  BIT(9),  BIT(2), false),
  };
  
  static const struct rockchip_domain_info rk3328_pm_domains[] = {
-       [RK3328_PD_CORE]        = DOMAIN_RK3328(-1, 0, 0, false),
-       [RK3328_PD_GPU]         = DOMAIN_RK3328(-1, 1, 1, false),
-       [RK3328_PD_BUS]         = DOMAIN_RK3328(-1, 2, 2, true),
-       [RK3328_PD_MSCH]        = DOMAIN_RK3328(-1, 3, 3, true),
-       [RK3328_PD_PERI]        = DOMAIN_RK3328(-1, 4, 4, true),
-       [RK3328_PD_VIDEO]       = DOMAIN_RK3328(-1, 5, 5, false),
-       [RK3328_PD_HEVC]        = DOMAIN_RK3328(-1, 6, 6, false),
-       [RK3328_PD_VIO]         = DOMAIN_RK3328(-1, 8, 8, false),
-       [RK3328_PD_VPU]         = DOMAIN_RK3328(-1, 9, 9, false),
+       [RK3328_PD_CORE]        = DOMAIN_RK3328(0, BIT(0), BIT(0), false),
+       [RK3328_PD_GPU]         = DOMAIN_RK3328(0, BIT(1), BIT(1), false),
+       [RK3328_PD_BUS]         = DOMAIN_RK3328(0, BIT(2), BIT(2), true),
+       [RK3328_PD_MSCH]        = DOMAIN_RK3328(0, BIT(3), BIT(3), true),
+       [RK3328_PD_PERI]        = DOMAIN_RK3328(0, BIT(4), BIT(4), true),
+       [RK3328_PD_VIDEO]       = DOMAIN_RK3328(0, BIT(5), BIT(5), false),
+       [RK3328_PD_HEVC]        = DOMAIN_RK3328(0, BIT(6), BIT(6), false),
+       [RK3328_PD_VIO]         = DOMAIN_RK3328(0, BIT(8), BIT(8), false),
+       [RK3328_PD_VPU]         = DOMAIN_RK3328(0, BIT(9), BIT(9), false),
  };
  
  static const struct rockchip_domain_info rk3366_pm_domains[] = {
-       [RK3366_PD_PERI]        = DOMAIN_RK3368(10, 10, 6, true),
-       [RK3366_PD_VIO]         = DOMAIN_RK3368(14, 14, 8, false),
-       [RK3366_PD_VIDEO]       = DOMAIN_RK3368(13, 13, 7, false),
-       [RK3366_PD_RKVDEC]      = DOMAIN_RK3368(11, 11, 7, false),
-       [RK3366_PD_WIFIBT]      = DOMAIN_RK3368(8, 8, 9, false),
-       [RK3366_PD_VPU]         = DOMAIN_RK3368(12, 12, 7, false),
-       [RK3366_PD_GPU]         = DOMAIN_RK3368(15, 15, 2, false),
+       [RK3366_PD_PERI]        = DOMAIN_RK3368(BIT(10), BIT(10), BIT(6), true),
+       [RK3366_PD_VIO]         = DOMAIN_RK3368(BIT(14), BIT(14), BIT(8), false),
+       [RK3366_PD_VIDEO]       = DOMAIN_RK3368(BIT(13), BIT(13), BIT(7), false),
+       [RK3366_PD_RKVDEC]      = DOMAIN_RK3368(BIT(11), BIT(11), BIT(7), false),
+       [RK3366_PD_WIFIBT]      = DOMAIN_RK3368(BIT(8),  BIT(8),  BIT(9), false),
+       [RK3366_PD_VPU]         = DOMAIN_RK3368(BIT(12), BIT(12), BIT(7), false),
+       [RK3366_PD_GPU]         = DOMAIN_RK3368(BIT(15), BIT(15), BIT(2), false),
  };
  
  static const struct rockchip_domain_info rk3368_pm_domains[] = {
-       [RK3368_PD_PERI]        = DOMAIN_RK3368(13, 12, 6, true),
-       [RK3368_PD_VIO]         = DOMAIN_RK3368(15, 14, 8, false),
-       [RK3368_PD_VIDEO]       = DOMAIN_RK3368(14, 13, 7, false),
-       [RK3368_PD_GPU_0]       = DOMAIN_RK3368(16, 15, 2, false),
-       [RK3368_PD_GPU_1]       = DOMAIN_RK3368(17, 16, 2, false),
+       [RK3368_PD_PERI]        = DOMAIN_RK3368(BIT(13), BIT(12), BIT(6), true),
+       [RK3368_PD_VIO]         = DOMAIN_RK3368(BIT(15), BIT(14), BIT(8), false),
+       [RK3368_PD_VIDEO]       = DOMAIN_RK3368(BIT(14), BIT(13), BIT(7), false),
+       [RK3368_PD_GPU_0]       = DOMAIN_RK3368(BIT(16), BIT(15), BIT(2), false),
+       [RK3368_PD_GPU_1]       = DOMAIN_RK3368(BIT(17), BIT(16), BIT(2), false),
  };
  
  static const struct rockchip_domain_info rk3399_pm_domains[] = {
-       [RK3399_PD_TCPD0]       = DOMAIN_RK3399(8, 8, -1, false),
-       [RK3399_PD_TCPD1]       = DOMAIN_RK3399(9, 9, -1, false),
-       [RK3399_PD_CCI]         = DOMAIN_RK3399(10, 10, -1, true),
-       [RK3399_PD_CCI0]        = DOMAIN_RK3399(-1, -1, 15, true),
-       [RK3399_PD_CCI1]        = DOMAIN_RK3399(-1, -1, 16, true),
-       [RK3399_PD_PERILP]      = DOMAIN_RK3399(11, 11, 1, true),
-       [RK3399_PD_PERIHP]      = DOMAIN_RK3399(12, 12, 2, true),
-       [RK3399_PD_CENTER]      = DOMAIN_RK3399(13, 13, 14, true),
-       [RK3399_PD_VIO]         = DOMAIN_RK3399(14, 14, 17, false),
-       [RK3399_PD_GPU]         = DOMAIN_RK3399(15, 15, 0, false),
-       [RK3399_PD_VCODEC]      = DOMAIN_RK3399(16, 16, 3, false),
-       [RK3399_PD_VDU]         = DOMAIN_RK3399(17, 17, 4, false),
-       [RK3399_PD_RGA]         = DOMAIN_RK3399(18, 18, 5, false),
-       [RK3399_PD_IEP]         = DOMAIN_RK3399(19, 19, 6, false),
-       [RK3399_PD_VO]          = DOMAIN_RK3399(20, 20, -1, false),
-       [RK3399_PD_VOPB]        = DOMAIN_RK3399(-1, -1, 7, false),
-       [RK3399_PD_VOPL]        = DOMAIN_RK3399(-1, -1, 8, false),
-       [RK3399_PD_ISP0]        = DOMAIN_RK3399(22, 22, 9, false),
-       [RK3399_PD_ISP1]        = DOMAIN_RK3399(23, 23, 10, false),
-       [RK3399_PD_HDCP]        = DOMAIN_RK3399(24, 24, 11, false),
-       [RK3399_PD_GMAC]        = DOMAIN_RK3399(25, 25, 23, true),
-       [RK3399_PD_EMMC]        = DOMAIN_RK3399(26, 26, 24, true),
-       [RK3399_PD_USB3]        = DOMAIN_RK3399(27, 27, 12, true),
-       [RK3399_PD_EDP]         = DOMAIN_RK3399(28, 28, 22, false),
-       [RK3399_PD_GIC]         = DOMAIN_RK3399(29, 29, 27, true),
-       [RK3399_PD_SD]          = DOMAIN_RK3399(30, 30, 28, true),
-       [RK3399_PD_SDIOAUDIO]   = DOMAIN_RK3399(31, 31, 29, true),
+       [RK3399_PD_TCPD0]       = DOMAIN_RK3399(BIT(8),  BIT(8),  0,       false),
+       [RK3399_PD_TCPD1]       = DOMAIN_RK3399(BIT(9),  BIT(9),  0,       false),
+       [RK3399_PD_CCI]         = DOMAIN_RK3399(BIT(10), BIT(10), 0,       true),
+       [RK3399_PD_CCI0]        = DOMAIN_RK3399(0,       0,       BIT(15), true),
+       [RK3399_PD_CCI1]        = DOMAIN_RK3399(0,       0,       BIT(16), true),
+       [RK3399_PD_PERILP]      = DOMAIN_RK3399(BIT(11), BIT(11), BIT(1),  true),
+       [RK3399_PD_PERIHP]      = DOMAIN_RK3399(BIT(12), BIT(12), BIT(2),  true),
+       [RK3399_PD_CENTER]      = DOMAIN_RK3399(BIT(13), BIT(13), BIT(14), true),
+       [RK3399_PD_VIO]         = DOMAIN_RK3399(BIT(14), BIT(14), BIT(17), false),
+       [RK3399_PD_GPU]         = DOMAIN_RK3399(BIT(15), BIT(15), BIT(0),  false),
+       [RK3399_PD_VCODEC]      = DOMAIN_RK3399(BIT(16), BIT(16), BIT(3),  false),
+       [RK3399_PD_VDU]         = DOMAIN_RK3399(BIT(17), BIT(17), BIT(4),  false),
+       [RK3399_PD_RGA]         = DOMAIN_RK3399(BIT(18), BIT(18), BIT(5),  false),
+       [RK3399_PD_IEP]         = DOMAIN_RK3399(BIT(19), BIT(19), BIT(6),  false),
+       [RK3399_PD_VO]          = DOMAIN_RK3399(BIT(20), BIT(20), 0,       false),
+       [RK3399_PD_VOPB]        = DOMAIN_RK3399(0,       0,       BIT(7),  false),
+       [RK3399_PD_VOPL]        = DOMAIN_RK3399(0,       0,       BIT(8),  false),
+       [RK3399_PD_ISP0]        = DOMAIN_RK3399(BIT(22), BIT(22), BIT(9),  false),
+       [RK3399_PD_ISP1]        = DOMAIN_RK3399(BIT(23), BIT(23), BIT(10), false),
+       [RK3399_PD_HDCP]        = DOMAIN_RK3399(BIT(24), BIT(24), BIT(11), false),
+       [RK3399_PD_GMAC]        = DOMAIN_RK3399(BIT(25), BIT(25), BIT(23), true),
+       [RK3399_PD_EMMC]        = DOMAIN_RK3399(BIT(26), BIT(26), BIT(24), true),
+       [RK3399_PD_USB3]        = DOMAIN_RK3399(BIT(27), BIT(27), BIT(12), true),
+       [RK3399_PD_EDP]         = DOMAIN_RK3399(BIT(28), BIT(28), BIT(22), false),
+       [RK3399_PD_GIC]         = DOMAIN_RK3399(BIT(29), BIT(29), BIT(27), true),
+       [RK3399_PD_SD]          = DOMAIN_RK3399(BIT(30), BIT(30), BIT(28), true),
+       [RK3399_PD_SDIOAUDIO]   = DOMAIN_RK3399(BIT(31), BIT(31), BIT(29), true),
  };
  
  static const struct rockchip_pmu_info px30_pmu = {
diff --combined drivers/soc/tegra/pmc.c
index 17e7796a832bb1ddf3d1e035e8837c9b79bf8ca8,edd4fe06810fdce36d238f91a9844c3320fccb72..9f9c1c677cf4200336e6876c467e669c2abc93ea
@@@ -232,6 -232,11 +232,11 @@@ struct tegra_pmc_soc 
        const char * const *reset_levels;
        unsigned int num_reset_levels;
  
+       /*
+        * These describe events that can wake the system from sleep (i.e.
+        * LP0 or SC7). Wakeup from other sleep states (such as LP1 or LP2)
+        * are dealt with in the LIC.
+        */
        const struct tegra_wake_event *wake_events;
        unsigned int num_wake_events;
  };
@@@ -700,7 -705,6 +705,7 @@@ int tegra_powergate_power_on(unsigned i
  
        return tegra_powergate_set(pmc, id, true);
  }
 +EXPORT_SYMBOL(tegra_powergate_power_on);
  
  /**
   * tegra_powergate_power_off() - power off partition
@@@ -1855,6 -1859,9 +1860,9 @@@ static int tegra_pmc_irq_alloc(struct i
        unsigned int i;
        int err = 0;
  
+       if (WARN_ON(num_irqs > 1))
+               return -EINVAL;
        for (i = 0; i < soc->num_wake_events; i++) {
                const struct tegra_wake_event *event = &soc->wake_events[i];
  
                }
        }
  
+       /*
+        * For interrupts that don't have associated wake events, assign a
+        * dummy hardware IRQ number. This is used in the ->irq_set_type()
+        * and ->irq_set_wake() callbacks to return early for these IRQs.
+        */
        if (i == soc->num_wake_events)
                err = irq_domain_set_hwirq_and_chip(domain, virq, ULONG_MAX,
                                                    &pmc->irq, pmc);
@@@ -1913,6 -1925,10 +1926,10 @@@ static int tegra_pmc_irq_set_wake(struc
        unsigned int offset, bit;
        u32 value;
  
+       /* nothing to do if there's no associated wake event */
+       if (WARN_ON(data->hwirq == ULONG_MAX))
+               return 0;
        offset = data->hwirq / 32;
        bit = data->hwirq % 32;
  
@@@ -1940,6 -1956,7 +1957,7 @@@ static int tegra_pmc_irq_set_type(struc
        struct tegra_pmc *pmc = irq_data_get_irq_chip_data(data);
        u32 value;
  
+       /* nothing to do if there's no associated wake event */
        if (data->hwirq == ULONG_MAX)
                return 0;
  
index 406e6717d252d1161cad02ba9385a288a2178552,7b3762f68df9108ebea519b245810bef06b596af..6c610e188a44f0d76679ab2590b6f6df579761ff
@@@ -166,29 -166,29 +166,29 @@@ struct ti_sci_dev_ops 
   * managed by driver for that purpose.
   */
  struct ti_sci_clk_ops {
 -      int (*get_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 +      int (*get_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid,
                         bool needs_ssc, bool can_change_freq,
                         bool enable_input_term);
 -      int (*idle_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
 -      int (*put_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
 -      int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 +      int (*idle_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid);
 +      int (*put_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid);
 +      int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u32 cid,
                       bool *req_state);
 -      int (*is_on)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 +      int (*is_on)(const struct ti_sci_handle *handle, u32 did, u32 cid,
                     bool *req_state, bool *current_state);
 -      int (*is_off)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 +      int (*is_off)(const struct ti_sci_handle *handle, u32 did, u32 cid,
                      bool *req_state, bool *current_state);
 -      int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 -                        u8 parent_id);
 -      int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 -                        u8 *parent_id);
 +      int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid,
 +                        u32 parent_id);
 +      int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid,
 +                        u32 *parent_id);
        int (*get_num_parents)(const struct ti_sci_handle *handle, u32 did,
 -                             u8 cid, u8 *num_parents);
 +                             u32 cid, u32 *num_parents);
        int (*get_best_match_freq)(const struct ti_sci_handle *handle, u32 did,
 -                                 u8 cid, u64 min_freq, u64 target_freq,
 +                                 u32 cid, u64 min_freq, u64 target_freq,
                                   u64 max_freq, u64 *match_freq);
 -      int (*set_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 +      int (*set_freq)(const struct ti_sci_handle *handle, u32 did, u32 cid,
                        u64 min_freq, u64 target_freq, u64 max_freq);
 -      int (*get_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
 +      int (*get_freq)(const struct ti_sci_handle *handle, u32 did, u32 cid,
                        u64 *current_freq);
  };
  
@@@ -241,12 -241,254 +241,254 @@@ struct ti_sci_rm_irq_ops 
                              u16 global_event, u8 vint_status_bit);
  };
  
+ /* RA config.addr_lo parameter is valid for RM ring configure TI_SCI message */
+ #define TI_SCI_MSG_VALUE_RM_RING_ADDR_LO_VALID        BIT(0)
+ /* RA config.addr_hi parameter is valid for RM ring configure TI_SCI message */
+ #define TI_SCI_MSG_VALUE_RM_RING_ADDR_HI_VALID        BIT(1)
+  /* RA config.count parameter is valid for RM ring configure TI_SCI message */
+ #define TI_SCI_MSG_VALUE_RM_RING_COUNT_VALID  BIT(2)
+ /* RA config.mode parameter is valid for RM ring configure TI_SCI message */
+ #define TI_SCI_MSG_VALUE_RM_RING_MODE_VALID   BIT(3)
+ /* RA config.size parameter is valid for RM ring configure TI_SCI message */
+ #define TI_SCI_MSG_VALUE_RM_RING_SIZE_VALID   BIT(4)
+ /* RA config.order_id parameter is valid for RM ring configure TISCI message */
+ #define TI_SCI_MSG_VALUE_RM_RING_ORDER_ID_VALID       BIT(5)
+ #define TI_SCI_MSG_VALUE_RM_ALL_NO_ORDER \
+       (TI_SCI_MSG_VALUE_RM_RING_ADDR_LO_VALID | \
+       TI_SCI_MSG_VALUE_RM_RING_ADDR_HI_VALID | \
+       TI_SCI_MSG_VALUE_RM_RING_COUNT_VALID | \
+       TI_SCI_MSG_VALUE_RM_RING_MODE_VALID | \
+       TI_SCI_MSG_VALUE_RM_RING_SIZE_VALID)
+ /**
+  * struct ti_sci_rm_ringacc_ops - Ring Accelerator Management operations
+  * @config: configure the SoC Navigator Subsystem Ring Accelerator ring
+  * @get_config: get the SoC Navigator Subsystem Ring Accelerator ring
+  *            configuration
+  */
+ struct ti_sci_rm_ringacc_ops {
+       int (*config)(const struct ti_sci_handle *handle,
+                     u32 valid_params, u16 nav_id, u16 index,
+                     u32 addr_lo, u32 addr_hi, u32 count, u8 mode,
+                     u8 size, u8 order_id
+       );
+       int (*get_config)(const struct ti_sci_handle *handle,
+                         u32 nav_id, u32 index, u8 *mode,
+                         u32 *addr_lo, u32 *addr_hi, u32 *count,
+                         u8 *size, u8 *order_id);
+ };
+ /**
+  * struct ti_sci_rm_psil_ops - PSI-L thread operations
+  * @pair: pair PSI-L source thread to a destination thread.
+  *    If the src_thread is mapped to UDMA tchan, the corresponding channel's
+  *    TCHAN_THRD_ID register is updated.
+  *    If the dst_thread is mapped to UDMA rchan, the corresponding channel's
+  *    RCHAN_THRD_ID register is updated.
+  * @unpair: unpair PSI-L source thread from a destination thread.
+  *    If the src_thread is mapped to UDMA tchan, the corresponding channel's
+  *    TCHAN_THRD_ID register is cleared.
+  *    If the dst_thread is mapped to UDMA rchan, the corresponding channel's
+  *    RCHAN_THRD_ID register is cleared.
+  */
+ struct ti_sci_rm_psil_ops {
+       int (*pair)(const struct ti_sci_handle *handle, u32 nav_id,
+                   u32 src_thread, u32 dst_thread);
+       int (*unpair)(const struct ti_sci_handle *handle, u32 nav_id,
+                     u32 src_thread, u32 dst_thread);
+ };
+ /* UDMAP channel types */
+ #define TI_SCI_RM_UDMAP_CHAN_TYPE_PKT_PBRR            2
+ #define TI_SCI_RM_UDMAP_CHAN_TYPE_PKT_PBRR_SB         3       /* RX only */
+ #define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_PBRR           10
+ #define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_PBVR           11
+ #define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_BCOPY_PBRR     12
+ #define TI_SCI_RM_UDMAP_CHAN_TYPE_3RDP_BCOPY_PBVR     13
+ #define TI_SCI_RM_UDMAP_RX_FLOW_DESC_HOST             0
+ #define TI_SCI_RM_UDMAP_RX_FLOW_DESC_MONO             2
+ #define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES      1
+ #define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_128_BYTES     2
+ #define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_256_BYTES     3
+ /* UDMAP TX/RX channel valid_params common declarations */
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_PAUSE_ON_ERR_VALID               BIT(0)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_ATYPE_VALID                BIT(1)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_CHAN_TYPE_VALID            BIT(2)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_FETCH_SIZE_VALID           BIT(3)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_CQ_QNUM_VALID              BIT(4)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_PRIORITY_VALID             BIT(5)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_QOS_VALID                  BIT(6)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_ORDER_ID_VALID             BIT(7)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_SCHED_PRIORITY_VALID       BIT(8)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_BURST_SIZE_VALID         BIT(14)
+ /**
+  * Configures a Navigator Subsystem UDMAP transmit channel
+  *
+  * Configures a Navigator Subsystem UDMAP transmit channel registers.
+  * See @ti_sci_msg_rm_udmap_tx_ch_cfg_req
+  */
+ struct ti_sci_msg_rm_udmap_tx_ch_cfg {
+       u32 valid_params;
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FILT_EINFO_VALID        BIT(9)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FILT_PSWORDS_VALID      BIT(10)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_SUPR_TDPKT_VALID        BIT(11)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_CREDIT_COUNT_VALID      BIT(12)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FDEPTH_VALID            BIT(13)
+       u16 nav_id;
+       u16 index;
+       u8 tx_pause_on_err;
+       u8 tx_filt_einfo;
+       u8 tx_filt_pswords;
+       u8 tx_atype;
+       u8 tx_chan_type;
+       u8 tx_supr_tdpkt;
+       u16 tx_fetch_size;
+       u8 tx_credit_count;
+       u16 txcq_qnum;
+       u8 tx_priority;
+       u8 tx_qos;
+       u8 tx_orderid;
+       u16 fdepth;
+       u8 tx_sched_priority;
+       u8 tx_burst_size;
+ };
+ /**
+  * Configures a Navigator Subsystem UDMAP receive channel
+  *
+  * Configures a Navigator Subsystem UDMAP receive channel registers.
+  * See @ti_sci_msg_rm_udmap_rx_ch_cfg_req
+  */
+ struct ti_sci_msg_rm_udmap_rx_ch_cfg {
+       u32 valid_params;
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_FLOWID_START_VALID      BIT(9)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_FLOWID_CNT_VALID        BIT(10)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_IGNORE_SHORT_VALID      BIT(11)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_RX_IGNORE_LONG_VALID       BIT(12)
+       u16 nav_id;
+       u16 index;
+       u16 rx_fetch_size;
+       u16 rxcq_qnum;
+       u8 rx_priority;
+       u8 rx_qos;
+       u8 rx_orderid;
+       u8 rx_sched_priority;
+       u16 flowid_start;
+       u16 flowid_cnt;
+       u8 rx_pause_on_err;
+       u8 rx_atype;
+       u8 rx_chan_type;
+       u8 rx_ignore_short;
+       u8 rx_ignore_long;
+       u8 rx_burst_size;
+ };
+ /**
+  * Configures a Navigator Subsystem UDMAP receive flow
+  *
+  * Configures a Navigator Subsystem UDMAP receive flow's registers.
+  * See @tis_ci_msg_rm_udmap_flow_cfg_req
+  */
+ struct ti_sci_msg_rm_udmap_flow_cfg {
+       u32 valid_params;
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_EINFO_PRESENT_VALID    BIT(0)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_PSINFO_PRESENT_VALID     BIT(1)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_ERROR_HANDLING_VALID     BIT(2)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DESC_TYPE_VALID          BIT(3)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SOP_OFFSET_VALID         BIT(4)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_QNUM_VALID          BIT(5)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_HI_VALID         BIT(6)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_LO_VALID         BIT(7)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_HI_VALID        BIT(8)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_LO_VALID        BIT(9)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_HI_SEL_VALID     BIT(10)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_SRC_TAG_LO_SEL_VALID     BIT(11)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_HI_SEL_VALID    BIT(12)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_DEST_TAG_LO_SEL_VALID    BIT(13)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ0_SZ0_QNUM_VALID      BIT(14)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ1_QNUM_VALID          BIT(15)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ2_QNUM_VALID          BIT(16)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_FDQ3_QNUM_VALID          BIT(17)
+ #define TI_SCI_MSG_VALUE_RM_UDMAP_FLOW_PS_LOCATION_VALID        BIT(18)
+       u16 nav_id;
+       u16 flow_index;
+       u8 rx_einfo_present;
+       u8 rx_psinfo_present;
+       u8 rx_error_handling;
+       u8 rx_desc_type;
+       u16 rx_sop_offset;
+       u16 rx_dest_qnum;
+       u8 rx_src_tag_hi;
+       u8 rx_src_tag_lo;
+       u8 rx_dest_tag_hi;
+       u8 rx_dest_tag_lo;
+       u8 rx_src_tag_hi_sel;
+       u8 rx_src_tag_lo_sel;
+       u8 rx_dest_tag_hi_sel;
+       u8 rx_dest_tag_lo_sel;
+       u16 rx_fdq0_sz0_qnum;
+       u16 rx_fdq1_qnum;
+       u16 rx_fdq2_qnum;
+       u16 rx_fdq3_qnum;
+       u8 rx_ps_location;
+ };
+ /**
+  * struct ti_sci_rm_udmap_ops - UDMA Management operations
+  * @tx_ch_cfg: configure SoC Navigator Subsystem UDMA transmit channel.
+  * @rx_ch_cfg: configure SoC Navigator Subsystem UDMA receive channel.
+  * @rx_flow_cfg1: configure SoC Navigator Subsystem UDMA receive flow.
+  */
+ struct ti_sci_rm_udmap_ops {
+       int (*tx_ch_cfg)(const struct ti_sci_handle *handle,
+                        const struct ti_sci_msg_rm_udmap_tx_ch_cfg *params);
+       int (*rx_ch_cfg)(const struct ti_sci_handle *handle,
+                        const struct ti_sci_msg_rm_udmap_rx_ch_cfg *params);
+       int (*rx_flow_cfg)(const struct ti_sci_handle *handle,
+                          const struct ti_sci_msg_rm_udmap_flow_cfg *params);
+ };
+ /**
+  * struct ti_sci_proc_ops - Processor Control operations
+  * @request:  Request to control a physical processor. The requesting host
+  *            should be in the processor access list
+  * @release:  Relinquish a physical processor control
+  * @handover: Handover a physical processor control to another host
+  *            in the permitted list
+  * @set_config:       Set base configuration of a processor
+  * @set_control: Setup limited control flags in specific cases
+  * @get_status: Get the state of physical processor
+  *
+  * NOTE: The following paramteres are generic in nature for all these ops,
+  * -handle:   Pointer to TI SCI handle as retrieved by *ti_sci_get_handle
+  * -pid:      Processor ID
+  * -hid:      Host ID
+  */
+ struct ti_sci_proc_ops {
+       int (*request)(const struct ti_sci_handle *handle, u8 pid);
+       int (*release)(const struct ti_sci_handle *handle, u8 pid);
+       int (*handover)(const struct ti_sci_handle *handle, u8 pid, u8 hid);
+       int (*set_config)(const struct ti_sci_handle *handle, u8 pid,
+                         u64 boot_vector, u32 cfg_set, u32 cfg_clr);
+       int (*set_control)(const struct ti_sci_handle *handle, u8 pid,
+                          u32 ctrl_set, u32 ctrl_clr);
+       int (*get_status)(const struct ti_sci_handle *handle, u8 pid,
+                         u64 *boot_vector, u32 *cfg_flags, u32 *ctrl_flags,
+                         u32 *status_flags);
+ };
  /**
   * struct ti_sci_ops - Function support for TI SCI
   * @dev_ops:  Device specific operations
   * @clk_ops:  Clock specific operations
   * @rm_core_ops:      Resource management core operations.
   * @rm_irq_ops:               IRQ management specific operations
+  * @proc_ops: Processor Control specific operations
   */
  struct ti_sci_ops {
        struct ti_sci_core_ops core_ops;
        struct ti_sci_clk_ops clk_ops;
        struct ti_sci_rm_core_ops rm_core_ops;
        struct ti_sci_rm_irq_ops rm_irq_ops;
+       struct ti_sci_rm_ringacc_ops rm_ring_ops;
+       struct ti_sci_rm_psil_ops rm_psil_ops;
+       struct ti_sci_rm_udmap_ops rm_udmap_ops;
+       struct ti_sci_proc_ops proc_ops;
  };
  
  /**
diff --combined lib/Kconfig
index 52a7b2e6fb747361d0122cc53d4b8b1a3d230e52,e09b3e081a53f1100cf87a9c936f50ed991cea39..f33d66fc0e86d5741e42b352bcb9e3a94d944412
@@@ -531,14 -531,6 +531,6 @@@ config LRU_CACH
  config CLZ_TAB
        bool
  
- config DDR
-       bool "JEDEC DDR data"
-       help
-         Data from JEDEC specs for DDR SDRAM memories,
-         particularly the AC timing parameters and addressing
-         information. This data is useful for drivers handling
-         DDR SDRAM controllers.
  config IRQ_POLL
        bool "IRQ polling library"
        help
@@@ -562,14 -554,6 +554,14 @@@ config SIGNATUR
          Digital signature verification. Currently only RSA is supported.
          Implementation is done using GnuPG MPI library
  
 +config DIMLIB
 +      bool "DIM library"
 +      default y
 +      help
 +        Dynamic Interrupt Moderation library.
 +        Implements an algorithm for dynamically change CQ modertion values
 +        according to run time performance.
 +
  #
  # libfdt files, only selected if needed.
  #
@@@ -584,11 -568,6 +576,11 @@@ config OID_REGISTR
  config UCS2_STRING
          tristate
  
 +#
 +# generic vdso
 +#
 +source "lib/vdso/Kconfig"
 +
  source "lib/fonts/Kconfig"
  
  config SG_SPLIT
diff --combined lib/Makefile
index 59067f51f3aba11e4c9587f078c3428e026a792b,cb66bc9c5b2fda11e54795f064e59089e3ea6f6c..095601ce371dabd7a7e5b3501c61ac4b6516d91b
@@@ -91,8 -91,6 +91,8 @@@ obj-$(CONFIG_TEST_DEBUG_VIRTUAL) += tes
  obj-$(CONFIG_TEST_MEMCAT_P) += test_memcat_p.o
  obj-$(CONFIG_TEST_OBJAGG) += test_objagg.o
  obj-$(CONFIG_TEST_STACKINIT) += test_stackinit.o
 +obj-$(CONFIG_TEST_BLACKHOLE_DEV) += test_blackhole_dev.o
 +obj-$(CONFIG_TEST_MEMINIT) += test_meminit.o
  
  obj-$(CONFIG_TEST_LIVEPATCH) += livepatch/
  
@@@ -104,7 -102,7 +104,7 @@@ endi
  obj-$(CONFIG_DEBUG_INFO_REDUCED) += debug_info.o
  CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any)
  
 -obj-y += math/
 +obj-y += math/ crypto/
  
  obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
  obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o
@@@ -204,13 -202,10 +204,11 @@@ obj-$(CONFIG_GLOB) += glob.
  obj-$(CONFIG_GLOB_SELFTEST) += globtest.o
  
  obj-$(CONFIG_MPILIB) += mpi/
 +obj-$(CONFIG_DIMLIB) += dim/
  obj-$(CONFIG_SIGNATURE) += digsig.o
  
  lib-$(CONFIG_CLZ_TAB) += clz_tab.o
  
- obj-$(CONFIG_DDR) += jedec_ddr_data.o
  obj-$(CONFIG_GENERIC_STRNCPY_FROM_USER) += strncpy_from_user.o
  obj-$(CONFIG_GENERIC_STRNLEN_USER) += strnlen_user.o
  
This page took 0.401739 seconds and 4 git commands to generate.