sh: define DMA slaves per CPU type, remove now redundant header

Now that DMA slave IDs are only used used in platform specific code and have
become opaque cookies for the rest of the code, we can make the, CPU specific
too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Guennadi Liakhovetski 2010-05-19 18:33:54 +00:00 committed by Paul Mundt
parent 2d15124828
commit 10440af1bc
10 changed files with 42 additions and 48 deletions

View File

@ -1,34 +0,0 @@
/*
* Header for the new SH dmaengine driver
*
* Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ASM_DMAENGINE_H
#define ASM_DMAENGINE_H
#include <linux/sh_dma.h>
enum {
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
SHDMA_SLAVE_SCIF1_RX,
SHDMA_SLAVE_SCIF2_TX,
SHDMA_SLAVE_SCIF2_RX,
SHDMA_SLAVE_SCIF3_TX,
SHDMA_SLAVE_SCIF3_RX,
SHDMA_SLAVE_SCIF4_TX,
SHDMA_SLAVE_SCIF4_RX,
SHDMA_SLAVE_SCIF5_TX,
SHDMA_SLAVE_SCIF5_RX,
SHDMA_SLAVE_SIUA_TX,
SHDMA_SLAVE_SIUA_RX,
SHDMA_SLAVE_SIUB_TX,
SHDMA_SLAVE_SIUB_RX,
};
#endif

View File

@ -11,8 +11,6 @@
#ifndef ASM_SIU_H
#define ASM_SIU_H
#include <asm/dmaengine.h>
struct device;
struct siu_platform {

View File

@ -235,4 +235,19 @@ enum {
HWBLK_NR,
};
enum {
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
SHDMA_SLAVE_SCIF1_RX,
SHDMA_SLAVE_SCIF2_TX,
SHDMA_SLAVE_SCIF2_RX,
SHDMA_SLAVE_SIUA_TX,
SHDMA_SLAVE_SIUA_RX,
SHDMA_SLAVE_SIUB_TX,
SHDMA_SLAVE_SIUB_RX,
SHDMA_SLAVE_SDHI0_TX,
SHDMA_SLAVE_SDHI0_RX,
};
#endif /* __ASM_SH7722_H__ */

View File

@ -283,4 +283,23 @@ enum {
HWBLK_NR,
};
enum {
SHDMA_SLAVE_SCIF0_TX,
SHDMA_SLAVE_SCIF0_RX,
SHDMA_SLAVE_SCIF1_TX,
SHDMA_SLAVE_SCIF1_RX,
SHDMA_SLAVE_SCIF2_TX,
SHDMA_SLAVE_SCIF2_RX,
SHDMA_SLAVE_SCIF3_TX,
SHDMA_SLAVE_SCIF3_RX,
SHDMA_SLAVE_SCIF4_TX,
SHDMA_SLAVE_SCIF4_RX,
SHDMA_SLAVE_SCIF5_TX,
SHDMA_SLAVE_SCIF5_RX,
SHDMA_SLAVE_SDHI0_TX,
SHDMA_SLAVE_SDHI0_RX,
SHDMA_SLAVE_SDHI1_TX,
SHDMA_SLAVE_SDHI1_RX,
};
#endif /* __ASM_SH7724_H__ */

View File

@ -17,7 +17,6 @@
#include <linux/usb/m66592.h>
#include <asm/clock.h>
#include <asm/dmaengine.h>
#include <asm/mmzone.h>
#include <asm/siu.h>

View File

@ -18,13 +18,13 @@
#include <linux/mm.h>
#include <linux/serial_sci.h>
#include <linux/uio_driver.h>
#include <linux/sh_dma.h>
#include <linux/sh_timer.h>
#include <linux/io.h>
#include <linux/notifier.h>
#include <asm/suspend.h>
#include <asm/clock.h>
#include <asm/dmaengine.h>
#include <asm/mmzone.h>
#include <cpu/dma-register.h>

View File

@ -12,10 +12,9 @@
#include <linux/serial.h>
#include <linux/io.h>
#include <linux/serial_sci.h>
#include <linux/sh_dma.h>
#include <linux/sh_timer.h>
#include <asm/dmaengine.h>
#include <cpu/dma-register.h>
static struct plat_sci_port scif0_platform_data = {

View File

@ -13,9 +13,9 @@
#include <linux/serial_sci.h>
#include <linux/io.h>
#include <linux/mm.h>
#include <linux/sh_dma.h>
#include <linux/sh_timer.h>
#include <asm/dmaengine.h>
#include <asm/mmzone.h>
#include <cpu/dma-register.h>

View File

@ -71,8 +71,7 @@ struct siu_firmware {
#include <linux/dmaengine.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <asm/dmaengine.h>
#include <linux/sh_dma.h>
#include <sound/core.h>
#include <sound/pcm.h>

View File

@ -31,7 +31,6 @@
#include <sound/pcm_params.h>
#include <sound/soc-dai.h>
#include <asm/dmaengine.h>
#include <asm/siu.h>
#include "siu.h"
@ -358,13 +357,13 @@ static int siu_pcm_open(struct snd_pcm_substream *ss)
if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) {
siu_stream = &port_info->playback;
param = &siu_stream->param;
param->slave_id = port ? SHDMA_SLAVE_SIUB_TX :
SHDMA_SLAVE_SIUA_TX;
param->slave_id = port ? pdata->dma_slave_tx_b :
pdata->dma_slave_tx_a;
} else {
siu_stream = &port_info->capture;
param = &siu_stream->param;
param->slave_id = port ? SHDMA_SLAVE_SIUB_RX :
SHDMA_SLAVE_SIUA_RX;
param->slave_id = port ? pdata->dma_slave_rx_b :
pdata->dma_slave_rx_a;
}
param->dma_dev = pdata->dma_dev;