diff options
-rw-r--r-- | drivers/dma/coh901318.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index 418e4e4fb7ba..fd22dd36985f 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
@@ -1690,7 +1690,7 @@ static u32 coh901318_get_bytes_left(struct dma_chan *chan) | |||
1690 | * Pauses a transfer without losing data. Enables power save. | 1690 | * Pauses a transfer without losing data. Enables power save. |
1691 | * Use this function in conjunction with coh901318_resume. | 1691 | * Use this function in conjunction with coh901318_resume. |
1692 | */ | 1692 | */ |
1693 | static void coh901318_pause(struct dma_chan *chan) | 1693 | static int coh901318_pause(struct dma_chan *chan) |
1694 | { | 1694 | { |
1695 | u32 val; | 1695 | u32 val; |
1696 | unsigned long flags; | 1696 | unsigned long flags; |
@@ -1730,12 +1730,13 @@ static void coh901318_pause(struct dma_chan *chan) | |||
1730 | enable_powersave(cohc); | 1730 | enable_powersave(cohc); |
1731 | 1731 | ||
1732 | spin_unlock_irqrestore(&cohc->lock, flags); | 1732 | spin_unlock_irqrestore(&cohc->lock, flags); |
1733 | return 0; | ||
1733 | } | 1734 | } |
1734 | 1735 | ||
1735 | /* Resumes a transfer that has been stopped via 300_dma_stop(..). | 1736 | /* Resumes a transfer that has been stopped via 300_dma_stop(..). |
1736 | Power save is handled. | 1737 | Power save is handled. |
1737 | */ | 1738 | */ |
1738 | static void coh901318_resume(struct dma_chan *chan) | 1739 | static int coh901318_resume(struct dma_chan *chan) |
1739 | { | 1740 | { |
1740 | u32 val; | 1741 | u32 val; |
1741 | unsigned long flags; | 1742 | unsigned long flags; |
@@ -1760,6 +1761,7 @@ static void coh901318_resume(struct dma_chan *chan) | |||
1760 | } | 1761 | } |
1761 | 1762 | ||
1762 | spin_unlock_irqrestore(&cohc->lock, flags); | 1763 | spin_unlock_irqrestore(&cohc->lock, flags); |
1764 | return 0; | ||
1763 | } | 1765 | } |
1764 | 1766 | ||
1765 | bool coh901318_filter_id(struct dma_chan *chan, void *chan_id) | 1767 | bool coh901318_filter_id(struct dma_chan *chan, void *chan_id) |
@@ -2512,8 +2514,8 @@ static const struct burst_table burst_sizes[] = { | |||
2512 | }, | 2514 | }, |
2513 | }; | 2515 | }; |
2514 | 2516 | ||
2515 | static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan, | 2517 | static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, |
2516 | struct dma_slave_config *config) | 2518 | struct dma_slave_config *config) |
2517 | { | 2519 | { |
2518 | struct coh901318_chan *cohc = to_coh901318_chan(chan); | 2520 | struct coh901318_chan *cohc = to_coh901318_chan(chan); |
2519 | dma_addr_t addr; | 2521 | dma_addr_t addr; |
@@ -2533,7 +2535,7 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan, | |||
2533 | maxburst = config->dst_maxburst; | 2535 | maxburst = config->dst_maxburst; |
2534 | } else { | 2536 | } else { |
2535 | dev_err(COHC_2_DEV(cohc), "illegal channel mode\n"); | 2537 | dev_err(COHC_2_DEV(cohc), "illegal channel mode\n"); |
2536 | return; | 2538 | return -EINVAL; |
2537 | } | 2539 | } |
2538 | 2540 | ||
2539 | dev_dbg(COHC_2_DEV(cohc), "configure channel for %d byte transfers\n", | 2541 | dev_dbg(COHC_2_DEV(cohc), "configure channel for %d byte transfers\n", |
@@ -2579,7 +2581,7 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan, | |||
2579 | default: | 2581 | default: |
2580 | dev_err(COHC_2_DEV(cohc), | 2582 | dev_err(COHC_2_DEV(cohc), |
2581 | "bad runtimeconfig: alien address width\n"); | 2583 | "bad runtimeconfig: alien address width\n"); |
2582 | return; | 2584 | return -EINVAL; |
2583 | } | 2585 | } |
2584 | 2586 | ||
2585 | ctrl |= burst_sizes[i].reg; | 2587 | ctrl |= burst_sizes[i].reg; |
@@ -2589,10 +2591,12 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan, | |||
2589 | 2591 | ||
2590 | cohc->addr = addr; | 2592 | cohc->addr = addr; |
2591 | cohc->ctrl = ctrl; | 2593 | cohc->ctrl = ctrl; |
2594 | |||
2595 | return 0; | ||
2592 | } | 2596 | } |
2593 | 2597 | ||
2594 | void coh901318_base_init(struct dma_device *dma, const int *pick_chans, | 2598 | static void coh901318_base_init(struct dma_device *dma, const int *pick_chans, |
2595 | struct coh901318_base *base) | 2599 | struct coh901318_base *base) |
2596 | { | 2600 | { |
2597 | int chans_i; | 2601 | int chans_i; |
2598 | int i = 0; | 2602 | int i = 0; |