2 * arch/sh/include/asm/dma-sh.h
4 * Copyright (C) 2000 Takashi YOSHII
5 * Copyright (C) 2003 Paul Mundt
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
14 #include <asm/dma-register.h>
15 #include <cpu/dma-register.h>
18 /* DMAOR contorl: The DMAOR access size is different by CPU.*/
19 #if defined(CONFIG_CPU_SUBTYPE_SH7723) || \
20 defined(CONFIG_CPU_SUBTYPE_SH7724) || \
21 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
22 defined(CONFIG_CPU_SUBTYPE_SH7785)
23 #define dmaor_read_reg(n) \
24 (n ? __raw_readw(SH_DMAC_BASE1 + DMAOR) \
25 : __raw_readw(SH_DMAC_BASE0 + DMAOR))
26 #define dmaor_write_reg(n, data) \
27 (n ? __raw_writew(data, SH_DMAC_BASE1 + DMAOR) \
28 : __raw_writew(data, SH_DMAC_BASE0 + DMAOR))
30 #define dmaor_read_reg(n) __raw_readw(SH_DMAC_BASE0 + DMAOR)
31 #define dmaor_write_reg(n, data) __raw_writew(data, SH_DMAC_BASE0 + DMAOR)
34 static int dmte_irq_map
[] __maybe_unused
= {
35 #if (MAX_DMA_CHANNELS >= 4)
41 #if (MAX_DMA_CHANNELS >= 6)
45 #if (MAX_DMA_CHANNELS >= 8)
49 #if (MAX_DMA_CHANNELS >= 12)
58 * Define the default configuration for dual address memory-memory transfer.
59 * The 0x400 value represents auto-request, external->external.
61 #define RS_DUAL (DM_INC | SM_INC | 0x400 | TS_INDEX2VAL(XMIT_SZ_32BIT))
63 /* DMA base address */
64 static u32 dma_base_addr
[] __maybe_unused
= {
65 #if (MAX_DMA_CHANNELS >= 4)
66 SH_DMAC_BASE0
+ 0x00, /* channel 0 */
71 #if (MAX_DMA_CHANNELS >= 6)
75 #if (MAX_DMA_CHANNELS >= 8)
79 #if (MAX_DMA_CHANNELS >= 12)
83 SH_DMAC_BASE1
+ 0x60, /* channel 11 */
87 #endif /* __DMA_SH_H */