1. 03 7月, 2015 3 次提交
  2. 23 6月, 2015 1 次提交
    • D
      clk: stm32: Add clock driver for STM32F4[23]xxx devices · 358bdf89
      Daniel Thompson 提交于
      The driver supports decoding and statically modelling PLL state (i.e.
      we inherit state from bootloader) and provides support for all
      peripherals that support simple one-bit gated clocks. The covers all
      peripherals whose clocks come from the AHB, APB1 or APB2 buses.
      
      It has been tested on an STM32F429I-Discovery board. The clock counts
      for TIM2, USART1 and SYSTICK are all set correctly and the wall clock
      looks OK when checked with a stopwatch. I have also tested a prototype
      driver for the RNG hardware. The RNG clock is correctly enabled by the
      framework (also did inverse test and proved that by changing DT to
      configure the wrong clock bit then we observe the RNG driver to fail).
      Signed-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
      Reviewed-by: NMaxime Coquelin <mcoquelin.stm32@gmail.com>
      [sboyd@codeaurora.org: Silence sparse warnings]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      358bdf89
  3. 21 6月, 2015 4 次提交
    • T
      cpufreq: exynos: remove Exynos4210 specific cpufreq driver support · 8eb92ab6
      Thomas Abraham 提交于
      Exynos4210 based platforms have switched over to use generic
      cpufreq driver for cpufreq functionality. So the Exynos
      specific cpufreq support for these platforms can be removed.
      
      Changes by Bartlomiej:
      - dropped Exynos5250 support removal for now
      - updated exynos-cpufreq.[c,h]
      
      Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NThomas Abraham <thomas.ab@samsung.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: NMichael Turquette <mturquette@baylibre.com>
      8eb92ab6
    • T
      clk: samsung: exynos4: add cpu clock configuration data and instantiate cpu clock · 6ae5a0b4
      Thomas Abraham 提交于
      With the addition of the new Samsung specific cpu-clock type, the
      arm clock can be represented as a cpu-clock type. Add the CPU clock
      configuration data and instantiate the CPU clock type for Exynos4210.
      
      Changes by Bartlomiej:
      - fixed issue with wrong dividers being setup by Common Clock Framework
        (by an addition of CLK_RECALC_NEW_RATES clock flag to mout_apll clock,
        without this change cpufreq-dt driver showed ~10 mA larger energy
        consumption when compared to cpufreq-exynos one when "performance"
        cpufreq governor was used on Exynos4210 SoC based Origen board), this
        was probably meant to be workarounded by use of CLK_GET_RATE_NOCACHE
        and CLK_DIVIDER_READ_ONLY clock flags in the original patchset (in
        "[PATCH v12 6/6] clk: samsung: remove unused clock aliases and update
        clock flags") but using these flags is not sufficient to fix the issue
        observed
      - removed Exynos5250 and Exynos5420 support for now
      
      Cc: Tomasz Figa <tomasz.figa@gmail.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: NThomas Abraham <thomas.ab@samsung.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: NMichael Turquette <mturquette@baylibre.com>
      6ae5a0b4
    • T
      clk: samsung: add infrastructure to register cpu clocks · ddeac8d9
      Thomas Abraham 提交于
      The CPU clock provider supplies the clock to the CPU clock domain. The
      composition and organization of the CPU clock provider could vary among
      Exynos SoCs. A CPU clock provider can be composed of clock mux, dividers
      and gates. This patch defines a new clock type for CPU clock provider and
      adds infrastructure to register the CPU clock providers for Samsung
      platforms.
      
      Changes by Bartlomiej:
      - fixed issue with setting lower dividers before the parent clock speed
        was lowered (the issue resulted in lockup on Exynos4210 SoC based
        Origen board when "ondemand" cpufreq governor was stress tested)
      - fixed missing spin_unlock on error in exynos_cpuclk_post_rate_change()
        problem by moving cfg_data search outside of the spin locked area
      - removed leftover kfree() in exynos_register_cpu_clock() that could
        result in dereferencing the NULL pointer on error
      - moved spin_lock earlier in exynos_cpuclk_pre_rate_change() to cover
        reading of E4210_SRC_CPU and E4210_DIV_CPU1 registers
      - added missing "last chance" checks to wait_until_divider_stable() and
        wait_until_mux_stable() (needed in case that IRQ handling took long
        time to proceed and resulted in function printing incorrect error
        message about timeout)
      - moved E4210_CPU_DIV[0,1]() macros just before their only users,
        this resulted in moving them from patch #2 to patch #3/6 ("clk:
        samsung: exynos4: add cpu clock configuration data and instantiate
        cpu clock")
      - removed E5250_CPU_DIV[0,1](), E5420_EGL_DIV0() and E5420_KFC_DIV()
        macros for now
      - added my Copyrights to drivers/clk/samsung/clk-cpu.c
      
      Cc: Tomasz Figa <tomasz.figa@gmail.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: NThomas Abraham <thomas.ab@samsung.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: NMichael Turquette <mturquette@baylibre.com>
      ddeac8d9
    • B
      clk: add CLK_RECALC_NEW_RATES clock flag for Exynos cpu clock support · d8d91987
      Bartlomiej Zolnierkiewicz 提交于
      This flag is needed to fix the issue with wrong dividers being setup
      by Common Clock Framework when using the new Exynos cpu clock support.
      
      The issue happens because clk_core_set_rate_nolock()  calls
      clk_calc_new_rates(clk, rate) before both pre/post clock notifiers have
      a chance to run.  In case of Exynos cpu clock support pre/post clock
      notifiers are registered for mout_apll clock which is a parent of armclk
      cpu clock and dividers are modified in both pre and post clock notifier.
      This results in wrong dividers values being later programmed by
      clk_change_rate(top).  To workaround the problem CLK_RECALC_NEW_RATES
      flag is added and it is set for mout_apll clock later so the correct
      divider values are re-calculated after both pre and post clock notifiers
      had run.
      
      For example when using "performance" governor on Exynos4210 Origen board
      the cpufreq-dt driver requests to change the frequency from 1000MHz to
      1200MHz and after the change state of the relevant clocks is following:
      
      Without use of CLK_GET_RATE_NOCACHE flag:
      
       fout_apll rate: 1200000000
               fout_apll_div_2 rate: 600000000
                       mout_clkout_cpu rate: 600000000
                               div_clkout_cpu rate: 600000000
                                       clkout_cpu rate: 600000000
               mout_apll rate: 1200000000
                       armclk rate: 1200000000
                       mout_hpm rate: 1200000000
                               div_copy rate: 300000000
                                       div_hpm rate: 300000000
                       mout_core rate: 1200000000
                               div_core rate: 1200000000
                                       div_core2 rate: 1200000000
                                               arm_clk_div_2 rate: 600000000
                                               div_corem0 rate: 300000000
                                               div_corem1 rate: 150000000
                                               div_periph rate: 300000000
                               div_atb rate: 300000000
                                       div_pclk_dbg rate: 150000000
                       sclk_apll rate: 1200000000
                               sclk_apll_div_2 rate: 600000000
      
      With use of CLK_GET_RATE_NOCACHE flag:
      
       fout_apll rate: 1200000000
               fout_apll_div_2 rate: 600000000
                       mout_clkout_cpu rate: 600000000
                               div_clkout_cpu rate: 600000000
                                       clkout_cpu rate: 600000000
               mout_apll rate: 1200000000
                       armclk rate: 1200000000
                       mout_hpm rate: 1200000000
                               div_copy rate: 200000000
                                       div_hpm rate: 200000000
                       mout_core rate: 1200000000
                               div_core rate: 1200000000
                                       div_core2 rate: 1200000000
                                               arm_clk_div_2 rate: 600000000
                                               div_corem0 rate: 300000000
                                               div_corem1 rate: 150000000
                                               div_periph rate: 300000000
                               div_atb rate: 240000000
                                       div_pclk_dbg rate: 120000000
                       sclk_apll rate: 150000000
                               sclk_apll_div_2 rate: 75000000
      
      Without this change cpufreq-dt driver showed ~10 mA larger energy
      consumption when compared to cpufreq-exynos one when "performance"
      cpufreq governor was used on Exynos4210 SoC based Origen board.
      
      This issue was probably meant to be workarounded by use of
      CLK_GET_RATE_NOCACHE and CLK_DIVIDER_READ_ONLY clock flags in
      the original Exynos cpu clock patchset (in "[PATCH v12 6/6] clk:
      samsung: remove unused clock aliases and update clock flags" patch)
      but usage of these flags is not sufficient to fix the issue observed.
      
      Cc: Thomas Abraham <thomas.ab@samsung.com>
      Cc: Tomasz Figa <tomasz.figa@gmail.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: NMichael Turquette <mturquette@baylibre.com>
      d8d91987
  4. 19 6月, 2015 7 次提交
  5. 13 6月, 2015 2 次提交
  6. 11 6月, 2015 3 次提交
  7. 10 6月, 2015 5 次提交
  8. 06 6月, 2015 6 次提交
  9. 05 6月, 2015 9 次提交