Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea071cc7 authored by Manuel Lauss's avatar Manuel Lauss Committed by Ralf Baechle
Browse files

MIPS: Alchemy: remove dbdma compat macros



Remove dbdma compat macros, move remaining users over to default
queueing functions and -flags.

(Queueing function signature has changed in order to give
 a build failure instead of silent functional changes due
 to the no longer implicitly specified DDMA_FLAGS_IE flag)

Signed-off-by: default avatarManuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent f1fc6645
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -571,7 +571,7 @@ EXPORT_SYMBOL(au1xxx_dbdma_ring_alloc);
 * This updates the source pointer and byte count.  Normally used
 * This updates the source pointer and byte count.  Normally used
 * for memory to fifo transfers.
 * for memory to fifo transfers.
 */
 */
u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags)
u32 au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags)
{
{
	chan_tab_t		*ctp;
	chan_tab_t		*ctp;
	au1x_ddma_desc_t	*dp;
	au1x_ddma_desc_t	*dp;
@@ -624,14 +624,13 @@ u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags)
	/* Return something non-zero. */
	/* Return something non-zero. */
	return nbytes;
	return nbytes;
}
}
EXPORT_SYMBOL(_au1xxx_dbdma_put_source);
EXPORT_SYMBOL(au1xxx_dbdma_put_source);


/* Put a destination buffer into the DMA ring.
/* Put a destination buffer into the DMA ring.
 * This updates the destination pointer and byte count.  Normally used
 * This updates the destination pointer and byte count.  Normally used
 * to place an empty buffer into the ring for fifo to memory transfers.
 * to place an empty buffer into the ring for fifo to memory transfers.
 */
 */
u32
u32 au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags)
_au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags)
{
{
	chan_tab_t		*ctp;
	chan_tab_t		*ctp;
	au1x_ddma_desc_t	*dp;
	au1x_ddma_desc_t	*dp;
@@ -687,7 +686,7 @@ _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags)
	/* Return something non-zero. */
	/* Return something non-zero. */
	return nbytes;
	return nbytes;
}
}
EXPORT_SYMBOL(_au1xxx_dbdma_put_dest);
EXPORT_SYMBOL(au1xxx_dbdma_put_dest);


/*
/*
 * Get a destination buffer into the DMA ring.
 * Get a destination buffer into the DMA ring.
+2 −21
Original line number Original line Diff line number Diff line
@@ -339,8 +339,8 @@ u32 au1xxx_dbdma_set_devwidth(u32 chanid, int bits);
u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries);
u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries);


/* Put buffers on source/destination descriptors. */
/* Put buffers on source/destination descriptors. */
u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags);
u32 au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags);
u32 _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags);
u32 au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags);


/* Get a buffer from the destination descriptor. */
/* Get a buffer from the destination descriptor. */
u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes);
u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes);
@@ -363,25 +363,6 @@ void au1xxx_dbdma_suspend(void);
void au1xxx_dbdma_resume(void);
void au1xxx_dbdma_resume(void);
#endif
#endif



/*
 * Some compatibilty macros -- needed to make changes to API
 * without breaking existing drivers.
 */
#define au1xxx_dbdma_put_source(chanid, buf, nbytes)			\
	_au1xxx_dbdma_put_source(chanid, buf, nbytes, DDMA_FLAGS_IE)
#define au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags)	\
	_au1xxx_dbdma_put_source(chanid, buf, nbytes, flags)
#define put_source_flags(chanid, buf, nbytes, flags)			\
	au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags)

#define au1xxx_dbdma_put_dest(chanid, buf, nbytes)			\
	_au1xxx_dbdma_put_dest(chanid, buf, nbytes, DDMA_FLAGS_IE)
#define au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags) 	\
	_au1xxx_dbdma_put_dest(chanid, buf, nbytes, flags)
#define put_dest_flags(chanid, buf, nbytes, flags)			\
	au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags)

/*
/*
 *	Flags for the put_source/put_dest functions.
 *	Flags for the put_source/put_dest functions.
 */
 */
+9 −12
Original line number Original line Diff line number Diff line
@@ -56,8 +56,8 @@ static inline void auide_insw(unsigned long port, void *addr, u32 count)
	chan_tab_t *ctp;
	chan_tab_t *ctp;
	au1x_ddma_desc_t *dp;
	au1x_ddma_desc_t *dp;


	if(!put_dest_flags(ahwif->rx_chan, (void*)addr, count << 1, 
	if (!au1xxx_dbdma_put_dest(ahwif->rx_chan, (void*)addr,
			   DDMA_FLAGS_NOIE)) {
				   count << 1, DDMA_FLAGS_NOIE)) {
		printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
		printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
		return;
		return;
	}
	}
@@ -74,7 +74,7 @@ static inline void auide_outsw(unsigned long port, void *addr, u32 count)
	chan_tab_t *ctp;
	chan_tab_t *ctp;
	au1x_ddma_desc_t *dp;
	au1x_ddma_desc_t *dp;


	if(!put_source_flags(ahwif->tx_chan, (void*)addr,
	if (!au1xxx_dbdma_put_source(ahwif->tx_chan, (void*)addr,
				     count << 1, DDMA_FLAGS_NOIE)) {
				     count << 1, DDMA_FLAGS_NOIE)) {
		printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
		printk(KERN_ERR "%s failed %d\n", __func__, __LINE__);
		return;
		return;
@@ -246,17 +246,14 @@ static int auide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)
				flags = DDMA_FLAGS_NOIE;
				flags = DDMA_FLAGS_NOIE;


			if (iswrite) {
			if (iswrite) {
				if(!put_source_flags(ahwif->tx_chan, 
				if (!au1xxx_dbdma_put_source(ahwif->tx_chan,
						     (void*) sg_virt(sg),
					(void *)sg_virt(sg), tc, flags)) {
						     tc, flags)) { 
					printk(KERN_ERR "%s failed %d\n", 
					printk(KERN_ERR "%s failed %d\n", 
					       __func__, __LINE__);
					       __func__, __LINE__);
				}
				}
			} else 
			} else  {
			{
				if (!au1xxx_dbdma_put_dest(ahwif->rx_chan,
				if(!put_dest_flags(ahwif->rx_chan, 
					(void *)sg_virt(sg), tc, flags)) {
						   (void*) sg_virt(sg),
						   tc, flags)) { 
					printk(KERN_ERR "%s failed %d\n", 
					printk(KERN_ERR "%s failed %d\n", 
					       __func__, __LINE__);
					       __func__, __LINE__);
				}
				}
+2 −2
Original line number Original line Diff line number Diff line
@@ -650,10 +650,10 @@ static int au1xmmc_prepare_data(struct au1xmmc_host *host,
				flags = DDMA_FLAGS_IE;
				flags = DDMA_FLAGS_IE;


			if (host->flags & HOST_F_XMIT) {
			if (host->flags & HOST_F_XMIT) {
				ret = au1xxx_dbdma_put_source_flags(channel,
				ret = au1xxx_dbdma_put_source(channel,
					(void *)sg_virt(sg), len, flags);
					(void *)sg_virt(sg), len, flags);
			} else {
			} else {
				ret = au1xxx_dbdma_put_dest_flags(channel,
				ret = au1xxx_dbdma_put_dest(channel,
					(void *)sg_virt(sg), len, flags);
					(void *)sg_virt(sg), len, flags);
			}
			}


+4 −2
Original line number Original line Diff line number Diff line
@@ -412,11 +412,13 @@ static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t)
	}
	}


	/* put buffers on the ring */
	/* put buffers on the ring */
	res = au1xxx_dbdma_put_dest(hw->dma_rx_ch, hw->rx, t->len);
	res = au1xxx_dbdma_put_dest(hw->dma_rx_ch, hw->rx,
				    t->len, DDMA_FLAGS_IE);
	if (!res)
	if (!res)
		dev_err(hw->dev, "rx dma put dest error\n");
		dev_err(hw->dev, "rx dma put dest error\n");


	res = au1xxx_dbdma_put_source(hw->dma_tx_ch, (void *)hw->tx, t->len);
	res = au1xxx_dbdma_put_source(hw->dma_tx_ch, (void *)hw->tx,
				      t->len, DDMA_FLAGS_IE);
	if (!res)
	if (!res)
		dev_err(hw->dev, "tx dma put source error\n");
		dev_err(hw->dev, "tx dma put source error\n");


Loading