ARM: spear: update for PL08x dma engine changes

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Russell King 2012-06-08 09:46:23 +01:00
parent aeea1808fe
commit a8fb688e1d
2 changed files with 7 additions and 9 deletions

View File

@ -14,8 +14,8 @@
#ifndef __PLAT_PL080_H
#define __PLAT_PL080_H
struct pl08x_dma_chan;
int pl080_get_signal(struct pl08x_dma_chan *ch);
void pl080_put_signal(struct pl08x_dma_chan *ch);
struct pl08x_channel_data;
int pl080_get_signal(const struct pl08x_channel_data *cd);
void pl080_put_signal(const struct pl08x_channel_data *cd, int signal);
#endif /* __PLAT_PL080_H */

View File

@ -27,9 +27,8 @@ struct {
unsigned char val;
} 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 long flags;
@ -63,18 +62,17 @@ int pl080_get_signal(struct pl08x_dma_chan *ch)
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;
spin_lock_irqsave(&lock, flags);
/* if signal is not used */
if (!signals[cd->min_signal].busy)
if (!signals[signal].busy)
BUG();
signals[cd->min_signal].busy--;
signals[signal].busy--;
spin_unlock_irqrestore(&lock, flags);
}