Skip to content

Commit 5ce8aee

Browse files
committed
bus: ti-sysc: Flush posted write on enable and disable
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: d59b605 ("bus: ti-sysc: Add generic enable/disable functions") Signed-off-by: Tony Lindgren <[email protected]>
1 parent 98ece19 commit 5ce8aee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/bus/ti-sysc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,9 @@ static int sysc_enable_module(struct device *dev)
991991
sysc_write_sysconfig(ddata, reg);
992992
}
993993

994+
/* Flush posted write */
995+
sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
996+
994997
if (ddata->module_enable_quirk)
995998
ddata->module_enable_quirk(ddata);
996999

@@ -1071,6 +1074,9 @@ static int sysc_disable_module(struct device *dev)
10711074
reg |= 1 << regbits->autoidle_shift;
10721075
sysc_write_sysconfig(ddata, reg);
10731076

1077+
/* Flush posted write */
1078+
sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
1079+
10741080
return 0;
10751081
}
10761082

0 commit comments

Comments
 (0)