SyterKit
0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
include
drivers
reg
reg-dma.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0+ */
2
3
#ifndef __REG_DMA_H__
4
#define __REG_DMA_H__
5
6
#include <
reg-ncat.h
>
7
8
#ifdef __cplusplus
9
extern
"C"
{
10
#endif
// __cplusplus
11
12
#define SUNXI_DMA_CHANNEL_BASE (SUNXI_DMA_BASE + 0x100)
13
#define DMA_AUTO_GATE_REG (SUNXI_DMA_BASE + 0x28)
14
15
#define SUNXI_DMA_CHANNEL_SIZE (0x40)
16
#define SUNXI_DMA_LINK_NULL (0xfffff800)
17
18
#define DMAC_DMATYPE_NORMAL 0
19
#define DMAC_CFG_TYPE_DRAM (1)
20
#define DMAC_CFG_TYPE_SRAM (0)
21
22
#define DMAC_CFG_TYPE_SPI0 (22)
23
#define DMAC_CFG_TYPE_SHMC0 (20)
24
#define DMAC_CFG_SRC_TYPE_NAND (5)
25
26
/* DMA base config */
27
#define DMAC_CFG_CONTINUOUS_ENABLE (0x01)
28
#define DMAC_CFG_CONTINUOUS_DISABLE (0x00)
29
30
/* DMA dest width config */
31
#define DMAC_CFG_DEST_DATA_WIDTH_8BIT (0x00)
32
#define DMAC_CFG_DEST_DATA_WIDTH_16BIT (0x01)
33
#define DMAC_CFG_DEST_DATA_WIDTH_32BIT (0x02)
34
#define DMAC_CFG_DEST_DATA_WIDTH_64BIT (0x03)
35
36
/* DMA dest bust config */
37
#define DMAC_CFG_DEST_1_BURST (0x00)
38
#define DMAC_CFG_DEST_4_BURST (0x01)
39
#define DMAC_CFG_DEST_8_BURST (0x02)
40
#define DMAC_CFG_DEST_16_BURST (0x03)
41
42
#define DMAC_CFG_DEST_ADDR_TYPE_LINEAR_MODE (0x00)
43
#define DMAC_CFG_DEST_ADDR_TYPE_IO_MODE (0x01)
44
45
/* DMA src config */
46
#define DMAC_CFG_SRC_DATA_WIDTH_8BIT (0x00)
47
#define DMAC_CFG_SRC_DATA_WIDTH_16BIT (0x01)
48
#define DMAC_CFG_SRC_DATA_WIDTH_32BIT (0x02)
49
#define DMAC_CFG_SRC_DATA_WIDTH_64BIT (0x03)
50
51
#define DMAC_CFG_SRC_1_BURST (0x00)
52
#define DMAC_CFG_SRC_4_BURST (0x01)
53
#define DMAC_CFG_SRC_8_BURST (0x02)
54
#define DMAC_CFG_SRC_16_BURST (0x03)
55
56
#define DMAC_CFG_SRC_ADDR_TYPE_LINEAR_MODE (0x00)
57
#define DMAC_CFG_SRC_ADDR_TYPE_IO_MODE (0x01)
58
59
/* DMA int config */
60
#define DMA_PKG_HALF_INT (1 << 0)
61
#define DMA_PKG_END_INT (1 << 1)
62
#define DMA_QUEUE_END_INT (1 << 2)
63
64
#ifdef __cplusplus
65
}
66
#endif
// __cplusplus
67
68
#endif
// __REG_DMA_H__
reg-ncat.h
Generated by
1.9.8