1. 23 12月, 2010 1 次提交
  2. 22 12月, 2010 5 次提交
    • P
      OMAP2+: powerdomain: move header file from plat-omap to mach-omap2 · 72e06d08
      Paul Walmsley 提交于
      The OMAP powerdomain code and data is all OMAP2+-specific.  This seems
      unlikely to change any time soon.  Move plat-omap/include/plat/powerdomain.h
      to mach-omap2/powerdomain.h.  The primary point of doing this is to remove
      the temptation for unrelated upper-layer code to access powerdomain code
      and data directly.
      
      As part of this process, remove the references to powerdomain data
      from the GPIO "driver" and the OMAP PM no-op layer, both in plat-omap.
      Change the DSPBridge code to point to the new location for the
      powerdomain headers.  The DSPBridge code should not be including the
      powerdomain headers; these should be removed.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      72e06d08
    • P
      OMAP2+: clockdomain: move header file from plat-omap to mach-omap2 · 1540f214
      Paul Walmsley 提交于
      The OMAP clockdomain code and data is all OMAP2+-specific.  This seems
      unlikely to change any time soon.  Move plat-omap/include/plat/clockdomain.h
      to mach-omap2/clockdomain.h.  The primary point of doing this is to remove
      the temptation for unrelated upper-layer code to access clockdomain code
      and data directly.
      
      DSPBridge also uses the clockdomain headers for some reason, so,
      modify it also. The DSPBridge code should not be including the
      clockdomain headers; these should be removed.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Tested-by: NRajendra Nayak <rnayak@ti.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      1540f214
    • P
      OMAP2/3: PRM/CM: prefix OMAP2 PRM/CM functions with "omap2_" · c4d7e58f
      Paul Walmsley 提交于
      Now that OMAP4-specific PRCM functions have been added, distinguish the
      existing OMAP2/3-specific PRCM functions by prefixing them with "omap2_".
      
      This patch should not result in any functional change.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Jarkko Nikula <jhnikula@gmail.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
      Cc: Liam Girdwood <lrg@slimlogic.co.uk>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Tested-by: NRajendra Nayak <rnayak@ti.com>
      c4d7e58f
    • P
      OMAP2/3: PRCM: split OMAP2/3-specific PRCM code into OMAP2/3-specific files · 59fb659b
      Paul Walmsley 提交于
      In preparation for adding OMAP4-specific PRCM accessor/mutator
      functions, split the existing OMAP2/3 PRCM code into OMAP2/3-specific
      files.  Most of what was in mach-omap2/{cm,prm}.{c,h} has now been
      moved into mach-omap2/{cm,prm}2xxx_3xxx.{c,h}, since it was
      OMAP2xxx/3xxx-specific.
      
      This process also requires the #includes in each of these files to be
      changed to reference the new file name.  As part of doing so, add some
      comments into plat-omap/sram.c and plat-omap/mcbsp.c, which use
      "sideways includes", to indicate that these users of the PRM/CM includes
      should not be doing so.
      
      Thanks to Felipe Contreras <felipe.contreras@gmail.com> for comments on this
      patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Jarkko Nikula <jhnikula@gmail.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
      Cc: Liam Girdwood <lrg@slimlogic.co.uk>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Acked-by: NOmar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Acked-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Reviewed-by: NKevin Hilman <khilman@deeprootsystems.com>
      Tested-by: NKevin Hilman <khilman@deeprootsystems.com>
      Tested-by: NRajendra Nayak <rnayak@ti.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      59fb659b
    • J
      OMAP2+: disable idle early in the suspend sequence · c166381d
      Jean Pihet 提交于
      Some bad interaction between the idle and the suspend paths has been
      identified: the idle code is called during the suspend enter and exit
      sequences. This could cause corruption or lock-up of resources.
      
      The solution is to move the calls to disable_hlt at the very beginning
      of the suspend sequence (ex. in omap3_pm_begin instead of
      omap3_pm_prepare), and the call to enable_hlt at the very end of
      the suspend sequence (ex. in omap3_pm_end instead of omap3_pm_finish).
      
      Tested with RET and OFF on Beagle and OMAP3EVM.
      Signed-off-by: NJean Pihet <j-pihet@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      c166381d
  3. 10 12月, 2010 1 次提交
    • K
      OMAP2+: PM/serial: fix console semaphore acquire during suspend · e83df17f
      Kevin Hilman 提交于
      commit 0d8e2d0d (OMAP2+: PM/serial:
      hold console semaphore while OMAP UARTs are disabled) added use of the
      console semaphore to protect UARTs from being accessed after disabled
      during idle, but this causes problems in suspend.
      
      During suspend, the console semaphore is acquired by the console
      suspend method (console_suspend()) so the try_acquire_console_sem()
      will always fail and suspend will be aborted.
      
      To fix, introduce a check so the console semaphore is only attempted
      during idle, and not during suspend.  Also use the same check so that
      the console semaphore is not prematurely released during resume.
      
      Thanks to Paul Walmsley for suggesting adding the same check during
      resume.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Tested-by: NJean Pihet <j-pihet@ti.com>
      Tested-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      e83df17f
  4. 25 11月, 2010 1 次提交
    • P
      OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled · 0d8e2d0d
      Paul Walmsley 提交于
      The console semaphore must be held while the OMAP UART devices are
      disabled, lest a console write cause an ARM abort (and a kernel crash)
      when the underlying console device is inaccessible.  These crashes
      only occur when the console is on one of the OMAP internal serial
      ports.
      
      While this problem has been latent in the PM idle loop for some time,
      the crash was not triggerable with an unmodified kernel until commit
      6f251e9d ("OMAP: UART: omap_device
      conversions, remove implicit 8520 assumptions").  After this patch, a
      console write often occurs after the console UART has been disabled in
      the idle loop, crashing the system.  Several users have encountered
      this bug:
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg38396.html
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36602.html
      
      The same commit also introduced new code that disabled the UARTs
      during init, in omap_serial_init_port().  The kernel will also crash
      in this code when earlyconsole and extra debugging is enabled:
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36411.html
      
      The minimal fix for the -rc series is to hold the console semaphore
      while the OMAP UARTs are disabled.  This is a somewhat overbroad fix,
      since the console may not be located on an OMAP UART, as is the case
      with the GPMC UART on Zoom3.  While it is technically possible to
      determine which devices the console or earlyconsole is actually
      running on, it is not a trivial problem to solve, and the code to do
      so is not really appropriate for the -rc series.
      
      The right long-term fix is to ensure that no code outside of the OMAP
      serial driver can disable an OMAP UART.  As I understand it, code to
      implement this is under development by TI.
      
      This patch is a collaboration between Paul Walmsley <paul@pwsan.com>
      and Tony Lindgren <tony@atomide.com>.  Thanks to Ming Lei
      <tom.leiming@gmail.com> and Pramod <pramod.gurav@ti.com> for their
      feedback on earlier versions of this patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Pramod <pramod.gurav@ti.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Jean Pihet <jean.pihet@newoldbits.com>
      Cc: Govindraj.R <govindraj.raja@ti.com>
      0d8e2d0d
  5. 09 10月, 2010 2 次提交
    • P
      OMAP: control: move plat-omap/control.h to mach-omap2/control.h · 4814ced5
      Paul Walmsley 提交于
      Only OMAP2+ platforms have the System Control Module (SCM) IP block.
      In the past, we've kept the SCM header file in plat-omap.  This has
      led to abuse - device drivers including it; includes being added that
      create implicit dependencies on OMAP2+ builds; etc.
      
      In response, move the SCM headers into mach-omap2/.
      
      As part of this, remove the direct SCM access from the OMAP UDC
      driver.  It was clearly broken.  The UDC code needs an indepth review for
      use on OMAP2+ chips.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Cory Maccarrone <darkstar6262@gmail.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      4814ced5
    • K
      OMAP2: PM: check UART status before trying to idle · 503923ee
      Kevin Hilman 提交于
      As is done on OMAP3, check omap_uart_can_sleep() as one of the
      pre-conditions for entering the idle loop.  Without this check,
      entering idle introduces large latencies on active UARTs, and is
      especially noticable on serial console.
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      503923ee
  6. 05 7月, 2010 1 次提交
  7. 21 5月, 2010 2 次提交
  8. 13 5月, 2010 1 次提交
    • K
      OMAP2/3: GPIO: generalize prepare for idle · 43ffcd9a
      Kevin Hilman 提交于
      Currently, the GPIO 'prepare' hook is only called when going to
      off-mode, while the function is called 'prepare_for_retention.'  This
      patch renames the function to 'prepare_for_idle' and calls it for any
      powersate != PWRDM_POWER_ON passing in the powerstate.
      
      The hook itself is then responsible for doing various preparation
      based on the powerstate.
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      43ffcd9a
  9. 27 1月, 2010 2 次提交
    • P
      OMAP clockdomains: add usecounting for wakeup and sleep dependencies · 369d5614
      Paul Walmsley 提交于
      Add usecounting for wakeup and sleep dependencies.  In the current
      situation, if several functions add dependencies on the same
      clockdomains, when the first dependency removal function is called,
      the dependency will be incorrectly removed from the hardware.
      
      Add clkdm_clear_all_wkdeps() and clkdm_clear_all_sleepdeps(), which
      provide a fast and usecounting-consistent way to clear all hardware
      clockdomain dependencies, since accesses to these registers can be
      quite slow.  pm{2,3}4xx.c has been updated to use these new functions.
      The original version of this patch did not touch these files, which
      previously wrote directly to the wkdep registers, and thus confused
      the usecounting code.  This problem was found by Kevin Hilman
      <khilman@deeprootsystems.com>.
      
      N.B.: This patch introduces one significant functional difference over
      the previous pm34xx.c code: sleepdeps are now cleared during
      clockdomain initialization, whereas previously they were left
      untouched.  This has been tested by Kevin and confirmed to work.
      
      The original version of this patch also did not take into
      consideration that some clockdomains do not have sleep or wakeup
      dependency sources, which caused NULL pointer dereferences.  This
      problem was debugged and fixed by Kevin Hilman
      <khilman@deeprootsystems.com>.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Cc: Jouni Högander <jouni.hogander@nokia.com>
      369d5614
    • A
      ARM: OMAP4: PM: OMAP4 Power Domain Porting Related Clean-up. · 37903009
      Abhijit Pagare 提交于
      Module offsets were same for OMAP2 and OMAP3 while they differ for OMAP4.
      Hence we need different macros for identifying platform specific offsets.
      Signed-off-by: NAbhijit Pagare <abhijitpagare@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      37903009
  10. 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
  11. 03 9月, 2009 1 次提交
  12. 06 8月, 2009 1 次提交
  13. 29 5月, 2009 3 次提交
    • K
      OMAP3: PM: UART: disable clocks when idle and off-mode support · 4af4016c
      Kevin Hilman 提交于
      This patch allows the UART clocks to be disabled when the OMAP UARTs
      are inactive, thus permitting the chip to hit retention in idle.
      After the expiration of an activity timer, each UART is allowed to
      disable its clocks so the system can enter retention.  The activity
      timer is (re)activated on any UART interrupt, UART wake event or any
      IO pad wakeup.  The actual disable of the UART clocks is done in the
      'prepare_idle' hook called from the OMAP idle loop.
      
      While the activity timer is active, the smart-idle mode of the UART is
      also disabled.  This is due to a "feature" of the UART module that
      after a UART wakeup, the smart-idle mode may be entered before the
      UART has communicated the interrupt, or upon TX, an idle mode may be
      entered before the TX FIFOs are emptied.
      
      Upon suspend, the 'prepare_suspend' hook cancels any pending activity
      timers and allows the clocks to be disabled immediately.
      
      In addition, upon disabling clocks the UART state is saved in case
      of an off-mode transition while clocks are off.
      
      Special thanks to Tero Kristo for the initial ideas and first versions
      of UART idle support, and to Jouni Hogander for extra testing and
      bugfixes.
      
      Tested on OMAP3 (Beagle, RX51, SDP, EVM) and OMAP2 (n810)
      
      Cc: Tero Kristo <tero.kristo@nokia.com>
      Cc: Jouni Hogander <jouni.hogander@nokia.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      4af4016c
    • J
      OMAP: Add new function to check wether there is irq pending · 94434535
      Jouni Hogander 提交于
      Add common omap2/3 function to check wether there is irq pending.
      Switch to use it in omap2 pm code instead of its own.
      Signed-off-by: NJouni Hogander <jouni.hogander@nokia.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      94434535
    • K
      OMAP2/3: PM: push core PM code from linux-omap · 8bd22949
      Kevin Hilman 提交于
      This patch is to sync the core linux-omap PM code with mainline.  This
      code has evolved and been used for a while the linux-omap tree, but
      the attempt here is to finally get this into mainline.
      
      Following this will be a series of patches from the 'PM branch' of the
      linux-omap tree to add full PM hardware support from the linux-omap
      tree.
      
      Much of this PM core code was written by Jouni Hogander with
      significant contributions from Paul Walmsley as well as many others
      from Nokia, Texas Instruments and linux-omap community.
      Signed-off-by: NJouni Hogander <jouni.hogander@nokia.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      8bd22949