1. 07 9月, 2012 5 次提交
    • J
      ARM: tegra: clocks: separate tegra_clk_32k_ops from Tegra20 and Tegra30 · b78c030c
      Joseph Lo 提交于
      Currently the tegra20 and tegra30 share the same symbol for
      tegra_clk_32k_ops. This will cause a compile error when building
      a tegra20-only kernel image. Add tegra_clk_32k_ops for tegra20 and
      modify tegra30_clk_32k_ops for tegra30.
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      b78c030c
    • P
      ARM: tegra: Port tegra to generic clock framework · 92fe58f0
      Prashant Gaikwad 提交于
      This patch converts tegra clock code to generic clock framework in following way:
       - Implement clk_ops as required by generic clk framework. (tegraXX_clocks.c)
       - Use platform specific struct clk_tegra in clk_ops implementation instead of struct clk.
       - Initialize all clock data statically. (tegraXX_clocks_data.c)
      
      Legacy framework did not have recalc_rate and is_enabled functions. Implemented these functions.
      Removed init function. It's functionality is splitted into recalc_rate and is_enabled.
      
      Static initialization is used since slab is not up in .init_early and clock
      is needed to be initialized before clockevent/clocksource initialization.
      Macros redefined for clk_tegra.
      
      Also, single struct clk_tegra is used for all type of clocks (PLL, peripheral etc.). This
      is to move quickly to generic common clock framework so that other dependent features will
      not be blocked (such as DT binding).
      
      Enabling COMMON_CLOCK config moved to ARCH_TEGRA since it is enabled for both Tegra20
      and Tegra30.
      Signed-off-by: NPrashant Gaikwad <pgaikwad@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      92fe58f0
    • P
      ARM: tegra: Rename tegra20 clock file · 23fc5b24
      Prashant Gaikwad 提交于
      Make the name consistent with other files.
      s/tegra2/tegra20
      Signed-off-by: NPrashant Gaikwad <pgaikwad@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      23fc5b24
    • P
      ARM: tegra20: Separate out clk ops and clk data · 86edb87a
      Prashant Gaikwad 提交于
      Move clock initialization data to separate file. This is
      required for migrating to generic clock framework if static
      initialization is used.
      Signed-off-by: NPrashant Gaikwad <pgaikwad@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      86edb87a
    • S
      ARM: tegra: fix U16 divider range check · eb70e1bd
      Stephen Warren 提交于
      A U16 divider can divide a clock by 1..64K. However, the range-check
      in clk_div16_get_divider() limited the range to 1..256. Fix this. NVIDIA's
      downstream kernels already have the fixed range-check.
      
      In practice this is a problem on Whistler's I2C bus, which uses a bus
      clock rate of 100KHz (rather than the more common 400KHz on Tegra boards),
      which requires a HW module clock of 8*100KHz. The parent clock is 216MHz,
      leading to a desired divider of 270. Prior to conversion to the common
      clock framework, this range error was somehow ignored/irrelevant and
      caused no problems. However, the common clock framework evidently has
      more rigorous error-checking, so this failure causes the I2C bus to fail
      to operate correctly.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      eb70e1bd
  2. 03 7月, 2012 2 次提交
  3. 27 6月, 2012 1 次提交
  4. 26 6月, 2012 1 次提交
  5. 26 4月, 2012 2 次提交
    • S
      ARM: tegra: add pll_x freq table entry for 750MHz · aea812e1
      Stephen Warren 提交于
      Some SKUs limit the maximum CPU frequency to 750MHz; see
      tegra2_pllx_clk_init(). The pll_x frequency table needs an entry for this
      frequency, or there will be continual log spam from the cpufreq driver
      attempting to set this rate, yet there being no table entry for it.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      aea812e1
    • A
      ARM: tegra: Add pllc clock init table · c8b62ab4
      Allen Martin 提交于
      pll_c will be used as a clock source. Fill in tegra_pll_c_freq_table[]
      so that it's possible to explicitly initialize the PLL.
      
      NVIDIA's downstream nv-3.1 kernel and the ChromeOS kernel have different
      pll_c tables. nv-3.1 contains entries for 522MHz and 598MHz output,
      whereas the ChromeOS kernel contains entries for 600MHz output. I chose
      to upstream the ChromeOS values for now, since the 600MHz rate appears
      to match the default rate of this PLL when the HW boots, and it's not
      clear to me why 522 or 598MHz are more useful.
      Signed-off-by: NAllen Martin <amartin@nvidia.com>
      Signed-off-by: NOlof Johansson <olofj@chromium.org>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      [swarren: wrote commit description]
      c8b62ab4
  6. 07 4月, 2012 1 次提交
  7. 27 2月, 2012 1 次提交
  8. 07 2月, 2012 1 次提交
  9. 18 12月, 2011 2 次提交
  10. 14 10月, 2011 3 次提交
  11. 13 7月, 2011 1 次提交
  12. 10 4月, 2011 1 次提交
  13. 02 4月, 2011 1 次提交
  14. 24 2月, 2011 2 次提交
  15. 23 2月, 2011 3 次提交
    • C
      ARM: tegra: clock: prevent accidental disables of cpu clock · 1be3d053
      Colin Cross 提交于
      Peripheral clocks that have no clock enable bit in the
      enable registers have their clk_num set to 0.  Bit 0
      in the clock enable registers is the CPU clock.
      Prevent disables on these peripheral clocks from
      accidentally disabling the CPU clock.
      Signed-off-by: NColin Cross <ccross@android.com>
      Acked-by: NOlof Johansson <olof@lixom.net>
      1be3d053
    • C
      ARM: tegra: clock: Round rate before setting rate · 421186e7
      Colin Cross 提交于
      Call the clock's round_rate op, if it exists, before calling
      the set_rate op.  This will help later when dvfs is added,
      dvfs needs to know what the final rate will be before the
      frequency changes.
      
      Also requires fixes to the round rate functions to ensure
      calling round rate and then set rate will not cause the
      frequency to be rounded down twice.  When picking clock
      divider values, the clock framework picks the closest
      frequency that is lower than the requested frequency.  If
      the new frequency calculated from the divider value is
      rounded down, and then passed to set_rate, it will get
      rounded down again, possibly resulting in a frequency two
      steps lower than the original requested frequency.
      
      Fix the problem by rounding up when calculating the frequency
      coming out of a clock divider, so if that frequency is
      requested again, the same divider value will be picked.
      Signed-off-by: NColin Cross <ccross@android.com>
      Acked-by: NOlof Johansson <olof@lixom.net>
      421186e7
    • C
      ARM: tegra: clock: Refcount periph clock enables · 78f379b5
      Colin Cross 提交于
      Some peripheral clocks share enable bits.  Refcount the enables so
      that calling clk_disable on one clock will not turn off another
      clock.
      Signed-off-by: NColin Cross <ccross@android.com>
      Acked-by: NOlof Johansson <olof@lixom.net>
      78f379b5
  16. 21 2月, 2011 13 次提交