diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-08-05 12:08:45 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-08-05 12:08:45 +1000 |
commit | 1a20e3d8075869193c58c3a0e95c76b5367bdf29 (patch) | |
tree | ee92e559624266b02f563bcf62a13e4c4152e2de /arch | |
parent | 171b6adf510f928cd15477d7630c663bb4979774 (diff) | |
parent | 6fc8ae787c589245ee3395630d2c428a1afab26c (diff) |
Merge remote-tracking branch 'slave-dma/next'
Conflicts:
drivers/dma/sh/Kconfig
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/common/edma.c | 31 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/mpc5121.dtsi | 1 |
2 files changed, 31 insertions, 1 deletions
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 485be42519b9..88099175fc56 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1414,6 +1414,34 @@ void edma_clear_event(unsigned channel) } EXPORT_SYMBOL(edma_clear_event); +/* + * edma_assign_channel_eventq - move given channel to desired eventq + * Arguments: + * channel - channel number + * eventq_no - queue to move the channel + * + * Can be used to move a channel to a selected event queue. + */ +void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no) +{ + unsigned ctlr; + + ctlr = EDMA_CTLR(channel); + channel = EDMA_CHAN_SLOT(channel); + + if (channel >= edma_cc[ctlr]->num_channels) + return; + + /* default to low priority queue */ + if (eventq_no == EVENTQ_DEFAULT) + eventq_no = edma_cc[ctlr]->default_queue; + if (eventq_no >= edma_cc[ctlr]->num_tc) + return; + + map_dmach_queue(ctlr, channel, eventq_no); +} +EXPORT_SYMBOL(edma_assign_channel_eventq); + static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, struct edma *edma_cc) { @@ -1470,7 +1498,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, queue_priority_map[i][1] = -1; pdata->queue_priority_mapping = queue_priority_map; - pdata->default_queue = 0; + /* Default queue has the lowest priority */ + pdata->default_queue = i - 1; return 0; } diff --git a/arch/powerpc/boot/dts/mpc5121.dtsi b/arch/powerpc/boot/dts/mpc5121.dtsi index 2c0e1552d20b..7f9d14f5c4da 100644 --- a/arch/powerpc/boot/dts/mpc5121.dtsi +++ b/arch/powerpc/boot/dts/mpc5121.dtsi @@ -498,6 +498,7 @@ compatible = "fsl,mpc5121-dma"; reg = <0x14000 0x1800>; interrupts = <65 0x8>; + #dma-cells = <1>; }; }; |