aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory/tegra/mc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-02-02 22:20:34 +0100
committerArnd Bergmann <arnd@arndb.de>2021-02-02 22:20:34 +0100
commit4d29b82686589fafd4cbdd2de5ae8b72fd5a3149 (patch)
tree9653aab4f4ec9f68b57372f8ef07a4e316b42784 /drivers/memory/tegra/mc.c
parentMerge tag 'memory-controller-drv-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers (diff)
parentmemory: tegra: Remove calls to dev_pm_opp_set_clkname() (diff)
downloadlinux-dev-4d29b82686589fafd4cbdd2de5ae8b72fd5a3149.tar.xz
linux-dev-4d29b82686589fafd4cbdd2de5ae8b72fd5a3149.zip
Merge tag 'memory-controller-drv-tegra-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers
Memory controller drivers for v5.12 - Tegra SoC 1. Make the tegra124-emc driver modular. 2. Add interconnect support to Tegra124 memory controller drivers. 3. Minor fixes. * tag 'memory-controller-drv-tegra-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: tegra: Remove calls to dev_pm_opp_set_clkname() memory: tegra: Check whether reset is already asserted memory: tegra124: Support interconnect framework memory: tegra124-emc: Continue probing if timings are missing in device-tree memory: tegra124-emc: Make driver modular Link: https://lore.kernel.org/r/20210131180109.11510-2-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/memory/tegra/mc.c')
-rw-r--r--drivers/memory/tegra/mc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index 44064de962c2..a21163ccadc4 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -176,6 +176,13 @@ static int tegra_mc_hotreset_assert(struct reset_controller_dev *rcdev,
if (!rst_ops)
return -ENODEV;
+ /* DMA flushing will fail if reset is already asserted */
+ if (rst_ops->reset_status) {
+ /* check whether reset is asserted */
+ if (rst_ops->reset_status(mc, rst))
+ return 0;
+ }
+
if (rst_ops->block_dma) {
/* block clients DMA requests */
err = rst_ops->block_dma(mc, rst);