1. 22 12月, 2010 1 次提交
    • 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
  2. 08 12月, 2010 6 次提交
    • T
      omap1: Fix gpio mpuio bank to work for multi-omap for 7xx/15xx/16xx · 5de62b86
      Tony Lindgren 提交于
      We need to divide the 15xx/16xx offset by 2 for 7xx. Use bank->stride
      for that. This allows us to get rid of the duplicate defines for the
      MPUIO registers.
      
      Note that this will cause omap-keypad.c driver to not work on 7xx.
      However, the right fix there is to move over to matrix_keypad instead
      as suggested by Cory Maccarrone <darkstar6262@gmail.com> and
      Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>.
      
      Cc: Cory Maccarrone <darkstar6262@gmail.com>
      Acked-by: NJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      5de62b86
    • V
      OMAP: GPIO: Implement GPIO as a platform device · 77640aab
      Varadarajan, Charulatha 提交于
      Implement GPIO as a platform device.
      
      GPIO APIs are used in machine_init functions. Hence it is
      required to complete GPIO probe before board_init. Therefore
      GPIO device register and driver register are implemented as
      postcore_initcalls.
      
      omap_gpio_init() does nothing now and this function would be
      removed in the next patch as it's usage is spread across most
      of the board files.
      
      Inorder to convert GPIO as platform device, modifications are
      required in clockxxxx_data.c file for OMAP1 so that device names
      can be used to obtain clock instead of getting clocks by
      name/NULL ptr.
      
      Use runtime pm APIs (pm_runtime_put*/pm_runtime_get*) for enabling
      or disabling the clocks, modify sysconfig settings and remove usage
      of clock FW APIs.
      Note 1: Converting GPIO driver to use runtime PM APIs is not done as a
      separate patch because GPIO clock names are different for various OMAPs
      and are different for some of the banks in the same CPU. This would need
      usage of cpu_is checks and bank id checks while using clock FW APIs in
      the gpio driver. Hence while making GPIO a platform driver framework,
      PM runtime APIs are used directly.
      
      Note 2: While implementing GPIO as a platform device, pm runtime APIs
      are used as mentioned above and modification is not done in gpio's
      prepare for idle/ resume after idle functions. This would be done
      in the next patch series and GPIO driver would be made to use dev_pm_ops
      instead of sysdev_class in that series only.
      
      Due to the above, the GPIO driver implicitly relies on
      CM_AUTOIDLE = 1 on its iclk for power management to work, since the
      driver never disables its iclk.
      This would be taken care in the next patch series (see Note 3 below).
      
      Refer to
      http://www.mail-archive.com/linux-omap@vger.kernel.org/msg39112.html
      for more details.
      
      Note 3: only pm_runtime_get_sync is called in gpio's probe() and
      pm_runtime_put* is never called. This is to make the implementation
      similar to the existing GPIO code. Another patch series would be sent
      to correct this.
      
      In OMAP3 and OMAP4 gpio's debounce clocks are optional clocks. They
      are enabled/ disabled whenever required using clock framework APIs
      
      TODO:
      1. Cleanup the GPIO driver. Use function pointers and register
      offest pointers instead of using hardcoded values
      2. Remove all cpu_is_ checks and OMAP specific macros
      3. Remove usage of gpio_bank array so that only
         instance specific information is used in driver code
      4. Rename 'method'/ avoid it's usage
      5. Fix the non-wakeup gpios handling for OMAP2430, OMAP3 & OMAP4
      6. Modify gpio's prepare for idle/ resume after idle functions
         to use runtime pm implentation.
      Signed-off-by: NCharulatha V <charu@ti.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Reviewed-by: NBasak, Partha <p-basak2@ti.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      [tony@atomide.com: updated for bank specific revision and updated boards]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      77640aab
    • V
      OMAP15xx: GPIO: Introduce support for GPIO init · c95d10bc
      Varadarajan, Charulatha 提交于
      Add support for handling OMAP15xx specific gpio_init by
      providing platform device data and doing device registration.
      Signed-off-by: NCharulatha V <charu@ti.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      c95d10bc
    • T
      OMAP: GPIO: Make omap_gpio_show_rev bank specific · 9a748053
      Tony Lindgren 提交于
      Otherwise GPIO init on 16xx may try to access uninitialized GPIO
      bank as the MPUIO bank does not have a revision register.
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      9a748053
    • V
      OMAP: GPIO: prepare for platform driver · 2fae7fbe
      Varadarajan, Charulatha 提交于
      Prepare for implementing GPIO as a platform driver.
      
      Modifies omap_gpio_init() to make use of omap_gpio_chip_init()
      and omap_gpio_mod_init(). omap_gpio_mod_init() does the module init
      by clearing the status register and initializing the GPIO control register.
      omap_gpio_chip_init() initializes the chip request, free, get, set and
      other function pointers and sets the gpio irq handler.
      
      This is only to reorganize the code so that the "omap gpio platform driver
      implementation patch" looks cleaner and better to review.
      Signed-off-by: NCharulatha V <charu@ti.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      2fae7fbe
    • E
      omap: Ptr "isr_reg" tracked as NULL was dereferenced · b1cc4c55
      Evgeny Kuznetsov 提交于
      Value of "isr_reg" pointer is depend on configuration and GPIO method.
      Potentially it may have NULL value and it is dereferenced later
      in code. Warning and exit from function are added in this case.
      Signed-off-by: NEvgeny Kuznetsov <EXT-Eugeny.Kuznetsov@nokia.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b1cc4c55
  3. 24 9月, 2010 2 次提交
    • S
      omap2: fix assorted compiler warnings · ca828760
      Sanjeev Premi 提交于
      This patch fixes these compiler warnings:
      
        CC      arch/arm/mach-omap2/mux.o
      arch/arm/mach-omap2/mux.c: In function 'omap_mux_init_gpio':
      arch/arm/mach-omap2/mux.c:90: warning: 'gpio_mux' may be used uninitial
      ized in this function
      
        CC      arch/arm/plat-omap/gpio.o
      arch/arm/plat-omap/gpio.c: In function 'omap2_gpio_resume_after_idle':
      arch/arm/plat-omap/gpio.c:2152: warning: 'l' may be used uninitialized
      in this function
      arch/arm/plat-omap/gpio.c: In function 'omap2_gpio_prepare_for_idle':
      arch/arm/plat-omap/gpio.c:2085: warning: 'l2' may be used uninitialized
      in this function
      arch/arm/plat-omap/gpio.c:2085: warning: 'l1' may be used uninitialized
      in this function
      
        CC      arch/arm/mach-omap2/board-omap4panda.o
      arch/arm/mach-omap2/board-omap4panda.c: In function 'omap4_panda_init':
      arch/arm/mach-omap2/board-omap4panda.c:277: warning: unused variable 's
      tatus'
      Signed-off-by: NSanjeev Premi <premi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ca828760
    • K
      OMAP: GPIO: ensure debounce clocks are disabled during idle/suspend · 0aed0435
      Kevin Hilman 提交于
      If a GPIO bank has more than one GPIO with debounce enabled, the
      debounce clock will not be fully disabled before going to
      idle/suspend.
      
      In the idle path, we just do a single clk_disable() of the bank's
      debounce clock.  If there are multiple debounce-enabled GPIOs in the
      bank, that clocks usage count will be > 1, so the clk_disable() will
      not actually disable the clock.
      
      So the fix is to clk_disable() for every debounce-enabled GPIO in the
      bank (and an equivalent clk_enable() of course.)
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      0aed0435
  4. 02 8月, 2010 1 次提交
  5. 10 6月, 2010 1 次提交
  6. 28 5月, 2010 2 次提交
  7. 21 5月, 2010 1 次提交
  8. 13 5月, 2010 6 次提交
  9. 23 4月, 2010 1 次提交
  10. 12 3月, 2010 1 次提交
  11. 24 2月, 2010 1 次提交
  12. 16 2月, 2010 5 次提交
  13. 30 1月, 2010 1 次提交
  14. 09 1月, 2010 2 次提交
    • T
      omap: Remove uninitialized warning for gpio.c · 4cc6420c
      Tony Lindgren 提交于
      Flags is not used on 15xx.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      4cc6420c
    • C
      omap: gpio: Simultaneously requested rising and falling edge · 4318f36b
      Cory Maccarrone 提交于
      Some chips, namely any OMAP1 chips using METHOD_MPUIO,
      OMAP15xx and OMAP7xx, cannot be setup to respond to on-chip GPIO
      interrupts in both rising and falling edge directions -- they can
      only respond to one direction or the other, depending on how the
      ICR is configured.
      
      Additionally, current code forces rising edge detection if both
      flags are specified:
      
              if (trigger & IRQ_TYPE_EDGE_RISING)
                      l |= 1 << gpio;
              else if (trigger & IRQ_TYPE_EDGE_FALLING)
                      l &= ~(1 << gpio);
              else
                      goto bad;
      
      This change implements a toggle function that will modify the ICR
      to flip the direction of interrupt for IRQs that are requested with
      both rising and falling flags.  The toggle function is not called
      for chips and GPIOs it does not apply to through the use of a flip_mask
      that's added on a per-bank basis.  The mask is only set for those
      GPIOs where a toggle is necessary.  Edge detection starts out the
      same as above with FALLING mode first.
      
      The toggle happens on EACH interrupt; without it, we have the
      following sequence of actions on GPIO transition:
      
        ICR    GPIO               Result
        0x1    0 -> 1 (rising)    Interrupt
        0x1    1 -> 0 (falling)   No interrupt
      
        (set ICR to 0x0 manually)
        0x0    0 -> 1 (rising)    No interrupt
        0x0    1 -> 0 (falling)   Interrupt
      
      That is, with the ICR set to 1 for a gpio, only rising edge interrupts
      are caught, and with it set to 0, only falling edge interrupts are
      caught.  If we add in the toggle, we get this:
      
        ICR    GPIO               Result
        0x1    0 -> 1 (rising)    Interrupt (ICR set to 0x0)
        0x0    1 -> 0 (falling)   Interrupt (ICR set to 0x1)
        0x1    0 -> 1 ...
      
      so, both rising and falling are caught, per the request for both
      (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING).
      Signed-off-by: NCory Maccarrone <darkstar6262@gmail.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      4318f36b
  15. 16 12月, 2009 1 次提交
  16. 23 11月, 2009 1 次提交
    • C
      omap: GPIO module enable/disable · 058af1ea
      Charulatha V 提交于
      This patch disables a GPIO module when all pins of a GPIO
      module are inactive (clock gating forced at module level) and
      enables the module when any gpio in the module is requested.
      
      The module is enabled only when "mod_usage" indicates that no GPIO
      in that  module is currently active and the GPIO being requested
      is the 1st one to be active in that module.
      
      Each module would be disabled in omap_gpio_free() API when all
      GPIOs in a particular module becomes inactive. The module is
      re-enabled in omap_gpio_request() API when a GPIO is requested
      from the module that was previously disabled.
      
      Since individual GPIO's bookkeeping is added in this patch
      via "mod_usage", the same is used in omap_set_gpio_debounce()
      & omap_set_gpio_debounce_time() APIs to ensure that the gpio being
      used is actually "requested" prior to being used (Nishant Menon's
      <nm@ti.comSuggestion)
      
      GPIO module level details are specific to hardware and hence
      introducing this patch in low level layer (plat-omap/gpio.c)
      Signed-off-by: NCharulatha V <charu@ti.com>
      Acked-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      058af1ea
  17. 19 11月, 2009 1 次提交
  18. 12 11月, 2009 1 次提交
  19. 20 10月, 2009 1 次提交
  20. 08 10月, 2009 3 次提交
  21. 25 9月, 2009 1 次提交