summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'tegra-for-6.5-memory' of ↵Arnd Bergmann2023-06-218-1/+835
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers memory: tegra: Changes for v6.5-rc1 This introduces an interconnect provider for the memory controller and external memory controller found on Tegra234 chips that will eventually be used to dynamically scale the EMC frequency based on a device's bandwidth needs. * tag 'tegra-for-6.5-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Make CPU cluster BW request a multiple of MC channels memory: tegra: Add software memory clients in Tegra234 memory: tegra: Add memory clients for Tegra234 memory: tegra: Add interconnect support for DRAM scaling in Tegra234 dt-bindings: tegra: Add ICC IDs for dummy memory clients dt-bindings: tegra: Document compatible for IGX Link: https://lore.kernel.org/r/20230609193620.2275240-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * memory: tegra: Make CPU cluster BW request a multiple of MC channelsSumit Gupta2023-05-164-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make CPU cluster's bandwidth (BW) request a multiple of MC channels. CPU OPP tables have BW info per MC channel. But, the actual BW depends on the number of MC channels which can change as per the boot config. Get the number of MC channels which are actually enabled in current boot configuration and multiply the BW request from a CPU cluster with the number of enabled MC channels. This is not required to be done for other MC clients. Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * memory: tegra: Add software memory clients in Tegra234Sumit Gupta2023-05-161-0/+15
| | | | | | | | | | | | | | | | | | Add dummy memory controller clients to represent CPU clusters. They will be used by the CPUFREQ driver to scale DRAM FREQ with the CPU FREQ. Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * memory: tegra: Add memory clients for Tegra234Sumit Gupta2023-05-161-0/+420
| | | | | | | | | | | | | | | | | | | | Add few isochronous (ISO) and non-ISO memory clients. ISO clients have guaranteed bandwidth requirement. PCIe clients added to the memory client table represent each controller in Tegra234. Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * memory: tegra: Add interconnect support for DRAM scaling in Tegra234Sumit Gupta2023-05-165-1/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Interconnect framework support to dynamically set the DRAM bandwidth from different clients. Both the MC and EMC drivers are added as ICC providers. The path for any request is: MC-Client[1-n] -> MC -> EMC -> EMEM/DRAM MC client's request for bandwidth will go to the MC driver which passes the client request info like BPMP Client ID, Client type and the Bandwidth to the BPMP-FW. The final DRAM freq to achieve the requested bandwidth is set by the BPMP-FW based on the passed parameters. Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * Merge branch 'for-6.5/dt-bindings' into for-6.5/memoryThierry Reding2023-05-162-0/+10
| |\
| | * dt-bindings: tegra: Add ICC IDs for dummy memory clientsSumit Gupta2023-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add ICC IDs for dummy software clients representing CCPLEX clusters. Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
| | * dt-bindings: tegra: Document compatible for IGXShubhi Garg2023-05-151-0/+5
| |/ | | | | | | | | | | | | | | | | Document the compatible strings used for Nvidia IGX Orin Development kit which uses P3701 SKU8 and P3740 carrier board. Signed-off-by: Shubhi Garg <shgarg@nvidia.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | Merge tag 'tegra-for-6.5-firmware' of ↵Arnd Bergmann2023-06-212-61/+147
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers firmware: tegra: Changes for v6.5-rc1 This adds support for using system memory as shared memory between the CPU and the BPMP, which will be needed for Tegra264 support. * tag 'tegra-for-6.5-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: bpmp: Add support for DRAM MRQ GSCs Link: https://lore.kernel.org/r/20230609193620.2275240-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | firmware: tegra: bpmp: Add support for DRAM MRQ GSCsPeter De Schrijver2023-06-092-61/+147
| |/ | | | | | | | | | | | | | | Implement support for DRAM MRQ GSCs. Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> [treding@nvidia.com: drop unnecessary discrimination enum] Signed-off-by: Thierry Reding <treding@nvidia.com>
* | Merge tag 'tegra-for-6.5-soc' of ↵Arnd Bergmann2023-06-214-27/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Changes for v6.5-rc1 This adds initial support for identifying the Tegra264 SoC family and fixes potential issues when reading from the FUSE block. A new software wake event for the AON cluster is added on Tegra234 and the debugfs initialization is drastically simplified. * tag 'tegra-for-6.5-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Use devm_clk_notifier_register() soc/tegra: pmc: Simplify debugfs initialization soc/tegra: fuse: Fix Tegra234 fuse size soc/tegra: pmc: Add AON SW Wake support for Tegra234 soc/tegra: fuse: Add support for Tegra264 Link: https://lore.kernel.org/r/20230609193620.2275240-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | soc/tegra: pmc: Use devm_clk_notifier_register()Thierry Reding2023-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move to the device-managed version of clk_notifier_register() to remove the need for manual cleanup. This fixes a potential issue where the clock notifier would stick around after the driver fails to probe at a later point. Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | soc/tegra: pmc: Simplify debugfs initializationThierry Reding2023-06-091-22/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debugfs calls should generally not be error-checked to simplify the case where debugfs is disabled. Since this driver is built-in and has the sysfs bind/unbind attributes disabled, it cannot be unloaded, so there is no need to hold onto a reference to the debugfs files that are created. We can further simplify this by moving the debugfs file creation to a later stage to avoid any cleanup we might have to do during error unwind operations. This is also a little cleaner because the debugfs file relies on data structures that are created at a later point than when the file was previously created. Suggested-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | soc/tegra: fuse: Fix Tegra234 fuse sizeKartik2023-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Tegra234 fuse size is incorrectly defined as 0x98c. The actual size of the Tegra234 fuses is 0xf8c and so update the size of the Tegra234 fuses to fix this. Signed-off-by: Kartik <kkartik@nvidia.com> Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | soc/tegra: pmc: Add AON SW Wake support for Tegra234Viswanath L2023-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wake-up signal 83 on Tegra234 is triggered by software writing to WAKE_AOWAKE_SW_WAKE_TIER0_TRIGGER_0 register. This wake-up is mapped to CPU interrupt 179 and is used by the Sensor Processing Engine (SPE) in the Always-on (AON) power domain for waking up the system. Signed-off-by: Viswanath L <viswanathl@nvidia.com> Signed-off-by: Kartik <kkartik@nvidia.com> Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | soc/tegra: fuse: Add support for Tegra264Stefan Kristiansson2023-05-162-2/+4
| |/ | | | | | | | | | | | | | | Add support for Tegra264 to the fuse handling code. Signed-off-by: Stefan Kristiansson <stefank@nvidia.com> Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | Merge tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx into ↵Arnd Bergmann2023-06-094-16/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soc/drivers arm64: ZynqMP SoC changes for v6.5 soc-power - Use of_property_present() instead of of_find_property() soc-event - Avoid use after free eve_data in event manager code firmware: - Extend zynqmp_pm_fpga_load() interface MAINTAINERS: - Clean xilinx records * tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx: MAINTAINERS: Switch to @amd.com emails MAINTAINERS: Remove Hyun and Anurag from maintainer list firmware: xilinx: Update the zynqmp_pm_fpga_load() API driver: soc: xilinx: use _safe loop iterator to avoid a use after free soc: xilinx: Use of_property_present() for testing DT property presence Link: https://lore.kernel.org/r/411aee78-e7e8-5966-cbe8-40ff45e27ba2@monstr.eu Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | MAINTAINERS: Switch to @amd.com emailsMichal Simek2023-06-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @xilinx.com is still working but better to switch to new amd.com after AMD/Xilinx acquisition. Acked-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com> Acked-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/f7773fdd002f89578b9e5262692a563fe7be4123.1684244928.git.michal.simek@amd.com
| * | MAINTAINERS: Remove Hyun and Anurag from maintainer listMichal Simek2023-05-221-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no activity from them for these drivers. All of them have Laurent as active maintainer and their emails no longer works that's why remove them from the list. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/18700dda117076510baf87a090acbb29cb3ba3ba.1684244832.git.michal.simek@amd.com
| * | firmware: xilinx: Update the zynqmp_pm_fpga_load() APINava kishore Manne2023-05-121-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update the zynqmp_pm_fpga_load() API to handle the firmware error’s properly. Signed-off-by: Nava kishore Manne <nava.kishore.manne@amd.com> Link: https://lore.kernel.org/r/20230503050158.1936467-1-nava.kishore.manne@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
| * | driver: soc: xilinx: use _safe loop iterator to avoid a use after freeDan Carpenter2023-05-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hash_for_each_possible() loop dereferences "eve_data" to get the next item on the list. However the loop frees eve_data so it leads to a use after free. Use hash_for_each_possible_safe() instead. Fixes: c7fdb2404f66 ("drivers: soc: xilinx: add xilinx event management driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/761e0e4a-4caf-4a71-8f47-1c6ad908a848@kili.mountain Signed-off-by: Michal Simek <michal.simek@amd.com>
| * | soc: xilinx: Use of_property_present() for testing DT property presenceRob Herring2023-05-121-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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> Link: https://lore.kernel.org/r/20230310144725.1545315-1-robh@kernel.org Signed-off-by: Michal Simek <michal.simek@amd.com>
* | Merge tag 'omap-for-v6.5/ti-sysc-signed' of ↵Arnd Bergmann2023-06-091-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/drivers Non-urgent ti-sysc driver fix for v6.5 merge window A fix for masking bool variables that can wait for the merge window no problem. * tag 'omap-for-v6.5/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Fix dispc quirk masking bool variables Link: https://lore.kernel.org/r/pull-1685700720-242492@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | bus: ti-sysc: Fix dispc quirk masking bool variablesTony Lindgren2023-05-171-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Fix warning drivers/bus/ti-sysc.c:1806 sysc_quirk_dispc() warn: masking a bool. While at it let's add a comment for what were doing to make the code a bit easier to follow. Fixes: 7324a7a0d5e2 ("bus: ti-sysc: Implement display subsystem reset quirk") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-omap/a8ec8a68-9c2c-4076-bf47-09fccce7659f@kili.mountain/ Signed-off-by: Tony Lindgren <tony@atomide.com>
* | Merge tag 'samsung-drivers-6.5' of ↵Arnd Bergmann2023-06-096-80/+211
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC driver changes for v6.5 1. Re-introduce Exynos4212: Exynos PMU driver. 2. Convert S5P/Exynos Multi Format Codec bindings to DT schema. * tag 'samsung-drivers-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: media: s5p-mfc: convert bindings to json-schema soc: samsung: exynos-pmu: Re-introduce Exynos4212 support dt-bindings: soc: samsung: exynos-pmu: add Exynos4212 compatible Link: https://lore.kernel.org/r/20230602091501.15178-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | dt-bindings: media: s5p-mfc: convert bindings to json-schemaAakarsh Jain2023-05-132-78/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | Convert s5p-mfc bindings to DT schema format using json-schema. Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230328114729.61436-1-aakarsh.jain@samsung.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
| * | soc: samsung: exynos-pmu: Re-introduce Exynos4212 supportArtur Weber2023-05-093-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for the Exynos4212 SoC was originally dropped as there were no boards using it. We will be adding a device that uses it, so add it back. This reverts commit c40610198f35e8264f9175dafe74db6288a07eda. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20230501195525.6268-5-aweber.kernel@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
| * | dt-bindings: soc: samsung: exynos-pmu: add Exynos4212 compatibleArtur Weber2023-05-091-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Support for the Exynos4212 SoC was originally dropped as there were no boards using it. We will be adding a device that uses it, so add back the relevant compatible. This reverts part of commit c40610198f35 ("soc: samsung: Remove Exynos4212 related dead code"). Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20230501195525.6268-2-aweber.kernel@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
* | Merge tag 'renesas-drivers-for-v6.5-tag2' of ↵Arnd Bergmann2023-06-092-25/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.5 (take two) - Convert the R-Mobile SYSC driver to readl_poll_timeout_atomic(). * tag 'renesas-drivers-for-v6.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rmobile-sysc: Convert to readl_poll_timeout_atomic() iopoll: Do not use timekeeping in read_poll_timeout_atomic() iopoll: Call cpu_relax() in busy loops Link: https://lore.kernel.org/r/cover.1686304612.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | soc: renesas: rmobile-sysc: Convert to readl_poll_timeout_atomic()Geert Uytterhoeven2023-06-051-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use readl_poll_timeout_atomic() instead of open-coding the same operation. 1. rmobile_pd_power_down(): as typically less than 20 retries are needed, PSTR_RETRIES (100) µs is a suitable timeout value. 2. __rmobile_pd_power_up(): the old method of first polling some cycles with a 1 µs delay, followed by more polling cycles without any delay didn't make much sense, as the latter was insignificant compared to the former. Furthermore, typically no retries are needed. Hence just retain the polling with delay. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/ae4bf03ab8fd5a557c683086958d6764babc0723.1685692810.git.geert+renesas@glider.be
| * | Merge tag 'iopoll-busy-loop-timeout-tag' into renesas-drivers-for-v6.5Geert Uytterhoeven2023-06-051-5/+19
| |\ \ | | | | | | | | | | | | iopoll: Busy loop and timeout improvements
| | * | iopoll: Do not use timekeeping in read_poll_timeout_atomic()Geert Uytterhoeven2023-06-051-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_poll_timeout_atomic() uses ktime_get() to implement the timeout feature, just like its non-atomic counterpart. However, there are several issues with this, due to its use in atomic contexts: 1. When called in the s2ram path (as typically done by clock or PM domain drivers), timekeeping may be suspended, triggering the WARN_ON(timekeeping_suspended) in ktime_get(): WARNING: CPU: 0 PID: 654 at kernel/time/timekeeping.c:843 ktime_get+0x28/0x78 Calling ktime_get_mono_fast_ns() instead of ktime_get() would get rid of that warning. However, that would break timeout handling, as (at least on systems with an ARM architectured timer), the time returned by ktime_get_mono_fast_ns() does not advance while timekeeping is suspended. Interestingly, (on the same ARM systems) the time returned by ktime_get() does advance while timekeeping is suspended, despite the warning. 2. Depending on the actual clock source, and especially before a high-resolution clocksource (e.g. the ARM architectured timer) becomes available, time may not advance in atomic contexts, thus breaking timeout handling. Fix this by abandoning the idea that one can rely on timekeeping to implement timeout handling in all atomic contexts, and switch from a global time-based to a locally-estimated timeout handling. In most (all?) cases the timeout condition is exceptional and an error condition, hence any additional delays due to underestimating wall clock time are irrelevant. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/3d2a2f4e553489392d871108797c3be08f88300b.1685692810.git.geert+renesas@glider.be
| | * | iopoll: Call cpu_relax() in busy loopsGeert Uytterhoeven2023-06-051-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is considered good practice to call cpu_relax() in busy loops, see Documentation/process/volatile-considered-harmful.rst. This can not only lower CPU power consumption or yield to a hyperthreaded twin processor, but also allows an architecture to mitigate hardware issues (e.g. ARM Erratum 754327 for Cortex-A9 prior to r2p0) in the architecture-specific cpu_relax() implementation. In addition, cpu_relax() is also a compiler barrier. It is not immediately obvious that the @op argument "function" will result in an actual function call (e.g. in case of inlining). Where a function call is a C sequence point, this is lost on inlining. Therefore, with agressive enough optimization it might be possible for the compiler to hoist the: (val) = op(args); "load" out of the loop because it doesn't see the value changing. The addition of cpu_relax() would inhibit this. As the iopoll helpers lack calls to cpu_relax(), people are sometimes reluctant to use them, and may fall back to open-coded polling loops (including cpu_relax() calls) instead. Fix this by adding calls to cpu_relax() to the iopoll helpers: - For the non-atomic case, it is sufficient to call cpu_relax() in case of a zero sleep-between-reads value, as a call to usleep_range() is a safe barrier otherwise. However, it doesn't hurt to add the call regardless, for simplicity, and for similarity with the atomic case below. - For the atomic case, cpu_relax() must be called regardless of the sleep-between-reads value, as there is no guarantee all architecture-specific implementations of udelay() handle this. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/45c87bec3397fdd704376807f0eec5cc71be440f.1685692810.git.geert+renesas@glider.be
* | | Merge tag 'sram-for-soc' of ↵Arnd Bergmann2023-05-262-4/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into soc/drivers This fixes a small bug in the SRAM misc driver and adds a compatible for SRAMs to the SRAM bindings. * tag 'sram-for-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: misc: sram: Generate unique names for subpools dt-bindings: sram: Add compatible for ST-Ericsson U8500 eSRAM Link: https://lore.kernel.org/r/CACRpkdbEQ7nTnJTj5WMtxvH057fDSbX5tNs5j4Y=5KSBMpa-Sw@mail.gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | | misc: sram: Generate unique names for subpoolsLinus Walleij2023-05-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code will, if we do not specify unique labels for the SRAM subnodes, fail to register several nodes named the same. Example: sram@40020000 { (...) sram@0 { (...) }; sram@1000 { (...) }; }; Since the child->name in both cases will be "sram" the gen_pool_create() will fail because the name is not unique. Use dev_name() for the device as this will have bus ID set to the fully translated address for the node, and that will always be unique. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230417-ux500-sram-v2-2-6e62ad551faa@linaro.org
| * | | dt-bindings: sram: Add compatible for ST-Ericsson U8500 eSRAMLinus Walleij2023-05-171-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | This adds an SoC-specific binding for the banks of eSRAM available in the ST-Ericsson U8500. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230417-ux500-sram-v2-1-6e62ad551faa@linaro.org
* | | arm-cci: add cci_enable_port_for_self prototypeArnd Bergmann2023-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cci_enable_port_for_self() is called from assembler, so add the prototype only to shut up the W=1 warning: drivers/bus/arm-cci.c:298:25: error: no previous prototype for 'cci_enable_port_for_self' [-Werror=missing-prototypes] Link: https://lore.kernel.org/r/20230516201218.556437-1-arnd@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | | Merge tag 'reset-for-v6.5' of git://git.pengutronix.de/pza/linux into ↵Arnd Bergmann2023-05-2615-198/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soc/drivers Reset controller updates for v6.5 Use devm_platform_ioremap_resource() instead of platform_get_resource() and devm_ioremap_resource() in various drivers, simplify the stih407 Kconfig and use regmap_field_read_poll_timeout() instead of open-coded waiting, and use dev_err_probe() in the meson-audio-arb reset driver. With its platform gone, remove the now obsolete oxnas reset driver. Drop depends on the non-user-visible CONFIG_AUXILIARY_BUS symbol. * tag 'reset-for-v6.5' of git://git.pengutronix.de/pza/linux: reset: mpfs: select AUXILIARY_BUS reset: starfive: select AUXILIARY_BUS reset: oxnas: remove obsolete reset driver reset: sti: simplify driver's config and build reset: meson-audio-arb: Use dev_err_probe() reset: sti: rely on regmap_field_read_poll_timeout for ack wait reset: brcmstb-rescal: Use devm_platform_ioremap_resource() reset: meson: Use devm_platform_ioremap_resource() reset: reset-hsdk: Use devm_platform_ioremap_resource() reset: lpc18xx: Use devm_platform_ioremap_resource() reset: axs10x: Use devm_platform_ioremap_resource() reset: ath79: Use devm_platform_ioremap_resource() Link: https://lore.kernel.org/r/20230511133235.874566-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | | reset: mpfs: select AUXILIARY_BUSPhilipp Zabel2023-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_AUXILIARY_BUS is not a user-visible symbol, replace 'depends on' with 'select'. Cc: Daire McNamara <daire.mcnamara@microchip.com> Suggested-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230502102041.1418397-1-p.zabel@pengutronix.de Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: starfive: select AUXILIARY_BUSPhilipp Zabel2023-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_AUXILIARY_BUS is not a user-visible symbol, replace 'depends on' with 'select'. Suggested-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Link: https://lore.kernel.org/r/20230502102050.1418417-1-p.zabel@pengutronix.de Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: oxnas: remove obsolete reset driverNeil Armstrong2023-05-084-150/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove support for OX810 and OX820 peripheral reset. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Daniel Golle <daniel@makrotopia.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230331-topic-oxnas-upstream-remove-v1-17-5bd58fd1dd1f@linaro.org Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: sti: simplify driver's config and buildLukas Bulwahn2023-05-082-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With commit 64933513e461 ("reset: sti: Remove STiH415/6 reset support"), there is only one sti reset driver left and there no need to define a dedicated config STI_RESET_SYSCFG, which is selected by the config for the STiH407 reset driver. Simply add reset-syscfg.c to the build for the STiH407 reset driver. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Link: https://lore.kernel.org/r/20230330112347.31137-2-lukas.bulwahn@gmail.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: meson-audio-arb: Use dev_err_probe()Ye Xingchen2023-05-081-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.kernel.org/r/202303231653447704556@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: sti: rely on regmap_field_read_poll_timeout for ack waitAlain Volmat2023-05-081-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use regmap_field_read_poll_timeout function when waiting for the ack bit upon performing the reset control. Signed-off-by: Alain Volmat <avolmat@me.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Link: https://lore.kernel.org/r/20230210224332.98482-1-avolmat@me.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: brcmstb-rescal: Use devm_platform_ioremap_resource()Ye Xingchen2023-05-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/202302161052126378140@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: meson: Use devm_platform_ioremap_resource()Ye Xingchen2023-05-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/202302161054598138273@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: reset-hsdk: Use devm_platform_ioremap_resource()Ye Xingchen2023-05-081-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202302161056304138337@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: lpc18xx: Use devm_platform_ioremap_resource()Ye Xingchen2023-05-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202302161053360618204@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: axs10x: Use devm_platform_ioremap_resource()Ye Xingchen2023-05-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202302161050336958071@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | | reset: ath79: Use devm_platform_ioremap_resource()Ye Xingchen2023-05-081-3/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202302161049100728015@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>