Message ID | 1542886753-17625-8-git-send-email-rogerq@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for TI PRU ICSS | expand |
* Roger Quadros <rogerq@ti.com> [181122 11:39]: > @@ -160,6 +159,11 @@ static int pruss_enable_module(struct device *dev) > pruss_soc_bus_rmw(psoc_bus->syscfg, SYSCFG_STANDBY_MODE_MASK, > SYSCFG_STANDBY_MODE_SMART); > > + /* enable OCP master ports/disable MStandby */ > + ret = pruss_soc_bus_enable_ocp_master_ports(dev); > + if (ret) > + pruss_disable_module(dev); > + > return ret; Seems like all you should need to do here with ti-sysc is to leave out SYSC_IDLE_SMART and SYSC_IDLE_SMART_WKUP in the dts for ti,sysc-midle property for am335x. Regards, Tony
diff --git a/drivers/soc/ti/pruss_soc_bus.c b/drivers/soc/ti/pruss_soc_bus.c index 46dfb7a..f477168 100644 --- a/drivers/soc/ti/pruss_soc_bus.c +++ b/drivers/soc/ti/pruss_soc_bus.c @@ -67,8 +67,7 @@ static inline void pruss_soc_bus_rmw(void __iomem *reg, u32 mask, u32 set) * outside of the PRU-ICSS. The function has to wait for the PRCM to * acknowledge through the monitoring of the PRUSS_SYSCFG.SUB_MWAIT bit. */ -static -int __maybe_unused pruss_soc_bus_enable_ocp_master_ports(struct device *dev) +static int pruss_soc_bus_enable_ocp_master_ports(struct device *dev) { struct pruss_soc_bus *psoc_bus = dev_get_drvdata(dev); u32 syscfg_val, i; @@ -160,6 +159,11 @@ static int pruss_enable_module(struct device *dev) pruss_soc_bus_rmw(psoc_bus->syscfg, SYSCFG_STANDBY_MODE_MASK, SYSCFG_STANDBY_MODE_SMART); + /* enable OCP master ports/disable MStandby */ + ret = pruss_soc_bus_enable_ocp_master_ports(dev); + if (ret) + pruss_disable_module(dev); + return ret; }