1
2
3
4
5
6
7
8
9
10
11
12#ifndef _ASM_PROC_DMACTL_REGS_H
13#define _ASM_PROC_DMACTL_REGS_H
14
15#include <asm/cpu-regs.h>
16
17#ifdef __KERNEL__
18
19
20#define DMxCTR(N) __SYSREG(0xd2000000 + ((N) * 0x100), u32)
21#define DMxCTR_BG 0x0000001f
22#define DMxCTR_BG_SOFT 0x00000000
23#define DMxCTR_BG_SC0TX 0x00000002
24#define DMxCTR_BG_SC0RX 0x00000003
25#define DMxCTR_BG_SC1TX 0x00000004
26#define DMxCTR_BG_SC1RX 0x00000005
27#define DMxCTR_BG_SC2TX 0x00000006
28#define DMxCTR_BG_SC2RX 0x00000007
29#define DMxCTR_BG_TM0UFLOW 0x00000008
30#define DMxCTR_BG_TM1UFLOW 0x00000009
31#define DMxCTR_BG_TM2UFLOW 0x0000000a
32#define DMxCTR_BG_TM3UFLOW 0x0000000b
33#define DMxCTR_BG_TM6ACMPCAP 0x0000000c
34#define DMxCTR_BG_AFE 0x0000000d
35#define DMxCTR_BG_ADC 0x0000000e
36#define DMxCTR_BG_IRDA 0x0000000f
37#define DMxCTR_BG_RTC 0x00000010
38#define DMxCTR_BG_XIRQ0 0x00000011
39#define DMxCTR_BG_XIRQ1 0x00000012
40#define DMxCTR_BG_XDMR0 0x00000013
41#define DMxCTR_BG_XDMR1 0x00000014
42#define DMxCTR_SAM 0x000000e0
43#define DMxCTR_SAM_INCR 0x00000000
44#define DMxCTR_SAM_DECR 0x00000020
45#define DMxCTR_SAM_FIXED 0x00000040
46#define DMxCTR_DAM 0x00000000
47#define DMxCTR_DAM_INCR 0x00000000
48#define DMxCTR_DAM_DECR 0x00000100
49#define DMxCTR_DAM_FIXED 0x00000200
50#define DMxCTR_TM 0x00001800
51#define DMxCTR_TM_BATCH 0x00000000
52#define DMxCTR_TM_INTERM 0x00001000
53#define DMxCTR_UT 0x00006000
54#define DMxCTR_UT_1 0x00000000
55#define DMxCTR_UT_2 0x00002000
56#define DMxCTR_UT_4 0x00004000
57#define DMxCTR_UT_16 0x00006000
58#define DMxCTR_TEN 0x00010000
59#define DMxCTR_RQM 0x00060000
60#define DMxCTR_RQM_FALLEDGE 0x00000000
61#define DMxCTR_RQM_RISEEDGE 0x00020000
62#define DMxCTR_RQM_LOLEVEL 0x00040000
63#define DMxCTR_RQM_HILEVEL 0x00060000
64#define DMxCTR_RQF 0x01000000
65#define DMxCTR_XEND 0x80000000
66
67#define DMxSRC(N) __SYSREG(0xd2000004 + ((N) * 0x100), u32)
68
69#define DMxDST(N) __SYSREG(0xd2000008 + ((N) * 0x100), u32)
70
71#define DMxSIZ(N) __SYSREG(0xd200000c + ((N) * 0x100), u32)
72#define DMxSIZ_CT 0x000fffff
73
74#define DMxCYC(N) __SYSREG(0xd2000010 + ((N) * 0x100), u32)
75
76#define DMxCYC_CYC 0x000000ff
77
78#define DM0IRQ 16
79#define DM1IRQ 17
80#define DM2IRQ 18
81#define DM3IRQ 19
82
83#define DM0ICR GxICR(DM0IRQ)
84#define DM1ICR GxICR(DM0IR1)
85#define DM2ICR GxICR(DM0IR2)
86#define DM3ICR GxICR(DM0IR3)
87
88#ifndef __ASSEMBLY__
89
90struct mn10300_dmactl_regs {
91 u32 ctr;
92 const void *src;
93 void *dst;
94 u32 siz;
95 u32 cyc;
96} __attribute__((aligned(0x100)));
97
98#endif
99
100#endif
101
102#endif
103