30 Nov, 2011
4 commits
-
Ensure that PM initializations are all ready before we proceed.
This allows drivers such as gfx, cpufreq which are ready earlier
than pm to not not attempt to use the scaling infrastructure before
it is ready.Signed-off-by: Nishanth Menon
[vaibhav.bedia@ti.com: Pull in for AM33xx]
Signed-off-by: Vaibhav Bedia -
dvfs.h is required by omap cpufreq driver that
lives in drivers folder, so move it to plat/
directory. Also move voltage.h, vc.h & vp.h
similarly to have clean header file inclusionsSigned-off-by: Afzal Mohammed
-
Bootloaders should in theory setup a frequency which is enabled in
OPP table. However, there can be mismatches, and we should try
both going lower in addition to the going higher to find
a match if bootloader boots up at a OPP than the kernel thinks it
should be allowed. We also sequence the frequency and voltage settings
properly.Reported-by: Colin Cross
Signed-off-by: Nishanth Menon
[vaibhav.bedia@ti.com: Pull in for AM33xx]
Signed-off-by: Vaibhav Bedia -
OPP functions as described in Documentation/power/opp.txt
should be accessed under rcu_locks.Signed-off-by: Nishanth Menon
[vaibhav.bedia@ti.com: Pull in for AM33xx]
Signed-off-by: Vaibhav Bedia
05 Oct, 2011
4 commits
-
Add nodes for devices used by PM code (mpu, dsp, iva).
Add a cpus node as well as recommended in the DT spec.
Remove mpu, dsp, iva devices init if is populated.
Signed-off-by: Benoit Cousson
Acked-by: Grant Likely
Cc: Kevin Hilman -
Since the device pointer is now retrieved using the hwmod name, remove
the static variables used to store the device pointers for DSP, MPU, IVA
and L3 devices for PM/DVFS usage.Signed-off-by: Benoit Cousson
Signed-off-by: Kevin Hilman -
Replace the struct device parameter of omap2_set_init_voltage
by the hwmod name. It will avoid having to store explicitely
the device pointer into a static variable.Moreover, it will be a little bit more scalable if we introduce
new DVFS devices.Signed-off-by: Benoit Cousson
Signed-off-by: Kevin Hilman
23 Sep, 2011
1 commit
16 Sep, 2011
4 commits
-
All of the device init and device driver interaction with omap_device
is done using platform_device pointers. To make this more explicit,
have omap_device return a platform_device pointer instead of an
omap_device pointer.All current users of the omap_device pointer were only using it to get
at the platform_device pointer or struct device pointer, so fixing all
of the users was trivial.This also makes it more difficult for device init code to directly
access members of struct omap_device, and allows for easier changing
of omap_device internals.Cc: Paul Walmsley
Signed-off-by: Kevin Hilman -
Rename voltage scaling related functions to use voltdm_ prefix intead
of omap_voltage_, and cleanup kerneldoc comments in the process.s/omap_voltage_scale_vdd/voltdm_scale/
s/omap_voltage_reset/voltdm_reset/Also, in voltdm_reset() s/target_uvdc/target_volt/ to be consistent with
naming throughout the file.No functional changes.
Signed-off-by: Kevin Hilman
-
This voltage domain (a.k.a. VDD1) contains both the MPU and the IVA, so
rename appropriately.Also fixup any users of the "mpu" name to use "mpu_iva"
Signed-off-by: Kevin Hilman
-
Start cleaning up the voltage layer to have a voltage domain layer
that resembles the structure of the existing clock and power domain
layers. To that end:- move the 'struct voltagedomain' out of 'struct omap_vdd_info' to
become the primary data structure.- convert any functions taking a pointer to struct omap_vdd_info into
functions taking a struct voltagedomain pointer.- convert the register & initialize of voltage domains to look like
that of powerdomains- convert omap_voltage_domain_lookup() to voltdm_lookup(), modeled
after the current powerdomain and clockdomain lookup functions.- omap_voltage_late_init(): only configure VDD info when
the vdd_info struct is non-NULLSigned-off-by: Kevin Hilman
31 Aug, 2011
2 commits
-
Also, clean up error messages by adding missing whitespace, fixing
capitalisations, removing double newlines, and reducing verbosity.Signed-off-by: Johan Hovold
[khilman@ti.com: minor changelog/subject edits]
Signed-off-by: Kevin Hilman -
Fix misc. typos in various comment and error message.
Signed-off-by: Johan Hovold
[khilman@ti.com: minor changelog/subject edits]
Signed-off-by: Kevin Hilman
20 Aug, 2011
1 commit
-
While using clockdomain force wakeup method, not waiting for powerdomain
to be effectively ON may end up locking the clockdomain FSM until a
next wakeup event occurs.One such issue was seen on OMAP4430, where L4_PER was periodically
getting stuck in in-transition state when transitioning from from OSWR to ON.This issue was reported and investigated by Patrick Titiano
Signed-off-by: Santosh Shilimkar
Signed-off-by: Rajendra Nayak
Reported-by: Patrick Titiano
Cc: Kevin Hilman
Cc: Benoit Cousson
Cc: Paul Walmsley
[paul@pwsan.com: updated to apply; added transition wait on clkdm_deny_idle();
remove two superfluous pwrdm_wait_transition() calls]
Signed-off-by: Paul Walmsley
10 Jul, 2011
2 commits
-
The omap_set_pwrdm_state function forces clockdomains
to idle, without checking the existing idle state
programmed, instead based solely on the HW capability
of the clockdomain to support idle.
This is wrong and the clockdomains should be idled
post a state_switch *only* if idle transitions on the
clockdomain were already enabled.Signed-off-by: Rajendra Nayak
Cc: Paul Walmsley
Acked-by: Kevin Hilman
Signed-off-by: Paul Walmsley -
sleep_switch which is initialised to 0 in omap_set_pwrdm_state
happens to be a valid sleep_switch type (FORCEWAKEUP_SWITCH)
which are defined as:#define FORCEWAKEUP_SWITCH 0
#define LOWPOWERSTATE_SWITCH 1This causes the function to wrongly program some clock domains
even when the Powerdomain is in ON state.Signed-off-by: Rajendra Nayak
Cc: Paul Walmsley
Acked-by: Kevin Hilman
Signed-off-by: Paul Walmsley
26 Apr, 2011
1 commit
-
OMAP4 has two different Devices IVA and DSP. DSP is bound
with IVA for DVFS. The registration of IVA dev in API
'omap2_init_processor_devices' was missing. Init dev for
'iva_dev' is added.This also fixes the following error seen during boot as
omap2_set_init_voltage can now find the iva deviceomap2_set_init_voltage: Invalid parameters!
omap2_set_init_voltage: Unable to put vdd_iva to its init voltageSigned-off-by: Shweta Gulati
Acked-by: Nishanth Menon
Signed-off-by: Tony Lindgren
12 Mar, 2011
1 commit
-
…ion into omap-for-linus
Conflicts:
arch/arm/mach-omap2/pm34xx.c
10 Mar, 2011
1 commit
-
IVA device is not present in many OMAP3 variants.
This patch ensures that initialization is tied to
the presence of IVA on the device.Signed-off-by: Sanjeev Premi
Signed-off-by: Kevin Hilman
08 Mar, 2011
1 commit
-
At this point in time, there's no reason for this header file to be in
plat-omap/include/plat/voltage.h. It should not be included by device
drivers, and the code that uses it is currently all under mach-omap2/.Signed-off-by: Paul Walmsley
26 Feb, 2011
2 commits
-
Define the following architecture specific funtions for omap2/3/4
.clkdm_allow_idle
.clkdm_deny_idleConvert the platform-independent framework to call these functions.
Also rename the api's by removing the omap2_ preamble.
Hence call omap2_clkdm_allow_idle as clkdm_allow_idle and
omap2_clkdm_deny_idle as clkdm_deny_idle.Make the _clkdm_add_autodeps and _clkdm_del_autodeps as non-static
so they can be accessed from OMAP2/3 platform specific code.Signed-off-by: Rajendra Nayak
Signed-off-by: Paul Walmsley -
Define the following architecture specific funtions for omap2/3/4
.clkdm_sleep
.clkdm_wakeupConvert the platform-independent framework to call these functions.
Also rename the api's by removing the omap2_ preamble.
Hence call omap2_clkdm_wakeup as clkdm_wakeup and
omap2_clkdm_sleep as clkdm_sleep.Signed-off-by: Rajendra Nayak
[paul@pwsan.com: fixed omap3_clkdm_clear_all_sleepdeps() and
omap2_clkdm_clear_all_wkdeps() to test against the correct
loop termination condition; thanks to Kevin Hilman for finding and
helping fix]
Cc: Kevin Hilman
Signed-off-by: Paul Walmsley
23 Dec, 2010
6 commits
-
By default the system boots up at nominal voltage for every
voltage domain in the system. This patch puts vdd_mpu, vdd_iva
and vdd_core to the correct boot up voltage as per the opp tables
specified. This patch implements this by matching the rate of
the main clock of the voltage domain with the opp table and
picking up the correct voltage.Signed-off-by: Thara Gopinath
Signed-off-by: Kevin Hilman -
TWL6030 is the power IC used along with OMAP4 in OMAP4 SDPs,
blaze boards and panda boards. This patch registers the OMAP4
PMIC specific information with the voltage layer.
This also involves implementing a different formula for
voltage to vsel and vsel to voltage calculations from
TWL4030.Signed-off-by: Thara Gopinath
Signed-off-by: Kevin Hilman -
By default the system boots up at nominal voltage for every
voltage domain in the system. This patch puts VDD1 and VDD2
to the correct boot up voltage as per the opp tables specified.
This patch implements this by matching the rate of the main clock
of the voltage domain with the opp table and picking up the correct
voltage.Signed-off-by: Thara Gopinath
Signed-off-by: Kevin Hilman -
This patch registers the TWL4030 PMIC specific informtion
with the voltage driver. Failing this patch the voltage driver
is unware of the formula to use for vsel to voltage and vice versa
conversion and lot of other PMIC dependent parameters.This file is based on the arch/arm/plat-omap opp_twl_tpl.c file
by Paul Walmsley. The original file is replaced by this file.Signed-off-by: Thara Gopinath
Signed-off-by: Kevin Hilman -
This patch adds support for device registration of various
smartreflex module present in the system. This patch introduces
the platform data for smartreflex devices which include
the efused n-target vaules, a parameter to indicate
whether smartreflex autocompensation needs to be
enabled on init or not. An API
omap_enable_smartreflex_on_init is provided for the
board files to enable smartreflex autocompensation during
system boot up.Signed-off-by: Thara Gopinath
Signed-off-by: Kevin Hilman -
This patch adds voltage driver support for OMAP3. The driver
allows configuring the voltage controller and voltage
processors during init and exports APIs to enable/disable
voltage processors, scale voltage and reset voltage.
The driver maintains the global voltage table on a per
VDD basis which contains the various voltages supported by the
VDD along with per voltage dependent data like smartreflex
efuse offset, errminlimit and voltage processor errorgain.
The driver also allows the voltage parameters dependent on the
PMIC to be passed from the PMIC file through an API.
The driver allows scaling of VDD voltages either through
"vc bypass method" or through "vp forceupdate method" the
choice being configurable through the board file.This patch contains code originally in linux omap pm branch
smartreflex driver. Major contributors to this driver are
Lesly A M, Rajendra Nayak, Kalle Jokiniemi, Paul Walmsley,
Nishant Menon, Kevin Hilman. The separation of PMIC parameters
into a separate structure which can be populated from
the PMIC file is based on the work of Lun Chang from Motorola
in an internal tree.Signed-off-by: Thara Gopinath
[khilman: fixed link error for OMAP2-only defconfig]
Signed-off-by: Kevin Hilman
22 Dec, 2010
5 commits
-
omap_set_pwrdm_state today assumes a clkdm supports hw_auto
transitions and hence leaves some which do not support this
in sw wkup state preventing low power transitions.Signed-off-by: Rajendra Nayak
Signed-off-by: Santosh Shilimkar
Acked-by: Benoit Cousson
Acked-by: Kevin Hilman
Signed-off-by: Paul Walmsley -
For pwrdm's which support LOWPOWERSTATECHANGE, do not try waking
up the domain to put it back to deeper sleep state.Signed-off-by: Rajendra Nayak
Signed-off-by: Santosh Shilimkar
Acked-by: Benoit Cousson
Cc: Kevin Hilman
Acked-by: Kevin Hilman
Signed-off-by: Paul Walmsley -
The OMAP powerdomain code and data is all OMAP2+-specific. This seems
unlikely to change any time soon. Move plat-omap/include/plat/powerdomain.h
to mach-omap2/powerdomain.h. The primary point of doing this is to remove
the temptation for unrelated upper-layer code to access powerdomain code
and data directly.As part of this process, remove the references to powerdomain data
from the GPIO "driver" and the OMAP PM no-op layer, both in plat-omap.
Change the DSPBridge code to point to the new location for the
powerdomain headers. The DSPBridge code should not be including the
powerdomain headers; these should be removed.Signed-off-by: Paul Walmsley
Cc: Kevin Hilman
Cc: Omar Ramirez Luna
Cc: Felipe Contreras
Cc: Greg Kroah-Hartman -
The OMAP clockdomain code and data is all OMAP2+-specific. This seems
unlikely to change any time soon. Move plat-omap/include/plat/clockdomain.h
to mach-omap2/clockdomain.h. The primary point of doing this is to remove
the temptation for unrelated upper-layer code to access clockdomain code
and data directly.DSPBridge also uses the clockdomain headers for some reason, so,
modify it also. The DSPBridge code should not be including the
clockdomain headers; these should be removed.Signed-off-by: Paul Walmsley
Cc: Kevin Hilman
Cc: Omar Ramirez Luna
Cc: Felipe Contreras
Cc: Greg Kroah-Hartman
Tested-by: Rajendra Nayak
Tested-by: Santosh Shilimkar -
omap2_common_pm_init is the API where generic system devices like
mpu, l3 etc get initialized. This has to happen really early on
during the boot and not at a later time. This is especially important
with the new opp changes as these devices need to be built before the
opp tables init happen. Today both are device initcalls and it works
just because of the order of compilation. Making this postcore_initcall
is ideal because the omap device layer init happens as a core_initcall
and typically rest of the driver/device inits are arch_initcall or
something lower.Signed-off-by: Thara Gopinath
Signed-off-by: Kevin Hilman
24 Sep, 2010
3 commits
-
The OMAP4 L3 interconnect is split in 3 part for power saving reason.
Because of that there is no l3_main like on OMAP2 & 3 but 3 differentes
l3_main_X instances.In the case of OMAP4, query only the l3_main_1 part. The clock and
voltage are shared across the 3 instances.Signed-off-by: Benoit Cousson
Cc: Paul Walmsley
Signed-off-by: Kevin Hilman -
The set_pwrdm_state() is needed on omap4 as well so move
this routine to common pm.c file so that it's available for omap3/4Signed-off-by: Rajendra Nayak
Signed-off-by: Santosh Shilimkar
Signed-off-by: Kevin Hilman -
OMAP4 has an iva device and a dsp devcice where as OMAP2/3
has only an iva device. In this file the iva device in the
system is registered under the name dsp_dev and the API
to retrieve the iva device is omap2_get_dsp_device.
This patch renames the dsp_dev to iva_dev, renames
omap2_get_dsp_device to omap2_get_iva_device,
registers dsp_dev for OMAP4 and adds a new API
omap4_get_dsp_device to retrieve the dep_dev.Signed-off-by: Thara Gopinath
Signed-off-by: Kevin Hilman
27 Jul, 2010
1 commit
-
Create simple omap_devices for the main processors and busses.
This is required to support the forth-coming device-based OPP
approach, where OPPs are managed and tracked at the device level.Also, move these common PM init functions into a common_pm_init call
that is called as a device_initcall(). The PM init is done at this level
to ensure that the driver core is initialized before initialized.Signed-off-by: Kevin Hilman
[paul@pwsan.com: sparse warnings cleaned up; newly-created functions moved
from mach-omap2/io.c to mach-omap2/pm.c; newly-created functions renamed
to start with "omap2" rather than "omap"]
Signed-off-by: Paul Walmsley
29 May, 2009
1 commit
-
This patch is to sync the core linux-omap PM code with mainline. This
code has evolved and been used for a while the linux-omap tree, but
the attempt here is to finally get this into mainline.Following this will be a series of patches from the 'PM branch' of the
linux-omap tree to add full PM hardware support from the linux-omap
tree.Much of this PM core code was written by Jouni Hogander with
significant contributions from Paul Walmsley as well as many others
from Nokia, Texas Instruments and linux-omap community.Signed-off-by: Jouni Hogander
Cc: Paul Walmsley
Signed-off-by: Kevin Hilman