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) || defined(CONFIG_CPU_SUBTYPE_SH7724) || \
20 defined(CONFIG_CPU_SUBTYPE_SH7780) || defined(CONFIG_CPU_SUBTYPE_SH7785)
21 #define dmaor_read_reg(n) \
22 (n ? __raw_readw(SH_DMAC_BASE1 + DMAOR) \
23 : __raw_readw(SH_DMAC_BASE0 + DMAOR))
24 #define dmaor_write_reg(n, data) \
25 (n ? __raw_writew(data, SH_DMAC_BASE1 + DMAOR) \
26 : __raw_writew(data, SH_DMAC_BASE0 + DMAOR))
28 #define dmaor_read_reg(n) __raw_readw(SH_DMAC_BASE0 + DMAOR)
29 #define dmaor_write_reg(n, data) __raw_writew(data, SH_DMAC_BASE0 + DMAOR)
32 static int dmte_irq_map
[] __maybe_unused
= {
33 #if (MAX_DMA_CHANNELS >= 4)
39 #if (MAX_DMA_CHANNELS >= 6)
43 #if (MAX_DMA_CHANNELS >= 8)
47 #if (MAX_DMA_CHANNELS >= 12)
56 * Define the default configuration for dual address memory-memory transfer.
57 * The 0x400 value represents auto-request, external->external.
59 #define RS_DUAL (DM_INC | SM_INC | 0x400 | TS_INDEX2VAL(XMIT_SZ_32BIT))
61 /* DMA base address */
62 static u32 dma_base_addr
[] __maybe_unused
= {
63 #if (MAX_DMA_CHANNELS >= 4)
64 SH_DMAC_BASE0
+ 0x00, /* channel 0 */
69 #if (MAX_DMA_CHANNELS >= 6)
73 #if (MAX_DMA_CHANNELS >= 8)
77 #if (MAX_DMA_CHANNELS >= 12)
81 SH_DMAC_BASE1
+ 0x60, /* channel 11 */
85 #endif /* __DMA_SH_H */