1. 14 10月, 2015 2 次提交
  2. 07 5月, 2015 1 次提交
  3. 21 11月, 2014 1 次提交
  4. 18 11月, 2014 1 次提交
  5. 06 11月, 2014 1 次提交
  6. 26 8月, 2014 1 次提交
  7. 28 7月, 2014 2 次提交
  8. 22 5月, 2014 7 次提交
  9. 30 4月, 2014 1 次提交
  10. 29 4月, 2014 1 次提交
    • T
      ARM: common: edma: Fix xbar mapping · cf7eb979
      Thomas Gleixner 提交于
      This is another great example of trainwreck engineering:
      
      commit 2646a0e529 (ARM: edma: Add EDMA crossbar event mux support)
      added support for using EDMA on peripherals which have no direct EDMA
      event mapping.
      
      The code compiles and does not explode in your face, but that's it.
      
      1) Reading an u16 array from an u32 device tree array simply does not
         work. Even if the function is named "edma_of_read_u32_to_s16_array".
      
         It merily calls of_property_read_u16_array. So the resulting 16bit
         array will have every other entry = 0.
      
      2) The DT entry for the xbar registers related to xbar has length 0x10
         instead of the real length: 0xfd0 - 0xf90 = 0x40.
      
         Not a real problem as it does not cross a page boundary, but
         wrong nevertheless.
      
      3) But none of this matters as the mapping never happens:
      
         After reading nonsense edma_of_read_u32_to_s16_array() invalidates
         the first array entry pair, so nobody can ever notice the
         braindamage by immediate explosion.
      
      Seems the QA criteria for this code was solely not to explode when
      someone adds edma-xbar-event-map entries to the DT. Goal achieved,
      congratulations!
      
      Not really helpful if someone wants to use edma on a device which
      requires a xbar mapping.
      
      Fix the issues by:
      
      - annotating the device tree entry with "/bits/ 16" as documented in
        the of_property_read_u16_array kernel doc
      
      - make the size of the xbar register mapping correct
      
      - invalidating the end of the array and not the start
      
      This convoluted mess wants to be completely rewritten as there is no
      point to keep the xbar_chan array memory and the iomapping of the xbar
      regs around forever. Marking the xbar mapped channels as used should
      be done right there.
      
      But that's a different issue and this patch is small enough to make it
      work and allows a simple backport for stable.
      
      Cc: stable@vger.kernel.org # v3.12+
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      cf7eb979
  11. 23 4月, 2014 2 次提交
  12. 30 10月, 2013 1 次提交
  13. 01 10月, 2013 1 次提交
    • J
      ARM: edma: Fix clearing of unused list for DT DMA resources · 6cdaca48
      Joel Fernandes 提交于
      HWMOD removal for MMC is breaking edma_start as the events are being manually
      triggered due to unused channel list not being clear.
      
      The above issue is fixed by reading the "dmas" property from the DT node if it
      exists and clearing the bits in the unused channel list if the dma controller
      used by any device is EDMA. For this purpose we use the of_* helpers to parse
      the arguments in the dmas phandle list.
      
      Also introduced is a minor clean up of a checkpatch error in old code.
      Reviewed-by: NSekhar Nori <nsekhar@ti.com>
      Reported-by: NBalaji T K <balajitk@ti.com>
      Cc: Sekhar Nori <nsekhar@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Pantel Antoniou <panto@antoniou-consulting.com>
      Cc: Jason Kridner <jkridner@beagleboard.org>
      Cc: Koen Kooi <koen@dominion.thruhere.net>
      Signed-off-by: NJoel Fernandes <joelf@ti.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      6cdaca48
  14. 04 9月, 2013 1 次提交
  15. 16 7月, 2013 1 次提交
  16. 24 6月, 2013 2 次提交
  17. 18 6月, 2013 3 次提交
  18. 12 3月, 2013 1 次提交
  19. 09 5月, 2012 2 次提交
    • A
      arm: davinci: use for_each_set_bit_from · 98e3b339
      Akinobu Mita 提交于
      Use for_each_set_bit_from to iterate over all the set bit in a memory
      region.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: NSekhar Nori <nsekhar@ti.com>
      Cc: Sekhar Nori <nsekhar@ti.com>
      Cc: Christian Riesch <christian.riesch@omicron.at>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: davinci-linux-open-source@linux.davincidsp.com
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      98e3b339
    • S
      ARM: davinci: optimize the DMA ISR · bcd59b0f
      Sebastian Andrzej Siewior 提交于
      The ISR does quiete a lot of hw access which could be avoided. First it
      checks for a pending interrupt by reading alteast one register. Then it
      checks for the "activated" slots by reading another register. This is
      more or a less a must.
      Now, once it found an active slot it does the same two reads again.
      After that it "knows" that there must be a pending transfer however it
      cross checks with the other register. There are 32 bit in an interger
      which are polled instead of considering only the set bits and ignoring
      those which are zero. This performs atleast 32 reads which could be
      avoided. In case of a first match it does another read.
      This patch reorganizes the access by re-using the register which have
      been read and then uses ffs() to find the matching slot instead looping
      over it. By doing this we get rid of the last (32 + 2 + hits) reads.
      
      It is possible however that by really busy bank0 we never get to handle
      bank1. If this is a problem, we could try to handle bank1 after we are
      done with bank0 to check if there are any outstanding transfers.
      
      To put some numbers on this, this is from spi transfer via spidev. The
      first column is the number of total transfers, the time stamp is taken
      before and after the ioctl():
      
      |10000, min: 542us      avg: 591us
      |20000, min: 542us      avg: 592us
      |30000, min: 542us      avg: 592us
      |40000, min: 542us      avg: 585us
      |50000, min: 542us      avg: 593us
      
      The same test case with the patch applied
      |10000, min: 444us      avg: 493us
      |20000, min: 444us      avg: 491us
      |30000, min: 444us      avg: 489us
      |40000, min: 444us      avg: 491us
      |50000, min: 444us      avg: 492us
      
      that is almost 100us that just went away.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      bcd59b0f
  20. 03 2月, 2012 1 次提交
  21. 17 9月, 2011 2 次提交
    • T
      ARM: davinci: edma: use kzalloc() · 902532db
      Thomas Meyer 提交于
       Use kzalloc rather than kmalloc followed by memset with 0
      
       This considers some simple cases that are common and easy to validate
       Note in particular that there are no ...s in the rule, so all of the
       matched code has to be contiguous
      
       The semantic patch that makes this output is available
       in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.
      
       More information about semantic patching is available at
       http://coccinelle.lip6.fr/Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      902532db
    • I
      ARM: davinci: Explicitly set channel controllers' default queues · f23fe857
      Ido Yariv 提交于
      Davinci platforms may define a default queue for each channel
      controller. If one is not defined, the default queue is set to EVENTQ_1.
      However, there's no way to distinguish between an unset default queue to
      one that is set to EVENTQ_0, as EVENTQ_0 = 0.
      
      Explicitly specify the default queue for all channel controllers on all
      Davinci platforms to EVENTQ_1, and don't overwrite it in the EDMA probe
      function.
      
      One exception is the DA850 board, for which EVENTQ_1 is not a valid
      option for its second channel controller. Use EVENTQ_0 instead for that
      channel controller.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      f23fe857
  22. 24 9月, 2010 1 次提交
  23. 06 8月, 2010 2 次提交
    • R
      davinci: support for EDMA resource sharing · 90bd4e6d
      Rajashekhara, Sudhakar 提交于
      Current EDMA driver is not taking care of EDMA channels/slots
      which are allocated from other processor, say DSP. If a
      channel/slot is allocated from DSP, the existing EDMA driver
      can still allocate the same resource on ARM.
      
      This patch enables the user to pass the channel/slots reserved
      for DSP as platform data. EDMA driver scans this list during
      probe and prepares a bitmap of channel/slots which can be used
      on ARM side.
      
      Trying to reserve channels by doing a 'pre-allocate' using
      edma_alloc_{slot|channel}() API does not work because
      
      1) The reservation should be done in probe() to avoid race
         with other ARM side driver trying to use EDMA
      
      2) The alloc channel API sets up the access through shadow region
         0 which will be incorrect for DSP usage. It also sets up the
         channel <-> queue number mapping which is not required as DSP
         will likely do its own mapping anyway.
      
      3) (minor) There is no API to allocate channels in bulk.
      Signed-off-by: NSudhakar Rajashekhara <sudhakar.raj@ti.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      90bd4e6d
    • S
      davinci: edma: provide ability to detect insufficient CC info data · bc3ac9f3
      Sekhar Nori 提交于
      This patch modifies the EDMA driver to expect the channel
      controller (CC) infomation passed on by the platform as a fixed
      size (EDMA_MAX_CC) array of pointers to structures.
      
      Doing so helps catch errors of the sort where the resource
      structure has information for more channel controllers than
      the number channel controller info structures defined.
      
      Such insufficient platform data would lead to illegal memory
      accesses.
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      bc3ac9f3
  24. 14 5月, 2010 2 次提交