diff options
author | Tony Lindgren <tony@atomide.com> | 2020-05-27 06:49:29 -0700 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2020-06-30 15:36:53 -0400 |
commit | 1f5197a5ad973c9a5511c1d4f27c9dea4ec5dcad (patch) | |
tree | 98ffbc507c7ca0b663af00b083d44573525722f1 /drivers/bus | |
parent | 21d511c6c9c25bd45acfafd9768027394a0fddb3 (diff) | |
download | linux-stable-1f5197a5ad973c9a5511c1d4f27c9dea4ec5dcad.tar.gz linux-stable-1f5197a5ad973c9a5511c1d4f27c9dea4ec5dcad.tar.bz2 linux-stable-1f5197a5ad973c9a5511c1d4f27c9dea4ec5dcad.zip |
bus: ti-sysc: Flush posted write on enable and disable
[ Upstream commit 5ce8aee81be6c8bc19051d7c7b0d3cbb7ac5fc3f ]
Looks like we're missing flush of posted write after module enable and
disable. I've seen occasional errors accessing various modules, and it
is suspected that the lack of posted writes can also cause random reboots.
The errors we can see are similar to the one below from spi for example:
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4CFG (Read): Data Access
in User mode during Functional access
...
mcspi_wait_for_reg_bit
omap2_mcspi_transfer_one
spi_transfer_one_message
...
We also want to also flush posted write for disable. The clkctrl clock
disable happens after module disable, and we don't want to have the
module potentially stay active while we're trying to disable the clock.
Fixes: d59b60564cbf ("bus: ti-sysc: Add generic enable/disable functions")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/ti-sysc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index f0bc0841cbc4..c088c6f4adcf 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -938,6 +938,9 @@ set_autoidle: sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg); } + /* Flush posted write */ + sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]); + if (ddata->module_enable_quirk) ddata->module_enable_quirk(ddata); @@ -1018,6 +1021,9 @@ set_sidle: reg |= 1 << regbits->autoidle_shift; sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg); + /* Flush posted write */ + sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]); + return 0; } |