Arnd Bergmann [Fri, 14 Apr 2023 12:34:17 +0000 (14:34 +0200)]
Merge tag 'qcom-drivers-for-6.4' of https://git./linux/kernel/git/qcom/linux into soc/drivers
Qualcomm driver updates for v6.4
The Qualcomm SCM driver will now always clear the download bit, avoiding
entering download mode on a clean reboot because the bootloader left it
set. The vmid bitmap passed to qcom_scm_assign_mem() is transitioned to
a well defined size. SM6375 support is added, and SC8180X,
QDU1000/QRU1000, IPQ5332 and IPQ9574 compatibles are documented.
GENI gains support for newer hardware with deeper FIFOs.
The BWMON driver is updated to better handle the two register blocks,
which are not consistent between MSM8998 and newer platforms.
The LLCC driver no longer assumes a fixes stride across the various
banks, and instead acquire the bank placement from DeviceTree. EDAC
support for polling is introduced. EDAC support on SDM845 is disabled,
as its been observed that accessing relevant registers is not permitted
on most devices.
PMIC GLINK is reworked to support defining which auxiliary children to
spawn per platform, support for spawning a UCSI child is added and
SM8450 and SM8550 is introduced.
The RPM power-domain driver is cleaned up by moving and generalizing
structures that are common between platforms, rather than duplicating
everything. Macros are replaced with just direct definition of the
relevant structures. Support for defining parent relationships between
the power-domains is introduced, like it has been in rpmhpd for a long
time.
Number of processors has gone up, so max processor count in SMEM
is bumped again. Error handling in SMSM is cleaned up using
dev_err_probe().
Socinfo is taught about IPQ9574, QCM2290, QRB2210, QRB4210, SM7150,
SA8775P and a number of PMICs.
* tag 'qcom-drivers-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (51 commits)
dt-bindings: firmware: document Qualcomm SC8180X SCM
dt-bindings: sram: qcom,imem: document SM6375 IMEM
soc: qcom: icc-bwmon: Handle global registers correctly
soc: qcom: icc-bwmon: Remove unused struct member
soc: qcom: smsm: Use dev_err_probe()
firmware: qcom_scm: Add SM6375 compatible
soc: qcom: llcc: Add configuration data for SM7150
dt-bindings: arm: msm: Add LLCC for SM7150
dt-bindings: soc: qcom: smd-rpm: re-add missing qcom,rpm-msm8994
soc: qcom: pmic_glink: register ucsi aux device
dt-bindings: soc: qcom: qcom,pmic-glink: document SM8550 compatible
dt-bindings: soc: qcom: qcom,pmic-glink: document SM8450 compatible
firmware: qcom_scm: Clear download bit during reboot
dt-bindings: soc: qcom: aoss: Document QDU1000/QRU1000 compatible
dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible
dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible
firmware: qcom_scm: Use fixed width src vm bitmap
dt-bindings: firmware: qcom,scm: document IPQ5332 SCM
dt-bindings: scm: Add compatible for IPQ9574
soc: qcom: rpmpd: Remove useless comments
...
Link: https://lore.kernel.org/r/20230410152421.4477-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:33:36 +0000 (14:33 +0200)]
Merge tag 'ti-driver-soc-for-v6.4' of git://git./linux/kernel/git/ti/linux into soc/drivers
TI SoC driver updates for v6.4
* Minor fixups for of_property, using devm_platform_ioremap
* Fixups for refcount leaks in pm33xx
* Fixups for k3-ringacc for dmaring_request
* SoCinfo detection for J784S4 SoC.
* tag 'ti-driver-soc-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
soc: ti: Use devm_platform_ioremap_resource()
soc: ti: k3-socinfo: Add entry for J784S4 SOC
soc: ti: Use of_property_read_bool() for boolean properties
soc: ti: Use of_property_present() for testing DT property presence
soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe
soc: ti: k3-ringacc: Add try_module_get() to k3_dmaring_request_dual_ring()
Link: https://lore.kernel.org/r/20230410140506.ucvkwq7vz2h47vyj@stipulate
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:32:54 +0000 (14:32 +0200)]
Merge tag 'renesas-drivers-for-v6.4-tag2' of git://git./linux/kernel/git/geert/renesas-devel into soc/drivers
Renesas driver updates for v6.4 (take two)
- Add "renesas," file contents pattern to MAINTAINERS,
- Fix a small leak on OOM.
* tag 'renesas-drivers-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
soc: renesas: renesas-soc: Release 'chipid' from ioremap()
MAINTAINERS: renesas: Add "renesas," file contents pattern
Link: https://lore.kernel.org/r/cover.1681113115.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:32:12 +0000 (14:32 +0200)]
Merge tag 'sunxi-drivers-for-6.4-1' of https://git./linux/kernel/git/sunxi/linux into soc/drivers
- remove MODULE_LICENSE from sram driver
- use of_property_present() in mbus driver
* tag 'sunxi-drivers-for-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
kbuild, soc: sunxi: sram: remove MODULE_LICENSE in non-modules
soc: sunxi: Use of_property_present() for testing DT property presence
Link: https://lore.kernel.org/r/20230408125255.GA17134@jernej-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:30:59 +0000 (14:30 +0200)]
Merge tag 'imx-drivers-6.4' of git://git./linux/kernel/git/shawnguo/linux into soc/drivers
i.MX drivers update for 6.4:
- Use dev_err_probe() for imx-scu driver to silences EPROBE_DEFER
messages.
- Add LVDS LPI2C and PWM power domains for scu-pd driver.
- A series from Jindong Yue to support module build of imx8m soc driver.
- Update imx8m-blk-ctrl driver to scan child nodes for binding drivers.
- Reorder structure members in imx8m-blk-ctrl driver by following
clang-analyzer suggestion.
- Update imx-weim bus driver to use helper function for "ranges"
parsing.
* tag 'imx-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
soc: imx: imx8m-blk-ctrl: reordering the fields
soc: imx8m: Support building imx8m soc driver as module
soc: imx8m: Add MODULE_LICENSE
soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE
soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name
soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE
soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match
soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
firmware: imx: scu-pd: add missed lvds lpi2c and pwm power domains
bus: imx-weim: Remove open coded "ranges" parsing
firmware: imx: scu: use dev_err_probe
Link: https://lore.kernel.org/r/20230408101928.280271-1-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:30:13 +0000 (14:30 +0200)]
Merge tag 'riscv-soc-for-v6.4' of https://git./linux/kernel/git/conor/linux into soc/drivers
RISC-V SoC drivers for v6.4
Microchip:
Mailbox controller & client changes for the system controller on
PolarFire SoC. The controller bits have been acked by Jassi.
Primarily the changes work around a "hardware" bug (really the system
controller's software, but it may as well be hardware as customers
cannot change it) where interrupts are not generated if a service fails.
The mailbox controller driver is tweaked to use polling, rather than
interrupt, mode and there are some changes to timeout code required in
the client driver as a result. There's some opportunistic cleanup that I
performed while doing the swap too.
Canaan:
A single fix for some randconfig issues that crop up when !mmu is
enabled for 32-bit kernels, due to my changes in a previous release that
swapped out select based entablement of the driver.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* tag 'riscv-soc-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
soc: microchip: mpfs: add a prefix to rx_callback()
soc: microchip: mpfs: handle timeouts and failed services differently
soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()
soc: microchip: mpfs: use a consistent completion timeout
soc: microchip: mpfs: fix some horrible alignment
mailbox: mpfs: check the service status in .tx_done()
mailbox: mpfs: ditch a useless busy check
mailbox: mpfs: switch to txdone_poll
mailbox: mpfs: fix an incorrect mask width
soc: canaan: Make K210_SYSCTL depend on CLK_K210
Link: https://lore.kernel.org/r/20230406-islamist-mop-81d651b8830d@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:16:11 +0000 (14:16 +0200)]
Merge tag 'tegra-for-6.4-firmware' of git://git./linux/kernel/git/tegra/linux into soc/drivers
soc/tegra: Changes for v6.4-rc1
This contains minor fixes and cleanups. Note that one of the patches
here includes ARM firmware changes, but I picked that up after checking
with Sudeep and Rob because it didn't seem worth splitting it up any
further.
* tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
firmware: Use of_property_present() for testing DT property presence
firmware: tegra: bpmp: Fix error paths in debugfs
Link: https://lore.kernel.org/r/20230406124804.970394-3-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:15:19 +0000 (14:15 +0200)]
Merge tag 'tegra-for-6.4-soc' of git://git./linux/kernel/git/tegra/linux into soc/drivers
soc/tegra: Changes for v6.4-rc1
Contains various minor cleanups and fixes as well as support for several
more wake events on Tegra234.
* tag 'tegra-for-6.4-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
soc/tegra: fuse: Remove nvmem root only access
soc/tegra: cbb: tegra194: Use of_address_count() helper
soc/tegra: cbb: Remove MODULE_LICENSE in non-modules
soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()
soc: tegra: cbb: Drop empty platform remove function
soc/tegra: pmc: Support software wake-up for SPE
soc/tegra: pmc: Add wake source interrupt for MGBE
soc/tegra: pmc: Add the PMIC wake event for Tegra234
soc/tegra: bpmp: Actually free memory on error path
soc/tegra: cbb: remove linux/version.h
Link: https://lore.kernel.org/r/20230406124804.970394-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:12:48 +0000 (14:12 +0200)]
Merge tag 'tegra-for-6.4-arm-core' of git://git./linux/kernel/git/tegra/linux into soc/drivers
ARM: tegra: Core changes for v6.4-rc1
This contains a single commit to drop MODULE_LICENSE() from a driver
that can't be built as a module since that can now confuse tooling.
* tag 'tegra-for-6.4-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
ARM: tegra: Remove MODULE_LICENSE in non-modules
Link: https://lore.kernel.org/r/20230406124804.970394-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 14 Apr 2023 12:12:05 +0000 (14:12 +0200)]
Merge tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux into soc/drivers
Apple SoC RTKit updates for 6.4.
Just one bugfix and one improvement to how forwarded syslogs are sent to
dmesg.
* tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux:
soc: apple: rtkit: Crop syslog messages
soc: apple: rtkit: Fix buffer address field width
Link: https://lore.kernel.org/r/0dbd2dc1-6a2c-5b21-354b-d8314937e8e7@marcan.st
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Thu, 6 Apr 2023 08:19:33 +0000 (10:19 +0200)]
Merge tag 'optee-load-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers
Add SMC for OP-TEE image loading
Adds an SMC call for loading OP-TEE by the kernel.
* tag 'optee-load-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee:
tee: optee: Add SMC for loading OP-TEE image
Link: https://lore.kernel.org/r/20230405062701.GA3391925@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Kartik [Tue, 17 Jan 2023 08:30:55 +0000 (14:00 +0530)]
soc/tegra: fuse: Remove nvmem root only access
To read fuse values, various "non-root" userspace applications require
access to nvmem binary interface.
Remove root only access for nvmem userspace binary interface.
Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Yang Yingliang [Thu, 27 Oct 2022 06:56:25 +0000 (14:56 +0800)]
soc/tegra: cbb: tegra194: Use of_address_count() helper
After commit
16988c742968 ("of/address: introduce of_address_count() helper"),
We can use of_address_count() to instead of open-coding it.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Nick Alcock [Tue, 28 Feb 2023 13:02:15 +0000 (13:02 +0000)]
soc/tegra: cbb: Remove MODULE_LICENSE in non-modules
Since commit
8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.
So remove it in the files in this commit, none of which can be built as
modules.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
Nick Alcock [Fri, 17 Feb 2023 14:10:44 +0000 (14:10 +0000)]
ARM: tegra: Remove MODULE_LICENSE in non-modules
Since commit
8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.
So remove it in the files in this commit, none of which can be built as
modules.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
Ye Xingchen [Wed, 15 Feb 2023 09:18:03 +0000 (17:18 +0800)]
soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Uwe Kleine-König [Mon, 12 Dec 2022 22:25:49 +0000 (23:25 +0100)]
soc: tegra: cbb: Drop empty platform remove function
A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Vinod Koul [Sat, 25 Mar 2023 12:24:33 +0000 (17:54 +0530)]
dt-bindings: firmware: document Qualcomm SC8180X SCM
Document the compatible for Qualcomm sc8180x SCM.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230325122444.249507-2-vkoul@kernel.org
Konrad Dybcio [Thu, 16 Mar 2023 14:12:52 +0000 (15:12 +0100)]
dt-bindings: sram: qcom,imem: document SM6375 IMEM
Add a compatible for SM6375 IMEM.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-3-708b8191f7eb@linaro.org
Rob Herring [Fri, 10 Mar 2023 14:47:04 +0000 (08:47 -0600)]
firmware: Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Konrad Dybcio [Wed, 15 Mar 2023 14:11:21 +0000 (15:11 +0100)]
soc: qcom: icc-bwmon: Handle global registers correctly
The BWMON hardware has two sets of registers: one for the monitor itself
and one called "global". It has what seems to be some kind of a head
switch and an interrupt control register. It's usually 0x200 in size.
On fairly recent SoCs (with the starting point seemingly being moving
the OSM programming to the firmware) these two register sets are
contiguous and overlapping, like this (on sm8450):
/* notice how base.start == global_base.start+0x100 */
reg = <0x90b6400 0x300>, <0x90b6300 0x200>;
reg-names = "base", "global_base";
Which led to some confusion and the assumption that since the
"interesting" global registers begin right after global_base+0x100,
there's no need to map two separate regions and one can simply subtract
0x100 from the offsets.
This is however not the case for anything older than SDM845, as the
global region can appear in seemingly random spots on the register map.
Handle the case where the global registers are mapped separately to allow
proper functioning of BWMONv4 on MSM8998 and older. Add specific
compatibles for 845, 8280xp, 7280 and 8550 (all of which use the single
reg space scheme) to keep backwards compatibility with old DTs.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-3-77a050c2fbda@linaro.org
Konrad Dybcio [Wed, 15 Mar 2023 14:11:20 +0000 (15:11 +0100)]
soc: qcom: icc-bwmon: Remove unused struct member
bwmon->regmap was never used, as the regmap for bwmon is registered
through devres and accessed through bwmon's regmap_field members.
Remove it
Fixes: ec63dcd3c863 ("soc: qcom: icc-bwmon: use regmap and prepare for BWMON v5")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-2-77a050c2fbda@linaro.org
Arnd Bergmann [Tue, 4 Apr 2023 14:10:21 +0000 (16:10 +0200)]
Merge tag 'amlogic-drivers-for-v6.4' of https://git./linux/kernel/git/amlogic/linux into soc/drivers
Amlogic Drivers changes for v6.4:
- convert clk-measure.txt to dt-schema
- meson-pwrc: Use dev_err_probe()
- meson_sm: populate platform devices from sm device tree data
- dt-bindings: Drop unneeded quotes
* tag 'amlogic-drivers-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
dt-bindings: soc: amlogic: Drop unneeded quotes
firmware: meson_sm: populate platform devices from sm device tree data
soc: amlogic: meson-pwrc: Use dev_err_probe()
dt-bindings: soc: amlogic: convert clk-measure.txt to dt-schema
Link: https://lore.kernel.org/r/aebef87f-e0a3-17dd-12b7-7231ca6b0923@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 4 Apr 2023 14:09:31 +0000 (16:09 +0200)]
Merge tag 'optee-per-cpu-irq-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers
Add OP-TEE per cpu asynchronous notification
Adds support for signalling from secure world with per-cpu interrupts in
addition to edge-triggered peripheral interrupts.
* tag 'optee-per-cpu-irq-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee:
optee: add per cpu asynchronous notification
dt-bindings: optee driver interrupt can be a per-cpu interrupt
Link: https://lore.kernel.org/r/20230404062727.GA2765560@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 4 Apr 2023 14:08:43 +0000 (16:08 +0200)]
Merge tag 'memory-controller-drv-6.4' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers
Memory controller drivers for v6.4
1. STM32 FMC2: allow using driver on all STM32MP SoCs.
2. Cleanups:
- Atmel EBI: use preferred of_property_present() API.
- Tegra210 MC: drop redundant variable initialization.
- Drop redundant quotes in Devicetree bindings.
- Remove MODULE_LICENSE in non-modules (several drivers).
* tag 'memory-controller-drv-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
dt-bindings: memory-controller: Drop unneeded quotes
memory: stm32-fmc2-ebi: depends on ARCH_STM32 instead of MACH_STM32MP157
memory: tegra: remove redundant variable initialization
memory: atmel-ebi: Use of_property_present() for testing DT property presence
memory: remove MODULE_LICENSE in non-modules
memory: tegra: remove MODULE_LICENSE in non-modules
Link: https://lore.kernel.org/r/20230403161427.328128-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 4 Apr 2023 14:07:26 +0000 (16:07 +0200)]
Merge tag 'omap-for-v6.4/ti-sysc-signed' of git://git./linux/kernel/git/tmlind/linux-omap into soc/drivers
Clean-up for ti-sysc driver for v6.4
Clean-up for ti-sysc interconnect target module driver mostly to remove
open coded ranges property parsing, to use of_property_present(), and
to use list_for_each_entry(). Also included is one comment typo change.
* tag 'omap-for-v6.4/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
bus: ti-sysc: Fix comment typo
bus: ti-sysc: Use list_for_each_entry() helper
bus: ti-sysc: Use of_property_present() for testing DT property presence
bus: ti-sysc: Remove open coded "ranges" parsing
Link: https://lore.kernel.org/r/pull-1680180355-69164@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 4 Apr 2023 13:44:38 +0000 (15:44 +0200)]
Merge tag 'renesas-drivers-for-v6.4-tag1' of git://git./linux/kernel/git/geert/renesas-devel into soc/drivers
Renesas driver updates for v6.4
- Drop support for the obsolete R-Car H3 ES1.* (R8A77950) SoC,
- Miscellaneous fixes and improvements.
* tag 'renesas-drivers-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
soc: renesas: Use "#ifdef" for single-symbol definition checks
soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table
soc: renesas: mark OF related data as maybe unused
soc: renesas: rmobile-sysc: Use of_fwnode_handle() helper
soc: renesas: Remove r8a77950 arch
soc: renesas: rcar-sysc: Remove R-Car H3 ES1.* handling
Link: https://lore.kernel.org/r/cover.1679907059.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Li Yang [Fri, 31 Mar 2023 09:55:44 +0000 (17:55 +0800)]
soc: renesas: renesas-soc: Release 'chipid' from ioremap()
Smatch reports:
drivers/soc/renesas/renesas-soc.c:536 renesas_soc_init() warn:
'chipid' from ioremap() not released on lines: 475.
If soc_dev_atrr allocation is failed, function renesas_soc_init()
will return without releasing 'chipid' from ioremap().
Fix this by adding function iounmap().
Fixes: cb5508e47e60 ("soc: renesas: Add support for reading product revision for RZ/G2L family")
Signed-off-by: Li Yang <lidaxian@hust.edu.cn>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230331095545.31823-1-lidaxian@hust.edu.cn
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Conor Dooley [Fri, 31 Mar 2023 07:18:17 +0000 (08:18 +0100)]
soc: microchip: mpfs: add a prefix to rx_callback()
Add a prefix to the function name to match the rest of the file.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Mon, 3 Apr 2023 18:21:09 +0000 (19:21 +0100)]
Merge patch series "mailbox,soc: mpfs: add support for fallible services"
Conor Dooley <conor@kernel.org> says:
Here are some fixes for the system controller on PolarFire SoC that I
ran into while implementing support for using the system controller to
re-program the FPGA. A few are just minor bits that I fixed in passing,
but the bulk of the patchset is changes to how the mailbox figures out
if a "service" has completed.
Prior to implementing this particular functionality, the services
requested from the system controller, via its mailbox interface, always
triggered an interrupt when the system controller was finished with
the service.
Unfortunately some of the services used to validate the FPGA images
before programming them do not trigger an interrupt if they fail.
For example, the service that checks whether an FPGA image is actually
a newer version than what is already programmed, does not trigger an
interrupt, unless the image is actually newer than the one currently
programmed. If it has an earlier version, no interrupt is triggered
and a status is set in the system controller's status register to
signify the reason for the failure.
In order to differentiate between the service succeeding & the system
controller being inoperative or otherwise unable to function, I had to
switch the controller to poll a busy bit in the system controller's
registers to see if it has completed a service.
This makes sense anyway, as the interrupt corresponds to "data ready"
rather than "tx done", so I have changed the mailbox controller driver
to do that & left the interrupt solely for signalling data ready.
It just so happened that all of the services that I had worked with and
tested up to this point were "infallible" & did not set a status, so the
particular code paths were never tested.
Link: https://lore.kernel.org/r/20230307202257.1762151-1-conor@kernel.org
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:58 +0000 (20:22 +0000)]
soc: microchip: mpfs: handle timeouts and failed services differently
The system controller will only deliver an interrupt if a service
succeeds. This leaves us in the unfortunate position with current code
where there is no way to differentiate between a legitimate timeout
where the service has not completed & where it has completed, but
failed.
mbox_send_message() has its own completion, and it will time out of the
system controller does not lower the busy flag. In this case, a timeout
has occurred and the error can be propagated back to the caller.
If the busy flag is lowered, but no interrupt has arrived to trigger the
rx callback, the service can be deemed to have failed. Report -EBADMSG
in this case so that callers can differentiate.
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:57 +0000 (20:22 +0000)]
soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()
The error handling has a kinda weird nested-if setup that is not really
adding anything. Switch it to more of an early return arrangement as a
predatory step for adding different handing for timeouts and failed
services.
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:56 +0000 (20:22 +0000)]
soc: microchip: mpfs: use a consistent completion timeout
Completion timeouts use jiffies, so passing a number directly will
produce inconsistent timeouts depending on config. Define the timeout in
ms and convert it to jiffies instead.
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:55 +0000 (20:22 +0000)]
soc: microchip: mpfs: fix some horrible alignment
mpfs_sys_controller_delete() has some horrible alignment that upsets my
OCD... Move the RHS of the assignment to a new line for greater
satifaction.
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:54 +0000 (20:22 +0000)]
mailbox: mpfs: check the service status in .tx_done()
Services are supposed to generate an interrupt once completed, whether
or not they have do so successfully. What appears to be a bug in the
system controller means that interrupts are only generated for
*successful* services.
Currently, the status of a service is only checked in the
mpfs_mbox_rx_data() once an interrupt is received. As it turns out, this
is not really helpful where the potentially buggy behaviour is present,
as we'll only see the status for successes where it is moot anyway.
Jassi suggested moving the check to the .tx_done() callback instead.
This makes sense, as the busy bit that tx_done() is polling will be
lowered on completion, regardless of whether the service passed or
failed.
That allows us to check the status bits for all services, whether they
generate an interrupt or not & pass something more informative than
-EBADMSG back to the drivers implementing individual services.
Suggested-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:53 +0000 (20:22 +0000)]
mailbox: mpfs: ditch a useless busy check
mpfs_mbox_rx_data() already checks if the system controller is busy
before attempting to do anything, so drop the second check before
reading any data.
No functional change intended.
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:52 +0000 (20:22 +0000)]
mailbox: mpfs: switch to txdone_poll
The system controller on PolarFire SoC has no interrupt to signify that
the TX has been completed. The interrupt instead signals that a service
requested by the mailbox client has succeeded. If a service fails, there
will be no interrupt delivered.
Switch to polling the busy register to determine whether transmission
has completed.
Fixes: 83d7b1560810 ("mbox: add polarfire soc system controller mailbox")
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Conor Dooley [Tue, 7 Mar 2023 20:22:51 +0000 (20:22 +0000)]
mailbox: mpfs: fix an incorrect mask width
The system controller registers on PolarFire SoC are 32 bits wide, so
16 + 16 as the first input to GENMASK_ULL() gives a 33 bit wide mask.
It probably should have been immediately obvious when it was pointed
out during review that the width required using GENMASK_ULL() - but I
scarcely knew what I was doing at the time and missed it.
The mistake ends up being moot as it is a mask after all, but it is
incorrect and should be fixed.
No functional change intended.
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Petlozu Pravareshwar [Thu, 30 Mar 2023 17:06:21 +0000 (17:06 +0000)]
soc/tegra: pmc: Support software wake-up for SPE
The Sensor Processing Engine(SPE) can trigger a software wake-up of
the device. To support this wake-up for the SPE, set SR_CAPTURE_EN
bit in WAKE_AOWAKE_CNTRL register associated with the wake-up for
the SPE. This SR capturing logic is expected to be enabled for wakes
with short pulse signalling requirements.
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Sushil Singh [Thu, 23 Mar 2023 13:13:24 +0000 (18:43 +0530)]
soc/tegra: pmc: Add wake source interrupt for MGBE
Add the GPIO wake interrupt for MGBE ethernet controller on Tegra234 SoC.
Signed-off-by: Sushil Singh <sushilkumars@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Jon Hunter [Mon, 6 Mar 2023 15:09:00 +0000 (15:09 +0000)]
soc/tegra: pmc: Add the PMIC wake event for Tegra234
Add the PMIC wake event for Tegra234 that is used to bring the device
out of system suspend for events such as an RTC alarm.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Mikko Perttunen [Wed, 1 Mar 2023 13:47:56 +0000 (15:47 +0200)]
soc/tegra: bpmp: Actually free memory on error path
Within the error path, genpd->domains has not been set, so we need
to pass the domains variable to kfree instead.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Mikko Perttunen [Wed, 1 Mar 2023 13:47:55 +0000 (15:47 +0200)]
firmware: tegra: bpmp: Fix error paths in debugfs
Some error paths in mrq_debug_read and bpmp_debug_show would overwrite
the return error code with a subsequent call to mrq_debug_close.
Change the code to only change the error code if there was no prior
error.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Jeffrey Kardatzke [Fri, 31 Mar 2023 18:35:47 +0000 (11:35 -0700)]
tee: optee: Add SMC for loading OP-TEE image
Adds an SMC call that will pass an OP-TEE binary image to EL3 and
instruct it to load it as the BL32 payload. This works in conjunction
with a feature added to Trusted Firmware for ARMv8 and above
architectures that supports this.
The main purpose of this change is to facilitate updating the OP-TEE
component on devices via a rootfs change rather than having to do a
firmware update. Further details are linked to in the Kconfig file.
Signed-off-by: Jeffrey Kardatzke <jkardatzke@chromium.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Rob Herring [Fri, 31 Mar 2023 18:21:18 +0000 (13:21 -0500)]
dt-bindings: memory-controller: Drop unneeded quotes
Cleanup bindings dropping unneeded quotes. Once all these are fixed,
checking for this can be enabled in yamllint.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230331182119.1899919-1-robh@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Geert Uytterhoeven [Fri, 17 Mar 2023 07:59:00 +0000 (08:59 +0100)]
MAINTAINERS: renesas: Add "renesas," file contents pattern
Add a keyword match pattern for the word "renesas," in files to the
ARM/RISC-V/RENESAS ARCHITECTURE section. This make sure patches
changing drivers that match against "renesas,<foo>" (as used mostly for
Renesas on-SoC components) are CCed to the linux-renesas-soc mailing
list.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/c1be1e97c5457eade25b0eb5118196677cecfc08.1679039809.git.geert+renesas@glider.be
Etienne Carriere [Wed, 22 Mar 2023 13:22:12 +0000 (14:22 +0100)]
optee: add per cpu asynchronous notification
Implements use of per-cpu irq for optee asynchronous notification.
Existing optee async notif implementation allows OP-TEE world to
raise an interrupt on which Linux optee driver will query some pending
events. This change allows the signaling interrupt to be a per-cpu
interrupt as with Arm GIC PPIs. Using a PPI instead of an SPI is useful
when no GIC lines are provisioned in the chip design and there are spare
PPI lines.
Cc: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Marc Zyngier <maz@kernel.org>
Co-developed-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
[JW: fixing a spell error in @notif_pcpu_wq description]
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Etienne Carriere [Wed, 22 Mar 2023 13:22:11 +0000 (14:22 +0100)]
dt-bindings: optee driver interrupt can be a per-cpu interrupt
Explicit in optee firmware device tree bindings that the interrupt
used by optee driver for async notification can be a peripheral
interrupt or a per-cpu interrupt.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Yang Li [Thu, 23 Mar 2023 08:09:52 +0000 (16:09 +0800)]
soc: ti: Use devm_platform_ioremap_resource()
According to commit
7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), convert platform_get_resource(),
devm_ioremap_resource() to a single call to use
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230323080952.124410-1-yang.lee@linux.alibaba.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Martin Povišer [Fri, 24 Feb 2023 16:21:59 +0000 (17:21 +0100)]
soc: apple: rtkit: Crop syslog messages
Crop trailing whitespace, null, and newline characters in syslog
messages received from coprocessors. Notably DCP sends its messages
including a trailing newline, so prior to this change we would end up
cluttering the kernel log by repeated newlines at the end of messages.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Reviewed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Asahi Lina [Fri, 24 Feb 2023 06:49:44 +0000 (15:49 +0900)]
soc: apple: rtkit: Fix buffer address field width
The buffer address field is missing two bits. This matters for the GPU,
which uses upper-half 64-bit addresses on the ASC and those get sign
extended from the mailbox message field, so the right number of high
bits need to be set.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Hector Martin <marcan@marcan.st>
Rob Herring [Mon, 27 Mar 2023 17:02:22 +0000 (12:02 -0500)]
dt-bindings: soc: amlogic: Drop unneeded quotes
Cleanup bindings dropping unneeded quotes. Once all these are fixed,
checking for this can be enabled in yamllint.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230327170222.4107746-1-robh@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Christophe Kerello [Fri, 24 Mar 2023 15:51:04 +0000 (16:51 +0100)]
memory: stm32-fmc2-ebi: depends on ARCH_STM32 instead of MACH_STM32MP157
To be able to compile the driver on all STM32MP SOCs, we move the
"depends on" on ARCH_STM32.
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Link: https://lore.kernel.org/r/20230324155105.826063-2-christophe.kerello@foss.st.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Dmitry Rokosov [Fri, 24 Mar 2023 14:55:57 +0000 (17:55 +0300)]
firmware: meson_sm: populate platform devices from sm device tree data
In some meson boards, secure monitor device has children, for example,
power secure controller. By default, secure monitor isn't the bus in terms
of device tree subsystem, so the of_platform initialization code doesn't
populate its device tree data. As a result, secure monitor's children
aren't probed at all.
Run the 'of_platform_populate()' routine manually to resolve such issues.
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230324145557.27797-1-ddrokosov@sberdevices.ru
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Jason Wang [Thu, 11 Aug 2022 12:11:19 +0000 (20:11 +0800)]
bus: ti-sysc: Fix comment typo
The double `the' is duplicated in the comment, remove one.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Message-Id: <
20220811121119.20288-1-wangborong@cdjrlc.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Yang Yingliang [Sat, 27 Aug 2022 09:46:04 +0000 (17:46 +0800)]
bus: ti-sysc: Use list_for_each_entry() helper
Convert list_for_each() to list_for_each_entry() where applicable.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Message-Id: <
20220827094604.
3325887-1-yangyingliang@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Ye Xingchen [Fri, 24 Mar 2023 02:16:26 +0000 (10:16 +0800)]
soc: amlogic: meson-pwrc: Use dev_err_probe()
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/202303241016261854322@zte.com.cn
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Rob Herring [Fri, 10 Mar 2023 14:47:34 +0000 (08:47 -0600)]
bus: ti-sysc: Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.
Signed-off-by: Rob Herring <robh@kernel.org>
Message-Id: <
20230310144734.
1546656-1-robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Rob Herring [Wed, 1 Feb 2023 22:00:02 +0000 (16:00 -0600)]
bus: ti-sysc: Remove open coded "ranges" parsing
"ranges" is a standard property and we have common helper functions for
parsing it, so let's use them.
Signed-off-by: Rob Herring <robh@kernel.org>
Message-Id: <
20230201220002.246907-1-robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Peng Fan [Mon, 13 Mar 2023 00:49:03 +0000 (08:49 +0800)]
soc: imx: imx8m-blk-ctrl: reordering the fields
The clang-analyzer reports:
"Excessive padding in 'struct imx8m_blk_ctrl_domain_data'
(12 padding bytes, where 4 is optimal). Optimal fields order: name,
clk_names, path_names, gpc_name, num_clks, num_paths, rst_mask, clk_mask,
mipi_phy_rst_mask, consider reordering the fields or adding explicit
padding members [clang-analyzer-optin.performance.Padding]
struct imx8m_blk_ctrl_domain_data {"
So reordering the fields.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Ye Xingchen [Fri, 24 Mar 2023 02:18:53 +0000 (10:18 +0800)]
soc: qcom: smsm: Use dev_err_probe()
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/202303241018532824420@zte.com.cn
Muhammad Usama Anjum [Fri, 3 Mar 2023 13:03:46 +0000 (18:03 +0500)]
soc/tegra: cbb: remove linux/version.h
make versioncheck reports the following:
./drivers/soc/tegra/cbb/tegra-cbb.c: 19 linux/version.h not needed.
./drivers/soc/tegra/cbb/tegra194-cbb.c: 26 linux/version.h not needed.
./drivers/soc/tegra/cbb/tegra234-cbb.c: 27 linux/version.h not needed.
So remove linux/version.h from these files.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diogo Ivo [Sun, 19 Mar 2023 17:13:03 +0000 (17:13 +0000)]
memory: tegra: remove redundant variable initialization
tegra210_emc_table_device_init() sets count = 0 twice, so
remove the second instance.
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Link: https://lore.kernel.org/r/20230319171303.120777-1-diogo.ivo@tecnico.ulisboa.pt
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Konrad Dybcio [Tue, 7 Mar 2023 01:22:47 +0000 (02:22 +0100)]
firmware: qcom_scm: Add SM6375 compatible
While it was introduced in bindings, requiring a core clock, and added
into the DT, this compatible was apparently forgotten about on the driver
side of things. Fix it.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230307012247.3655547-1-konrad.dybcio@linaro.org
Danila Tikhonov [Sun, 5 Mar 2023 20:26:27 +0000 (23:26 +0300)]
soc: qcom: llcc: Add configuration data for SM7150
Add LLCC configuration data for SM7150 SoC.
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230305202627.402386-3-danila@jiaxyga.com
Danila Tikhonov [Sun, 5 Mar 2023 20:26:26 +0000 (23:26 +0300)]
dt-bindings: arm: msm: Add LLCC for SM7150
Add LLCC compatible for SM7150 SoC.
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230305202627.402386-2-danila@jiaxyga.com
Krzysztof Kozlowski [Sun, 5 Mar 2023 12:24:28 +0000 (13:24 +0100)]
dt-bindings: soc: qcom: smd-rpm: re-add missing qcom,rpm-msm8994
Re-add the qcom,rpm-msm8994 compatible, dropped during conversion from
TXT to DT schema:
apq8094-sony-xperia-kitakami-karin_windy.dtb: smd: rpm:rpm-requests:compatible:0: 'qcom,rpm-msm8994' is not one of ['qcom,rpm-apq8084' ...]
Fixes: f935a752f229 ("dt-bindings: soc: qcom: smd-rpm: Convert binding to YAML schema")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230305122428.167580-1-krzysztof.kozlowski@linaro.org
Neil Armstrong [Tue, 21 Mar 2023 13:21:44 +0000 (14:21 +0100)]
soc: qcom: pmic_glink: register ucsi aux device
Only register UCSI on know working devices, like on the SM8450
or SM8550 which requires UCSI to get USB mode switch events.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-4-552f3b721f9e@linaro.org
Neil Armstrong [Tue, 21 Mar 2023 13:21:43 +0000 (14:21 +0100)]
dt-bindings: soc: qcom: qcom,pmic-glink: document SM8550 compatible
Document the SM8550 compatible used to describe the pmic glink
on this platform.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-3-552f3b721f9e@linaro.org
Neil Armstrong [Tue, 21 Mar 2023 13:21:42 +0000 (14:21 +0100)]
dt-bindings: soc: qcom: qcom,pmic-glink: document SM8450 compatible
Document the SM8450 compatible used to describe the pmic glink
on this platform.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-2-552f3b721f9e@linaro.org
Siddharth Vadapalli [Tue, 14 Mar 2023 08:55:00 +0000 (14:25 +0530)]
soc: ti: k3-socinfo: Add entry for J784S4 SOC
J784S4 SoC's JTAG ID is 0xBB80.
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Link: https://lore.kernel.org/r/20230314085500.10597-1-j-choudhary@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Mukesh Ojha [Thu, 16 Mar 2023 15:14:26 +0000 (20:44 +0530)]
firmware: qcom_scm: Clear download bit during reboot
During normal restart of a system download bit should
be cleared irrespective of whether download mode is
set or not.
Fixes: 8c1b7dc9ba22 ("firmware: qcom: scm: Expose download-mode control")
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1678979666-551-1-git-send-email-quic_mojha@quicinc.com
Geert Uytterhoeven [Mon, 13 Mar 2023 11:02:56 +0000 (12:02 +0100)]
soc: renesas: Use "#ifdef" for single-symbol definition checks
Replace "#if defined(CONFIG_<foo>)" by "#ifdef CONFIG_<foo>" for
brevity.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/6026a3fe36735f0e6a0ecb037bf7c45f42aa3daf.1678705241.git.geert+renesas@glider.be
Krzysztof Kozlowski [Sun, 12 Mar 2023 13:26:50 +0000 (14:26 +0100)]
soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here). This
also fixes a !CONFIG_OF error with W=1:
drivers/soc/renesas/pwc-rzv2m.c:124:34: error: ‘rzv2m_pwc_of_match’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230312132650.352796-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Krzysztof Kozlowski [Sun, 12 Mar 2023 13:26:49 +0000 (14:26 +0100)]
soc: renesas: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused. With W=1:
drivers/soc/renesas/renesas-soc.c:272:34: error: ‘renesas_socs’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230312132650.352796-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Melody Olvera [Mon, 6 Mar 2023 23:11:57 +0000 (15:11 -0800)]
dt-bindings: soc: qcom: aoss: Document QDU1000/QRU1000 compatible
Add compatible for QDU1000 and QRU1000 aoss devices.
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230306231202.12223-3-quic_molvera@quicinc.com
Melody Olvera [Mon, 6 Mar 2023 23:11:56 +0000 (15:11 -0800)]
dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible
Update compatible for QDU1000 and QRU1000 to include the interconnect
these devices have.
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230306231202.12223-2-quic_molvera@quicinc.com
Devi Priya [Fri, 17 Feb 2023 14:20:25 +0000 (19:50 +0530)]
dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible
Document the compatible for RPM communication
over SMD for IPQ9574 SoC
Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230217142030.16012-2-quic_devipriy@quicinc.com
Elliot Berman [Mon, 13 Feb 2023 18:18:29 +0000 (10:18 -0800)]
firmware: qcom_scm: Use fixed width src vm bitmap
The maximum VMID for assign_mem is 63. Use a u64 to represent this
bitmap instead of architecture-dependent "unsigned int" which varies in
size on 32-bit and 64-bit platforms.
Acked-by: Kalle Valo <kvalo@kernel.org> (ath10k)
Tested-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230213181832.3489174-1-quic_eberman@quicinc.com
Kathiravan T [Tue, 7 Mar 2023 06:22:30 +0000 (11:52 +0530)]
dt-bindings: firmware: qcom,scm: document IPQ5332 SCM
Document the compatible for IPQ5332 SCM.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230307062232.4889-8-quic_kathirav@quicinc.com
Poovendhan Selvaraj [Thu, 16 Feb 2023 12:00:08 +0000 (17:30 +0530)]
dt-bindings: scm: Add compatible for IPQ9574
Add the scm compatible string for IPQ9574 SoC
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230216120012.28357-2-quic_poovendh@quicinc.com
Konrad Dybcio [Mon, 13 Mar 2023 20:00:08 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Remove useless comments
It goes without saying that socname_rpmpds[] is the array of the RPM
power domains associated with socname. Remove these comments.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-10-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:07 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX
The GPU core clock requires that both VDDGX and VDDMX domains are scaled
at the same rate at the same time (well, MX just before GX but you get
the idea). Set MX as parent of GX to take care of that.
Suggested-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-9-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:06 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Add parent PD support
In some cases (like with the GPU core clock on GMU-less SoCs) it's
required that we scale more than one voltage domain. This can be achieved
by linking them in a parent-child relationship. Add support for specifying
a parent PD, similarly to what has been done in the RPMhPD driver.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-8-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:05 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Make bindings assignments consistent
Currently the whitespace between [DT_BINDING] = &struct is all over
the place.. some SoC structs have a space, others have a tab, others
have N tabs.. Make that a single tab for everybody to keep things
coherent.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-7-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:04 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Improve the naming
Now that we aren't bound by the preprocessor macros, improve the naming
to be a bit less preprocessor-y and touch up some rpmpd.pd.name fields
while at it.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-6-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:03 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Expand struct definition macros
Expand the struct definition macros to make things easier to see and
maintain. Now that the macros are unnecessary, remove them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-5-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:02 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Remove vdd* from struct names
It's rather obvious by the characteristic of these resources that
they correspond to some voltage lines governed by RPM. Remove the
"vdd" unnecessary prefix from them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-4-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:01 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Unify Low Power Island definitions
Up until now, we had 2 separate entries for VDD_LPI[CM]X and
VDD_LPI_[CM]X which both pointed to the same RPM resource. Fix it.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-3-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 20:00:00 +0000 (21:00 +0100)]
soc: qcom: rpmpd: Bring all definitions to the top
Keep all definitions in one place in preparation for a cleanup to make
things tidier.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-2-06a4f448ff90@linaro.org
Konrad Dybcio [Mon, 13 Mar 2023 19:59:59 +0000 (20:59 +0100)]
soc: qcom: rpmpd: Remove SoC names from RPMPD definitions
Replace the SoC names with type+id_key (or type+id+..name..+key for
fixed-key definitions) and remove duplicate entries.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-1-06a4f448ff90@linaro.org
David Wronek [Sun, 5 Mar 2023 19:17:45 +0000 (22:17 +0300)]
soc: qcom: socinfo: Add Soc ID for SM7150
Add Soc ID table entries for Qualcomm SM7150.
Signed-off-by: David Wronek <davidwronek@gmail.com>
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230305191745.386862-3-danila@jiaxyga.com
David Wronek [Sun, 5 Mar 2023 19:17:44 +0000 (22:17 +0300)]
dt-bindings: arm: qcom,ids: Add Soc ID for SM7150
Add the ID for the Qualcomm SM7150 SoC.
Signed-off-by: David Wronek <davidwronek@gmail.com>
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230305191745.386862-2-danila@jiaxyga.com
Bhupesh Sharma [Wed, 15 Mar 2023 16:01:51 +0000 (21:31 +0530)]
soc: qcom: socinfo: Add IDs for QRB4210
Add the ID for QRB4210 variant.
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230315160151.2166861-3-bhupesh.sharma@linaro.org
Bhupesh Sharma [Wed, 15 Mar 2023 16:01:50 +0000 (21:31 +0530)]
dt-bindings: arm: qcom,ids: Add IDs for QRB4210
Add the ID for QRB4210 variant.
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230315160151.2166861-2-bhupesh.sharma@linaro.org
Varadarajan Narayanan [Tue, 14 Mar 2023 06:13:34 +0000 (11:43 +0530)]
soc: qcom: socinfo: Add IDs for IPQ9574 and its variants
Add SOC ID for Qualcomm IPQ9574, IPQ9570, IPQ9554, IPQ9550,
IPQ9514 and IPQ9510
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1678774414-14414-3-git-send-email-quic_varada@quicinc.com
Varadarajan Narayanan [Tue, 14 Mar 2023 06:13:33 +0000 (11:43 +0530)]
dt-bindings: arm: qcom,ids: Add IDs for IPQ9574 and its variants
Add SOC ID for Qualcomm IPQ9574, IPQ9570, IPQ9554, IPQ9550,
IPQ9514 and IPQ9510
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1678774414-14414-2-git-send-email-quic_varada@quicinc.com
Manivannan Sadhasivam [Tue, 14 Mar 2023 08:04:43 +0000 (13:34 +0530)]
soc: qcom: llcc: Do not create EDAC platform device on SDM845
The platforms based on SDM845 SoC locks the access to EDAC registers in the
bootloader. So probing the EDAC driver will result in a crash. Hence,
disable the creation of EDAC platform device on all SDM845 devices.
The issue has been observed on Lenovo Yoga C630 and DB845c.
While at it, also sort the members of `struct qcom_llcc_config` to avoid
any holes in-between.
Cc: <stable@vger.kernel.org> # 5.10
Reported-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230314080443.64635-15-manivannan.sadhasivam@linaro.org
Manivannan Sadhasivam [Tue, 14 Mar 2023 08:04:42 +0000 (13:34 +0530)]
qcom: llcc/edac: Support polling mode for ECC handling
Not all Qcom platforms support IRQ mode for ECC handling. For those
platforms, the current EDAC driver will not be probed due to missing ECC
IRQ in devicetree.
So add support for polling mode so that the EDAC driver can be used on all
Qcom platforms supporting LLCC.
The polling delay of 5000ms is chosen based on Qcom downstream/vendor
driver.
Reported-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Steev Klimaszewski <steev@kali.org> # Thinkpad X13s
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230314080443.64635-14-manivannan.sadhasivam@linaro.org
Manivannan Sadhasivam [Tue, 14 Mar 2023 08:04:41 +0000 (13:34 +0530)]
qcom: llcc/edac: Fix the base address used for accessing LLCC banks
The Qualcomm LLCC/EDAC drivers were using a fixed register stride for
accessing the (Control and Status Registers) CSRs of each LLCC bank.
This stride only works for some SoCs like SDM845 for which driver
support was initially added.
But the later SoCs use different register stride that vary between the
banks with holes in-between. So it is not possible to use a single register
stride for accessing the CSRs of each bank. By doing so could result in a
crash.
For fixing this issue, let's obtain the base address of each LLCC bank from
devicetree and get rid of the fixed stride. This also means, there is no
need to rely on reg-names property and the base addresses can be obtained
using the index.
First index is LLCC bank 0 and last index is LLCC broadcast. If the SoC
supports more than one bank, then those need to be defined in devicetree
for index from 1..N-1.
Reported-by: Parikshit Pareek <quic_ppareek@quicinc.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Steev Klimaszewski <steev@kali.org> # Thinkpad X13s
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230314080443.64635-13-manivannan.sadhasivam@linaro.org