09 Dec, 2008

1 commit

  • Mapping the destination multiple times is a misuse of the dma-api.
    Since the destination may be reused as a source, ensure that it is only
    mapped once and that it is mapped bidirectionally. This appears to add
    ugliness on the unmap side in that it always reads back the destination
    address from the descriptor, but gcc can determine that dma_unmap is a
    nop and not emit the code that calculates its arguments.

    Cc:
    Cc: Saeed Bishara
    Acked-by: Yuri Tikhonov
    Signed-off-by: Dan Williams

    Dan Williams
     

04 Dec, 2008

2 commits


12 Nov, 2008

3 commits


11 Nov, 2008

3 commits


25 Oct, 2008

3 commits


23 Oct, 2008

1 commit


22 Oct, 2008

1 commit

  • The Intel 7300 Memory Controller supports dynamic throttling of memory which can
    be used to save power when system is idle. This driver does the memory
    throttling when all CPUs are idle on such a system.

    Refer to "Intel 7300 Memory Controller Hub (MCH)" datasheet
    for the config space description.

    Signed-off-by: Andy Henroid
    Signed-off-by: Len Brown
    Signed-off-by: Venkatesh Pallipadi

    Andy Henroid
     

21 Oct, 2008

1 commit


04 Oct, 2008

1 commit

  • The tasklet checks RAW.BLOCK twice, and does not check RAW.XFER. This is
    obviously wrong, and could theoretically cause the driver to hang.

    Reported-by: Nicolas Ferre
    Signed-off-by: Haavard Skinnemoen
    Acked-by: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     

27 Sep, 2008

1 commit

  • Modify the Freescale Elo / Elo Plus DMA driver so that it can be compiled as
    a module.

    The primary change is to stop treating the DMA controller as a bus, and the
    DMA channels as devices on the bus. This is because the Open Firmware (OF)
    kernel code does not allow busses to be removed, so although we can call
    of_platform_bus_probe() to probe the DMA channels, there is no
    of_platform_bus_remove(). Instead, the DMA channels are manually probed,
    similar to what fsl_elbc_nand.c does.

    Cc: Scott Wood
    Acked-by: Li Yang
    Signed-off-by: Timur Tabi
    Signed-off-by: Dan Williams

    Timur Tabi
     

24 Sep, 2008

1 commit

  • The Freescale Elo DMA driver runs an internal self-test before registering
    the channels with the DMA engine. This self-test has a fundemental flaw in
    that it calls the DMA engine's callback functions directly before the
    registration. However, the registration initializes some variables that the
    callback functions uses, namely the device struct.

    The code works today because there are two device structs: the one created
    by the DMA engine, and one created by the Open Firmware (OF) subsystem. The
    self-test currently uses the device struct created by OF. However, in the
    future, some of the device structs created by OF will be eliminated.
    This means that the self-test will only have access to the device struct
    created by the DMA engine. But this device struct isn't initialized when
    the self-test runs, and this causes a kernel panic.

    Since there is already a DMA test module (dmatest), the internal self-test
    code is not useful anyway. It is extremely unlikely that the test will fail
    in normal usage. It may have been helpful during development, but not any more.

    Cc: Kumar Gala
    Cc: Li Yang
    Cc: Scott Wood
    Signed-off-by: Timur Tabi
    Signed-off-by: Dan Williams

    Timur Tabi
     

19 Sep, 2008

2 commits


14 Sep, 2008

1 commit


10 Aug, 2008

1 commit


09 Aug, 2008

2 commits

  • This patch performs the equivalent include directory shuffle for
    plat-orion, and fixes up all users.

    Signed-off-by: Lennert Buytenhek

    Lennert Buytenhek
     
  • * 'for-linus-merged' of master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 5177/1: arm/mach-sa1100/Makefile: remove CONFIG_SA1100_USB
    [ARM] 5166/1: magician: add MAINTAINERS entry
    [ARM] fix pnx4008 build errors
    [ARM] Fix SMP booting with non-zero PHYS_OFFSET
    [ARM] 5185/1: Fix spi num_chipselect for lubbock
    [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
    [ARM] Add support for arch/arm/mach-*/include and arch/arm/plat-*/include
    [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead
    [ARM] Eliminate useless includes of asm/mach-types.h
    [ARM] Fix circular include dependency with IRQ headers
    avr32: Use instead of
    avr32: Introduce arch/avr32/mach-*/include/mach
    avr32: Move include/asm-avr32 to arch/avr32/include/asm
    [ARM] sa1100_wdt: use reset_status to remember watchdog reset status
    [ARM] pxa: introduce reset_status and clear_reset_status for driver's usage
    [ARM] pxa: introduce reset.h for reset specific header information

    Linus Torvalds
     

07 Aug, 2008

2 commits


23 Jul, 2008

3 commits

  • This patch adds to ioatdma and dca modules
    support for Intel I/OAT DMA engine ver.3 (aka CB3 device).
    The main features of I/OAT ver.3 are:
    * 8 single channel DMA devices (8 channels total)
    * 8 DCA providers, each can accept 2 requesters
    * 8-bit TAG values and 32-bit extended APIC IDs

    Signed-off-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Maciej Sosnowski
     
  • I/OAT DMA performance tuning showed different optimal values of
    tcp_dma_copybreak for different I/OAT versions (4096 for 1.2 and 2048
    for 2.0). This patch lets ioatdma driver set tcp_dma_copybreak value
    according to these results.

    [dan.j.williams@intel.com: remove some ifdefs]
    Signed-off-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Maciej Sosnowski
     
  • Due to occasional DMA channel hangs observed for I/OAT versions 1.2 and 2.0
    a watchdog has been introduced to check every 2 seconds
    if all channels progress normally.
    If stuck channel is detected, driver resets it.
    The reset is done in two parts. The second part is scheduled
    by the first one to reinitialize the channel after the restart.

    Signed-off-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Maciej Sosnowski
     

18 Jul, 2008

2 commits


09 Jul, 2008

9 commits

  • This adds a driver for the Synopsys DesignWare DMA controller (aka
    DMACA on AVR32 systems.) This DMA controller can be found integrated
    on the AT32AP7000 chip and is primarily meant for peripheral DMA
    transfer, but can also be used for memory-to-memory transfers.

    This patch is based on a driver from David Brownell which was based on
    an older version of the DMA Engine framework. It also implements the
    proposed extensions to the DMA Engine API for slave DMA operations.

    The dmatest client shows no problems, but there may still be room for
    improvement performance-wise. DMA slave transfer performance is
    definitely "good enough"; reading 100 MiB from an SD card running at ~20
    MHz yields ~7.2 MiB/s average transfer rate.

    Full documentation for this controller can be found in the Synopsys
    DW AHB DMAC Databook:

    http://www.synopsys.com/designware/docs/iip/DW_ahb_dmac/latest/doc/dw_ahb_dmac_db.pdf

    The controller has lots of implementation options, so it's usually a
    good idea to check the data sheet of the chip it's intergrated on as
    well. The AT32AP7000 data sheet can be found here:

    http://www.atmel.com/dyn/products/datasheets.asp?family_id=682

    Changes since v4:
    * Use client_count instead of dma_chan_is_in_use()
    * Add missing include
    * Unmap buffers unless client told us not to

    Changes since v3:
    * Update to latest DMA engine and DMA slave APIs
    * Embed the hw descriptor into the sw descriptor
    * Clean up and update MODULE_DESCRIPTION, copyright date, etc.

    Changes since v2:
    * Dequeue all pending transfers in terminate_all()
    * Rename dw_dmac.h -> dw_dmac_regs.h
    * Define and use controller-specific dma_slave data
    * Fix up a few outdated comments
    * Define hardware registers as structs (doesn't generate better
    code, unfortunately, but it looks nicer.)
    * Get number of channels from platform_data instead of hardcoding it
    based on CONFIG_WHATEVER_CPU.
    * Give slave clients exclusive access to the channel

    Acked-by: Maciej Sosnowski ,
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Haavard Skinnemoen
     
  • This patch adds the necessary interfaces to the DMA Engine framework
    to use functionality found on most embedded DMA controllers: DMA from
    and to I/O registers with hardware handshaking.

    In this context, hardware hanshaking means that the peripheral that
    owns the I/O registers in question is able to tell the DMA controller
    when more data is available for reading, or when there is room for
    more data to be written. This usually happens internally on the chip,
    but these signals may also be exported outside the chip for things
    like IDE DMA, etc.

    A new struct dma_slave is introduced. This contains information that
    the DMA engine driver needs to set up slave transfers to and from a
    slave device. Most engines supporting DMA slave transfers will want to
    extend this structure with controller-specific parameters. This
    additional information is usually passed from the platform/board code
    through the client driver.

    A "slave" pointer is added to the dma_client struct. This must point
    to a valid dma_slave structure iff the DMA_SLAVE capability is
    requested. The DMA engine driver may use this information in its
    device_alloc_chan_resources hook to configure the DMA controller for
    slave transfers from and to the given slave device.

    A new operation for preparing slave DMA transfers is added to struct
    dma_device. This takes a scatterlist and returns a single descriptor
    representing the whole transfer.

    Another new operation for terminating all pending transfers is added as
    well. The latter is needed because there may be errors outside the scope
    of the DMA Engine framework that may require DMA operations to be
    terminated prematurely.

    DMA Engine drivers may extend the dma_device, dma_chan and/or
    dma_slave_descriptor structures to allow controller-specific
    operations. The client driver can detect such extensions by looking at
    the DMA Engine's struct device, or it can request a specific DMA
    Engine device by setting the dma_dev field in struct dma_slave.

    dmaslave interface changes since v4:
    * Fix checkpatch errors
    * Fix changelog (there are no slave descriptors anymore)

    dmaslave interface changes since v3:
    * Use dma_data_direction instead of a new enum
    * Submit slave transfers as scatterlists
    * Remove the DMA slave descriptor struct

    dmaslave interface changes since v2:
    * Add a dma_dev field to struct dma_slave. If set, the client can
    only be bound to the DMA controller that corresponds to this
    device. This allows controller-specific extensions of the
    dma_slave structure; if the device matches, the controller may
    safely assume its extensions are present.
    * Move reg_width into struct dma_slave as there are currently no
    users that need to be able to set the width on a per-transfer
    basis.

    dmaslave interface changes since v1:
    * Drop the set_direction and set_width descriptor hooks. Pass the
    direction and width to the prep function instead.
    * Declare a dma_slave struct with fixed information about a slave,
    i.e. register addresses, handshake interfaces and such.
    * Add pointer to a dma_slave struct to dma_client. Can be NULL if
    the DMA_SLAVE capability isn't requested.
    * Drop the set_slave device hook since the alloc_chan_resources hook
    now has enough information to set up the channel for slave
    transfers.

    Acked-by: Maciej Sosnowski
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Haavard Skinnemoen
     
  • In some cases client code may need the dma-driver to skip the unmap of source
    and/or destination buffers. Setting these flags indicates to the driver to
    skip the unmap step. In this regard async_xor is currently broken in that it
    allows the destination buffer to be unmapped while an operation is still in
    progress, i.e. when the number of sources exceeds the hardware channel's
    maximum (fixed in a subsequent patch).

    Acked-by: Saeed Bishara
    Acked-by: Maciej Sosnowski
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Dan Williams
     
  • A DMA controller capable of doing slave transfers may need to know a
    few things about the slave when preparing the channel. We don't want
    to add this information to struct dma_channel since the channel hasn't
    yet been bound to a client at this point.

    Instead, pass a reference to the client requesting the channel to the
    driver's device_alloc_chan_resources hook so that it can pick the
    necessary information from the dma_client struct by itself.

    [dan.j.williams@intel.com: fixed up fsldma and mv_xor]
    Acked-by: Maciej Sosnowski
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Haavard Skinnemoen
     
  • This client tests DMA memcpy using various lengths and various offsets
    into the source and destination buffers. It will initialize both
    buffers with a repeatable pattern and verify that the DMA engine copies
    the requested region and nothing more. It will also verify that the
    bytes aren't swapped around, and that the source buffer isn't modified.

    The dmatest module can be configured to test a specific device, a
    specific channel. It can also test multiple channels at the same time,
    and it can start multiple threads competing for the same channel.

    Changes since v2:
    * Support testing multiple channels at the same time
    * Support testing with multiple threads competing for the same channel
    * Use counting test patterns in order to catch byte ordering issues

    Changes since v1:
    * Remove extra dashes around "help"
    * Remove "default n" from Kconfig
    * Turn TEST_BUF_SIZE into a module parameter
    * Return DMA_NAK instead of DMA_DUP
    * Print unhandled events
    * Support testing specific channels and devices
    * Move to the end of the Makefile

    Acked-by: Maciej Sosnowski
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Haavard Skinnemoen
     
  • The XOR engine found in Marvell's SoCs and system controllers
    provides XOR and DMA operation, iSCSI CRC32C calculation, memory
    initialization, and memory ECC error cleanup operation support.

    This driver implements the DMA engine API and supports the following
    capabilities:
    - memcpy
    - xor
    - memset

    The XOR engine can be used by DMA engine clients implemented in the
    kernel, one of those clients is the RAID module. In that case, I
    observed 20% improvement in the raid5 write throughput, and 40%
    decrease in the CPU utilization when doing array construction, those
    results obtained on an 5182 running at 500Mhz.

    When enabling the NET DMA client, the performance decreased, so
    meanwhile it is recommended to keep this client off.

    Signed-off-by: Saeed Bishara
    Signed-off-by: Lennert Buytenhek
    Signed-off-by: Nicolas Pitre
    Acked-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Saeed Bishara
     
  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform
    modalias is prefixed with "platform:". Add MODULE_ALIAS() to most
    of the hotpluggable platform drivers, to re-enable auto loading.

    Cc:
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Dan Williams

    Kay Sievers
     
  • Haavard's dma-slave interface would like to test for exclusive access to a
    channel. The standard channel refcounting is not sufficient in that it
    tracks more than just client references, it is also inaccurate as reference
    counts are percpu until the channel is removed.

    This change also enables a future fix to deallocate resources when a client
    declines to use a capable channel.

    Acked-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Dan Williams
     
  • The dependency is redundant since all drivers set their specific arch
    dependencies. The NET_DMA option is modified to be enabled only on platforms
    where it is known to have a positive effect. HAS_DMA is added as an explicit
    dependency for the DMADEVICES menu.

    Acked-by: Adrian Bunk
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Dan Williams