Re: [PATCH 05/17] soc: ti: pruss: Configure SYSCFG properly during probe/remove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Roger Quadros <rogerq@xxxxxx> [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



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux