summaryrefslogtreecommitdiffstats
path: root/drivers/memory
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'memory-controller-drv-tegra-5.11-3' of ↵Arnd Bergmann2020-12-094-50/+516
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.11 - Tegra SoC, part two Continuation of work on Tegra SoC memory controllers towards adding interconnect support and integration with devfreq. This brings few more patches including one which removes/fixes annoying warning if the DTS patches get applied. This is expected and only informs that new features of Tegra memory controller drivers will not be enabled however the warning itself could look worrying. * tag 'memory-controller-drv-tegra-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: tegra30: Support interconnect framework memory: tegra20: Support hardware versioning and clean up OPP table initialization dt-bindings: memory: tegra20-emc: Document opp-supported-hw property Link: https://lore.kernel.org/r/20201207075758.5501-2-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * memory: tegra30: Support interconnect frameworkDmitry Osipenko2020-12-053-22/+496
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now Internal and External memory controllers are memory interconnection providers. This allows us to use interconnect API for tuning of memory configuration. EMC driver now supports OPPs and DVFS. MC driver now supports tuning of memory arbitration latency, which needs to be done for ISO memory clients, like a Display client for example. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Peter Geis <pgwipeout@gmail.com> Acked-by: Georgi Djakov <georgi.djakov@linaro.org> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201203192439.16177-4-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20: Support hardware versioning and clean up OPP table ↵Dmitry Osipenko2020-12-051-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization Support hardware versioning, which is now required for Tegra20 EMC OPP. Clean up OPP table initialization by using a error code returned by OPP API for judging about the OPP table presence in a device-tree and remove OPP regulator initialization because we're now going to use power domain instead of a raw regulator. This puts Tegra20 EMC OPP preparation on par with the Tegra30/124 EMC drivers. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201203192439.16177-3-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
* | Merge tag 'memory-controller-drv-5.11-2' of ↵Arnd Bergmann2020-12-093-15/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.11, part two 1. Several fixes for Renesas RPC-IF driver. 2. Correct compile testing of TI EMIF SRAM driver. 3. Fix potential NULL pointer in JZ4780 NEMC driver. * tag 'memory-controller-drv-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe() memory: ti-emif-sram: only build for ARMv7 memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline memory: renesas-rpc-if: Fix a node reference leak in rpcif_probe() memory: renesas-rpc-if: Fix unbalanced pm_runtime_enable in rpcif_{enable,disable}_rpm memory: renesas-rpc-if: Return correct value to the caller of rpcif_manual_xfer() Link: https://lore.kernel.org/r/20201207075758.5501-1-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe()Zhang Changzhong2020-12-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. Fixes: 911a88829725 ("memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCs") Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Acked-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/1607070717-32880-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * | memory: ti-emif-sram: only build for ARMv7Arnd Bergmann2020-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver can be compile-tested on all ARM machines, but causes a failure when built for ARMv7-M: arm-linux-gnueabi-ld: error: drivers/memory/ti-emif-sram-pm.o: conflicting architecture profiles A/M Limit the target machines to configurations that have ARMv7 enabled. Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20201203230832.1481767-1-arnd@kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * | memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inlineLad Prabhakar2020-11-281-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define rpcif_enable_rpm() and rpcif_disable_rpm() as static inline in the header instead of exporting them. Suggested-by: Pavel Machek <pavel@denx.de> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Pavel Machek (CIP) <pavel@denx.de> Link: https://lore.kernel.org/r/20201126191146.8753-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * | memory: renesas-rpc-if: Fix a node reference leak in rpcif_probe()Lad Prabhakar2020-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release the node reference by calling of_node_put(flash) in the probe. Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek <pavel@denx.de> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Pavel Machek (CIP) <pavel@denx.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126191146.8753-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * | memory: renesas-rpc-if: Fix unbalanced pm_runtime_enable in ↵Lad Prabhakar2020-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpcif_{enable,disable}_rpm rpcif_enable_rpm calls pm_runtime_enable, so rpcif_disable_rpm needs to call pm_runtime_disable and not pm_runtime_put_sync. Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126191146.8753-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * | memory: renesas-rpc-if: Return correct value to the caller of ↵Lad Prabhakar2020-11-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpcif_manual_xfer() In the error path of rpcif_manual_xfer() the value of ret is overwritten by value returned by reset_control_reset() function and thus returning incorrect value to the caller. This patch makes sure the correct value is returned to the caller of rpcif_manual_xfer() by dropping the overwrite of ret in error path. Also now we ignore the value returned by reset_control_reset() in the error path and instead print a error message when it fails. Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek <pavel@denx.de> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Pavel Machek (CIP) <pavel@denx.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126191146.8753-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
* | | Merge tag 'memory-controller-drv-tegra-5.11-2' of ↵Arnd Bergmann2020-11-2612-168/+901
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.11 - Tegra SoC There is a bigger work from Dmitry Osipenko around Tegra SoC memory controller drivers, mostly towards adding interconnect support and integration with devfreq. This work touches all Tegra memory controller drivers and also few other SoC-related parts. It's not yet finished but the intermediate stage seems ready to merge. Beside that Tegra 210 memory controller got few fixes and received new swgroups (work of Nicolin Chen). * tag 'memory-controller-drv-tegra-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (38 commits) memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe memory: tegra: Complete tegra210_swgroups memory: tegra30-emc: Continue probing if timings are missing in device-tree memory: tegra30-emc: Make driver modular memory: tegra30: Add FIFO sizes to memory clients memory: tegra20-emc: Add devfreq support memory: tegra20-emc: Remove IRQ number from error message memory: tegra20-emc: Factor out clk initialization memory: tegra20-emc: Use dev_pm_opp_set_clkname() memory: tegra: Correct stub of devm_tegra_memory_controller_get() memory: tegra20: Support interconnect framework memory: tegra20-emc: Continue probing if timings are missing in device-tree memory: tegra20-emc: Make driver modular memory: tegra-mc: Add interconnect framework memory: tegra: Add missing latency allowness entry for Page Table Cache memory: tegra: Remove superfluous error messages around platform_get_irq() memory: tegra: Use devm_platform_ioremap_resource() memory: tegra: Add and use devm_tegra_memory_controller_get() dt-bindings: host1x: Document new interconnect properties dt-bindings: tegra30-actmon: Document OPP and interconnect properties ... Link: https://lore.kernel.org/r/20201126191241.23302-1-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probeNathan Chancellor2020-11-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang warns: drivers/memory/tegra/tegra30-emc.c:1275:15: warning: variable 'np' is uninitialized when used here [-Wuninitialized] of_node_put(np); ^~ drivers/memory/tegra/tegra30-emc.c:1269:24: note: initialize the variable 'np' to silence this warning There does not need to be an of_node_put call in this error handling block after the shuffling of the np assignment. Remove it so there is no use of uninitialized memory. Fixes: 5e00fd90183a ("memory: tegra30-emc: Continue probing if timings are missing in device-tree") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201119195244.1517236-1-natechancellor@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Complete tegra210_swgroupsNicolin Chen2020-11-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Tegra X1 TRM, there are missing swgroups in the tegra210_swgroups list. So this patch adds them to the list. Note that the TEGRA_SWGROUP_GPU (in list) should be actually TEGRA_SWGROUP_GPUB (in TRM), yet TEGRA_SWGROUP_GPU (in TRM) is not being used -- only TEGRA_SWGROUP_GPUB (in TRM) is. So this patch does not add TEGRA_SWGROUP_GPU (in TRM) and keeps TEGRA_SWGROUP_GPU (in list) as it is. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201008003746.25659-6-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra30-emc: Continue probing if timings are missing in device-treeDmitry Osipenko2020-11-261-14/+15
| | | | | | | | | | | | | | | | | | | | | | EMC driver will become mandatory after turning it into interconnect provider because interconnect users, like display controller driver, will fail to probe using newer device-trees that have interconnect properties. Thus make EMC driver to probe even if timings are missing in device-tree. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201111011456.7875-9-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra30-emc: Make driver modularDmitry Osipenko2020-11-263-6/+16
| | | | | | | | | | | | | | | | | | Add modularization support to the Tegra30 EMC driver, which now can be compiled as a loadable kernel module. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201111011456.7875-8-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra30: Add FIFO sizes to memory clientsDmitry Osipenko2020-11-261-0/+66
| | | | | | | | | | | | | | | | | | The latency allowness is calculated based on buffering capabilities of memory clients. Add FIFO sizes to the Tegra30 memory clients. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201111011456.7875-7-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20-emc: Add devfreq supportDmitry Osipenko2020-11-262-1/+92
| | | | | | | | | | | | | | | | | | | | | | Add devfreq support to the Tegra20 EMC driver. Memory utilization statistics will be periodically polled from the memory controller and appropriate minimum clock rate will be selected by the devfreq governor. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Link: https://lore.kernel.org/r/20201111011456.7875-5-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20-emc: Remove IRQ number from error messageDmitry Osipenko2020-11-261-1/+1
| | | | | | | | | | | | | | | | | | Remove IRQ number from error message since it doesn't add any useful information, especially because this number is virtual. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201111011456.7875-6-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20-emc: Factor out clk initializationDmitry Osipenko2020-11-261-23/+47
| | | | | | | | | | | | | | | | | | Factor out clk initialization and make it resource-managed. This makes easier to follow code and will help to make further changes cleaner. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201111011456.7875-4-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20-emc: Use dev_pm_opp_set_clkname()Dmitry Osipenko2020-11-261-11/+19
| | | | | | | | | | | | | | | | | | | | The dev_pm_opp_get_opp_table() shouldn't be used by drivers, use dev_pm_opp_set_clkname() instead. Suggested-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201111011456.7875-3-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20: Support interconnect frameworkDmitry Osipenko2020-11-263-4/+386
| | | | | | | | | | | | | | | | | | | | Now Internal and External Memory Controllers are memory interconnection providers. This allows us to use interconnect API for tuning of memory configuration. EMC driver now supports OPPs and DVFS. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201104164923.21238-36-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20-emc: Continue probing if timings are missing in device-treeDmitry Osipenko2020-11-261-18/+16
| | | | | | | | | | | | | | | | | | | | | | EMC driver will become mandatory after turning it into interconnect provider because interconnect users, like display controller driver, will fail to probe using newer device-trees that have interconnect properties. Thus make EMC driver to probe even if timings are missing in device-tree. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201104164923.21238-35-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra20-emc: Make driver modularDmitry Osipenko2020-11-262-6/+13
| | | | | | | | | | | | | | | | | | | | Add modularization support to the Tegra20 EMC driver, which now can be compiled as a loadable kernel module. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201104164923.21238-34-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra-mc: Add interconnect frameworkDmitry Osipenko2020-11-263-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | Add common SoC-agnostic ICC framework which turns Tegra Memory Controller into a memory interconnection provider. This allows us to use interconnect API for tuning of memory configurations. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Peter Geis <pgwipeout@gmail.com> Tested-by: Nicolas Chauvet <kwizart@gmail.com> Link: https://lore.kernel.org/r/20201104164923.21238-33-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Add missing latency allowness entry for Page Table CacheDmitry Osipenko2020-11-263-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Add missing PTC memory client latency allowness entry to the Tegra MC drivers. This prevents erroneous clearing of MC_INTSTATUS 0x0 register during of the LA programming in tegra_mc_setup_latency_allowance() due to the missing entry. Note that this patch doesn't fix any known problems. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201104164923.21238-32-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Remove superfluous error messages around platform_get_irq()Dmitry Osipenko2020-11-263-7/+3
| | | | | | | | | | | | | | | | | | The platform_get_irq() prints error message telling that interrupt is missing, hence there is no need to duplicated that message in the drivers. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20201104164923.21238-31-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Use devm_platform_ioremap_resource()Dmitry Osipenko2020-11-262-6/+2
| | | | | | | | | | | | | | | | | | | | Use devm_platform_ioremap_resource() helper which makes code a bit cleaner. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201104164923.21238-30-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Add and use devm_tegra_memory_controller_get()Dmitry Osipenko2020-11-264-59/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple Tegra drivers need to retrieve Memory Controller and there is duplication of the retrieval code among the drivers. Add new devm_tegra_memory_controller_get() helper to remove the code's duplication and to fix put_device() which was missed in the duplicated code. Make EMC drivers to use the new helper. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201104164923.21238-29-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Sort tegra210_swgroups by reg addressNicolin Chen2020-10-271-10/+10
| | | | | | | | | | | | | | | | | | | | Cleanup the list of swgroups (ordering by register address) to prepare for new ones. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201008003746.25659-4-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Correct tegra210_mc_clients def valuesNicolin Chen2020-10-271-14/+14
| | | | | | | | | | | | | | | | | | | | Some def values are mismatched with Tegra X1 TRM, probably because being copied from tegra124.c file. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201008003746.25659-3-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Correct la.reg address of seswrNicolin Chen2020-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | According to Tegra X1 TRM, ALLOWANCE_SESWR is located in field [23:16] of register at address 0x3e0 with a reset value of 0x80 at register 0x3e0, while bit-1 of register 0xb98 is for enable bit of seswr. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201008003746.25659-2-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
* | memory: pl353-smc: fix compile test on !ARM_AMBAKrzysztof Kozlowski2020-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pl353-smc driver uses module_amba_driver so it has a build dependency on CONFIG_ARM_AMBA: /usr/bin/arm-linux-gnueabi-ld: drivers/memory/pl353-smc.o: in function `pl353_smc_driver_init': pl353-smc.c:(.init.text+0x10): undefined reference to `amba_driver_register' However it still can be compile tested on platforms other than ARM, which in practice is limited to those selecting ARM_AMBA (so only ARM64). Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/20201029193357.389593-1-krzk@kernel.org
* | memory: mtk-smi: Add mt8192 supportYong Wu2020-11-051-0/+19
| | | | | | | | | | | | | | | | Add mt8192 SMI support. Signed-off-by: Yong Wu <yong.wu@mediatek.com> Link: https://lore.kernel.org/r/20201103054200.21386-4-yong.wu@mediatek.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
* | memory: jz4780_nemc: Fix an error pointer vs NULL check in probe()Dan Carpenter2020-10-261-2/+2
|/ | | | | | | | | | | | The devm_ioremap() function returns NULL on error, it doesn't return error pointers. This bug could lead to an Oops during probe. Fixes: f046e4a3f0b9 ("memory: jz4780_nemc: Only request IO memory the driver will use") Cc: <stable@vger.kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200803143607.GC346925@mwanda Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
* Merge tag 'armsoc-drivers' of ↵Linus Torvalds2020-10-2414-266/+332
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC-related driver updates from Olof Johansson: "Various driver updates for platforms. A bulk of this is smaller fixes or cleanups, but some of the new material this time around is: - Support for Nvidia Tegra234 SoC - Ring accelerator support for TI AM65x - PRUSS driver for TI platforms - Renesas support for R-Car V3U SoC - Reset support for Cortex-M4 processor on i.MX8MQ There are also new socinfo entries for a handful of different SoCs and platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (131 commits) drm/mediatek: reduce clear event soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api soc: mediatek: cmdq: add jump function soc: mediatek: cmdq: add write_s_mask value function soc: mediatek: cmdq: add write_s value function soc: mediatek: cmdq: add read_s function soc: mediatek: cmdq: add write_s_mask function soc: mediatek: cmdq: add write_s function soc: mediatek: cmdq: add address shift in jump soc: mediatek: mtk-infracfg: Fix kerneldoc soc: amlogic: pm-domains: use always-on flag reset: sti: reset-syscfg: fix struct description warnings reset: imx7: add the cm4 reset for i.MX8MQ dt-bindings: reset: imx8mq: add m4 reset reset: Fix and extend kerneldoc reset: reset-zynqmp: Added support for Versal platform dt-bindings: reset: Updated binding for Versal reset driver reset: imx7: Support module build soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk soc: fsl: qman: convert to use be32_add_cpu() ...
| * memory: emif: Convert to DEFINE_SHOW_ATTRIBUTEQinglang Miao2020-09-201-20/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Along with this change, we get additionally: .owner = THIS_MODULE, .llseek = seq_lseek, 1. The llseek method is used to change the current read/write position in a file which can be ignored if you don't use it. 2. The owner is not even a method. Instead, it is a pointer to the module that “owns” this structure; it is used by the kernel to maintain the module's usage count which can be ignored. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20200917125113.103550-1-miaoqinglang@huawei.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Convert to DEFINE_SHOW_ATTRIBUTEQinglang Miao2020-09-201-13/+1
| | | | | | | | | | | | | | | | Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20200917125114.103598-1-miaoqinglang@huawei.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: omap-gpmc: Fix compile test on SPARCKrzysztof Kozlowski2020-09-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking: /usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child': omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create' Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Roger Quadros <rogerq@ti.com> Link: https://lore.kernel.org/r/20200911143251.399-1-krzk@kernel.org
| * memory: mtk-smi: add support for MT8167Fabien Parent2020-09-091-0/+23
| | | | | | | | | | | | | | | | Add support for the SMI IP on MT8167 Signed-off-by: Fabien Parent <fparent@baylibre.com> Link: https://lore.kernel.org/r/20200906180938.1117526-2-fparent@baylibre.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Delete duplicated argument to '|' in function ↵Ye Bin2020-09-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | tegra210_emc_r21021_periodic_compensation In function tegra210_emc_r21021_periodic_compensation when calculate emc_cfg EMC_CFG_DRAM_CLKSTOP_PD is duplicated. Signed-off-by: Ye Bin <yebin10@huawei.com> Link: https://lore.kernel.org/r/20200903021542.315195-1-yebin10@huawei.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: fsl-corenet-cf: Fix handling of platform_get_irq() errorKrzysztof Kozlowski2020-09-021-4/+2
| | | | | | | | | | | | | | | | | | platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 54afbec0d57f ("memory: Freescale CoreNet Coherency Fabric error reporting driver") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200827073315.29351-1-krzk@kernel.org
| * memory: omap-gpmc: Fix -Wunused-function warningsYueHaibing2020-09-021-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_OF is not set, make W=1 warns: drivers/memory/omap-gpmc.c:987:12: warning: ‘gpmc_cs_remap’ defined but not used [-Wunused-function] drivers/memory/omap-gpmc.c:926:20: warning: ‘gpmc_cs_get_name’ defined but not used [-Wunused-function] drivers/memory/omap-gpmc.c:919:13: warning: ‘gpmc_cs_set_name’ defined but not used [-Wunused-function] Move them to #ifdef CONFIG_OF block to fix this. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Roger Quadros <rogerq@ti.com> Link: https://lore.kernel.org/r/20200901112832.3084-1-yuehaibing%40huawei.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra: Remove GPU from DRM IOMMU groupThierry Reding2020-09-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") added the GPU to the DRM IOMMU group, which doesn't make any sense. This causes problems when Nouveau tries to attach to the SMMU and causes it to fall back to using the DMA API. Remove the GPU from the DRM groups to restore the old behaviour. The GPU should always have its own IOMMU domain to make sure it can map buffers into contiguous chunks (for big page support) without getting in the way of mappings from the DRM group. Cc: <stable@vger.kernel.org> Fixes: 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") Reported-by: Matias Zuniga <matias.nicolas.zc@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20200901153248.1831263-1-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: tegra186-emc: Simplify with dev_err_probe()Krzysztof Kozlowski2020-09-021-8/+2
| | | | | | | | | | | | | | | | Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200828153747.22358-2-krzk@kernel.org
| * memory: brcmstb_dpfe: Simplify with dev_err_probe()Krzysztof Kozlowski2020-09-021-5/+2
| | | | | | | | | | | | | | | | | | | | Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Markus Mayer <mmayer@broadcom.com> Link: https://lore.kernel.org/r/20200828153747.22358-1-krzk@kernel.org
| * memory: samsung: exynos5422-dmc: add missing and fix kerneldocKrzysztof Kozlowski2020-09-011-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing kerneldoc to struct exynos5_dmc and correct the existing kerneldoc in other places to fix W=1 warnings like: drivers/memory/samsung/exynos5422-dmc.c:107: warning: Function parameter or member 'freq_hz' not described in 'dmc_opp_table' drivers/memory/samsung/exynos5422-dmc.c:154: warning: Function parameter or member 'dev' not described in 'exynos5_dmc' drivers/memory/samsung/exynos5422-dmc.c:357: warning: Excess function parameter 'param' description in 'exynos5_set_bypass_dram_timings' drivers/memory/samsung/exynos5422-dmc.c:630: warning: Function parameter or member 'flags' not described in 'exynos5_dmc_get_volt_freq' drivers/memory/samsung/exynos5422-dmc.c:962: warning: cannot understand function prototype: 'struct devfreq_dev_profile exynos5_dmc_df_profile = ' drivers/memory/samsung/exynos5422-dmc.c:1011: warning: Function parameter or member 'reg_timing_row' not described in 'create_timings_aligned' drivers/memory/samsung/exynos5422-dmc.c:1011: warning: Excess function parameter 'idx' description in 'create_timings_aligned' drivers/memory/samsung/exynos5422-dmc.c:1345: warning: Excess function parameter 'set' description in 'exynos5_dmc_set_pause_on_switching' Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://lore.kernel.org/r/20200822163218.21857-3-krzk@kernel.org
| * memory: samsung: exynos5422-dmc: remove unused exynos5_dmc membersKrzysztof Kozlowski2020-09-011-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | The struct exynos5_dmc members bypass_rate, mx_mspll_ccore_phy, mout_mx_mspll_ccore_phy and opp_bypass are not actually used. Apparently there was a plan to store the OPP for the bypass mode in opp_bypass member, but driver fails to do it and instead always sets target voltage during bypass mode. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200822163218.21857-2-krzk@kernel.org
| * memory: samsung: exynos5422-dmc: rename timing register fields variablesKrzysztof Kozlowski2020-09-011-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | The driver has file-scope arrays defining fields of timing registers (e.g. struct timing_reg timing_row) and actual values for these registers per each OPP in state container (struct exynos5_dmc.timing_row). The meanings of these are different so use different names to avoid confusion. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://lore.kernel.org/r/20200822163218.21857-1-krzk@kernel.org
| * memory: emif: Remove bogus debugfs error handlingDan Carpenter2020-08-271-28/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers are generally not supposed to check the return values from debugfs functions. Debugfs functions never return NULL so this error handling will never trigger. (Historically debugfs functions used to return a mix of NULL and error pointers but it was eventually deemed too complicated for something which wasn't intended to be used in normal situations). Delete all the error handling. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Link: https://lore.kernel.org/r/20200826113759.GF393664@mwanda Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
| * memory: omap-gpmc: Fix build error without CONFIG_OFYueHaibing2020-08-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_OF is n, gcc fails: drivers/memory/omap-gpmc.o: In function `gpmc_omap_onenand_set_timings': omap-gpmc.c:(.text+0x2a88): undefined reference to `gpmc_read_settings_dt' Add gpmc_read_settings_dt() helper function, which zero the gpmc_settings so the caller doesn't proceed with random/invalid settings. Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Roger Quadros <rogerq@ti.com> Link: https://lore.kernel.org/r/20200827125316.20780-1-yuehaibing@huawei.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>