12 Dec, 2011

2 commits


06 Dec, 2011

3 commits


01 Dec, 2011

12 commits


30 Nov, 2011

23 commits

  • TPS65910 VDD1 SMPS is connected to MPU.
    Add dummy entries for other regulators.

    TODO: Replace dummy regulator entries
    with proper ones as required.

    Signed-off-by: Afzal Mohammed

    Afzal Mohammed
     
  • MPU voltage domain data added. Also added
    OPP table for MPU voltage domain.

    OPP table for CORE voltage domain has not been
    added as there were issues upon reducing CORE
    voltage, hence no dependency has been defined
    for MPU.

    Signed-off-by: Afzal Mohammed

    Afzal Mohammed
     
  • Jitter correction for AM33XX is not present.
    Handle revelant clock API's properly.

    Signed-off-by: Afzal Mohammed

    Vaibhav Bedia
     
  • Signed-off-by: Vaibhav Bedia

    Vaibhav Bedia
     
  • Initialize voltage to be as per OPP

    Signed-off-by: Vaibhav Bedia
    Signed-off-by: Afzal Mohammed

    Vaibhav Bedia
     
  • Replace clk_set_rate with omap_device_scale
    in target function. This provides the ability
    to change voltage as well as frequency as per
    OPP tables

    Signed-off-by: Afzal Mohammed

    Afzal Mohammed
     
  • TI processors in TI81x and AM33x family work with PMICs like
    TPS65910/1 which are not part of the TWL series. These processors
    also do not have a voltage controller/processor module.

    In order to invoke the normal regulator calls from the voltage
    layer the following changes are done to struct voltagedomain
    - Add a flag use_regulator for the SoC voltagedomain
    code to indicate its intention of using a PMIC which
    is not controlled by VC/VP
    - Add a regulator_init callback which the platform code
    can utilise for any custom init sequence before making
    use of the regulator. Platform code is also expected
    to set the voltdm->scale function in the init callback

    Signed-off-by: Ravikumar Kattekola
    Signed-off-by: Vaibhav Bedia

    Vaibhav Bedia
     
  • Most clock rates can vary to some extent based on the exact
    M/N values used to lock a dpll.
    Do a round_rate before updating the rates into the OPP table
    so that the 'exact' rates appear and a subsequent clk_set_rate
    works without issues.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Nishanth Menon
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia
    Signed-off-by: Afzal Mohammed

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

    Nishanth Menon
     
  • Make DVFS to try the next available frequency if the higher match
    is not available. This will probably be the max available for the device.

    If we cannot match any thing at all, fail. This modifies the behavior
    of device scale to guarenteeing _atleast_ the frequency requested into
    _if possible_, the frequency requested.

    Signed-off-by: Girish S G
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Girish S G
     
  • Provide mechanism to know if DVFS is scaling on a specific domain.
    This API will allow us to detect transition and take appropriate
    measures in idle path

    Acked-by: Todd Poynor
    Acked-by: Santosh Shilimkar
    Signed-off-by: Nishanth Menon
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Nishanth Menon
     
  • Ability to show the dependency table helps debug some of the quirky
    issues associated with dvfs when multiple device requests are present

    [nm@ti.com: log beautification, few fixes]
    Signed-off-by: Nishanth Menon
    Signed-off-by: Todd Poynor
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Todd Poynor
     
  • Let omap_init_opp_table run through all the OPP's instead of
    returning on seeing the first invalid one. Skip the invalid ones
    and give a fair chance to the rest to get registered,
    if they are found to be valid.
    For every invalid entry in the OPP table, instead of a pr_warn,
    do a WARN so it gets the attention it needs.

    Signed-off-by: Rajendra Nayak
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Rajendra Nayak
     
  • Allocating dvfs_info for every device instead of doing it
    for every voltage domain causes devices registered using
    omap_dvfs_register_device() to disappear.

    Signed-off-by: Rajendra Nayak
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

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

    Signed-off-by: Afzal Mohammed

    Afzal Mohammed
     
  • Register DVFS entries per opp entry to capture all
    scalable domain devices.

    Signed-off-by: Nishanth Menon
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Nishanth Menon
     
  • With hwmods, ideally, we should have been able to do:
    pdm = omap_hwmod_get_pwrdm(oh);
    voltdm = pwrdm_get_voltdm(pdm);
    clk = clk_get(oh->main_clk);

    Unfortunately hwmod database is'nt mature enough yet to handle
    silicon variance within the same family, e.g. 4430 Vs 4460.
    So we explicitly map the domain and clk names within the OPP
    entries. This allows us to scale by having a central location for
    the registration.

    IMPORTANT NOTE: we probably will need to fix core and iva clk
    setting.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Vishwanath BS
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Nishanth Menon
     
  • This patch introduces helper functions for Device Voltage and Frequency
    Scaling (DVFS).
    Data structures added:
    1. omap_dev_user_list: This structure maintains list of frequency requests per
    device basis. When a device needs to be scaled to a particular frequency,
    This list is searched to find the maximum request for a given device.
    If noone has placed any request, device frequency is obtained from device
    opp table.
    2. omap_vdd_dev_list: This strcucture stores device list per vdd basis.
    Whenever a device is registered with a vdd, it is added to this list.
    3. omap_vdd_user_list: User list of devices associated with each voltage domain
    instance. The user list is implemented using plist structure with priority
    node populated with the voltage values.
    4. omap_vdd_dvfs_info: This structure is used to abstract DVFS related
    information per VDD basis. It holds pointer to corresponding vdd's
    voltagedomain instance and pointer to user list.

    Following helper functions have been added to operate on above data structures:
    1. omap_dvfs_add_vdd_user - function to add a user into omap_vdd_user_list
    2. omap_vdd_user_list - function to remove a user from omap_vdd_user_list
    3. omap_dvfs_register_device - function to register a device with vdd
    4. omap_dvfs_add_freq_request - function to add a frequency request into
    omap_dev_user_list
    5. omap_dvfs_remove_freq_request - function to remove a frequency request from
    omap_dev_user_list
    6. omap_dvfs_find_voltage - function to find the opp corresponding to given
    voltage
    7. omap_device_scale - this is the function that is to be used for scaling
    a specific domain. This is exported for drivers such as syslink, dspbridge
    to use it while being a module.

    DVFS layer is initialized and basic data structures are allocated and
    initialized as part of this.

    This patch is based on Vishwa and Thara's previous DVFS implementation, but with
    major rework.

    note: generates "warning: 'omap_dvfs_remove_vdd_user' defined but not used"
    this function will be used in future patches

    [nm@ti.com: misc cleanups including use voltage files from mach-omap2 dir]
    [axelhaslam@ti.com: fixed issue with ondemand - required mutex unlock]
    [toddpoynor@google.com: Add spinlocking of plists, GFP_ATOMIC]
    Signed-off-by: Nishanth Menon
    Signed-off-by: Axel Haslam
    Signed-off-by: Todd Poynor
    Signed-off-by: Vishwanath BS
    Cc: Thara Gopinath
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia
    [afzal@ti.com: fix warning]
    Signed-off-by: Afzal Mohammed

    Vishwanath BS
     
  • There could be dependencies between various voltage domains for
    maintaining system performance or hardware limitation reasons
    like VDD should be at voltage v1 when VDD is at voltage v2.
    This patch introduce dependent vdd information structures in the
    voltage layer which can be used to populate these dependencies
    for a voltage domain.

    Based on original patch from Thara.

    NOTE: OMAP4460 dependency table is not frozen yet, hence not added.

    [nm@ti.com: cleanups and squash for OMAP3,4 data]
    Signed-off-by: Vishwanath BS
    Cc: Thara Gopinath
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Vishwanath BS
     
  • 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

    Nishanth Menon
     
  • 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

    Nishanth Menon
     
  • We use a single frequency table for multiple CPUs. But, with
    OMAP4, since we have multiple CPUs, the cpu_init call for CPU1
    causes freq_table previously allocated for CPU0 to be overwritten.
    In addition, we dont free the table on exit path.

    We solve this by maintaining an atomic type counter to ensure
    just a single table exists at a given time.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Kevin Hilman
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Nishanth Menon
     
  • Release the mpu_clk in fail paths.

    Reported-by: Todd Poynor
    Signed-off-by: Nishanth Menon
    Signed-off-by: Kevin Hilman
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Nishanth Menon