ARM: dts: add AM33XX SPI DMA support

Adds DMA resources to the AM33XX SPI nodes.

Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
da8xx: config: Enable TI_EDMA in defconfig

Signed-off-by: Joel Fernandes <joelf@ti.com>
DMA: EDMA: Split out PaRAM set calculations into its own function

PaRAM set calculation is abstracted into its own function to
enable better reuse for other DMA cases. Currently it only
implements the Slave case.

This provides a much cleaner abstraction to the internals of the
PaRAM set. However, any PaRAM attributes that are not common to
all DMA types must be set separately. This function only calculates
the most-common attributes.

Also added comments clarifying A-sync case calculations.

Signed-off-by: Joel Fernandes <joelf@ti.com>
dmaengine: add dma_slave_get_caps api

add new device callback .device_slave_caps api which can be used by clients to
query the dma channel capablties before they program the channel. This can help
is removing errors during the channel programming. Also add helper
dma_slave_get_caps API

This patch folds the work done by Matt earlier
https://patchwork.kernel.org/patch/2094891/

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
ARM: dts: add AM33XX EDMA support

Adds AM33XX EDMA support to the am33xx.dtsi as documented in
Documentation/devicetree/bindings/dma/ti-edma.txt

Joel: Drop DT entries that are non-hardware-description for now as discussed in [1]

[1] https://patchwork.kernel.org/patch/2226761/

Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
ARM: dts: add AM33XX MMC support

Adds AM33XX MMC support for am335x-bone, am335x-evm, and
am335x-evmsk.

Also added is the DMA binding definitions based on the generic
DMA request binding.

Changes to DTS:
Interrupt and reg added by: Joel Fernandes <joelf@ti.com>
Compatible added by Balaji TK <balajitk@ti.com>
ti,needs-special-hs-handling added by Gururaja Hebbar <gururaja.hebbar@ti.com>

Signed-off-by: Matt Porter <mporter@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Joel Fernandes <joelf@ti.com>
mmc: omap_hsmmc: set max_segs based on dma engine limits

Use device_get_slave_caps() to configure mmc->max_segs appropriately.

Signed-off-by: Joel Fernandes <joelf@ti.com>
dma: edma: add device_slave_caps() support

Implement device_slave_caps(). EDMA has a limited number of slots.
Slave drivers such as omap_hsmmc will query the driver to make
sure they don't pass in more than these many scatter segments.

Signed-off-by: Joel Fernandes <joelf@ti.com>
ARM: EDMA: Fix clearing of unused list for DT DMA resources

HWMOD removal for MMC is breaking edma_start as the events are being manually
triggered due to unused channel list not being clear.

This patch fixes the issue, by reading the "dmas" property from the DT node if
it exists and clearing the bits in the unused channel list.

v2 changes:
Reduced indendation by returning from if block.

Reviewed-by: Sekhar Nori <nsekhar@ti.com>
Reported-by: Balaji T K <balajitk@ti.com>
Cc: Pantel Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Joel Fernandes <joelf@ti.com>