1. 07 1月, 2013 1 次提交
    • J
      dmaengine: add helper function to request a slave DMA channel · 9a6cecc8
      Jon Hunter 提交于
      Currently slave DMA channels are requested by calling dma_request_channel()
      and requires DMA clients to pass various filter parameters to obtain the
      appropriate channel.
      
      With device-tree being used by architectures such as arm and the addition of
      device-tree helper functions to extract the relevant DMA client information
      from device-tree, add a new function to request a slave DMA channel using
      device-tree. This function is currently a simple wrapper that calls the
      device-tree of_dma_request_slave_channel() function.
      
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <djbw@fb.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Reviewed-by: NStephen Warren <swarren@wwwdotorg.org>
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      9a6cecc8
  2. 18 12月, 2012 2 次提交
  3. 01 12月, 2012 1 次提交
    • T
      ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h · 45c3eb7d
      Tony Lindgren 提交于
      Based on earlier discussions[1] we attempted to find a suitable
      location for the omap DMA header in commit 2b6c4e73 (ARM: OMAP:
      DMA: Move plat/dma.h to plat-omap/dma-omap.h) until the conversion
      to dmaengine is complete.
      
      Unfortunately that was before I was able to try to test compile
      of the ARM multiplatform builds for omap2+, and the end result
      was not very good.
      
      So I'm creating yet another all over the place patch to cut the
      last dependency for building omap2+ for ARM multiplatform. After
      this, we have finally removed the driver dependencies to the
      arch/arm code, except for few drivers that are being worked on.
      
      The other option was to make the <plat-omap/dma-omap.h> path
      to work, but we'd have to add some new header directory to for
      multiplatform builds.
      
      Or we would have to manually include arch/arm/plat-omap/include
      again from arch/arm/Makefile for omap2+.
      
      Neither of these alternatives sound appealing as they will
      likely lead addition of various other headers exposed to the
      drivers, which we want to avoid for the multiplatform kernels.
      
      Since we already have a minimal include/linux/omap-dma.h,
      let's just use that instead and add a note to it to not
      use the custom omap DMA functions any longer where possible.
      
      Note that converting omap DMA to dmaengine depends on
      dmaengine supporting automatically incrementing the FIFO
      address at the device end, and converting all the remaining
      legacy drivers. So it's going to be few more merge windows.
      
      [1] https://patchwork.kernel.org/patch/1519591/#
      
      cc: Russell King <linux@arm.linux.org.uk>
      cc: Kevin Hilman <khilman@ti.com>
      cc: "Benoît Cousson" <b-cousson@ti.com>
      cc: Herbert Xu <herbert@gondor.apana.org.au>
      cc: "David S. Miller" <davem@davemloft.net>
      cc: Vinod Koul <vinod.koul@intel.com>
      cc: Dan Williams <djbw@fb.com>
      cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      cc: David Woodhouse <dwmw2@infradead.org>
      cc: Kyungmin Park <kyungmin.park@samsung.com>
      cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      cc: Hans Verkuil <hans.verkuil@cisco.com>
      cc: Vaibhav Hiremath <hvaibhav@ti.com>
      cc: Lokesh Vutla <lokeshvutla@ti.com>
      cc: Rusty Russell <rusty@rustcorp.com.au>
      cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      cc: Afzal Mohammed <afzal@ti.com>
      cc: linux-crypto@vger.kernel.org
      cc: linux-media@vger.kernel.org
      cc: linux-mtd@lists.infradead.org
      cc: linux-usb@vger.kernel.org
      cc: linux-fbdev@vger.kernel.org
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      45c3eb7d
  4. 29 11月, 2012 2 次提交
  5. 23 11月, 2012 4 次提交
    • T
      dma: mv_xor: fix error handling path · 73d9cdca
      Thomas Petazzoni 提交于
      The ->probe() function of the mv_xor function contains in its error
      handling code a loop to cleanup the XOR channels that had been
      successfully initialized if some other XOR channel fails to be
      initialized. It does that by traveling the list of XOR channels, and
      cleanup those for which the pointer is not NULL.
      
      However, since the mv_xor_channel_add() function return a PTR_ERR
      style value, the pointer is not NULL on error. So, when handling the
      error of a given channel initialization, we cleanup this channel
      initialization and mark this channel entry as NULL in the array. This
      allows the remaining of the cleanup (for other channels) to work
      properly.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      73d9cdca
    • T
      dma: mv_xor: fix error checking of irq_of_parse_and_map() · f8eb9e7d
      Thomas Petazzoni 提交于
      The irq_of_parse_and_map() function returns 0 on failure, and does not
      return an error code, so we fix the calling site of
      irq_of_parse_and_map() in the mv_xor driver.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      f8eb9e7d
    • T
      dma: mv_xor: use request_irq() instead of devm_request_irq() · 2d0a0745
      Thomas Petazzoni 提交于
      Even through the usage of devm_*() functions is generally recommended
      over their classic variants, in the case of devm_request_irq()
      combined with irq_of_parse_and_map(), it doesn't work nicely.
      
      We have the following scenario:
      
       irq_of_parse_and_map(...)
       devm_request_irq(...)
      
      For some reason, the driver initialization fails at a later
      point. Since irq_of_parse_and_map() is no device-managed, we do a:
      
       irq_dispose_mapping(...)
      
      Unfortunately, this doesn't work, because the free_irq() must be done
      prior to calling irq_dispose_mapping(). But with the devm mechanism,
      the automatic free_irq() would happen only after we get out of the
      ->probe() function.
      
      So basically, we revert to using request_irq() with traditional error
      handling, so that in case of error, free_irq() gets called before
      irq_dispose_mapping().
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      2d0a0745
    • T
      dma: mv_xor: clear the window override control registers · c4b4b732
      Thomas Petazzoni 提交于
      The XOR channels on Marvell SoCs have a Window Override Control
      register that allow to do some fancy things with addresses. Those
      features are not used by the driver, but some U-Boot versions anyway
      modify those registers.
      
      For some reason, the U-Boot on OpenBlocks AX3-4 was setting an invalid
      value in those registers when the addition 2 GB DRAM chip was plugged
      into the board, causing the XOR driver to fail in using the XOR
      engines.
      
      By setting those registers to 0 during the driver initialization, we
      ensure that the registers are configured according with the driver
      operation model.
      
      Thanks to Lior Amsalem <alior@marvell.com> for his help in debugging
      this problem.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      c4b4b732
  6. 20 11月, 2012 26 次提交
  7. 15 11月, 2012 1 次提交
    • A
      ioat: Do not enable DCA if tag map is invalid · 07bd34db
      Alexander Duyck 提交于
      I have encountered several systems that have an invalid tag map.  This
      invalid tag map results in only two tags being generated 0x1F which is
      usually applied to the first core in a Hyper-threaded pair and 0x00 which
      is applied to the second core in a Hyper-threaded pair.  The net result of
      all this is that DCA causes significant cache thrash because the 0x1F tag
      will send traffic to the second socket, which the 0x00 tag will not DCA tag
      the frame resulting in no benefit.
      
      For now the best solution from the driver's perspective is to just disable
      DCA if the tag map is invalid.  The correct solution for this would be to
      have the BIOS on affected systems updated so that the correct tags are
      generated for a given APIC ID.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      07bd34db
  8. 05 11月, 2012 1 次提交
  9. 01 11月, 2012 1 次提交
    • T
      ARM: OMAP: Remove cpu_is_omap usage from plat-omap/dma.c · 82809601
      Tony Lindgren 提交于
      This code will be eventually in drivers, and for the
      code in the drivers we don't want to have any cpu_is_omap
      usage. Those macros should be private to arch/arm/mach-omap1
      and arch/arm/mach-omap2.
      
      To fix this, let's move the define for dma_omap2plus()
      to dma-omap.h, and use the existing dma_attr passed in
      the platform_data as the revision registers are what they
      are.
      
      Note that we can now also remove the relative includes
      introduced by the recent clean-up patches.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      82809601
  10. 26 10月, 2012 1 次提交