Commits
Suman Anna committed 3f484f09d87
remoteproc/pruss_soc: fix system suspend/MStandby config issues The PRU-ICSS subsystem has a separate PRUSS_CFG module that contains various configuration registers. This includes a control bit STANDBY_INIT in register PRUSS_CFG register to initiate a Standby sequence (when set) and trigger a MStandby request to the SoC's PRCM module. This same bit is also used to enable the OCP master ports (when cleared). The system suspend/resume functionality on AM33xx/AM437x/AM57xx SoCs requires all initiators to assert their MStandby signal properly inorder to successfully enter suspend, and resume on a wakeup event. Certain firmwares can enable the OCP master ports through the STANDBY_INIT programming on the firmware side in order to access peripherals or memories external to the PRUSS. This causes a hang in the resume sequence on AM33xx/AM437x boards and requires a board reset to come out of the hang. This patch adds the preliminary System PM callbacks in the PRUSS SoC bus driver, and fixes this system resume hang by setting the STANDBY_INIT in the PM system suspend callback and resetting it back in the PM system resume callback, if so configured. The clearing of the STANDBY_INIT during resume requires an acknowledgment from PRCM and is done through the monitoring of the PRUSS_SYSCFG.SUB_MWAIT bit. NOTE: 1. This patch only adds the PM callbacks with code to fix the System Suspend/Resume hang issue on AM33xx/AM437x SoCs, but does not implement the full context save and restore required for the PRUSS drivers to work across system suspend/resume when the power domain is switched off (L4PER domain is switched OFF on AM335x/AM437x during system suspend/resume, so PRUSS modules do lose context). 2. The PRUSS driver functionality on AM57xx SoCs is not affected that much because the PER power domain to which the PRUSS IPs belong is not switched OFF during suspend/resume. Signed-off-by: Suman Anna <s-anna@ti.com>