1. 19 10月, 2012 1 次提交
  2. 13 9月, 2012 1 次提交
    • T
      ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+ · dbc04161
      Tony Lindgren 提交于
      As the plat and mach includes need to disappear for single zImage work,
      we need to remove plat/hardware.h.
      
      Do this by splitting plat/hardware.h into omap1 and omap2+ specific files.
      
      The old plat/hardware.h already has omap1 only defines, so it gets moved
      to mach/hardware.h for omap1. For omap2+, we use the local soc.h
      that for now just includes the related SoC headers to keep this patch more
      readable.
      
      Note that the local soc.h still includes plat/cpu.h that can be dealt
      with in later patches. Let's also include plat/serial.h from common.h for
      all the board-*.c files. This allows making the include files local later
      on without patching these files again.
      
      Note that only minimal changes are done in this patch for the
      drivers/watchdog/omap_wdt.c driver to keep things compiling. Further
      patches are needed to eventually remove cpu_is_omap usage in the drivers.
      
      Also only minimal changes are done to sound/soc/omap/* to remove the
      unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's
      no need to include omap44xx.h.
      
      While at it, also sort some of the includes in the standard way.
      
      Cc: linux-watchdog@vger.kernel.org
      Cc: alsa-devel@alsa-project.org
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Liam Girdwood <lrg@ti.com>
      Acked-by: NWim Van Sebroeck <wim@iguana.be>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      dbc04161
  3. 25 2月, 2012 2 次提交
  4. 22 12月, 2010 1 次提交
  5. 25 2月, 2010 2 次提交
    • P
      OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files · 81b34fbe
      Paul Walmsley 提交于
      In preparation for multi-OMAP2 kernels, split
      mach-omap2/clock2xxx_data.c into mach-omap2/clock2420_data.c and
      mach-omap2/clock2430_data.c.  2430 uses a different device space
      physical memory layout than past or future OMAPs, and we use a
      different virtual memory layout as well, which causes trouble for
      architecture-level code/data that tries to support both.  We tried
      using offsets from the virtual base last year, but those patches never
      made it upstream; so after some discussion with Tony about the best
      all-around approach, we'll just grit our teeth and duplicate the
      structures.  The maintenance advantages of a single kernel config that
      can compile and boot on OMAP2, 3, and 4 platforms are simply too
      compelling.
      
      This approach does have some nice benefits beyond multi-OMAP 2 kernel
      support.  The runtime size of OMAP2420-specific and OMAP2430-specific
      kernels is smaller, since unused clocks for the other OMAP2 chip will
      no longer be compiled in.  (At some point we will mark the clock data
      __initdata and allocate it during registration, which will eliminate
      the runtime memory advantage.)  It also makes the clock trees slightly
      easier to read, since 2420-specific and 2430-specific clocks are no
      longer mixed together.
      
      This patch also splits 2430-specific clock code into its own file,
      mach-omap2/clock2430.c, which is only compiled in for 2430 builds -
      mostly for organizational clarity.
      
      While here, fix a bug in the OMAP2430 clock tree: "emul_ck" was
      incorrectly marked as being 2420-only, when actually it is present on
      both OMAP2420 and OMAP2430.
      
      Thanks to Tony for some good discussions about how to approach this
      problem.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      81b34fbe
    • 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
  6. 30 1月, 2010 3 次提交
    • 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
    • P
      OMAP2/3 clock: remove unnecessary includes and clean up header · da4d2904
      Paul Walmsley 提交于
      Now that almost all of the code has been removed from clock2xxx.c and
      clock34xx.c, many of the includes are now unnecessary and can be removed.
      While we're here, standardize the initial comment blocks.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Jouni Högander <jouni.hogander@nokia.com>
      da4d2904
    • P
      OMAP2/3 clock: clean up omap*_clk_arch_init() · 4680c29f
      Paul Walmsley 提交于
      In the OMAP3xxx clock code, remove the #ifdef CONFIG_ARCH_OMAP3 in
      clock34xx.c, since this file is only compiled for OMAP3xxx builds.  Also,
      rename omap2_clk_arch_init in this file to omap3xxx_clk_arch_init() to
      pave the way for multi-OMAP kernels.  Ensure that it is not executed
      on non-OMAP3xxx systems.
      
      In the OMAP2xxx clock code, rename omap2_clk_arch_init in this file to
      omap2xxx_clk_arch_init() to pave the way for multi-OMAP kernels.
      Ensure that it is not executed on non-OMAP2xxx systems.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4680c29f
  7. 29 1月, 2010 4 次提交
    • P
      OMAP2 clock: don't compile OMAP2430-only functions on non-2430 builds · 6ebe0d88
      Paul Walmsley 提交于
      omap2430_clk_i2chs_find_idlest() doesn't need to be compiled in on
      non-2430 builds, so skip it in those cases to save memory.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6ebe0d88
    • P
      OMAP2xxx clock: move sys_clk code into mach-omap2/clkt2xxx_sys.c · 44da0a51
      Paul Walmsley 提交于
      Move the sys_clk clock functions from clock2xxx.c to
      mach-omap2/clkt2xxx_sys.c.  This is intended to make the clock code
      easier to understand, since all of the functions needed to manage the
      sys_clk 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 the sys_clk clock alone.  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 placed in the mach-omap2xxx/
      directory, rather than shared with other chip types that don't use
      this clock type.
      
      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>
      44da0a51
    • P
      OMAP2xxx clock: move osc_clk code into mach-omap2/clkt2xxx_osc.c · 87a1b26c
      Paul Walmsley 提交于
      Move the osc_clk clock functions from clock2xxx.c to
      mach-omap2/clkt2xxx_osc.  This is intended to make the clock code
      easier to understand, since all of the functions needed to manage the
      osc_clk 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 osc_clk clocks alone.  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 placed in the mach-omap2xxx/
      directory, rather than shared with other chip types that don't use this
      clock type.
      
      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>
      87a1b26c
    • P
      OMAP2xxx clock: move the APLL clock code into mach-omap2/clkt2xxx_apll.c · 49214640
      Paul Walmsley 提交于
      Move the APLL-related clock functions from clock2xxx.c to
      mach-omap2/clkt2xxx_apll.c.  This is intended to make the clock code
      easier to understand, since all of the functions needed to manage APLLs
      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 APLL clocks alone.  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 placed in the mach-omap2xxx/
      directory, rather than shared with other chip types that don't use this
      clock type.
      
      Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
      improve the patch description.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Alexander Shishkin <virtuoso@slind.org>
      49214640
  8. 27 1月, 2010 3 次提交
    • P
      OMAP2xxx clock: move the DVFS virtual clock code into mach-omap2/clkt2xxx_virt_prcm_set.c · 734f69a7
      Paul Walmsley 提交于
      Move the DVFS virtual clock functions from clock2xxx.c to
      mach-omap2/clkt2xxx_virt_prcm_set.c.  This is intended to make the
      clock code easier to understand, since all of the functions needed to
      manage the virt_prcm_set clock 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 the virt_prcm_set clock alone.  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 placed in the mach-omap2xxx/
      directory, rather than shared with other chip types that don't use
      this clock type.
      
      Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments.
      Thanks also to Kevin Hilman <khilman@deeprootsystems.com> for finding
      and fixing a bug with the CONFIG_CPU_FREQ portion of this patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Alexander Shishkin <virtuoso@slind.org>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      734f69a7
    • P
      OMAP2xxx clock: move the DPLL+CORE composite clock code into mach-omap2/clkt2xxx_dpllcore.c · b1823d86
      Paul Walmsley 提交于
      Move the DPLL+CORE composite clock functions from clock2xxx.c to
      mach-omap2/clkt2xxx_dpllcore.c.  This is intended to make the clock
      code easier to understand, since all of the functions needed to manage
      the OMAP2 DPLL+CORE clock 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 the DPLL+CORE clock alone.  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 placed in the mach-omap2xxx/
      directory, rather than shared with other chip types that don't use this
      clock type.
      
      Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
      improve the patch description.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Alexander Shishkin <virtuoso@slind.org>
      b1823d86
    • 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
  9. 09 1月, 2010 2 次提交
    • P
      OMAP2 clock: dynamically allocate CPUFreq frequency table · cdf1a915
      Paul Walmsley 提交于
      Dynamically allocate the CPUFreq frequency table on OMAP2xxx chips.
      This fixes some compilation problems, since the kernel may not know
      what chip it is running on until boot-time.  This also reduces the size
      of the CPUFreq frequency table.
      
      Problem originally reported by Felipe Balbi <felipe.balbi@nokia.com>.
      Thanks also for comments on the patch from Felipe and Kevin.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Felipe Balbi <felipe.balbi@nokia.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      cdf1a915
    • F
      OMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled · 19fe4583
      Felipe Balbi 提交于
      if we enable CPUFREQ we can't build omap2 for two reasons,
      one of them is fixed by the patch below.
      
      It's failing because the __must_be_array() check in
      ARRAY_SIZE() is failing and printing the following message:
      
      arch/arm/mach-omap2/clock2xxx.c:453: error: negative width in bit-field '<anonymous>'
      Signed-off-by: NFelipe Balbi <felipe.balbi@nokia.com>
      [paul@pwsan.com: commit message updated; changed rate variable name]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      19fe4583
  10. 12 12月, 2009 5 次提交
  11. 09 12月, 2009 1 次提交
  12. 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
  13. 15 10月, 2009 1 次提交
    • P
      OMAP2xxx clock: set up clockdomain pointer in struct clk · a7f20b26
      Paul Walmsley 提交于
      clock24xx.c is missing a omap2_init_clk_clkdm() in its
      omap2_clk_init() function.  Among other bad effects, this causes the
      OMAP hwmod layer to oops on boot.
      
      Thanks to Carlos Aguiar <carlos.aguiar@indt.org.br> and Stefano
      Panella <Stefano.Panella@csr.com> for reporting this bug.  Thanks to Tony
      Lindgren <tony@atomide.com> for N800 booting advice.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Carlos Aguiar <carlos.aguiar@indt.org.br>
      Cc: Stefano Panella <Stefano.Panella@csr.com>
      Cc: Tony Lindgren <tony@atomide.com>
      a7f20b26
  14. 25 7月, 2009 1 次提交
    • P
      OMAP2 clock: 2430 I2CHS uses non-standard CM_IDLEST register · 3dc21975
      Paul Walmsley 提交于
      OMAP2430 I2CHS CM_IDLEST bits are in CM_IDLEST1_CORE, but the CM_*CLKEN bits
      are in CM_{I,F}CLKEN2_CORE [1].  Fix by implementing a custom clkops
      .find_idlest function to return the correct slave IDLEST register.
      
      ...
      
      1. OMAP2430 Multimedia Device Package-on-Package (POP) Silicon Revision 2.1
         (Rev. V) Technical Reference Manual, tables 4-99 and 4-105.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      3dc21975
  15. 26 5月, 2009 2 次提交
  16. 16 5月, 2009 1 次提交
  17. 13 5月, 2009 2 次提交
  18. 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
    • P
      OMAP2xxx clock: fix broken cpu_mask code · 15ca78f7
      Paul Walmsley 提交于
      Commit 8ad8ff65 breaks the OMAP2xxx
      cpu_mask code, which causes OMAP2xxx to panic on boot.  Fix by
      removing the cpu_mask auto variable and by changing CK_242X
      and CK_243X to use RATE_IN_242X/RATE_IN_243X.
      
      Resolves
      
      <1>Unable to handle kernel NULL pointer dereference at virtual address 0000000c
      <1>pgd = c0004000
      <1>[0000000c] *pgd=00000000
      Internal error: Oops: 5 [#1]
      Modules linked in:
      CPU: 0    Not tainted  (2.6.29-omap1 #32)
      PC is at omap2_clk_set_parent+0x104/0x120
      LR is at omap2_clk_set_parent+0x28/0x120
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Tested-by: NJarkko Nikula <jarkko.nikula@nokia.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      15ca78f7
  19. 23 4月, 2009 1 次提交
    • P
      OMAP2xxx clock: pre-initialize struct clks early · c8088112
      Paul Walmsley 提交于
      Commit 3f0a820c breaks OMAP2xxx boot
      during initial propagate_rate() on osc_ck and sys_ck.  Fix by
      pre-initializing all struct clks before running any other clock init
      code.  Incorporates review comments from Russell King
      <rmk+kernel@arm.linux.org.uk>.
      
      Resolves
      
      <1>Unable to handle kernel NULL pointer dereference at virtual address 00000000
      <1>pgd = c0004000
      <1>[00000000] *pgd=00000000
      Internal error: Oops: 5 [#1]
      Modules linked in:
      CPU: 0    Not tainted  (2.6.29-omap1 #37)
      PC is at propagate_rate+0x10/0x60
      LR is at omap2_clk_init+0x30/0x218
      ...
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Tested-by: NJarkko Nikula <jarkko.nikula@nokia.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      c8088112
  20. 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
  21. 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
  22. 09 2月, 2009 2 次提交