aboutsummaryrefslogtreecommitdiff
path: root/include/linux/power/smartreflex.h
AgeCommit message (Collapse)AuthorFilesLines
2023-01-09ARM: omap2: smartreflex: remove on_init controlArnd Bergmann1-3/+0
Nothing calls omap_enable_smartreflex_on_init() any more, so it does not need to be tracked either. Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2021-08-10soc: ti: Remove pm_runtime_irq_safe() usage for smartreflexTony Lindgren1-0/+2
For the smartreflex device, we need to disable smartreflex on SoC idle, and have been using pm_runtime_irq_safe() to do that. But we want to remove the irq_safe usage as PM runtime takes a permanent usage count on the parent device with it. In order to remove the need for pm_runtime_irq_safe(), let's gate the clock directly in the driver. This removes the need to call PM runtime during idle, and allows us to switch to using CPU_PM in the following patch. Note that the smartreflex interconnect target module is configured for smart idle, but the clock does not have autoidle capability, and needs to be gated manually. If the clock supported autoidle, we would not need to even gate the clock. With this change, we can now remove the related quirk flags for ti-sysc also. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]>
2019-11-13ARM: OMAP2+: SmartReflex: add omap_sr_pdata definitionBen Dooks1-0/+3
The omap_sr_pdata is not declared but is exported, so add a define for it to fix the following warning: arch/arm/mach-omap2/pdata-quirks.c:609:36: warning: symbol 'omap_sr_pdata' was not declared. Should it be static? Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-12-12PM / AVS: SmartReflex: Switch to SPDX Licence IDNishanth Menon1-4/+1
Fix up licensing to be inline with Linux conventions. Signed-off-by: Nishanth Menon <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-10-09PM / AVS: SmartReflex: remove unused functionUwe Kleine-König1-5/+0
omap_sr_register_pmic() was introduced in 2010 in commit 984aa6dbf4ca ("OMAP3: PM: Adding smartreflex driver support.") . There was never any caller of this function in mainline resulting in a warning sr_init: No PMIC hook to init smartreflex for each machine where this driver is enabled. So remove the unused function and the pr_warn. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-02-22ARM: OMAP2+: Prepare to pass auxdata for smartreflexTony Lindgren1-1/+9
We are still initializing smartreflex with platform data using omap_device_build(). We can instead pass the platform data in with auxdata in pdata-quirks.c and make the driver use that in later patches. Note that we cannot enable the auxdata use yet, this is done in the last patch of the series. Signed-off-by: Tony Lindgren <[email protected]>
2013-06-10PM / AVS: SmartReflex: use omap_sr * for enable/disable interfaceAndrii Tseglytskyi1-2/+2
SmartReflex driver interface is natively divided to two parts: - external SmartReflex interface - interface between SmartReflex driver and SmartReflex Class Functions which belong to AVS class interface can use struct omap_sr* instead of struct voltatedomain*, to provide a direct connection between SR driver and SR class. This allows us to optimize and not do additional lookups where none is required. sr_enable() and sr_disable() are interface functions between SR driver and SR class. They are typically used by Class driver to enable/disable SmartReflex hardware module. Now they take struct omap_sr* as input parameter. Signed-off-by: Andrii Tseglytskyi <[email protected]> Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2013-06-10PM / AVS: SmartReflex: use omap_sr * for minmax interfacesAndrii Tseglytskyi1-1/+1
SmartReflex driver interface is natively divided to two parts: - external SmartReflex interface - interface between SmartReflex driver and SmartReflex Class Functions which belong to AVS class interface can use struct omap_sr* instead of struct voltatedomain*, to provide a direct connection between SR driver and SR class. This allows us to optimize and not do additional lookups where none is required. sr_configure_minmax() is interface function between SR driver and SR class. It is typically used by Class driver to configure MINMAXAVG module inside SmartReflex module. Now it takes struct omap_sr* as input parameter. Signed-off-by: Andrii Tseglytskyi <[email protected]> Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2013-06-10PM / AVS: SmartReflex: use omap_sr * for errgen interfacesAndrii Tseglytskyi1-2/+2
SmartReflex driver interface is natively divided to two parts: - external SmartReflex interface - interface between SmartReflex driver and SmartReflex Class Functions which belong to AVS class interface can use struct omap_sr* instead of struct voltatedomain*, to provide a direct connection between SR driver and SR class. This allows us to optimize and not do additional lookups where none is required. sr_disable_errgen() and sr_configure_errgen() are interface functions between SR driver and SR class. They are typically used by Class driver to configure error generator module during SmartReflex enable/disable sequence. Now they take struct omap_sr* as input parameter. Signed-off-by: Andrii Tseglytskyi <[email protected]> Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-10-15ARM: OMAP: SmartReflex: pass device dependent data via platform dataJean Pihet1-2/+12
Remove the device dependent code (ex. cpu_is_xxx()) and settings from the driver code and instead pass them via the platform data. This allows a clean separation of the driver code and the platform code, as required by the move of the platform header files to include/linux/platform_data. Note about the smartreflex functional clocks: the smartreflex fclks are derived from sys_clk and have the same name as the main_clk from the hwmod entry, in order for the SmartReflex driver to request the fclk (using clk_get(dev, "fck")). Signed-off-by: Jean Pihet <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-09-19ARM: omap: move platform_data definitionsArnd Bergmann1-1/+1
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the omap include directories Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Acked-by: Tony Lindgren <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: "Benoît Cousson" <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Ohad Ben-Cohen <[email protected]> Cc: Grant Likely <[email protected]> Cc: Omar Ramirez Luna <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: Peter Ujfalusi <[email protected]> Cc: Jarkko Nikula <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Artem Bityutskiy <[email protected]> Cc: Jean Pihet <[email protected]> Cc: J Keerthy <[email protected]> Cc: [email protected]
2012-05-31ARM: OMAP2+: SmartReflex: add POWER_AVS Kconfig optionsJean Pihet1-1/+1
Add a Kconfig menu (POWER_AVS) and rename the Kconfig options for the OMAP SmartReflex implementation: CONFIG_OMAP_SMARTREFLEX renames to CONFIG_POWER_AVS_OMAP CONFIG_OMAP_SMARTREFLEX_CLASS3 renames to CONFIG_POWER_AVS_OMAP_CLASS3 This change makes the SmartReflex implementation ready for the move to drivers/. Signed-off-by: Jean Pihet <[email protected]> Signed-off-by: J Keerthy <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-31ARM: OMAP2+: SmartReflex: Use per-OPP data structureJean Pihet1-2/+6
The SmartReflex driver incorrectly treats some per-OPP data as data common to all OPPs (e.g., ERRMINLIMIT). Move this data into a per-OPP data structure. Furthermore, in order to make the SmartReflex implementation ready for the move to drivers/, remove the dependency from the SR driver code to the voltage layer by querying the data tables only from the SR device init code. Based on Paul's original code for the SmartReflex driver conversion. Signed-off-by: Jean Pihet <[email protected]> Signed-off-by: J Keerthy <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-31ARM: OMAP2+: SmartReflex: introduce a busy loop condition test macroJean Pihet1-1/+22
Now that omap_test_timeout is only accessible from mach-omap2/, introduce a similar function for SR. This change makes the SmartReflex implementation ready for the move to drivers/. Signed-off-by: Jean Pihet <[email protected]> Signed-off-by: J Keerthy <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-31ARM: OMAP2+: smartreflex: Use the names from hwmod data instead of voltage ↵Jean Pihet1-0/+3
domains. Associate a name with each SmartReflex instance from the hwmod data, rather than attempting to reuse the name of a voltage domain. The name from hwmod better reflects the smartreflex integration in the system. Also have the name passed to the drivers using pdata, which helps to remove any dependencies on SoC-specific structures. Signed-off-by: Jean Pihet <[email protected]> Signed-off-by: J Keerthy <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-31ARM: OMAP3+: SmartReflex: class drivers should use struct omap_sr *Jean Pihet1-4/+27
Convert SmartReflex "class" functions to take a struct omap_sr *, rather than a struct voltagedomain *. SmartReflex code should be driver code and not tightly coupled to OMAP subarchitecture-specific structures. Based on Paul's original code for the SmartReflex driver conversion. Signed-off-by: Jean Pihet <[email protected]> Signed-off-by: J Keerthy <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-31ARM: OMAP2+: SmartReflex: move the smartreflex header to include/linux/powerJean Pihet1-0/+257
Move the smartreflex header file (arch/arm/mach-omap2/smartreflex.h) in a new header file include/linux/power/smartreflex.h. This change makes the SmartReflex implementation ready for the move to drivers/. Signed-off-by: Jean Pihet <[email protected]> Signed-off-by: J Keerthy <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>