1. 25 2月, 2010 3 次提交
    • P
      OMAP3/4 clock: split into per-chip family files · 657ebfad
      Paul Walmsley 提交于
      clock34xx_data.c now contains data for the OMAP34xx family, the
      OMAP36xx family, and the OMAP3517 family, so rename it to
      clock3xxx_data.c.  Rename clock34xx.c to clock3xxx.c, and move the
      chip family-specific clock functions to clock34xx.c, clock36xx.c, or
      clock3517.c, as appropriate.  So now "clock3xxx.*" refers to the OMAP3
      superset.
      
      The main goal here is to prepare to compile chip family-specific clock
      functions only for kernel builds that target that chip family.  To get to
      that point, we also need to add CONFIG_SOC_* options for those other
      chip families; that will be done in future patches, planned for 2.6.35.
      
      OMAP4 is also affected by this.  It duplicated the OMAP3 non-CORE DPLL
      clkops structure.  The OMAP4 variant of this clkops structure has been
      removed, and since there was nothing else currently in clock44xx.c, it
      too has been removed -- it can always be added back later when there
      is some content for it.  (The OMAP4 clock autogeneration scripts have been
      updated accordingly.)
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Ranjith Lohithakshan <ranjithl@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      657ebfad
    • R
      OMAP3 clock: introduce DPLL4 Jtype · 358965d7
      Richard Woodruff 提交于
      DPLL4 for 3630 introduces a changed block called j type dpll, requiring
      special divisor bits and additional reg fields. To allow for silicons to
      use this, this is introduced as a flag and is enabled for 3630 silicon.
      OMAP4 also has j type dpll for usb.
      
      Tested with 3630 ZOOM3 and OMAP3430 ZOOM2
      Signed-off-by: NRichard Woodruff <r-woodruff2@ti.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NVishwanath BS <Vishwanath.bs@ti.com>
      [paul@pwsan.com: added some comments; updated copyrights and credits; fixed
       some style issues]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      358965d7
    • R
      OMAP2/3 clock: Extend find_idlest() to pass back idle state value · 419cc97d
      Ranjith Lohithakshan 提交于
      Current implementation defines clock idle state indicators based on the
      cpu information (cpu_is_omap24xx() or cpu_is_omap34xx()) in a system wide
      manner. This patch extends the find_idlest() function in clkops to pass
      back the idle state indicator for that clock, thus allowing idle state
      indicators to be defined on a per clock basis if required.
      
      This is specifically needed on AM35xx devices as the new IPSS clocks
      indicates the idle status (0 is idle, 1 is ready) in a way just
      opposite to how its handled in OMAP3 (0 is ready, 1 is idle).
      Signed-off-by: NRanjith Lohithakshan <ranjithl@ti.com>
      [paul@pwsan.com: updated to apply after commit 98c45457 et seq.]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      419cc97d
  2. 16 2月, 2010 2 次提交
  3. 30 1月, 2010 2 次提交
    • P
      OMAP2/3/4 clock: rename and clean the omap2_clk_init() functions · e80a9729
      Paul Walmsley 提交于
      Rename the omap2_clk_init() in the OMAP2, 3, and 4 clock code to be
      omap2xxx_clk_init(), omap3xxx_clk_init(), etc.  Remove all traces of
      the (commented) old virt_prcm_set code from omap3xxx_clk_init() and
      omap4xxx_clk_init(), since this will be handled with the OPP code that
      is cooking in the PM branch.
      
      After this patch, there should be very little else in the clock code
      that blocks a multi-OMAP 2+3 kernel.  (OMAP2420+OMAP2430 still has some
      outstanding issues that need to be resolved; this is pending on some
      additions to the hwmod data.)
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e80a9729
    • P
      OMAP2/3/4 clock: omap2_clk_prepare_for_reboot() is OMAP2xxx-only · feec1277
      Paul Walmsley 提交于
      omap2_clk_prepare_for_reboot() is only applicable to OMAP2xxx chips,
      so rename it to omap2xxx_clk_prepare_for_reboot() and only call it when
      running on OMAP2xxx chips.  Remove the old stub in the OMAP3 clock code.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      feec1277
  4. 27 1月, 2010 3 次提交
    • P
      OMAP2/3/4 clock: combine all omap2_clk_functions · 69ecefca
      Paul Walmsley 提交于
      The struct clk_functions for OMAP2, 3, and 4 are all essentially the
      same, so combine them.  This removes one multi-OMAP kernel impediment
      and saves memory on multi-OMAP builds.
      
      The stubs for omap2_clk_{init,exit}_cpufreq() code will removed once
      the OPP layer code that's currently in Kevin's PM branch is merged.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      69ecefca
    • P
      OMAP2/3/4 clock: move clksel clock functions into mach-omap2/clkt_clksel.c · df791b3e
      Paul Walmsley 提交于
      Move all clksel-related clock functions from mach-omap2/clock.c to
      mach-omap2/clkt_clksel.c.  This is intended to make the clock code
      easier to understand, since all of the functions needed to manage
      clksel clocks are now located in their own file, rather than being
      mixed with other, unrelated functions.
      
      Clock debugging is also now more finely-grained, since the DEBUG macro
      can now be defined for clksel clocks alon.  This should reduce
      unnecessary console noise when debugging.
      
      Also, if at some future point the mach-omap2/ directory is split
      into OMAP2/3/4 variants, this clkt file can be moved to the plat-omap/
      directory to be shared.
      
      Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
      improve the patch description.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Alexander Shishkin <virtuoso@slind.org>
      df791b3e
    • P
      OMAP clock: make the fixed divisor clock code available for all OMAPs · e9b98f60
      Paul Walmsley 提交于
      One of the OMAP1 clocks can use the fixed divisor recalculation code
      introduced in the OMAP2 clock code, so rename the
      omap2_fixed_divisor_recalc() function to omap_fixed_divisor_recalc()
      and make it available to all OMAPs.  A followup patch converts the OMAP1
      clock.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e9b98f60
  5. 12 12月, 2009 5 次提交
  6. 21 10月, 2009 1 次提交
    • T
      omap: headers: Move remaining headers from include/mach to include/plat · ce491cf8
      Tony Lindgren 提交于
      Move the remaining headers under plat-omap/include/mach
      to plat-omap/include/plat. Also search and replace the
      files using these headers to include using the right path.
      
      This was done with:
      
      #!/bin/bash
      mach_dir_old="arch/arm/plat-omap/include/mach"
      plat_dir_new="arch/arm/plat-omap/include/plat"
      headers=$(cd $mach_dir_old && ls *.h)
      omap_dirs="arch/arm/*omap*/ \
      drivers/video/omap \
      sound/soc/omap"
      other_files="drivers/leds/leds-ams-delta.c \
      drivers/mfd/menelaus.c \
      drivers/mfd/twl4030-core.c \
      drivers/mtd/nand/ams-delta.c"
      
      for header in $headers; do
      	old="#include <mach\/$header"
      	new="#include <plat\/$header"
      	for dir in $omap_dirs; do
      		find $dir -type f -name \*.[chS] | \
      			xargs sed -i "s/$old/$new/"
      	done
      	find drivers/ -type f -name \*omap*.[chS] | \
      		xargs sed -i "s/$old/$new/"
      	for file in $other_files; do
      		sed -i "s/$old/$new/" $file
      	done
      done
      
      for header in $(ls $mach_dir_old/*.h); do
      	git mv $header $plat_dir_new/
      done
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ce491cf8
  7. 25 7月, 2009 1 次提交
    • P
      OMAP2/3 clock: split, rename omap2_wait_clock_ready() · 72350b29
      Paul Walmsley 提交于
      Some OMAP2/3 hardware modules have CM_IDLEST attributes that are not
      handled by the current omap2_wait_clock_ready() code.  In preparation
      for patches that fix the unusual devices, rename the function
      omap2_wait_clock_ready() to omap2_wait_module_ready() and split it
      into three parts:
      
      1. A clkops-specific companion clock return function (by default,
         omap2_clk_dflt_find_companion())
      
      2. A clkops-specific CM_IDLEST register address and bit shift return
         function (by default, omap2_clk_dflt_find_idlest())
      
      3. Code to wait for the CM to indicate that the module is ready
         (omap2_cm_wait_idlest())
      
      Clocks can now specify their own custom find_companion() and find_idlest()
      functions; used in subsequent patches.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      72350b29
  8. 20 2月, 2009 1 次提交
    • R
      [ARM] omap: add support for bypassing DPLLs · c0bf3132
      Russell King 提交于
      This roughly corresponds with OMAP commits: 7d06c48, 3241b19,
      88b5d9b, 18a5500, 9c909ac, 5c6497b, 8b1f0bd, 2ac1da8.
      
      For both OMAP2 and OMAP3, we note the reference and bypass clocks in
      the DPLL data structure.  Whenever we modify the DPLL rate, we first
      ensure that both the reference and bypass clocks are enabled.  Then,
      we decide whether to use the reference and DPLL, or the bypass clock
      if the desired rate is identical to the bypass rate, and program the
      DPLL appropriately.  Finally, we update the clock's parent, and then
      disable the unused clocks.
      
      This keeps the parents correctly balanced, and more importantly ensures
      that the bypass clock is running whenever we reprogram the DPLL.  This
      is especially important because the procedure for reprogramming the DPLL
      involves switching to the bypass clock.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      c0bf3132
  9. 14 2月, 2009 1 次提交
    • R
      [ARM] omap: arrange for clock recalc methods to return the rate · 8b9dbc16
      Russell King 提交于
      linux-omap source commit 33d000c99ee393fe2042f93e8422f94976d276ce
      introduces a way to "dry run" clock changes before they're committed.
      However, this involves putting logic to handle this into each and
      every recalc function, and unfortunately due to the caching, led to
      some bugs.
      
      Solve both of issues by making the recalc methods always return the
      clock rate for the clock, which the caller decides what to do with.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      8b9dbc16
  10. 09 2月, 2009 1 次提交
    • P
      [ARM] OMAP: Fix sparse, checkpatch warnings in OMAP2/3 PRCM/PM code · fecb494b
      Paul Walmsley 提交于
      Fix sparse & checkpatch warnings in OMAP2/3 PRCM & PM code.  This mostly
      consists of:
      
      - converting pointer comparisons to integers in form similar to
        (ptr == 0) to the standard idiom (!ptr)
      
      - labeling a few non-static private functions as static
      
      - adding prototypes for *_init() functions in the appropriate header
        files, and getting rid of the corresponding open-coded extern
        prototypes in other C files
      
      - renaming the variable 'sclk' in mach-omap2/clock.c:omap2_get_apll_clkin
        to avoid shadowing an earlier declaration
      
      Clean up checkpatch issues.  This mostly involves:
      
      - converting some asm/ includes to linux/ includes
      
      - cleaning up some whitespace
      
      - getting rid of braces for conditionals with single following statements
      
      Also take care of a few odds and ends, including:
      
      - getting rid of unlikely() and likely() - none of this code is particularly
        fast-path code, so the performance impact seems slim; and some of those
        likely() and unlikely() indicators are probably not as accurate as the
        ARM's branch predictor
      
      - removing some superfluous casts
      
      linux-omap source commit is 347df59f5d20fdf905afbc26b1328b0e28a8a01b.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fecb494b
  11. 08 2月, 2009 2 次提交
  12. 06 10月, 2008 1 次提交
    • T
      ARM: OMAP2: Misc updates from linux-omap tree · 646e3ed1
      Tony Lindgren 提交于
      Misc updates from linux-omap tree, mostly to update common
      device initialization and add missing defines from linux-omap
      tree. Also some changes to make room for adding 34xx in
      following patches.
      
      Note that the I2C resources are now set up in
      arch/arm/plat-omap/i2c.c helper, and can be removed
      from devices.c.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      646e3ed1
  13. 19 8月, 2008 1 次提交
  14. 07 8月, 2008 1 次提交
  15. 03 7月, 2008 2 次提交
    • P
      ARM: OMAP2: Clock: New OMAP2/3 DPLL rate rounding algorithm · 88b8ba90
      Paul Walmsley 提交于
      This patch adds a new rate rounding algorithm for DPLL clocks on the
      OMAP2/3 architecture.
      
      For a desired DPLL target rate, there may be several
      multiplier/divider (M, N) values which will generate a sufficiently
      close rate.  Lower N values result in greater power economy.  However,
      lower N values can cause the difference between the rounded rate and
      the target rate ("rate error") to be larger than it would be with a
      higher N.  This can cause downstream devices to run more slowly than
      they otherwise would.
      
      This DPLL rate rounding algorithm:
      
      - attempts to find the lowest possible N (DPLL divider) to reach the
        target_rate (since, according to Richard Woodruff <r-woodruff@ti.com>,
        lower N values save more power than higher N values).
      
      - allows developers to set an upper bound on the error between the
        rounded rate and the desired target rate ("rate tolerance"), so an
        appropriate balance between rate fidelity and power savings can be
        set.  This maximum rate error tolerance is set via
        omap2_set_dpll_rate_tolerance().
      
      - never returns a rounded rate higher than the target rate.
      
      The rate rounding algorithm caches the last rounded M, N, and rate
      computation to avoid rounding the rate twice for each clk_set_rate()
      call.  (This patch does not yet implement set_rate for DPLLs; that
      follows in a future patch.)
      
      The algorithm trades execution speed for rate accuracy.  It will find
      the (M, N) set that results in the least rate error, within a
      specified rate tolerance.  It does this by evaluating each divider
      setting - on OMAP3, this involves 128 steps.  Another approach to DPLL
      rate rounding would be to bail out as soon as a valid rate is found
      within the rate tolerance, which would trade rate accuracy for
      execution speed.  Alternate implementations welcome.
      
      This code is not yet used by the OMAP24XX DPLL clock, since it
      is currently defined as a composite clock, fusing the DPLL M,N and the
      M2 output divider.  This patch also renames the existing OMAP24xx DPLL
      programming functions to highlight that they program both the DPLL and
      the DPLL's output multiplier.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      88b8ba90
    • T
      ARM: OMAP: Turn CM and PRM access into functions · ff00fcc9
      Tony Lindgren 提交于
      Otherwise compiling in omap2 and omap3 will not work.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ff00fcc9
  16. 15 4月, 2008 3 次提交
  17. 21 5月, 2007 1 次提交
  18. 07 3月, 2007 1 次提交
  19. 25 9月, 2006 2 次提交
  20. 27 6月, 2006 1 次提交
  21. 03 4月, 2006 1 次提交
  22. 18 1月, 2006 1 次提交
  23. 10 11月, 2005 1 次提交