1. 01 12月, 2010 1 次提交
    • H
      usb: musb: add names for IRQs in structure resource · fcf173e4
      Hema Kalliguddi 提交于
      Soon resource data will get automatically
      populated from a set of autogenerated data
      from TI's hardware database for the OMAP
      platform.
      
      Such database, might not have resources at
      the expected order by the current drivers.
      
      While we could hack in some exceptions to
      that tool to generate resources in a specific
      order, it seems less fragile to use the
      resource name instead. That way, no matter
      what order the resources are generated, the
      driver still work.
      
      Modified the OMAP, Blackfin and Davinci
      architecture files to add the name of the IRQs
      in the resource structures and musb driver to
      use the platform_get_irq_byname() api to get
      the device and dma irq numbers instead of using
      the index.
      
      Cc: Tony Lindgren <tony@atomide.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      fcf173e4
  2. 23 10月, 2010 1 次提交
  3. 25 9月, 2010 1 次提交
  4. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  5. 03 3月, 2010 1 次提交
  6. 24 12月, 2009 1 次提交
  7. 01 12月, 2009 1 次提交
    • D
      USB: musb: Fix CPPI IRQs not being signaled · 8d6499e5
      Daniel Glöckner 提交于
      On tx channel abort a cppi interrupt is generated for a short time by
      setting the lowest bit of the TCPPICOMPPTR register. It is then reset
      immediately by clearing the bit. When the interrupt handler is run,
      it does not detect an interrupt in the TCPPIMSKSR or RCPPIMSKSR
      registers and thus exits early without writing the TCPPIEOIR register.
      It appears that this inhibits further cppi interrupts until the handler
      is called by chance, f.ex. from davinci_interrupt().
      
      By moving the unmasking of the interrupt below the writes to
      TCPPICOMPPTR, no interrupt is generated and no write to TCPPIEOIR is
      necessary.
      Signed-off-by: NDaniel Glöckner <dg@emlix.com>
      Signed-off-by: NAjay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8d6499e5
  8. 16 6月, 2009 1 次提交
  9. 18 4月, 2009 2 次提交
    • S
      USB: musb: fix isochronous TXDMA (take 2) · 6b6e9710
      Sergei Shtylyov 提交于
      Multi-frame isochronous TX URBs transfers in DMA mode never
      complete with CPPI DMA because musb_host_tx() doesn't restart
      DMA on the second frame, only emitting a debug message.
      With Inventra DMA they complete, but in PIO mode.  To fix:
      
       - Factor out programming of the DMA transfer from
         musb_ep_program() into musb_tx_dma_program();
      
       - Reorder the code at the end of musb_host_tx() to
         facilitate the fallback to PIO iff DMA fails;
      
       - Handle the buffer offset consistently for both
         PIO and DMA modes;
      
       - Add an argument to musb_ep_program() for the same
         reason (it only worked correctly with non-zero
         offset of the first frame in PIO mode);
      
       - Set the completed isochronous frame descriptor's
         'actual_length' and 'status' fields correctly in
         DMA mode.
      
      Also, since CPPI reportedly doesn't like sending isochronous
      packets in the RNDIS mode, change the criterion for this
      mode to be used only for multi-packet transfers.  (There's
      no need for that mode in the single-packet case anyway.)
      
      [ dbrownell@users.sourceforge.net: split comment paragraph
      into bullet list, shrink patch delta, style tweaks ]
      Signed-off-by: NPavel Kiryukhin <pkiryukhin@ru.mvista.com>
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6b6e9710
    • S
      USB: musb: bugfixes for multi-packet TXDMA support · c7bbc056
      Sergei Shtylyov 提交于
      We really want to use DMA mode 1 for all multi-packet transfers;
      that's one IRQ on DMA completion, instead of one per packet.
      
      There is an important issue with such transfers, especially on
      the host side:  when such transfers end with a full-size packet,
      we must defer musb_dma_completion() calls until the FIFO empties.
      Else we report URB completions too soon, and may clobber data in
      the FIFO fifo when writing the next packet (losing data).
      
      The Inventra DMA support uses DMA mode 1, but it ignores that
      issue.  The CPPI DMA support uses mode 0, but doesn't handle
      its TXPKTRDY interrupts quite right either; it can get stale
      "packet ready" interrupts, and report transfer completion too
      early using slightly different code paths, also losing data.
      
      So I'm solving it in a generic way -- by adding a sort of the
      "interrupt filter" into musb_host_tx(), catching these cases
      where a DMA completion IRQ doesn't suffice and removing some
      needlessly controller-specific logic.  When a TXDMA interrupt
      happens and DMA request mode 1 is active, that filter resets
      to mode 0 and defers URB completion processing until TXPKTRDY,
      unless the FIFO is already empty.  Related filtering logic in
      Inventra and CPPI code gets removed.
      
      Since it should be competely safe now to use the DMA request
      mode 1 for host side transfers with the CPPI DMA controller,
      set it in musb_h_tx_dma_start() ... now renamed (and shared).
      
      [ dbrownell@users.sourceforge.net: don't introduce more
      CamElCase; use more concise explanations ]
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Felipe Balbi <felipe.balbi@nokia.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c7bbc056
  10. 28 1月, 2009 2 次提交
  11. 14 8月, 2008 1 次提交