30 Nov, 2011

4 commits


05 Oct, 2011

4 commits


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

    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

    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

    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-NULL

    Signed-off-by: Kevin Hilman

    Kevin Hilman
     

31 Aug, 2011

2 commits


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

    Santosh Shilimkar
     

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

    Rajendra Nayak
     
  • 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 1

    This 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

    Rajendra Nayak
     

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 device

    omap2_set_init_voltage: Invalid parameters!
    omap2_set_init_voltage: Unable to put vdd_iva to its init voltage

    Signed-off-by: Shweta Gulati
    Acked-by: Nishanth Menon
    Signed-off-by: Tony Lindgren

    Shweta Gulati
     

12 Mar, 2011

1 commit


10 Mar, 2011

1 commit


08 Mar, 2011

1 commit


26 Feb, 2011

2 commits

  • Define the following architecture specific funtions for omap2/3/4
    .clkdm_allow_idle
    .clkdm_deny_idle

    Convert 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

    Rajendra Nayak
     
  • Define the following architecture specific funtions for omap2/3/4
    .clkdm_sleep
    .clkdm_wakeup

    Convert 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

    Rajendra Nayak
     

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

    Thara Gopinath
     
  • 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

    Thara Gopinath
     
  • 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

    Thara Gopinath
     
  • 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

    Thara Gopinath
     
  • 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

    Thara Gopinath
     
  • 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

    Thara Gopinath
     

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

    Rajendra Nayak
     
  • 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

    Rajendra Nayak
     
  • 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

    Paul Walmsley
     
  • 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

    Paul Walmsley
     
  • 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

    Thara Gopinath
     

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

    Benoit Cousson
     
  • 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/4

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Kevin Hilman

    Santosh Shilimkar
     
  • 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

    Thara Gopinath
     

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

    Kevin Hilman
     

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

    Kevin Hilman