summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-14soc: ti: smartreflex: Simplify getting the opam_sr pointerUwe Kleine-König
The probe function stores the sr_info pointer using platform_set_drvdata(). Use the corresponding platform_get_drvdata() to retrieve that pointer in the remove and shutdown functions. This simplifies these functions and makes error handling unnecessary. This is a good thing as at least for .remove() returning an error code doesn't have the desired effect. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-14Merge tag 'qcom-drivers-for-6.4-2' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers A few more Qualcomm driver updates for v6.4 This introduces a new binding and a dedicated driver for the Qualcomm Inline-Crypto-Engine (ICE), in order to support a single shared instance between SDHCI and UFS, found in recent platforms. RSC version check is updated to support minor revisions of v3 of the ip block, the SMD-RPM interface is transitioned to GFP_ATOMIC to avoid the shrinker to kick in underneath the GPU and QCM2290 support is added to the SCM binding. * tag 'qcom-drivers-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: dt-bindings: crypto: Add Qualcomm Inline Crypto Engine soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver dt-bindings: firmware: document Qualcomm QCM2290 SCM soc: qcom: rpmh-rsc: Support RSC v3 minor versions soc: qcom: smd-rpm: Use GFP_ATOMIC in write path Link: https://lore.kernel.org/r/20230414024302.2411985-1-andersson@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-14Merge tag 'arm-soc/for-6.4/drivers' of https://github.com/Broadcom/stblinux ↵Arnd Bergmann
into soc/drivers This pull request contains Broadcom SoCs drivers changes for 6.4, please pull the following: - Zhaoyang fixes an of_iomap() leak in the STB BIU driver - Florian removes the bare-metal ARM suspend/resume code which has long been replaced by the standard PSCI suspend/resume. * tag 'arm-soc/for-6.4/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: brcmstb: biuctrl: fix of_iomap leak soc: bcm: brcmstb: Remove bare-metal ARM suspend/resume code kbuild, soc: bcm: bcm2835-power: remove MODULE_LICENSE in non-modules kbuild, soc: bcm: raspberrypi-power: remove MODULE_LICENSE in non-modules bus: brcmstb_gisb: Use devm_platform_get_and_ioremap_resource() Link: https://lore.kernel.org/r/20230410232606.1917803-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-04-14Merge tag 'qcom-drivers-for-6.4' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'ti-driver-soc-for-v6.4' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'renesas-drivers-for-v6.4-tag2' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'sunxi-drivers-for-6.4-1' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'imx-drivers-6.4' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'riscv-soc-for-v6.4' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'tegra-for-6.4-firmware' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'tegra-for-6.4-soc' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'tegra-for-6.4-arm-core' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-14Merge tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux into ↵Arnd Bergmann
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>
2023-04-07dt-bindings: crypto: Add Qualcomm Inline Crypto EngineAbel Vesa
Add schema file for new Qualcomm Inline Crypto Engine driver. Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230407105029.2274111-2-abel.vesa@linaro.org
2023-04-07Merge tag '20230407105029.2274111-4-abel.vesa@linaro.org' into drivers-for-6.4Bjorn Andersson
The dedicated ICE driver was merged through a immutable tag, to make it available to other maintainers.
2023-04-07soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driverAbel Vesa
This takes the already existing duplicated support in both ufs-qcom and sdhci-msm drivers and makes it a dedicated driver that can be used by both mentioned drivers. The reason for this is because, staring with SM8550, the ICE IP block is shared between UFS and SDCC, which means we need to probe a dedicated device and share it between those two consumers. So let's add the ICE dedicated driver as a soc driver. Platforms that already have ICE supported, will use it as a library as the of_qcom_ice_get will return an ICE instance created for the consumer device. This allows the backwards compatibility with old-style devicetree approach. Also, add support to HW version 4.x since it works out-of-the-box with the current driver. The 4.x HW version is found on SM8550 platform. Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230407105029.2274111-4-abel.vesa@linaro.org
2023-04-07dt-bindings: firmware: document Qualcomm QCM2290 SCMKonrad Dybcio
Add a compatible for Qualcomm QCM2290 SCM and add it to the core clock users list. 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/20230403-topic-rb1_qcm-v2-1-dae06f8830dc@linaro.org
2023-04-07soc: qcom: rpmh-rsc: Support RSC v3 minor versionsTushar Nimkar
RSC v3 register offsets are same for all minor versions of v3. Fix a minor version check to pick correct offsets for all v3 minor versions. Fixes: 40482e4f7364 ("soc: qcom: rpmh-rsc: Add support for RSC v3 register offsets") Signed-off-by: Tushar Nimkar <quic_tnimkar@quicinc.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230406115732.9293-1-quic_tnimkar@quicinc.com
2023-04-06soc: qcom: smd-rpm: Use GFP_ATOMIC in write pathRob Clark
Preparing for better lockdep annotations for things that happen in runpm suspend/resume path vs shrinker/reclaim in the following patches, we need to avoid allocations that can trigger reclaim in the icc_set_bw() path. In the RPMh case, rpmh_write_batch() already uses GFP_ATOMIC, so it should be reasonable to use in the smd-rpm case as well. Alternatively, 256bytes is small enough for a function that isn't called recursively to allocate on-stack. Signed-off-by: Rob Clark <robdclark@chromium.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230320144356.803762-21-robdclark@gmail.com
2023-04-06Merge tag 'optee-load-for-v6.4' of ↵Arnd Bergmann
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>
2023-04-05soc/tegra: fuse: Remove nvmem root only accessKartik
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>
2023-04-05soc/tegra: cbb: tegra194: Use of_address_count() helperYang Yingliang
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>
2023-04-05soc/tegra: cbb: Remove MODULE_LICENSE in non-modulesNick Alcock
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>
2023-04-05ARM: tegra: Remove MODULE_LICENSE in non-modulesNick Alcock
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>
2023-04-05soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()Ye Xingchen
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>
2023-04-05soc: tegra: cbb: Drop empty platform remove functionUwe Kleine-König
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>
2023-04-04dt-bindings: firmware: document Qualcomm SC8180X SCMVinod Koul
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
2023-04-04dt-bindings: sram: qcom,imem: document SM6375 IMEMKonrad Dybcio
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
2023-04-04firmware: Use of_property_present() for testing DT property presenceRob Herring
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>
2023-04-04soc: qcom: icc-bwmon: Handle global registers correctlyKonrad Dybcio
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
2023-04-04soc: qcom: icc-bwmon: Remove unused struct memberKonrad Dybcio
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
2023-04-04Merge tag 'amlogic-drivers-for-v6.4' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/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>
2023-04-04Merge tag 'optee-per-cpu-irq-for-v6.4' of ↵Arnd Bergmann
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>
2023-04-04Merge tag 'memory-controller-drv-6.4' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/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>
2023-04-04Merge tag 'omap-for-v6.4/ti-sysc-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-04Merge tag 'renesas-drivers-for-v6.4-tag1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/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>
2023-04-04soc: renesas: renesas-soc: Release 'chipid' from ioremap()Li Yang
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>
2023-04-03soc: bcm: brcmstb: biuctrl: fix of_iomap leakZhaoyang Li
Smatch reports: drivers/soc/bcm/brcmstb/biuctrl.c:291 setup_hifcpubiuctrl_regs() warn: 'cpubiuctrl_base' from of_iomap() not released on lines: 291. This is because in setup_hifcpubiuctrl_regs(), cpubiuctrl_base is not released when handle error, which may cause a leak. To fix this, iounmap is added when handle error. Fixes: 22f7a9116eba ("soc: brcmstb: Correct CPU_CREDIT_REG offset for Brahma-B53 CPUs") Signed-off-by: Zhaoyang Li <lizhaoyang04@hust.edu.cn> Reviewed-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Link: https://lore.kernel.org/r/20230327115422.1536615-1-lizhaoyang04@hust.edu.cn Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2023-04-03soc: microchip: mpfs: add a prefix to rx_callback()Conor Dooley
Add a prefix to the function name to match the rest of the file. Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2023-04-03Merge patch series "mailbox,soc: mpfs: add support for fallible services"Conor Dooley
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>
2023-04-03soc: microchip: mpfs: handle timeouts and failed services differentlyConor Dooley
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>
2023-04-03soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()Conor Dooley
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>
2023-04-03soc: microchip: mpfs: use a consistent completion timeoutConor Dooley
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>
2023-04-03soc: microchip: mpfs: fix some horrible alignmentConor Dooley
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>
2023-04-03mailbox: mpfs: check the service status in .tx_done()Conor Dooley
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>
2023-04-03mailbox: mpfs: ditch a useless busy checkConor Dooley
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>
2023-04-03mailbox: mpfs: switch to txdone_pollConor Dooley
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>
2023-04-03mailbox: mpfs: fix an incorrect mask widthConor Dooley
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>
2023-04-03soc/tegra: pmc: Support software wake-up for SPEPetlozu Pravareshwar
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>
2023-04-03soc/tegra: pmc: Add wake source interrupt for MGBESushil Singh
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>