1. 06 1月, 2014 1 次提交
    • V
      cpufreq: Mark ARM drivers with CPUFREQ_NEED_INITIAL_FREQ_CHECK flag · ae6b4271
      Viresh Kumar 提交于
      Sometimes boot loaders set CPU frequency to a value outside of frequency table
      present with cpufreq core. In such cases CPU might be unstable if it has to run
      on that frequency for long duration of time and so its better to set it to a
      frequency which is specified in frequency table.
      
      On some systems we can't really say what frequency we're running at the moment
      and so for these we shouldn't check if we are running at a frequency present in
      frequency table. And so we really can't force this for all the cpufreq drivers.
      
      Hence we are created another flag here: CPUFREQ_NEED_INITIAL_FREQ_CHECK that
      will be marked by platforms which want to go for this check at boot time.
      
      Initially this is done for all ARM platforms but others may follow if required.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ae6b4271
  2. 31 10月, 2013 1 次提交
  3. 26 10月, 2013 1 次提交
    • V
      cpufreq: Implement light weight ->target_index() routine · 9c0ebcf7
      Viresh Kumar 提交于
      Currently, the prototype of cpufreq_drivers target routines is:
      
      int target(struct cpufreq_policy *policy, unsigned int target_freq,
      		unsigned int relation);
      
      And most of the drivers call cpufreq_frequency_table_target() to get a valid
      index of their frequency table which is closest to the target_freq. And they
      don't use target_freq and relation after that.
      
      So, it makes sense to just do this work in cpufreq core before calling
      cpufreq_frequency_table_target() and simply pass index instead. But this can be
      done only with drivers which expose their frequency table with cpufreq core. For
      others we need to stick with the old prototype of target() until those drivers
      are converted to expose frequency tables.
      
      This patch implements the new light weight prototype for target_index() routine.
      It looks like this:
      
      int target_index(struct cpufreq_policy *policy, unsigned int index);
      
      CPUFreq core will call cpufreq_frequency_table_target() before calling this
      routine and pass index to it. Because CPUFreq core now requires to call routines
      present in freq_table.c CONFIG_CPU_FREQ_TABLE must be enabled all the time.
      
      This also marks target() interface as deprecated. So, that new drivers avoid
      using it. And Documentation is updated accordingly.
      
      It also converts existing .target() to newly defined light weight
      .target_index() routine for many driver.
      Acked-by: NHans-Christian Egtvedt <egtvedt@samfundet.no>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NRussell King <linux@arm.linux.org.uk>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Tested-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rjw@rjwysocki.net>
      9c0ebcf7
  4. 16 10月, 2013 3 次提交
  5. 01 10月, 2013 1 次提交
  6. 10 8月, 2013 1 次提交
  7. 24 6月, 2013 1 次提交
  8. 18 6月, 2013 1 次提交
  9. 04 6月, 2013 1 次提交
  10. 02 4月, 2013 1 次提交
  11. 20 7月, 2012 1 次提交
  12. 01 3月, 2012 1 次提交
    • H
      [CPUFREQ] Add S3C2416/S3C2450 cpufreq driver · 34ee5507
      Heiko Stübner 提交于
      The S3C2416/S3C2450 SoCs support two sources for the armclk.
      
      The first source is the so called armdiv which divides the msysclk down
      to provide necessary cpu rates. In this mode the core voltage must be
      always at 1.3V. The frequency from the armdiv is not allowed to be
      lower than the hclk frequency.
      
      In the second mode the armclk can be sourced directly from the hclk in
      the so called "dynamic voltags scaling" (dvs) mode. Here the armdiv
      isn't used at all. Also in this mode the core voltage may be lowered.
      Existing hardware and tests with it suggest 1.0V as sufficient.
      
      When changing the clock source to the armdiv from the hclk, the SoC
      shows stability issues if the new frequency is higher than the current
      hclk frequency. Hence the driver always forces the armdiv to the hclk
      frequency before the source change and lets the cpufreq issue another
      set_target call for higher frequencies.
      
      To mark the hclk frequency as lower as the corresponding armdiv
      frequency it is set 1MHz below the real frequency. This lets the cpufreq
      framework change between 133MHz based on hclk and 133MHz based on armdiv
      at will.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Tested-by: NAndrey Gusakov <dron0gus@gmail.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      34ee5507