1. 19 2月, 2015 1 次提交
    • A
      cpufreq: s3c: remove incorrect __init annotations · 61882b63
      Arnd Bergmann 提交于
      The two functions s3c2416_cpufreq_driver_init and s3c_cpufreq_register
      are marked init but are called from a context that might be run after
      the __init sections are discarded, as the compiler points out:
      
      WARNING: vmlinux.o(.data+0x1ad9dc): Section mismatch in reference from the variable s3c2416_cpufreq_driver to the function .init.text:s3c2416_cpufreq_driver_init()
      WARNING: drivers/built-in.o(.text+0x35b5dc): Section mismatch in reference from the function s3c2410a_cpufreq_add() to the function .init.text:s3c_cpufreq_register()
      
      This removes the __init markings.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      61882b63
  2. 30 4月, 2014 1 次提交
  3. 07 4月, 2014 1 次提交
    • V
      cpufreq: create another field .flags in cpufreq_frequency_table · 7f4b0461
      Viresh Kumar 提交于
      Currently cpufreq frequency table has two fields: frequency and driver_data.
      driver_data is only for drivers' internal use and cpufreq core shouldn't use
      it at all. But with the introduction of BOOST frequencies, this assumption
      was broken and we started using it as a flag instead.
      
      There are two problems due to this:
      - It is against the description of this field, as driver's data is used by
        the core now.
      - if drivers fill it with -3 for any frequency, then those frequencies are
        never considered by cpufreq core as it is exactly same as value of
        CPUFREQ_BOOST_FREQ, i.e. ~2.
      
      The best way to get this fixed is by creating another field flags which
      will be used for such flags. This patch does that. Along with that various
      drivers need modifications due to the change of struct cpufreq_frequency_table.
      Reviewed-by: NGautham R Shenoy <ego@linux.vnet.ibm.com>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7f4b0461
  4. 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
  5. 31 10月, 2013 1 次提交
  6. 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
  7. 16 10月, 2013 3 次提交
  8. 01 10月, 2013 1 次提交
  9. 10 8月, 2013 1 次提交
  10. 24 6月, 2013 1 次提交
  11. 18 6月, 2013 1 次提交
  12. 04 6月, 2013 1 次提交
  13. 02 4月, 2013 1 次提交
  14. 20 7月, 2012 1 次提交
  15. 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