linux-2.6-microblaze.git
3 years agoMerge tag 'samsung-drivers-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Wed, 9 Dec 2020 19:51:26 +0000 (20:51 +0100)]
Merge tag 'samsung-drivers-5.11-2' of git://git./linux/kernel/git/krzk/linux into arm/drivers

Samsung SoC drivers changes for v5.11, part two

1. Mark PM functions of newly added clkout module as unused to silence
   !CONFIG_PM warnings.
2. Initialize ChipID driver later - in arch initcall.

* tag 'samsung-drivers-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  clk: samsung: mark PM functions as __maybe_unused
  soc: samsung: exynos-chipid: initialize later - with arch_initcall
  soc: samsung: exynos-chipid: order list of SoCs by name

Link: https://lore.kernel.org/r/20201207074528.4475-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'zynqmp-soc-for-v5.11-v2' of https://github.com/Xilinx/linux-xlnx into...
Arnd Bergmann [Wed, 9 Dec 2020 19:37:12 +0000 (20:37 +0100)]
Merge tag 'zynqmp-soc-for-v5.11-v2' of https://github.com/Xilinx/linux-xlnx into arm/drivers

arm64: soc: ZynqMP SoC changes for v5.11 v2

- Small alignments in Xilinx Firmware driver
- Exposing syscon interface for VCU driver

* tag 'zynqmp-soc-for-v5.11-v2' of https://github.com/Xilinx/linux-xlnx:
  firmware: xilinx: Properly align function parameter
  firmware: xilinx: Add a blank line after function declaration
  firmware: xilinx: Remove additional newline
  firmware: xilinx: Fix kernel-doc warnings
  firmware: xlnx-zynqmp: fix compilation warning
  soc: xilinx: vcu: add missing register NUM_CORE
  soc: xilinx: vcu: use vcu-settings syscon registers
  dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding
  soc: xilinx: vcu: drop useless success message

Link: https://lore.kernel.org/r/71d38756-4456-29fc-26a3-341e1d09aafe@monstr.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agofirmware: xilinx: Properly align function parameter
Michal Simek [Wed, 2 Dec 2020 07:38:50 +0000 (08:38 +0100)]
firmware: xilinx: Properly align function parameter

Fix parameters alignment reported by checkpatch --strict.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/00ed9fcb94a6c22eff1fe8afdea46b2764a8687d.1606894725.git.michal.simek@xilinx.com
3 years agofirmware: xilinx: Add a blank line after function declaration
Michal Simek [Wed, 2 Dec 2020 07:38:49 +0000 (08:38 +0100)]
firmware: xilinx: Add a blank line after function declaration

Fix all these issues which are also reported by checkpatch --strict.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/7b6007e05f6c01214861a37f198cd5bee62a4d3e.1606894725.git.michal.simek@xilinx.com
3 years agofirmware: xilinx: Remove additional newline
Michal Simek [Wed, 2 Dec 2020 07:38:48 +0000 (08:38 +0100)]
firmware: xilinx: Remove additional newline

This additional newline is useless and also reported by checkpatch
--strict.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/d927f3f2c97910958dd77a22828cd0bf8d89c9de.1606894725.git.michal.simek@xilinx.com
3 years agofirmware: xilinx: Fix kernel-doc warnings
Michal Simek [Tue, 1 Dec 2020 14:29:59 +0000 (15:29 +0100)]
firmware: xilinx: Fix kernel-doc warnings

kernel-doc is reporting some style issues. The patch is fixing them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/e606233d15bfdc594535dd34eb85472b42f61830.1606832997.git.michal.simek@xilinx.com
3 years agofirmware: xlnx-zynqmp: fix compilation warning
Wendy Liang [Tue, 24 Nov 2020 08:18:18 +0000 (00:18 -0800)]
firmware: xlnx-zynqmp: fix compilation warning

Fix compilation warning when ZYNQMP_FIRMWARE is not defined.

include/linux/firmware/xlnx-zynqmp.h: In function
'zynqmp_pm_get_eemi_ops':
 include/linux/firmware/xlnx-zynqmp.h:363:9: error: implicit
 declaration of function 'ERR_PTR'
 [-Werror=implicit-function-declaration]
     363 |  return ERR_PTR(-ENODEV);

include/linux/firmware/xlnx-zynqmp.h:363:18: note: each undeclared
identifier is reported only once for each function it appears in
   include/linux/firmware/xlnx-zynqmp.h: In function
'zynqmp_pm_get_api_version':
   include/linux/firmware/xlnx-zynqmp.h:367:10: error: 'ENODEV'
undeclared (first use in this function)
     367 |  return -ENODEV;
         |          ^~~~~~

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
Link: https://lore.kernel.org/r/1606205898-12642-1-git-send-email-wendy.liang@xilinx.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agosoc: xilinx: vcu: add missing register NUM_CORE
Michael Tretter [Mon, 9 Nov 2020 13:48:18 +0000 (14:48 +0100)]
soc: xilinx: vcu: add missing register NUM_CORE

The H.264/H.265 Video Codec Unit v1.2 documentation describes this
register as follows:

Number of encoders core used for the provided configuration

This is required for configuring the VCU encoder buffer.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Link: https://lore.kernel.org/r/20201109134818.4159342-5-m.tretter@pengutronix.de
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agosoc: xilinx: vcu: use vcu-settings syscon registers
Michael Tretter [Mon, 9 Nov 2020 13:48:17 +0000 (14:48 +0100)]
soc: xilinx: vcu: use vcu-settings syscon registers

Switch the "logicoreip" registers to the new xlnx,vcu-settings binding
to be able to read the settings if the settings are specified in a
separate device tree node that is shared with other drivers.

If the driver is not able to find a node with the new binding, fall back
to check for the logicore register bank to be backwards compatible.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Link: https://lore.kernel.org/r/20201109134818.4159342-4-m.tretter@pengutronix.de
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agodt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding
Michael Tretter [Mon, 9 Nov 2020 13:48:16 +0000 (14:48 +0100)]
dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding

The xlnx,vcu binding comprises two adjacent register banks:

The first register bank ("vcu_slcr") contains registers for setting the
clocks of the vcu and controlling the performance monitors. The second
bank ("logicoreip") contains the configuration settings of the video codec
unit, which are set before synthesizing the bitstream.

Drivers that drive the actual video codec unit need to read the
registers from the logicoreip register bank for configuring the vcu
firmware.

As logicoreip is a too generic name for this register bank, use
"vcu-settings" as a binding name, because the register bank basically
provides the configuration settings of the VCU.

Therefore, add the vcu-settings binding to provide a syscon interface
for other drivers to read these registers.

The alternative would have been to merge the two register banks of the
xlnx,vcu binding into one register bank and make xlnx,vcu provide a
syscon interface, but that would lead to more incompatibility than
making second register bank of xlnx,vcu optional.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201109134818.4159342-3-m.tretter@pengutronix.de
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agosoc: xilinx: vcu: drop useless success message
Michael Tretter [Mon, 9 Nov 2020 13:48:15 +0000 (14:48 +0100)]
soc: xilinx: vcu: drop useless success message

The message that the driver was successfully probed only adds useless
noise. Drop the message.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Link: https://lore.kernel.org/r/20201109134818.4159342-2-m.tretter@pengutronix.de
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoMerge tag 'memory-controller-drv-tegra-5.11-3' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Tue, 8 Dec 2020 23:29:33 +0000 (00:29 +0100)]
Merge tag 'memory-controller-drv-tegra-5.11-3' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.11 - Tegra SoC, part two

Continuation of work on Tegra SoC memory controllers towards adding
interconnect support and integration with devfreq.

This brings few more patches including one which removes/fixes annoying
warning if the DTS patches get applied.  This is expected and only
informs that new features of Tegra memory controller drivers will not be
enabled however the warning itself could look worrying.

* tag 'memory-controller-drv-tegra-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: tegra30: Support interconnect framework
  memory: tegra20: Support hardware versioning and clean up OPP table initialization
  dt-bindings: memory: tegra20-emc: Document opp-supported-hw property

Link: https://lore.kernel.org/r/20201207075758.5501-2-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'memory-controller-drv-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 8 Dec 2020 23:28:39 +0000 (00:28 +0100)]
Merge tag 'memory-controller-drv-5.11-2' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.11, part two

1. Several fixes for Renesas RPC-IF driver.
2. Correct compile testing of TI EMIF SRAM driver.
3. Fix potential NULL pointer in JZ4780 NEMC driver.

* tag 'memory-controller-drv-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe()
  memory: ti-emif-sram: only build for ARMv7
  memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline
  memory: renesas-rpc-if: Fix a node reference leak in rpcif_probe()
  memory: renesas-rpc-if: Fix unbalanced pm_runtime_enable in rpcif_{enable,disable}_rpm
  memory: renesas-rpc-if: Return correct value to the caller of rpcif_manual_xfer()

Link: https://lore.kernel.org/r/20201207075758.5501-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'v5.11-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 8 Dec 2020 23:27:44 +0000 (00:27 +0100)]
Merge tag 'v5.11-rockchip-drivers-1' of git://git./linux/kernel/git/mmind/linux-rockchip into arm/drivers

Minor fixes for the io-domain soc-driver

* tag 'v5.11-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: io-domain: Fix error return code in rockchip_iodomain_probe()
  soc: rockchip: io-domain: Remove incorrect and incomplete comment header

Link: https://lore.kernel.org/r/2045618.irdbgypaU6@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'reset-for-v5.11' of git://git.pengutronix.de/pza/linux into arm/drivers
Arnd Bergmann [Tue, 8 Dec 2020 23:26:38 +0000 (00:26 +0100)]
Merge tag 'reset-for-v5.11' of git://git.pengutronix.de/pza/linux into arm/drivers

Reset controller updates for v5.11

This tag adds support for sharing pulsed resets under certain
conditions. For example, when multiple drivers go through a
suspend-resume cycle, a reset line they share can be triggered
again during resume.
Further, the reset-meson driver now can be built as a module, the
reset-socfpga driver properly releases its memory region in the
probe error path, and reset-ti-syscon driver uses regmap_write_bits()
instead of regmap_update_bits() to support devices without status
readback.

* tag 'reset-for-v5.11' of git://git.pengutronix.de/pza/linux:
  reset-controller: ti: force the write operation when assert or deassert
  reset: socfpga: add error handling and release mem-region
  reset: meson: make it possible to build as a module
  reset: make shared pulsed reset controls re-triggerable

Link: https://lore.kernel.org/r/d586ada0073f2ac50a02274f42bf07bfb0603835.camel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'imx-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawngu...
Arnd Bergmann [Tue, 8 Dec 2020 23:24:20 +0000 (00:24 +0100)]
Merge tag 'imx-drivers-5.11' of git://git./linux/kernel/git/shawnguo/linux into arm/drivers

i.MX drivers change for 5.11:

- A series from Daniel Baluta to update imx-dsp driver and export
  functions for on demand channel request/free.
- A number of patches to add power domains for i.MX8qxp DC0, LVDS1,
  MIPI1 and JPEG subsystems.
- Add dummy functions for i.MX firmware drivers to avoid build failure
  seen with COMPILE_TEST.

* tag 'imx-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  firmware: imx: scu-pd: Add some power domains support for i.MX8qxp MIPI1 subsystem
  firmware: imx: scu-pd: Add main power domain support for i.MX8qxp LVDS1 subsystem
  firmware: imx: scu-pd: Add video0/1 power domains support for i.MX8qxp DC0 subsystem
  firmware: imx-dsp: Export functions to request/free channels
  firmware: imx: Save channel name for further use
  firmware: imx: Introduce imx_dsp_setup_channels
  firmware: imx: scu-pd: Add power domains for imx-jpeg
  firmware: imx: add dummy functions

Link: https://lore.kernel.org/r/20201202142717.9262-1-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman...
Arnd Bergmann [Tue, 8 Dec 2020 23:23:29 +0000 (00:23 +0100)]
Merge tag 'amlogic-drivers' of git://git./linux/kernel/git/khilman/linux-amlogic into arm/drivers

soc: amlogic: driver updates for v5.11
- enable building as modules
- reset API updates

* tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  soc: amlogic: replace devm_reset_control_array_get()
  soc: amlogic: canvas: add missing put_device() call in meson_canvas_get()
  firmware: meson-sm: enable build as module
  soc: meson: enable building drivers as modules
  soc: amlogic: socinfo: build for specific arch

Link: https://lore.kernel.org/r/7him9ljgtr.fsf@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'drivers_soc_for_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 8 Dec 2020 23:21:31 +0000 (00:21 +0100)]
Merge tag 'drivers_soc_for_5.11' of git://git./linux/kernel/git/ssantosh/linux-keystone into arm/drivers

drivers: soc: TI SOC changes for 5.11

- ti_sci changes towards DMSS support
- Static warning fixes
- Kconfig update for Keystone ARM64 socs
- AM64X SOC family support

* tag 'drivers_soc_for_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: (23 commits)
  drivers: soc: ti: knav_qmss_queue: Fix error return code in knav_queue_probe
  soc: ti: Fix reference imbalance in knav_dma_probe
  soc: ti: pruss: Remove wrong check against *get_match_data return value
  soc: ti: Kconfig: Drop ARM64 SoC specific configs
  soc: ti: k3-ringacc: Provide documentation for 'k3_ring's 'state'
  soc: ti: wkup_m3_ipc: Document 'm3_ipc' parameter throughout
  soc: ti: pm33xx: Remove set but unused variable 'ret'
  soc: ti: knav_dma: Fix a kernel function doc formatting issue
  soc: ti: knav_qmss_queue: Fix a whole host of function documentation issues
  soc: ti: knav_qmss_queue: Remove set but unchecked variable 'ret'
  soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted
  soc: ti: knav_qmss: fix reference leak in knav_queue_probe
  soc: ti: k3-socinfo: Add entry for AM64X SoC family
  soc: ti: k3-ringacc: Use correct device for allocation in RING mode
  firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops
  soc: ti: k3-ringacc: Use the ti_sci set_cfg callback for ring configuration
  firmware: ti_sci: rm: Add new ops for ring configuration
  firmware: ti_sci: rm: Remove ring_get_config support
  firmware: ti_sci: rm: Add support for extended_ch_type for tx channel
  soc: ti: ti_sci_inta_msi: Add support for second range in resource ranges
  ...

Link: https://lore.kernel.org/r/1606851405-26338-1-git-send-email-santosh.shilimkar@oracle.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Tue, 8 Dec 2020 23:19:56 +0000 (00:19 +0100)]
Merge tag 'omap-for-v5.11/genpd-drivers-signed' of git://git./linux/kernel/git/tmlind/linux-omap into arm/drivers

Driver changes for omaps for genpd for v5.11 merge window

This series of changes allows booting am335x with genpd and
device tree data without the legacy platform data. Also at
least am437x can be booted with gendp with power domain and
dts data. The SoC specific dts changes will be a separate
pull request.

We need the following driver changes merged before the dts
changes can be done:

- platform code needs a few improvments to probe l4_wkup first
  for clocks, and to bail out when there is no platform data

- ti-sysc driver needs a non-urgent fix for asserting rstctrl
  reset only after disabling the clocks, to probe modules with
  no known control registers, and added quirk handling for gpmc
  devices

- omap-prm driver needs a non-urgent fix for reset status bit,
  support added for pm_clk, and then we add the rest of am335x
  power domain data

- clock driver for am335x needs to keep l3_main clock enabled
  with genpd for suspend and resume to work

- wkup_m3 remoteproc driver needs support added for reset
  control if available instead of the legacy pdata callbacks

- pm33xx driver needs PM runtime support added for genpd

The am335x specific driver changes for the clock, wkup_m3,
pm33xx and remoteproc drivers are quite trivial and have not
caused merge conflicts in Linux next. I did not get acks for
these changes except from Santosh but had already pushed out
the branch already at that point. So I've added the related
driver maintainers to Cc.

* tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  remoteproc/wkup_m3: Use reset control driver if available
  soc: ti: pm33xx: Enable basic PM runtime support for genpd
  soc: ti: omap-prm: am3: add genpd support for remaining PRM instances
  soc: ti: omap-prm: Add pm_clk for genpd
  clk: ti: am33xx: Keep am3 l3 main clock always on for genpd
  bus: ti-sysc: Implement GPMC debug quirk to drop platform data
  bus: ti-sysc: Support modules without control registers
  ARM: OMAP2+: Probe PRCM first to probe l4_wkup with simple-pm-bus
  ARM: OMAP2+: Check for inited flag
  bus: ti-sysc: Assert reset only after disabling clocks
  soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted
  bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw
  bus: ti-sysc: Fix reset status check for modules with quirks
  ARM: OMAP2+: Fix missing select PM_GENERIC_DOMAINS_OF
  ARM: OMAP2+: Fix location for select PM_GENERIC_DOMAINS

Link: https://lore.kernel.org/r/pull-1606806458-694517@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'qcom-drivers-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 8 Dec 2020 23:17:54 +0000 (00:17 +0100)]
Merge tag 'qcom-drivers-for-5.11' of git://git./linux/kernel/git/qcom/linux into arm/drivers

Qualcomm driver updates for v5.11

This adds support for the core power domains on MSM8916, MSM8939, SDM660
and SDX55. It adds SM8150 support to the last-level cache controller
driver and it makes it possible to build the Command DB and RPMh drivers
as modules.

It also contains a slew of smaller cleanups, style and bug fixes
throughout the various drivers.

* tag 'qcom-drivers-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (39 commits)
  soc: qcom: rpmhpd: Add SDX55 power domains
  dt-bindings: power: Add rpm power domain bindings for sdx55
  soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write()
  samples: qmi: Constify static qmi ops
  soc: qcom: pdr: Constify static qmi structs
  soc: qcom: initialize local variable
  soc: qcom: socinfo: add soc ids for msm8953 variants
  soc: qcom: geni: Remove "iova" check
  soc: qcom: llcc: Add configuration data for SM8150
  dt-bindings: msm: Add LLCC for SM8150
  soc: qcom: rpmh: Fix possible doc-rot in rpmh_write()'s header
  soc: qcom: kryo-l2-accessors: Fix misnaming of 'val'
  soc: qcom: rpmhpd: Provide some missing struct member descriptions
  soc: qcom: llcc-qcom: Fix expected kernel-doc formatting
  soc: qcom: smp2p: Remove unused struct attribute provide another
  soc: qcom: wcnss_ctrl: Demote non-conformant struct header and fix function headers
  soc: qcom: smsm: Fix some kernel-doc formatting and naming problems
  soc: qcom: smem: Fix formatting and missing documentation issues
  soc: qcom: qcom-geni-se: Fix misnamed function parameter 'rx_rfr'
  soc: qcom: qcom_aoss: Add missing description for 'cooling_devs'
  ...

Link: https://lore.kernel.org/r/20201130190142.345246-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoclk: samsung: mark PM functions as __maybe_unused
Arnd Bergmann [Fri, 4 Dec 2020 09:16:11 +0000 (10:16 +0100)]
clk: samsung: mark PM functions as __maybe_unused

The use of SIMPLE_DEV_PM_OPS() means that the suspend/resume
functions are now unused when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos-clkout.c:219:12: error: 'exynos_clkout_resume' defined but not used [-Werror=unused-function]
  219 | static int exynos_clkout_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-exynos-clkout.c:210:12: error: 'exynos_clkout_suspend' defined but not used [-Werror=unused-function]
  210 | static int exynos_clkout_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the otherwise harmless warning.

Fixes: 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to module driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20201204091616.4128366-1-arnd@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: samsung: exynos-chipid: initialize later - with arch_initcall
Krzysztof Kozlowski [Wed, 2 Dec 2020 19:59:55 +0000 (21:59 +0200)]
soc: samsung: exynos-chipid: initialize later - with arch_initcall

The Exynos ChipID driver on Exynos SoCs has only informational
purpose - to expose the SoC device in sysfs.  No other drivers
depend on it so there is really no benefit of initializing it early.

Instead, initialize everything with arch_initcall which:
1. Allows to use dev_info() as the SoC bus is present (since
   core_initcall),
2. Could speed things up because of execution in a SMP environment
   (after bringing up secondary CPUs, unlike early_initcall),
3. Reduces the amount of work to be done early, when the kernel has to
   bring up critical devices.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201202195955.128633-2-krzk@kernel.org
3 years agosoc: samsung: exynos-chipid: order list of SoCs by name
Krzysztof Kozlowski [Wed, 2 Dec 2020 19:59:54 +0000 (21:59 +0200)]
soc: samsung: exynos-chipid: order list of SoCs by name

Bring some order to the list of SoCs.  No functional change.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201202195955.128633-1-krzk@kernel.org
3 years agomemory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe()
Zhang Changzhong [Fri, 4 Dec 2020 08:31:57 +0000 (16:31 +0800)]
memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe()

platform_get_resource() may fail and return NULL, so we should
better check it's return value to avoid a NULL pointer dereference
a bit later in the code.

This is detected by Coccinelle semantic patch.

Fixes: 911a88829725 ("memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCs")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/1607070717-32880-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: ti-emif-sram: only build for ARMv7
Arnd Bergmann [Thu, 3 Dec 2020 23:08:14 +0000 (00:08 +0100)]
memory: ti-emif-sram: only build for ARMv7

The driver can be compile-tested on all ARM machines, but
causes a failure when built for ARMv7-M:

arm-linux-gnueabi-ld: error: drivers/memory/ti-emif-sram-pm.o: conflicting architecture profiles A/M

Limit the target machines to configurations that have ARMv7 enabled.

Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201203230832.1481767-1-arnd@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra30: Support interconnect framework
Dmitry Osipenko [Thu, 3 Dec 2020 19:24:32 +0000 (22:24 +0300)]
memory: tegra30: Support interconnect framework

Now Internal and External memory controllers are memory interconnection
providers. This allows us to use interconnect API for tuning of memory
configuration. EMC driver now supports OPPs and DVFS. MC driver now
supports tuning of memory arbitration latency, which needs to be done
for ISO memory clients, like a Display client for example.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Acked-by: Georgi Djakov <georgi.djakov@linaro.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201203192439.16177-4-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20: Support hardware versioning and clean up OPP table initialization
Dmitry Osipenko [Thu, 3 Dec 2020 19:24:31 +0000 (22:24 +0300)]
memory: tegra20: Support hardware versioning and clean up OPP table initialization

Support hardware versioning, which is now required for Tegra20 EMC OPP.
Clean up OPP table initialization by using a error code returned by OPP
API for judging about the OPP table presence in a device-tree and remove
OPP regulator initialization because we're now going to use power domain
instead of a raw regulator. This puts Tegra20 EMC OPP preparation on par
with the Tegra30/124 EMC drivers.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201203192439.16177-3-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agodt-bindings: memory: tegra20-emc: Document opp-supported-hw property
Dmitry Osipenko [Thu, 3 Dec 2020 19:24:30 +0000 (22:24 +0300)]
dt-bindings: memory: tegra20-emc: Document opp-supported-hw property

Document opp-supported-hw property, which is not strictly necessary to
have on Tegra20, but it's very convenient to have because all other SoC
core devices will use hardware versioning, and thus, it's good to maintain
the consistency.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201203192439.16177-2-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: rockchip: io-domain: Fix error return code in rockchip_iodomain_probe()
Zhang Changzhong [Fri, 4 Dec 2020 08:33:25 +0000 (16:33 +0800)]
soc: rockchip: io-domain: Fix error return code in rockchip_iodomain_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: e943c43b32ce ("PM: AVS: rockchip-io: Move the driver to the rockchip specific drivers")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1607070805-33038-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
3 years agoreset-controller: ti: force the write operation when assert or deassert
Crystal Guo [Wed, 30 Sep 2020 02:21:59 +0000 (10:21 +0800)]
reset-controller: ti: force the write operation when assert or deassert

Force the write operation in case the read already happens
to return the correct value.

Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
3 years agoreset: socfpga: add error handling and release mem-region
Dinh Nguyen [Mon, 9 Nov 2020 19:21:41 +0000 (13:21 -0600)]
reset: socfpga: add error handling and release mem-region

In case of an error, call release_mem_region when an error happens
during allocation of resources. Also add error handling for the case
that reset_controller_register fails.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
3 years agosoc: amlogic: replace devm_reset_control_array_get()
Yejune Deng [Wed, 18 Nov 2020 02:48:20 +0000 (10:48 +0800)]
soc: amlogic: replace devm_reset_control_array_get()

devm_reset_control_array_get_exclusive() looks more readable

Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/1605667700-16681-1-git-send-email-yejune.deng@gmail.com
3 years agosoc: amlogic: canvas: add missing put_device() call in meson_canvas_get()
Yu Kuai [Tue, 17 Nov 2020 01:13:22 +0000 (09:13 +0800)]
soc: amlogic: canvas: add missing put_device() call in meson_canvas_get()

if of_find_device_by_node() succeed, meson_canvas_get() doesn't have
a corresponding put_device(). Thus add put_device() to fix the exception
handling for this function implementation.

Fixes: 382f8be04551 ("soc: amlogic: canvas: Fix meson_canvas_get when probe failed")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20201117011322.522477-1-yukuai3@huawei.com
3 years agoMerge tag 'aspeed-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel...
Arnd Bergmann [Mon, 30 Nov 2020 16:24:21 +0000 (17:24 +0100)]
Merge tag 'aspeed-5.11-soc' of git://git./linux/kernel/git/joel/aspeed into arm/drivers

ASPEED soc driver updates for 5.11

New drivers:

 - SoC info driver to expose revision information

New features:

 - AST2600 support for the LPC control driver. This includes
   setting the LPC2AHB bridge up in a backwards compatible manner.

Cleanups:

 - LPC control
 - Kconfig
 - Bindings updates for AST2600 strings

* tag 'aspeed-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed:
  soc: aspeed: Enable drivers with ARCH_ASPEED
  soc: aspeed: Fix a reference leak in aspeed_socinfo_init()
  soc: aspeed: remove unneeded semicolon
  soc: aspeed-lpc-ctrl: Fix driver name
  soc: aspeed-lpc-ctrl: Fix whitespace
  soc: aspeed-lpc-ctrl: LPC to AHB mapping on ast2600
  soc: aspeed-lpc-ctrl: Fail probe of lpc-ctrl if reserved memory is not aligned
  soc: aspeed: lpc: Add AST2600 compatible strings
  dt-bindings: aspeed-lpc: Add AST2600 compatible strings
  ARM: dts: aspeed: Add silicon id node
  soc: aspeed: Add soc info driver
  dt-bindings: aspeed: Add silicon id node to SCU
  soc: aspeed: Improve kconfig

Link: https://lore.kernel.org/r/CACPK8Xe=9ezhyWRMqVOEQr7SU1YoYfVBGGdGzjmE4SiBr--vJQ@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'v5.10-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias...
Arnd Bergmann [Mon, 30 Nov 2020 16:22:02 +0000 (17:22 +0100)]
Merge tag 'v5.10-next-soc' of git://git./linux/kernel/git/matthias.bgg/linux into arm/drivers

power-domains:
- add support for new power domain driver.
- add support for mt8183 and mt8192

devapc:
- add support for the devapc device found on mt6779 to identify of
  malicious bus accesses from a controller to a device

mmsys:
- move DDP routing IDs into the driver

cmdq:
- drop timeout handler support as not usefull

scpsys:
- print warning on theoretical error

* tag 'v5.10-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (21 commits)
  soc: mediatek: mmsys: Use devm_platform_ioremap_resource()
  soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h
  soc: mediatek: add mt6779 devapc driver
  dt-bindings: devapc: add bindings for mtk-devapc
  soc / drm: mediatek: cmdq: Remove timeout handler in helper function
  soc: mediatek: pm-domains: Add support for mt8192
  soc: mediatek: pm-domains: Add default power off flag
  soc: mediatek: pm-domains: Add support for mt8183
  soc: mediatek: pm-domains: Allow bus protection to ignore clear ack
  soc: mediatek: pm-domains: Add subsystem clocks
  soc: mediatek: pm-domains: Add extra sram control
  soc: mediatek: pm-domains: Add SMI block as bus protection block
  soc: mediatek: pm_domains: Make bus protection generic
  soc: mediatek: pm-domains: Add bus protection protocol
  soc: mediatek: Add MediaTek SCPSYS power domains
  dt-bindings: power: Add MT8192 power domains
  dt-bindings: power: Add MT8183 power domains
  dt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller
  mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function.
  MAINTAINERS: change mediatek wiki page
  ...

Link: https://lore.kernel.org/r/b03fe343-e183-c6f3-f2dc-4c58aae3146b@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux into...
Arnd Bergmann [Mon, 30 Nov 2020 16:20:57 +0000 (17:20 +0100)]
Merge tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux into arm/drivers

This pull request contains Broadcom SoCs driver changes for 5.11, please
pull the following:

- Lee provides a missing function declaration spotted with W=1 builds

* tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux:
  soc: bcm: brcmstb: pm: pm-arm: Provide prototype for brcmstb_pm_s3_finish()

Link: https://lore.kernel.org/r/20201128163410.1691529-5-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91...
Arnd Bergmann [Mon, 30 Nov 2020 16:19:19 +0000 (17:19 +0100)]
Merge tag 'at91-drivers-5.11' of git://git./linux/kernel/git/at91/linux into arm/drivers

AT91 drivers for 5.11:

 - add sam9x60 SiP IDs
 - at91_cf cleanups

* tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  pcmcia: at91_cf: remove platform data support
  pcmcia: at91_cf: move definitions locally
  ARM: at91: sam9x60 SiP types added to soc description

Link: https://lore.kernel.org/r/20201127214140.GA1688544@piout.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agofirmware: imx: scu-pd: Add some power domains support for i.MX8qxp MIPI1 subsystem
Liu Ying [Wed, 18 Nov 2020 07:31:23 +0000 (15:31 +0800)]
firmware: imx: scu-pd: Add some power domains support for i.MX8qxp MIPI1 subsystem

This patch adds the main power domain, pwm0 power domain and i2c0/1
power domains support for i.MX8qxp MIPI1 subsystem.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
3 years agofirmware: imx: scu-pd: Add main power domain support for i.MX8qxp LVDS1 subsystem
Liu Ying [Wed, 18 Nov 2020 07:31:22 +0000 (15:31 +0800)]
firmware: imx: scu-pd: Add main power domain support for i.MX8qxp LVDS1 subsystem

This patch adds the main power domain support for i.MX8qxp LVDS1 subsystem.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
3 years agofirmware: imx: scu-pd: Add video0/1 power domains support for i.MX8qxp DC0 subsystem
Liu Ying [Wed, 18 Nov 2020 07:31:21 +0000 (15:31 +0800)]
firmware: imx: scu-pd: Add video0/1 power domains support for i.MX8qxp DC0 subsystem

This patch adds video0/1 power domains support for i.MX8qxp DC0 subsystem.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
3 years agomemory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline
Lad Prabhakar [Thu, 26 Nov 2020 19:11:45 +0000 (19:11 +0000)]
memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline

Define rpcif_enable_rpm() and rpcif_disable_rpm() as static
inline in the header instead of exporting them.

Suggested-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Pavel Machek (CIP) <pavel@denx.de>
Link: https://lore.kernel.org/r/20201126191146.8753-5-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: renesas-rpc-if: Fix a node reference leak in rpcif_probe()
Lad Prabhakar [Thu, 26 Nov 2020 19:11:44 +0000 (19:11 +0000)]
memory: renesas-rpc-if: Fix a node reference leak in rpcif_probe()

Release the node reference by calling of_node_put(flash) in the probe.

Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Pavel Machek (CIP) <pavel@denx.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201126191146.8753-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: renesas-rpc-if: Fix unbalanced pm_runtime_enable in rpcif_{enable,disable...
Lad Prabhakar [Thu, 26 Nov 2020 19:11:43 +0000 (19:11 +0000)]
memory: renesas-rpc-if: Fix unbalanced pm_runtime_enable in rpcif_{enable,disable}_rpm

rpcif_enable_rpm calls pm_runtime_enable, so rpcif_disable_rpm needs to
call pm_runtime_disable and not pm_runtime_put_sync.

Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver")
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201126191146.8753-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: renesas-rpc-if: Return correct value to the caller of rpcif_manual_xfer()
Lad Prabhakar [Thu, 26 Nov 2020 19:11:42 +0000 (19:11 +0000)]
memory: renesas-rpc-if: Return correct value to the caller of rpcif_manual_xfer()

In the error path of rpcif_manual_xfer() the value of ret is overwritten
by value returned by reset_control_reset() function and thus returning
incorrect value to the caller.

This patch makes sure the correct value is returned to the caller of
rpcif_manual_xfer() by dropping the overwrite of ret in error path.
Also now we ignore the value returned by reset_control_reset() in the
error path and instead print a error message when it fails.

Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Pavel Machek (CIP) <pavel@denx.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201126191146.8753-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: mediatek: mmsys: Use devm_platform_ioremap_resource()
Enric Balletbo i Serra [Tue, 6 Oct 2020 19:33:18 +0000 (21:33 +0200)]
soc: mediatek: mmsys: Use devm_platform_ioremap_resource()

For the common platform_get_resource()+devm_platform_ioremap() combination,
there is a helper, so use it and make the code a bit more compact.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20201006193320.405529-3-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc / drm: mediatek: Move DDP component defines into mtk-mmsys.h
Yongqiang Niu [Tue, 6 Oct 2020 19:33:17 +0000 (21:33 +0200)]
soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h

MMSYS is the driver which controls the routing of these DDP components,
so the definition of the mtk_ddp_comp_id enum should be placed in mtk-mmsys.h

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20201006193320.405529-2-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: add mt6779 devapc driver
Neal Liu [Thu, 15 Oct 2020 03:20:39 +0000 (11:20 +0800)]
soc: mediatek: add mt6779 devapc driver

MediaTek bus fabric provides TrustZone security support and data
protection to prevent slaves from being accessed by unexpected
masters.
The security violation is logged and sent to the processor for
further analysis or countermeasures.

Any occurrence of security violation would raise an interrupt, and
it will be handled by mtk-devapc driver. The violation
information is printed in order to find the murderer.

Signed-off-by: Neal Liu <neal.liu@mediatek.com>
Link: https://lore.kernel.org/r/1602732039-12179-3-git-send-email-neal.liu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agodt-bindings: devapc: add bindings for mtk-devapc
Neal Liu [Thu, 15 Oct 2020 03:20:38 +0000 (11:20 +0800)]
dt-bindings: devapc: add bindings for mtk-devapc

Add bindings for mtk-devapc.

Signed-off-by: Neal Liu <neal.liu@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1602732039-12179-2-git-send-email-neal.liu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc / drm: mediatek: cmdq: Remove timeout handler in helper function
Chun-Kuang Hu [Mon, 2 Nov 2020 00:04:38 +0000 (08:04 +0800)]
soc / drm: mediatek: cmdq: Remove timeout handler in helper function

For each client driver, its timeout handler need to dump hardware register
or its state machine information, and their way to detect timeout are
also different, so remove timeout handler in helper function and
let client driver implement its own timeout handler.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20201102000438.29225-1-chunkuang.hu@kernel.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agopcmcia: at91_cf: remove platform data support
Alexandre Belloni [Wed, 30 Sep 2020 18:48:03 +0000 (20:48 +0200)]
pcmcia: at91_cf: remove platform data support

Board file support has been removed for at91rm9200 back in 2014, make the
CF driver DT only.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200930184804.3127757-2-alexandre.belloni@bootlin.com
3 years agopcmcia: at91_cf: move definitions locally
Alexandre Belloni [Wed, 30 Sep 2020 18:48:02 +0000 (20:48 +0200)]
pcmcia: at91_cf: move definitions locally

struct at91_cf_data is only used in the driver since all the platforms moved
to device tree, move its definition locally.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200930184804.3127757-1-alexandre.belloni@bootlin.com
3 years agoMerge tag 'scmi-updates-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Fri, 27 Nov 2020 20:06:06 +0000 (21:06 +0100)]
Merge tag 'scmi-updates-5.11' of git://git./linux/kernel/git/sudeep.holla/linux into arm/drivers

ARM SCMI updates for v5.11

Two main additions this time:
1. Support for SCMI v3.0 sensor extensions
2. Support for voltage domain management protocol added newly to SCMI v3.0

* tag 'scmi-updates-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Remove residual _le structs naming
  firmware: arm_scmi: Add SCMI v3.0 sensor notifications
  firmware: arm_scmi: Add SCMI v3.0 sensor configuration support
  firmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads
  hwmon: (scmi) Update hwmon internal scale data type
  firmware: arm_scmi: Add support to enumerated SCMI voltage domain device
  firmware: arm_scmi: Add voltage domain management protocol support
  dt-bindings: arm: Add support for SCMI Regulators
  firmware: arm_scmi: Add SCMI v3.0 sensors descriptors extensions
  firmware: arm_scmi: Add full list of sensor type enumeration
  firmware: arm_scmi: Rework scmi_sensors_protocol_init
  firmware: arm_scmi: Fix missing destroy_workqueue()

Link: https://lore.kernel.org/r/20201124122412.22386-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoBackmerge tag 'v5.10-rc2' into arm/drivers
Arnd Bergmann [Fri, 27 Nov 2020 20:04:53 +0000 (21:04 +0100)]
Backmerge tag 'v5.10-rc2' into arm/drivers

The SCMI pull request for the arm/drivers branch requires v5.10-rc2
because of dependencies with other git trees, so merge that in here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'tegra-for-5.11-firmware' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Fri, 27 Nov 2020 16:57:13 +0000 (17:57 +0100)]
Merge tag 'tegra-for-5.11-firmware' of git://git./linux/kernel/git/tegra/linux into arm/drivers

firmware: tegra: Changes for v5.11-rc1

Contains a single fix for a strncpy()/strncat() issue that some versions
of GCC are reporting.

* tag 'tegra-for-5.11-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: fix strncpy()/strncat() confusion

Link: https://lore.kernel.org/r/20201127144329.124891-3-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'tegra-for-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Arnd Bergmann [Fri, 27 Nov 2020 16:56:09 +0000 (17:56 +0100)]
Merge tag 'tegra-for-5.11-soc' of git://git./linux/kernel/git/tegra/linux into arm/drivers

soc/tegra: Changes for v5.11-rc1

This contains a couple of warning fixes and a fix for a mostly harmless
bug in the process ID retrieval code.

* tag 'tegra-for-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: fuse: Fix index bug in get_process_id
  soc: tegra: fuse: speedo-tegra210: Remove a group of set but unused variables
  soc: tegra: fuse: speedo-tegra124: Remove some set but unused variables

Link: https://lore.kernel.org/r/20201127144329.124891-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'renesas-drivers-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Fri, 27 Nov 2020 16:55:09 +0000 (17:55 +0100)]
Merge tag 'renesas-drivers-for-v5.11-tag2' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.11 (take two)

  - Stop using __raw_*() I/O accessors.

* tag 'renesas-drivers-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors

Link: https://lore.kernel.org/r/20201127132155.77418-4-geert@linux-m68k.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agosoc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors
Geert Uytterhoeven [Thu, 19 Nov 2020 12:52:14 +0000 (13:52 +0100)]
soc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors

There is no reason to keep on using the __raw_{read,write}l() I/O
accessors in Renesas ARM driver code.  Switch to using the plain
{read,write}l() I/O accessors, to have a chance that this works on
big-endian.

Suggested-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201119125214.4065925-1-geert+renesas@glider.be
3 years agosoc: mediatek: pm-domains: Add support for mt8192
Weiyi Lu [Fri, 30 Oct 2020 11:36:22 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add support for mt8192

Add the needed board data to support mt8192 SoC.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Weiyi Lu <weiyi.lu@mediatek.com>
Link: https://lore.kernel.org/r/20201030113622.201188-17-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add default power off flag
Weiyi Lu [Fri, 30 Oct 2020 11:36:21 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add default power off flag

For some power domain, like conn on MT8192, it should be default OFF.
Because the power on/off control relies the function of connectivity chip
and its firmware. And if project choose other chip vendor solution,
those necessary connectivity functions will not provided.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-16-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add support for mt8183
Matthias Brugger [Fri, 30 Oct 2020 11:36:17 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add support for mt8183

Add the needed board data to support mt8183 SoC.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-12-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Allow bus protection to ignore clear ack
Matthias Brugger [Fri, 30 Oct 2020 11:36:15 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Allow bus protection to ignore clear ack

In some cases the hardware does not create an acknowledgment of the
bus protection clearing. Add a flag to the bus protection indicating
that a clear event will be ignored.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-10-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add subsystem clocks
Matthias Brugger [Fri, 30 Oct 2020 11:36:14 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add subsystem clocks

For the bus protection operations, some subsystem clocks need to be enabled
before releasing the protection. This patch identifies the subsystem clocks
by it's name.

Suggested-by: Weiyi Lu <weiyi.lu@mediatek.com>
[Adapted the patch to the mtk-pm-domains driver]
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-9-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add extra sram control
Matthias Brugger [Fri, 30 Oct 2020 11:36:13 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add extra sram control

For some power domains like vpu_core on MT8183 whose sram need to do clock
and internal isolation while power on/off sram. We add a cap
"MTK_SCPD_SRAM_ISO" to judge if we need to do the extra sram isolation
control or not.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-8-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add SMI block as bus protection block
Matthias Brugger [Fri, 30 Oct 2020 11:36:12 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add SMI block as bus protection block

Apart from the infracfg block, the SMI block is used to enable the bus
protection for some power domains. Add support for this block.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-7-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm_domains: Make bus protection generic
Matthias Brugger [Fri, 30 Oct 2020 11:36:11 +0000 (12:36 +0100)]
soc: mediatek: pm_domains: Make bus protection generic

Bus protection is not exclusively done by calling the infracfg misc driver.
Make the calls for setting and clearing the bus protection generic so
that we can use other blocks for it as well.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-6-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: pm-domains: Add bus protection protocol
Matthias Brugger [Fri, 30 Oct 2020 11:36:10 +0000 (12:36 +0100)]
soc: mediatek: pm-domains: Add bus protection protocol

Bus protection will need to update more then one register
in infracfg. Add support for several operations.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-5-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agosoc: mediatek: Add MediaTek SCPSYS power domains
Enric Balletbo i Serra [Fri, 30 Oct 2020 11:36:08 +0000 (12:36 +0100)]
soc: mediatek: Add MediaTek SCPSYS power domains

The System Control Processor System (SCPSYS) has several power management
related tasks in the system. This driver implements support to handle
the different power domains supported in order to meet high performance
and low power requirements.

Co-developed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201030113622.201188-3-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agoMerge tag 'v5.10-next-pm-domains-stable' into HEAD
Matthias Brugger [Fri, 27 Nov 2020 11:04:34 +0000 (12:04 +0100)]
Merge tag 'v5.10-next-pm-domains-stable' into HEAD

3 years agoMerge tag 'ib-mfd-mediatek-v5.11' into HEAD
Matthias Brugger [Fri, 27 Nov 2020 11:04:26 +0000 (12:04 +0100)]
Merge tag 'ib-mfd-mediatek-v5.11' into HEAD

Immutable branch between MFD and MediaTek due for the v5.11 merge window

3 years agodt-bindings: power: Add MT8192 power domains
Weiyi Lu [Fri, 30 Oct 2020 11:36:20 +0000 (12:36 +0100)]
dt-bindings: power: Add MT8192 power domains

Add power domains dt-bindings for MT8192.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201030113622.201188-15-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agodt-bindings: power: Add MT8183 power domains
Enric Balletbo i Serra [Fri, 30 Oct 2020 11:36:16 +0000 (12:36 +0100)]
dt-bindings: power: Add MT8183 power domains

Add power domains dt-bindings for MT8183.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201030113622.201188-11-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agodt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller
Enric Balletbo i Serra [Fri, 30 Oct 2020 11:36:07 +0000 (12:36 +0100)]
dt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller

The System Control Processor System (SCPSYS) has several power management
related tasks in the system. Add the bindings to define the power
domains for the SCPSYS power controller.

Co-developed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201030113622.201188-2-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
3 years agoMerge tag 'memory-controller-drv-tegra-5.11-2' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Thu, 26 Nov 2020 21:05:15 +0000 (22:05 +0100)]
Merge tag 'memory-controller-drv-tegra-5.11-2' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.11 - Tegra SoC

There is a bigger work from Dmitry Osipenko around Tegra SoC memory
controller drivers, mostly towards adding interconnect support and
integration with devfreq.  This work touches all Tegra memory controller
drivers and also few other SoC-related parts.  It's not yet finished but
the intermediate stage seems ready to merge.

Beside that Tegra 210 memory controller got few fixes and received new
swgroups (work of Nicolin Chen).

* tag 'memory-controller-drv-tegra-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (38 commits)
  memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe
  memory: tegra: Complete tegra210_swgroups
  memory: tegra30-emc: Continue probing if timings are missing in device-tree
  memory: tegra30-emc: Make driver modular
  memory: tegra30: Add FIFO sizes to memory clients
  memory: tegra20-emc: Add devfreq support
  memory: tegra20-emc: Remove IRQ number from error message
  memory: tegra20-emc: Factor out clk initialization
  memory: tegra20-emc: Use dev_pm_opp_set_clkname()
  memory: tegra: Correct stub of devm_tegra_memory_controller_get()
  memory: tegra20: Support interconnect framework
  memory: tegra20-emc: Continue probing if timings are missing in device-tree
  memory: tegra20-emc: Make driver modular
  memory: tegra-mc: Add interconnect framework
  memory: tegra: Add missing latency allowness entry for Page Table Cache
  memory: tegra: Remove superfluous error messages around platform_get_irq()
  memory: tegra: Use devm_platform_ioremap_resource()
  memory: tegra: Add and use devm_tegra_memory_controller_get()
  dt-bindings: host1x: Document new interconnect properties
  dt-bindings: tegra30-actmon: Document OPP and interconnect properties
  ...

Link: https://lore.kernel.org/r/20201126191241.23302-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'memory-controller-drv-5.11' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Thu, 26 Nov 2020 21:03:19 +0000 (22:03 +0100)]
Merge tag 'memory-controller-drv-5.11' of git://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.11

1. jz4780_nemc: fix devm_ioremap() return value check leading to
   potential NULL pointer dereference.
2. mediatek: Convert bindings to dtschema and add support for mt8192.
3. pl353-smc: Fix compile test.

* tag 'memory-controller-drv-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: pl353-smc: fix compile test on !ARM_AMBA
  memory: mtk-smi: Add mt8192 support
  dt-bindings: memory: mediatek: Add mt8192 support
  dt-bindings: memory: mediatek: Convert SMI to DT schema
  MAINTAINERS: add dt binding headers to memory controller drivers entry
  memory: jz4780_nemc: Fix an error pointer vs NULL check in probe()

Link: https://lore.kernel.org/r/20201125184529.5392-1-krzk@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agoMerge tag 'soc-fsl-next-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/leo...
Arnd Bergmann [Thu, 26 Nov 2020 21:00:55 +0000 (22:00 +0100)]
Merge tag 'soc-fsl-next-v5.11' of git://git./linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.11

- Add RCPM errata workaround for A-008646 on LS1021A
- Various W=1 warning fixes for fsl/soc drivers

* tag 'soc-fsl-next-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  soc: fsl: handle RCPM errata A-008646 on SoC LS1021A
  soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq'
  soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'
  soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours

Link: https://lore.kernel.org/r/20201125165913.15441-1-leoyang.li@nxp.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agomemory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe
Nathan Chancellor [Thu, 19 Nov 2020 19:52:44 +0000 (12:52 -0700)]
memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe

Clang warns:

  drivers/memory/tegra/tegra30-emc.c:1275:15: warning: variable 'np' is uninitialized when used here [-Wuninitialized]
                of_node_put(np);
                            ^~
  drivers/memory/tegra/tegra30-emc.c:1269:24: note: initialize the variable 'np' to silence this warning

There does not need to be an of_node_put call in this error handling
block after the shuffling of the np assignment. Remove it so there is
no use of uninitialized memory.

Fixes: 5e00fd90183a ("memory: tegra30-emc: Continue probing if timings are missing in device-tree")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201119195244.1517236-1-natechancellor@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Complete tegra210_swgroups
Nicolin Chen [Thu, 8 Oct 2020 00:37:46 +0000 (17:37 -0700)]
memory: tegra: Complete tegra210_swgroups

According to Tegra X1 TRM, there are missing swgroups in the
tegra210_swgroups list. So this patch adds them to the list.

Note that the TEGRA_SWGROUP_GPU (in list) should be actually
TEGRA_SWGROUP_GPUB (in TRM), yet TEGRA_SWGROUP_GPU (in TRM) is not being
used -- only TEGRA_SWGROUP_GPUB (in TRM) is. So this patch does not add
TEGRA_SWGROUP_GPU (in TRM) and keeps TEGRA_SWGROUP_GPU (in list)
as it is.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201008003746.25659-6-nicoleotsuka@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra30-emc: Continue probing if timings are missing in device-tree
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:38 +0000 (04:14 +0300)]
memory: tegra30-emc: Continue probing if timings are missing in device-tree

EMC driver will become mandatory after turning it into interconnect
provider because interconnect users, like display controller driver, will
fail to probe using newer device-trees that have interconnect properties.
Thus make EMC driver to probe even if timings are missing in device-tree.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-9-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra30-emc: Make driver modular
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:37 +0000 (04:14 +0300)]
memory: tegra30-emc: Make driver modular

Add modularization support to the Tegra30 EMC driver, which now can be
compiled as a loadable kernel module.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-8-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra30: Add FIFO sizes to memory clients
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:36 +0000 (04:14 +0300)]
memory: tegra30: Add FIFO sizes to memory clients

The latency allowness is calculated based on buffering capabilities of
memory clients. Add FIFO sizes to the Tegra30 memory clients.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-7-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Add devfreq support
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:34 +0000 (04:14 +0300)]
memory: tegra20-emc: Add devfreq support

Add devfreq support to the Tegra20 EMC driver. Memory utilization
statistics will be periodically polled from the memory controller and
appropriate minimum clock rate will be selected by the devfreq governor.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20201111011456.7875-5-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Remove IRQ number from error message
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:35 +0000 (04:14 +0300)]
memory: tegra20-emc: Remove IRQ number from error message

Remove IRQ number from error message since it doesn't add any useful
information, especially because this number is virtual.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-6-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Factor out clk initialization
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:33 +0000 (04:14 +0300)]
memory: tegra20-emc: Factor out clk initialization

Factor out clk initialization and make it resource-managed. This makes
easier to follow code and will help to make further changes cleaner.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-4-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Use dev_pm_opp_set_clkname()
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:32 +0000 (04:14 +0300)]
memory: tegra20-emc: Use dev_pm_opp_set_clkname()

The dev_pm_opp_get_opp_table() shouldn't be used by drivers, use
dev_pm_opp_set_clkname() instead.

Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-3-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Correct stub of devm_tegra_memory_controller_get()
Dmitry Osipenko [Wed, 11 Nov 2020 01:14:31 +0000 (04:14 +0300)]
memory: tegra: Correct stub of devm_tegra_memory_controller_get()

Correct typo in a stub of devm_tegra_memory_controller_get() to fix a
non-ARM kernel compile-testing.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201111011456.7875-2-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20: Support interconnect framework
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:11 +0000 (19:49 +0300)]
memory: tegra20: Support interconnect framework

Now Internal and External Memory Controllers are memory interconnection
providers. This allows us to use interconnect API for tuning of memory
configuration. EMC driver now supports OPPs and DVFS.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-36-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Continue probing if timings are missing in device-tree
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:10 +0000 (19:49 +0300)]
memory: tegra20-emc: Continue probing if timings are missing in device-tree

EMC driver will become mandatory after turning it into interconnect
provider because interconnect users, like display controller driver, will
fail to probe using newer device-trees that have interconnect properties.
Thus make EMC driver to probe even if timings are missing in device-tree.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-35-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra20-emc: Make driver modular
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:09 +0000 (19:49 +0300)]
memory: tegra20-emc: Make driver modular

Add modularization support to the Tegra20 EMC driver, which now can be
compiled as a loadable kernel module.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201104164923.21238-34-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra-mc: Add interconnect framework
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:08 +0000 (19:49 +0300)]
memory: tegra-mc: Add interconnect framework

Add common SoC-agnostic ICC framework which turns Tegra Memory Controller
into a memory interconnection provider. This allows us to use interconnect
API for tuning of memory configurations.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-33-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Add missing latency allowness entry for Page Table Cache
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:07 +0000 (19:49 +0300)]
memory: tegra: Add missing latency allowness entry for Page Table Cache

Add missing PTC memory client latency allowness entry to the Tegra MC
drivers.

This prevents erroneous clearing of MC_INTSTATUS 0x0 register during
of the LA programming in tegra_mc_setup_latency_allowance() due to the
missing entry. Note that this patch doesn't fix any known problems.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-32-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Remove superfluous error messages around platform_get_irq()
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:06 +0000 (19:49 +0300)]
memory: tegra: Remove superfluous error messages around platform_get_irq()

The platform_get_irq() prints error message telling that interrupt is
missing, hence there is no need to duplicated that message in the drivers.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20201104164923.21238-31-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Use devm_platform_ioremap_resource()
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:05 +0000 (19:49 +0300)]
memory: tegra: Use devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() helper which makes code a bit
cleaner.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201104164923.21238-30-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: qcom: rpmhpd: Add SDX55 power domains
Vinod Koul [Thu, 26 Nov 2020 09:27:11 +0000 (14:57 +0530)]
soc: qcom: rpmhpd: Add SDX55 power domains

This adds the power domains found in SDX55 SoC. Downstream code tells me
that we have 3 power domains so add them

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20201126092711.1084518-2-vkoul@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agomemory: tegra: Add and use devm_tegra_memory_controller_get()
Dmitry Osipenko [Wed, 4 Nov 2020 16:49:04 +0000 (19:49 +0300)]
memory: tegra: Add and use devm_tegra_memory_controller_get()

Multiple Tegra drivers need to retrieve Memory Controller and there is
duplication of the retrieval code among the drivers.

Add new devm_tegra_memory_controller_get() helper to remove the code's
duplication and to fix put_device() which was missed in the duplicated
code. Make EMC drivers to use the new helper.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201104164923.21238-29-digetx@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agodt-bindings: power: Add rpm power domain bindings for sdx55
Vinod Koul [Thu, 26 Nov 2020 09:27:10 +0000 (14:57 +0530)]
dt-bindings: power: Add rpm power domain bindings for sdx55

Add RPM power domain bindings for the SDX55 SoC

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20201126092711.1084518-1-vkoul@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agoMerge tag 'tegra-soc-clk-drivers-5.11' into for-v5.11/tegra-mc
Krzysztof Kozlowski [Thu, 26 Nov 2020 17:50:04 +0000 (18:50 +0100)]
Merge tag 'tegra-soc-clk-drivers-5.11' into for-v5.11/tegra-mc

Tegra SoC and clock controller changes for v5.11

Export symbols and add stubs necessary for upcoming modified Tegra
memory controller drivers (touching also devfreq and interconnect).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write()
Maulik Shah [Thu, 26 Nov 2020 08:31:30 +0000 (14:01 +0530)]
soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write()

Use __fill_rpmh_msg API during rpmh_write(). This allows to
remove duplication of code in error checking, copying commands
and setting message state.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://lore.kernel.org/r/1606379490-4052-1-git-send-email-mkshah@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosamples: qmi: Constify static qmi ops
Rikard Falkeborn [Tue, 24 Nov 2020 21:29:54 +0000 (22:29 +0100)]
samples: qmi: Constify static qmi ops

The only usage of qmi_sample_handlers[] and lookup_ops is to pass their
addresses to qmi_handle_init() which accepts const pointers to both
qmi_ops and qmi_msg_handler. Make them const to allow the compiler to
put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20201124212954.17750-1-rikard.falkeborn@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: sunxi: Fix compilation of sunxi_mbus
Maxime Ripard [Tue, 24 Nov 2020 10:35:46 +0000 (11:35 +0100)]
soc: sunxi: Fix compilation of sunxi_mbus

dma_direct_set_offset has been moved from dma-mapping.h to
dma-map-ops.h, but our driver hasn't been updated resulting in a build
breakage. Let's change the header to fix the build.

Fixes: 16fee29b0735 ("dma-mapping: remove the dma_direct_set_offset export")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20201124103546.839711-1-maxime@cerno.tech'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
3 years agosoc: fsl: handle RCPM errata A-008646 on SoC LS1021A
Biwen Li [Mon, 2 Nov 2020 07:26:50 +0000 (15:26 +0800)]
soc: fsl: handle RCPM errata A-008646 on SoC LS1021A

Hardware issue:
- Reading register RCPM_IPPDEXPCR1 always return zero, this causes
  system firmware could not get correct information and wrongly do
  clock gating for all wakeup source IP during system suspend. Then
  those IPs will never get chance to wake system.

Workaround:
- Copy register RCPM_IPPDEXPCR1's setting to register SCFG_SPARECR8
  to allow system firmware's psci method read it and do things accordingly.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>