30 Nov, 2011

6 commits

  • if we do not have mpu_dev we normally fail in cpu_init. It is better
    to fail driver registration if the devices are not available.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Kevin Hilman
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia
    [afzal@ti.com: use 'omap_device_get_by_hwmod_name' for 'mpu_dev']
    Signed-off-by: Afzal Mohammed

    Nishanth Menon
     
  • Clk name does'nt need to dynamically detected during clk init.
    move them off to driver initialization, if we dont have a clk name,
    there is no point in registering the driver anyways. The actual clk
    get and put is left at cpu_init and exit functions.

    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
     
  • Sometimes, bootloaders starts up with a frequency which is not
    in the OPP table. At cpu_init, policy->cur contains the frequency
    we pick at boot. It is possible that system might have fixed
    it's boot frequency later on as part of power initialization.
    After this condition, the first call to omap_target results in the
    following:

    omap_getspeed(actual device frequency) != policy->cur(frequency that
    cpufreq thinks that the system is at), and it is possible that
    freqs.old == freqs.new (because the governor requested a scale down).

    We exit without triggering the notifiers in the current code, which
    does'nt let code which depends on cpufreq_notify_transition to have
    accurate information as to what the system frequency is.

    Instead, we do a normal transition if policy->cur is wrong, then,
    freqs.old will be the actual cpu frequency, freqs.new will be the
    actual new cpu frequency and all required notifiers have the accurate
    information.

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

    Colin Cross
     
  • Enable all CPUs in the shared policy in the CPU init callback.
    Otherwise, the governor CPUFREQ_GOV_START event is invoked with
    a policy that only includes the first CPU, leaving other CPUs
    uninitialized by the governor.

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

    Todd Poynor
     
  • On OMAP SMP configuartion, both processors share the voltage
    and clock. So both CPUs needs to be scaled together and hence
    needs software co-ordination.

    Also, update lpj with reference value to avoid progressive error.

    Adjust _both_ the per-cpu loops_per_jiffy and global lpj. Calibrate
    them with with reference to the initial values to avoid a
    progressively bigger and bigger error in the value over time.

    While at this, re-use the notifiers for UP/SMP since on UP machine or
    UP_ON_SMP policy->cpus mask would contain only the boot CPU.

    Based on initial SMP support by Santosh Shilimkar.

    Signed-off-by: Russell King
    Signed-off-by: Santosh Shilimkar
    [khilman@ti.com: due to overlap/rework, combined original Santosh patch
    and Russell's rework]
    Signed-off-by: Kevin Hilman
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Russell King
     
  • Move OMAP cpufreq driver from arch/arm/mach-omap2 into
    drivers/cpufreq, along with a few cleanups:

    - generalize support for better handling of different SoCs in the OMAP
    - use OPP layer instead of OMAP clock internals for frequency table init

    Signed-off-by: Santosh Shilimkar
    [khilman@ti.com: move to drivers]
    Signed-off-by: Kevin Hilman
    [vaibhav.bedia@ti.com: Pull in for AM33xx]
    Signed-off-by: Vaibhav Bedia

    Santosh Shilimkar