Commit a8fb688e authored by Russell King's avatar Russell King

ARM: spear: update for PL08x dma engine changes

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent aeea1808
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#ifndef __PLAT_PL080_H #ifndef __PLAT_PL080_H
#define __PLAT_PL080_H #define __PLAT_PL080_H
struct pl08x_dma_chan; struct pl08x_channel_data;
int pl080_get_signal(struct pl08x_dma_chan *ch); int pl080_get_signal(const struct pl08x_channel_data *cd);
void pl080_put_signal(struct pl08x_dma_chan *ch); void pl080_put_signal(const struct pl08x_channel_data *cd, int signal);
#endif /* __PLAT_PL080_H */ #endif /* __PLAT_PL080_H */
...@@ -27,9 +27,8 @@ struct { ...@@ -27,9 +27,8 @@ struct {
unsigned char val; unsigned char val;
} signals[16] = {{0, 0}, }; } signals[16] = {{0, 0}, };
int pl080_get_signal(struct pl08x_dma_chan *ch) int pl080_get_signal(const struct pl08x_channel_data *cd)
{ {
const struct pl08x_channel_data *cd = ch->cd;
unsigned int signal = cd->min_signal, val; unsigned int signal = cd->min_signal, val;
unsigned long flags; unsigned long flags;
...@@ -63,18 +62,17 @@ int pl080_get_signal(struct pl08x_dma_chan *ch) ...@@ -63,18 +62,17 @@ int pl080_get_signal(struct pl08x_dma_chan *ch)
return signal; return signal;
} }
void pl080_put_signal(struct pl08x_dma_chan *ch) void pl080_put_signal(const struct pl08x_channel_data *cd, int signal)
{ {
const struct pl08x_channel_data *cd = ch->cd;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&lock, flags); spin_lock_irqsave(&lock, flags);
/* if signal is not used */ /* if signal is not used */
if (!signals[cd->min_signal].busy) if (!signals[signal].busy)
BUG(); BUG();
signals[cd->min_signal].busy--; signals[signal].busy--;
spin_unlock_irqrestore(&lock, flags); spin_unlock_irqrestore(&lock, flags);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment