diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-11 10:14:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-11 10:14:01 -0400 |
commit | c7a19c795b4b0a3232c157ed29eea85077e95da6 (patch) | |
tree | d3916dcdea74b55453694c9f31b95b6d906e3202 /arch/arm | |
parent | 5fd41f2a10b38ab84b4c2436140ce490d34291fa (diff) | |
parent | a0bbe990c161ddf56444efe80d9d6e15fdc47aca (diff) |
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dma updates from Vinod Koul:
"Some notable changes are:
- new driver for AMBA AXI NBPF by Guennadi
- new driver for sun6i controller by Maxime
- pl330 drivers fixes from Lar's
- sh-dma updates and fixes from Laurent, Geert and Kuninori
- Documentation updates from Geert
- drivers fixes and updates spread over dw, edma, freescale, mpc512x
etc.."
* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (72 commits)
dmaengine: sun6i: depends on RESET_CONTROLLER
dma: at_hdmac: fix invalid remaining bytes detection
dmaengine: nbpfaxi: don't build this driver where it cannot be used
dmaengine: nbpf_error_get_channel() can be static
dma: pl08x: Use correct specifier for size_t values
dmaengine: Remove the context argument to the prep_dma_cyclic operation
dmaengine: nbpfaxi: convert to tasklet
dmaengine: nbpfaxi: fix a theoretical race
dmaengine: add a driver for AMBA AXI NBPF DMAC IP cores
dmaengine: add device tree binding documentation for the nbpfaxi driver
dmaengine: edma: Do not register second device when booted with DT
dmaengine: edma: Do not change the error code returned from edma_alloc_slot
dmaengine: rcar-dmac: Add device tree bindings documentation
dmaengine: shdma: Allocate cyclic sg list dynamically
dmaengine: shdma: Make channel filter ignore unrelated devices
dmaengine: sh: Rework Kconfig and Makefile
dmaengine: sun6i: Fix memory leaks
dmaengine: sun6i: Free the interrupt before killing the tasklet
dmaengine: sun6i: Remove switch statement from buswidth convertion routine
dmaengine: of: kconfig: select DMA_ENGINE when DMA_OF is selected
...
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/edma.c | 31 |
1 files changed, 30 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) | |||
1414 | } | 1414 | } |
1415 | EXPORT_SYMBOL(edma_clear_event); | 1415 | EXPORT_SYMBOL(edma_clear_event); |
1416 | 1416 | ||
1417 | /* | ||
1418 | * edma_assign_channel_eventq - move given channel to desired eventq | ||
1419 | * Arguments: | ||
1420 | * channel - channel number | ||
1421 | * eventq_no - queue to move the channel | ||
1422 | * | ||
1423 | * Can be used to move a channel to a selected event queue. | ||
1424 | */ | ||
1425 | void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no) | ||
1426 | { | ||
1427 | unsigned ctlr; | ||
1428 | |||
1429 | ctlr = EDMA_CTLR(channel); | ||
1430 | channel = EDMA_CHAN_SLOT(channel); | ||
1431 | |||
1432 | if (channel >= edma_cc[ctlr]->num_channels) | ||
1433 | return; | ||
1434 | |||
1435 | /* default to low priority queue */ | ||
1436 | if (eventq_no == EVENTQ_DEFAULT) | ||
1437 | eventq_no = edma_cc[ctlr]->default_queue; | ||
1438 | if (eventq_no >= edma_cc[ctlr]->num_tc) | ||
1439 | return; | ||
1440 | |||
1441 | map_dmach_queue(ctlr, channel, eventq_no); | ||
1442 | } | ||
1443 | EXPORT_SYMBOL(edma_assign_channel_eventq); | ||
1444 | |||
1417 | static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, | 1445 | static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, |
1418 | struct edma *edma_cc) | 1446 | struct edma *edma_cc) |
1419 | { | 1447 | { |
@@ -1470,7 +1498,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, | |||
1470 | queue_priority_map[i][1] = -1; | 1498 | queue_priority_map[i][1] = -1; |
1471 | 1499 | ||
1472 | pdata->queue_priority_mapping = queue_priority_map; | 1500 | pdata->queue_priority_mapping = queue_priority_map; |
1473 | pdata->default_queue = 0; | 1501 | /* Default queue has the lowest priority */ |
1502 | pdata->default_queue = i - 1; | ||
1474 | 1503 | ||
1475 | return 0; | 1504 | return 0; |
1476 | } | 1505 | } |