diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-02-15 19:21:49 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-02-20 15:48:02 +0530 |
commit | 17166a3b6e88b93189e6be5f7e1335a3cc4fa965 (patch) | |
tree | a78f080d07426f95d83867a704eac9d6f5dcdd33 /arch/arm/mach-spear13xx/spear13xx.c | |
parent | ARM: dts: pl330: Add #dma-cells for generic dma binding support (diff) | |
download | linux-dev-17166a3b6e88b93189e6be5f7e1335a3cc4fa965.tar.xz linux-dev-17166a3b6e88b93189e6be5f7e1335a3cc4fa965.zip |
Revert "ARM: SPEAr13xx: Pass DW DMAC platform data from DT"
This reverts commit f9965aa20706860077cfa093d04a6351c0c1e940.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to '')
-rw-r--r-- | arch/arm/mach-spear13xx/spear13xx.c | 55 |
1 files changed, 51 insertions, 4 deletions
diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c index b074db8b109c..c4af775a8451 100644 --- a/arch/arm/mach-spear13xx/spear13xx.c +++ b/arch/arm/mach-spear13xx/spear13xx.c @@ -22,16 +22,63 @@ #include <asm/hardware/gic.h> #include <asm/mach/map.h> #include <asm/smp_twd.h> +#include <mach/dma.h> #include <mach/generic.h> #include <mach/spear.h> +/* common dw_dma filter routine to be used by peripherals */ +bool dw_dma_filter(struct dma_chan *chan, void *slave) +{ + struct dw_dma_slave *dws = (struct dw_dma_slave *)slave; + + if (chan->device->dev == dws->dma_dev) { + chan->private = slave; + return true; + } else { + return false; + } +} + /* ssp device registration */ +static struct dw_dma_slave ssp_dma_param[] = { + { + /* Tx */ + .cfg_hi = DWC_CFGH_DST_PER(DMA_REQ_SSP0_TX), + .cfg_lo = 0, + .src_master = DMA_MASTER_MEMORY, + .dst_master = DMA_MASTER_SSP0, + }, { + /* Rx */ + .cfg_hi = DWC_CFGH_SRC_PER(DMA_REQ_SSP0_RX), + .cfg_lo = 0, + .src_master = DMA_MASTER_SSP0, + .dst_master = DMA_MASTER_MEMORY, + } +}; + struct pl022_ssp_controller pl022_plat_data = { .enable_dma = 1, - .dma_filter = dw_dma_generic_filter, - .dma_rx_param = "ssp0_rx", - .dma_tx_param = "ssp0_tx", - .num_chipselect = 3, + .dma_filter = dw_dma_filter, + .dma_rx_param = &ssp_dma_param[1], + .dma_tx_param = &ssp_dma_param[0], +}; + +/* CF device registration */ +struct dw_dma_slave cf_dma_priv = { + .cfg_hi = 0, + .cfg_lo = 0, + .src_master = 0, + .dst_master = 0, +}; + +/* dmac device registeration */ +struct dw_dma_platform_data dmac_plat_data = { + .nr_channels = 8, + .chan_allocation_order = CHAN_ALLOCATION_DESCENDING, + .chan_priority = CHAN_PRIORITY_DESCENDING, + .block_size = 4095U, + .nr_masters = 2, + .data_width = { 3, 3, 0, 0 }, }; void __init spear13xx_l2x0_init(void) |