lkml.org 
[lkml]   [2018]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/17] soc: ti: pruss: Configure SYSCFG properly during probe/remove
* Roger Quadros <rogerq@ti.com> [181122 11:39]:
> +/* firmware must be idle when calling this function */
> +static void pruss_disable_module(struct device *dev)
> +{
> + struct pruss_soc_bus *psoc_bus = dev_get_drvdata(dev);
> +
> + /* configure Smart Standby */
> + pruss_soc_bus_rmw(psoc_bus->syscfg, SYSCFG_STANDBY_MODE_MASK,
> + SYSCFG_STANDBY_MODE_SMART);
> +
> + /* initiate MStandby */
> + pruss_soc_bus_rmw(psoc_bus->syscfg, SYSCFG_STANDBY_INIT,
> + SYSCFG_STANDBY_INIT);
> +
> + /* tell PRCM to initiate IDLE request */
> + pm_runtime_put_sync(dev);
> +}
> +
> +static int pruss_enable_module(struct device *dev)
> +{
> + struct pruss_soc_bus *psoc_bus = dev_get_drvdata(dev);
> + int ret;
> +
> + /* tell PRCM to de-assert IDLE request */
> + ret = pm_runtime_get_sync(dev);
> + if (ret < 0) {
> + pm_runtime_put_noidle(dev);
> + return ret;
> + }
> +
> + /* configure for Smart Idle & Smart Standby */
> + pruss_soc_bus_rmw(psoc_bus->syscfg, SYSCFG_IDLE_MODE_MASK,
> + SYSCFG_IDLE_MODE_SMART);
> + pruss_soc_bus_rmw(psoc_bus->syscfg, SYSCFG_STANDBY_MODE_MASK,
> + SYSCFG_STANDBY_MODE_SMART);
> +
> + return ret;
> +}

Yeah so nothing PRU specific here, this you should be able to
handle in a generic way with drivers/bus/ti-sysc.c.

Regards,

Tony

\
 
 \ /
  Last update: 2018-11-23 17:27    [W:0.203 / U:1.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site