1. 25 2月, 2010 10 次提交
    • V
      OMAP3: clock: add capability to change rate of dpll4_m5_ck_3630 · e8d37377
      Vimarsh Zutshi 提交于
      Add necessary clk_sel definitions to clock framework to allow changing
      dpll4_m5_ck_3630 rate. This is used by the ISP driver.
      Signed-off-by: NVimarsh Zutshi <vimarsh.zutshi@nokia.com>
      [paul@pwsan.com: updated to apply]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e8d37377
    • P
      OMAP clock: drop RATE_FIXED clock flag · 51c19541
      Paul Walmsley 提交于
      The RATE_FIXED clock flag is pointless.  In the OMAP1 clock code, it
      simply causes the omap1_clk_round_rate() function to return the
      current rate of the clock.  omap1_clk_round_rate(), however, should
      never be called for a fixed-rate clock, since none of these clocks
      have a .round_rate function pointer set in their struct clk records.
      Similarly, in the OMAP2+ clock code, the RATE_FIXED flag just causes
      the clock code to emit a warning if the OMAP clock maintainer was
      foolish enough to add a .round_rate function pointer to a fixed-rate
      clock.  "Doctor, it hurts when I pretend that a fixed-rate clock is
      rate-changeable."  "Then don't pretend that a fixed-rate clock is
      rate-changeable."  It has no functional value.  This patch drops the
      RATE_FIXED clock flag, removing it from all clocks that are so marked.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      51c19541
    • 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
    • P
      OMAP clock: drop .id field; ensure each clock has a unique name · b92c170d
      Paul Walmsley 提交于
      After the clkdev conversion, the struct clk.id field became
      superfluous, so, drop it.  Bring the clock names closer to the TRMs
      and ensure they are unique for debugfs.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b92c170d
    • P
      OMAP2/3/4 clock: fix DPLL multiplier value errors; also copyrights, includes, documentation · 93340a22
      Paul Walmsley 提交于
      The maximum DPLL multiplier (M) values for OMAP2xxx and OMAP3xxx are
      one increment higher than they should be.  See for example the
      OMAP242x TRM Rev X Section 5.10.6 "Clock Generator Registers" and the
      OMAP36xx TRM Rev C Table 3-202 "CM_CLKSEL1_PLL".  Programming a 0 into
      the DPLL's M register bitfield is valid for OMAP2/3 and indicates that
      the DPLL should enter MN-bypass mode.  Also, increase the minimum
      multiplier (M) value for the DPLL rate rounding code from 1 to 2, to
      ensure that it does not inadvertently put the DPLL into bypass.
      
      Note that the register documentation in the OMAP2xxx and OMAP3xxx TRMs
      does not make clear that the actual DPLL divider value (the "N") is
      the content of the appropriate register bitfield for the N value,
      _plus one_.  (In other words, an N register bitfield of 0 indicates a
      DPLL divider value of 1.)  This is only clearly documented in the
      OMAP4430 TRM, in, for example, OMAP4430 TRM Rev A Table 3-1167
      "CM_CLKSEL_DPLL_USB".
      
      While here, update copyrights, add kerneldoc for struct dpll_data,
      drop the unused struct dpll_data.max_tolerance field, remove some
      unnecessary #includes in DPLL-related code, and replace the #include
      of <linux/module.h> with <linux/list.h>, which is what was really
      needed.  The OMAP4 clock autogenerator script has 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>
      93340a22
    • V
      OMAP3 clock: add support for 192Mhz DPLL4M2 output · 7356f0b2
      Vishwanath BS 提交于
      In 3630, DPLL4M2 output can be 96MHz or 192MHz (for SGX to run at
      192). This patch has changes to support this feature. 96MHz clock is
      generated by dividing 192Mhz clock by 2 using CM_CLKSEL_CORE register.
      SGX can select Core Clock, 192MHz clock or CM_96M_FCLK as it's
      functional clock. In summary changes done are:
      1. Added a feature called omap3_has_192mhz_clk and enabled for 3630
      2. Added a new clock node called omap_192m_alwon_ck
      3. Made omap_96m_alwon_fck to derive its clock from omap_192m_alwon_ck
      Signed-off-by: NVishwanath BS <Vishwanath.bs@ti.com>
      [paul@pwsan.com: fixed whitespace]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7356f0b2
    • V
      OMAP3 clock: Introduce 3630 DPLL4 HSDivider changes · 678bc9a2
      Vishwanath BS 提交于
      Divider (M2, M3, M4, M5 and M6) field width has been increased by 1 bit
      in 3630. This patch has changes to accommodate this in CM dynamically
      based on chip version.
      Basically new clock nodes have been added for 3630 DPLL4 M2,M3,M4,M5 and
      M6 and value of these nodes are used if cpu type is 3630.
      Signed-off-by: NVishwanath BS <vishwanath.bs@ti.com>
      [paul@pwsan.com: updated to apply on 2.6.34 queue; comments added]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      678bc9a2
    • 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
    • M
      OMAP3630: Clock: Workaround for DPLL HS divider limitation · a7e069fc
      Mike Turquette 提交于
      This patch implements a workaround for the DPLL HS divider limitation
      in OMAP3630 as given by Errata ID: i556.
      
      Errata:
      When PWRDN bit is set, it resets the internal HSDIVIDER divide-by value (Mx).
      The reset value gets loaded instead of the previous value.
      The following HSDIVIDERs exhibit above behavior:
      . DPLL4 : M6 / M5 / M4 / M3 / M2 (CM_CLKEN_PLL[31:26] register bits)
      . DPLL3 : M3 (CM_CLKEN_PLL[12] register bit).
      
      Work Around:
      It is mandatory to apply the following sequence to ensure the write
      value will
      be loaded in DPLL HSDIVIDER FSM:
      The global sequence when using PWRDN bit is the following:
      . Disable Mx HSDIVIDER clock output related functional clock enable bits
              (in CM_FCLKEN_xxx / CM_ICLKEN_xxx)
      . Enable PWRDN bit of HSDIVIDER
      . Disable PWRDN bit of HSDIVIDER
      . Read current HSDIVIDER register value
      . Write different value in HSDIVIDER register
      . Write expected value in HSDIVIDER register
      . Enable Mx HSDIVIDER clock output related functional clocks
              (CM_FCLKEN_xxx / CM_ICLKEN_xxx)
      Signed-off-by: NMike Turquette <mturquette@ti.com>
      Signed-off-by: NVishwanath BS <vishwanath.bs@ti.com>
      Signed-off-by: NVijaykumar GN <vijaykumar.gn@ti.com>
      [paul@pwsan.com: updated patch to apply; made workaround function static;
       marked as being 36xx-specific]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a7e069fc
    • R
      AM35xx: Add clock support for new modules on AM35xx · 3cc4a2fc
      Ranjith Lohithakshan 提交于
      This patch adds clock support for the following AM35xx modules
      	- Ethernet MAC
      	- CAN Controller (HECC)
      	- New MUSB OTG Controller with integrated Phy
      	- Video Processing Front End (VPFE)
      	- Additional UART (UART4)
      Signed-off-by: NRanjith Lohithakshan <ranjithl@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      3cc4a2fc
  2. 16 2月, 2010 1 次提交
  3. 30 1月, 2010 1 次提交
    • 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
  4. 27 1月, 2010 3 次提交
    • 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
    • R
      AM35xx: Clock table updates for AM3505/17 · ced82529
      Ranjith Lohithakshan 提交于
      AM3505/17 though a OMAP3530 derivative have the following
      main differences
      
      	- Removal of the following OMAP3 modules
      		- IVA
      		- ISP/CAM
      		- Modem and D2D components (MAD2D, SAD2D)
      		- USIM
      		- SSI
      		- Mailboxes
      		- USB OTG
      		- ICR
      		- MSPRO
      		- SmartReflex
      	- SDRC replaced with EMIF4 Controller in the SDRC subsystem
      	  thus adding support for DDR2 memory devices
      	- Addition of the following new modules
      		- Ethernet MAC (CPGMAC)
      		- CAN Controller (HECC)
      		- New USB OTG Controller with integrated Phy
      		- Video Processing Front End (VPFE)
      		- Additional UART (UART4)
      	- All security accelerators disabled on GP devices and not to
      	  be accessed or configured
      
      This patch defines CPU flags for AM3505/17 and update the clock table.
      Clock support for new modules will be added by subsequent patches.
      Signed-off-by: NRanjith Lohithakshan <ranjithl@ti.com>
      [paul@pwsan.com: updated for 2.6.34 clock layout]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      ced82529
    • P
      OMAP3 clock: reorganize CK_* platform flags · 2c8a177e
      Paul Walmsley 提交于
      Add CK_* flags for the two new Sitara chips, AM3505 and AM3517, and
      the OMAP34xx die shrink, OMAP36xx/OMAP37xx.  Introduce a new CK_*
      flag, CK_3XXX, that marks all clocks that are common to OMAP3 family
      chips.  CK_343X now refers to clocks that are available only on
      OMAP34{1,2,3,4}0 (WTBU) and OMAP35{03,15,25,30} (any version).
      At some point, the RATE_IN_* flags should be updated also.
      
      While here, add some documentation describing the chip families
      covered by these clock flags.
      
      This patch is partially based on patches from Ranjith Lohithakshan
      <ranjithl@ti.com> and Vishwanath Sripathy <vishwanath.bs@ti.com>.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Ranjith Lohithakshan <ranjithl@ti.com>
      Cc: Vishwanath Sripathy <vishwanath.bs@ti.com>
      2c8a177e
  5. 20 1月, 2010 1 次提交
  6. 09 1月, 2010 3 次提交
  7. 12 12月, 2009 1 次提交
  8. 18 11月, 2009 1 次提交
  9. 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
  10. 04 9月, 2009 2 次提交
  11. 25 7月, 2009 1 次提交
    • P
      OMAP3 clock: correct module IDLEST bits: SSI; DSS; USBHOST; HSOTGUSB · 3c82e229
      Paul Walmsley 提交于
      Fix two bugs in the OMAP3 clock tree pertaining to the SSI, DSS,
      USBHOST, and HSOTGUSB devices.  These devices are both interconnect
      initiators and targets.  Without this patch, clk_enable()s on clocks for
      these modules can be very high latency (potentially up to ~200
      milliseconds) and message such as the following are generated:
      
          Clock usbhost_48m_fck didn't enable in 100000 tries
      
      Two bugs are fixed by this patch.  First, OMAP hardware only supports
      target CM_IDLEST register bits on ES2+ chips and beyond.  ES1 chips
      should not wait for these clocks to enable.  So, split the appropriate
      clocks into ES1 and ES2+ variants, so that kernels running on ES1
      devices won't try to wait.
      
      Second, the current heuristic in omap2_clk_dflt_find_idlest() will
      fail for these clocks.  It assumes that the CM_IDLEST bit to wait upon
      is the same as the CM_*CLKEN bit, which is false[1].  Fix by
      implementing custom clkops .find_idlest function pointers for the
      appropriate clocks that return the correct slave IDLEST bit shift.
      
      This was originally fixed in the linux-omap kernel during 2.6.29 in a
      slightly different manner[2][3].
      
      In the medium-term future, all of the module IDLEST code will
      eventually be moved to the omap_hwmod code.
      
      Problem reported by Jarkko Nikula <jhnikula@gmail.com>:
      
          http://marc.info/?l=linux-omap&m=124306184903679&w=2
      
      ...
      
      1. See for example 34xx TRM Revision P Table 4-213 and 4-217 (for the
         DSS case).
      
      2. http://www.spinics.net/lists/linux-omap/msg05512.html et seq.
      
      3. http://lkml.indiana.edu/hypermail/linux/kernel/0901.3/01498.htmlSigned-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Jarkko Nikula <jhnikula@gmail.com>
      3c82e229
  12. 29 5月, 2009 1 次提交
  13. 26 5月, 2009 2 次提交
  14. 13 5月, 2009 1 次提交
  15. 24 4月, 2009 2 次提交
    • P
      OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files · f248076c
      Paul Walmsley 提交于
      Add a function omap2_gp_clockevent_set_gptimer() for board-*.c files
      to use in .init_irq functions to configure the system tick GPTIMER.
      Practical choices at this point are GPTIMER1 or GPTIMER12.  Both of
      these timers are in the WKUP powerdomain, and so are unaffected by
      chip power management.  GPTIMER1 can use sys_clk as a source, for
      applications where a high-resolution timer is more important than
      power management.  GPTIMER12 has the special property that it has the
      secure 32kHz oscillator as its source clock, which may be less prone
      to glitches than the off-chip 32kHz oscillator.  But on HS devices, it
      may not be available for Linux use.
      
      It appears that most boards are fine with GPTIMER1, but BeagleBoard
      should use GPTIMER12 when using a 32KiHz timer source, due to hardware bugs
      in revisions B4 and below.  Modify board-omap3beagle.c to use GPTIMER12.
      
      This patch originally used a Kbuild config option to select the GPTIMER,
      but was changed to allow this to be specified in board-*.c files, per
      Tony's request.
      
      Kalle Vallo <kalle.valo@nokia.com> found a bug in an earlier version of
      this patch - thanks Kalle.
      
      Tested on Beagle rev B4 ES2.1, with and without CONFIG_OMAP_32K_TIMER, and
      3430SDP.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Cc: Kalle Valo <kalle.valo@nokia.com>
      f248076c
    • S
      OMAP3: clock: Camera module doesn't have IDLEST bit · 9e53dd71
      Sergio Aguirre 提交于
      This patch avoids waiting for the camera module to become ready,
      since it doesn't have IDLEST bit.
      
      Based on a earlier hack done by Paul Walmsley on Sep 9 2008 on
      linux-omap tree.
      Signed-off-by: NSergio Aguirre <saaguirre@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      9e53dd71
  16. 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
  17. 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
  18. 09 2月, 2009 7 次提交