summaryrefslogtreecommitdiff
path: root/arch/sh/drivers/dma
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers/dma')
-rw-r--r--arch/sh/drivers/dma/Kconfig20
-rw-r--r--arch/sh/drivers/dma/dma-api.c7
2 files changed, 6 insertions, 21 deletions
diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig
index 99935f9daf4b..ee711431e504 100644
--- a/arch/sh/drivers/dma/Kconfig
+++ b/arch/sh/drivers/dma/Kconfig
@@ -5,12 +5,13 @@ config SH_DMA_API
config SH_DMA
bool "SuperH on-chip DMA controller (DMAC) support"
+ depends on CPU_SH3 || CPU_SH4
select SH_DMA_API
default n
config NR_ONCHIP_DMA_CHANNELS
+ int
depends on SH_DMA
- int "Number of on-chip DMAC channels"
default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R
default "12" if CPU_SUBTYPE_SH7780
default "4"
@@ -36,23 +37,6 @@ config NR_DMA_CHANNELS
support. Setting this to a higher value allows for cascading DMACs
with additional channels.
-config DMA_PAGE_OPS
- bool "Use DMAC for page copy/clear"
- depends on SH_DMA && BROKEN
- help
- Selecting this option will use a dual-address mode configured channel
- in the SH DMAC for copy_page()/clear_page(). Primarily a performance
- hack.
-
-config DMA_PAGE_OPS_CHANNEL
- depends on DMA_PAGE_OPS
- int "DMA channel for sh memory-manager page copy/clear"
- default "3"
- help
- This allows the specification of the dual address dma channel,
- in case channel 3 is unavailable. On the SH4, channels 1,2, and 3
- are dual-address capable.
-
config SH_DMABRG
bool "SH7760 DMABRG support"
depends on CPU_SUBTYPE_SH7760
diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c
index cf8e11994330..76ed816d9a24 100644
--- a/arch/sh/drivers/dma/dma-api.c
+++ b/arch/sh/drivers/dma/dma-api.c
@@ -31,8 +31,8 @@ struct dma_info *get_dma_info(unsigned int chan)
* the channel is.
*/
list_for_each_entry(info, &registered_dmac_list, list) {
- if ((chan < info->first_channel_nr) ||
- (chan >= info->first_channel_nr + info->nr_channels))
+ if ((chan < info->first_vchannel_nr) ||
+ (chan >= info->first_vchannel_nr + info->nr_channels))
continue;
return info;
@@ -82,7 +82,7 @@ struct dma_channel *get_dma_channel(unsigned int chan)
for (i = 0; i < info->nr_channels; i++) {
channel = &info->channels[i];
- if (channel->chan == chan)
+ if (channel->vchan == chan)
return channel;
}
@@ -369,6 +369,7 @@ int register_dmac(struct dma_info *info)
}
total_channels = get_nr_channels();
+ info->first_vchannel_nr = total_channels;
for (i = 0; i < info->nr_channels; i++) {
struct dma_channel *chan = &info->channels[i];