|
38 | 38 | #define PL080_SOFT_LSREQ (0x2C) |
39 | 39 |
|
40 | 40 | #define PL080_CONFIG (0x30) |
41 | | -#define PL080_CONFIG_M2_BE (1 << 2) |
42 | | -#define PL080_CONFIG_M1_BE (1 << 1) |
43 | | -#define PL080_CONFIG_ENABLE (1 << 0) |
| 41 | +#define PL080_CONFIG_M2_BE BIT(2) |
| 42 | +#define PL080_CONFIG_M1_BE BIT(1) |
| 43 | +#define PL080_CONFIG_ENABLE BIT(0) |
44 | 44 |
|
45 | 45 | #define PL080_SYNC (0x34) |
46 | 46 |
|
47 | 47 | /* Per channel configuration registers */ |
48 | 48 |
|
49 | | -#define PL080_Cx_STRIDE (0x20) |
| 49 | +/* Per channel configuration registers */ |
50 | 50 | #define PL080_Cx_BASE(x) ((0x100 + (x * 0x20))) |
51 | | -#define PL080_Cx_SRC_ADDR(x) ((0x100 + (x * 0x20))) |
52 | | -#define PL080_Cx_DST_ADDR(x) ((0x104 + (x * 0x20))) |
53 | | -#define PL080_Cx_LLI(x) ((0x108 + (x * 0x20))) |
54 | | -#define PL080_Cx_CONTROL(x) ((0x10C + (x * 0x20))) |
55 | | -#define PL080_Cx_CONFIG(x) ((0x110 + (x * 0x20))) |
56 | | -#define PL080S_Cx_CONTROL2(x) ((0x110 + (x * 0x20))) |
57 | | -#define PL080S_Cx_CONFIG(x) ((0x114 + (x * 0x20))) |
58 | | - |
59 | 51 | #define PL080_CH_SRC_ADDR (0x00) |
60 | 52 | #define PL080_CH_DST_ADDR (0x04) |
61 | 53 | #define PL080_CH_LLI (0x08) |
|
66 | 58 |
|
67 | 59 | #define PL080_LLI_ADDR_MASK (0x3fffffff << 2) |
68 | 60 | #define PL080_LLI_ADDR_SHIFT (2) |
69 | | -#define PL080_LLI_LM_AHB2 (1 << 0) |
| 61 | +#define PL080_LLI_LM_AHB2 BIT(0) |
70 | 62 |
|
71 | | -#define PL080_CONTROL_TC_IRQ_EN (1 << 31) |
| 63 | +#define PL080_CONTROL_TC_IRQ_EN BIT(31) |
72 | 64 | #define PL080_CONTROL_PROT_MASK (0x7 << 28) |
73 | 65 | #define PL080_CONTROL_PROT_SHIFT (28) |
74 | | -#define PL080_CONTROL_PROT_CACHE (1 << 30) |
75 | | -#define PL080_CONTROL_PROT_BUFF (1 << 29) |
76 | | -#define PL080_CONTROL_PROT_SYS (1 << 28) |
77 | | -#define PL080_CONTROL_DST_INCR (1 << 27) |
78 | | -#define PL080_CONTROL_SRC_INCR (1 << 26) |
79 | | -#define PL080_CONTROL_DST_AHB2 (1 << 25) |
80 | | -#define PL080_CONTROL_SRC_AHB2 (1 << 24) |
| 66 | +#define PL080_CONTROL_PROT_CACHE BIT(30) |
| 67 | +#define PL080_CONTROL_PROT_BUFF BIT(29) |
| 68 | +#define PL080_CONTROL_PROT_SYS BIT(28) |
| 69 | +#define PL080_CONTROL_DST_INCR BIT(27) |
| 70 | +#define PL080_CONTROL_SRC_INCR BIT(26) |
| 71 | +#define PL080_CONTROL_DST_AHB2 BIT(25) |
| 72 | +#define PL080_CONTROL_SRC_AHB2 BIT(24) |
81 | 73 | #define PL080_CONTROL_DWIDTH_MASK (0x7 << 21) |
82 | 74 | #define PL080_CONTROL_DWIDTH_SHIFT (21) |
83 | 75 | #define PL080_CONTROL_SWIDTH_MASK (0x7 << 18) |
|
103 | 95 | #define PL080_WIDTH_16BIT (0x1) |
104 | 96 | #define PL080_WIDTH_32BIT (0x2) |
105 | 97 |
|
106 | | -#define PL080N_CONFIG_ITPROT (1 << 20) |
107 | | -#define PL080N_CONFIG_SECPROT (1 << 19) |
108 | | -#define PL080_CONFIG_HALT (1 << 18) |
109 | | -#define PL080_CONFIG_ACTIVE (1 << 17) /* RO */ |
110 | | -#define PL080_CONFIG_LOCK (1 << 16) |
111 | | -#define PL080_CONFIG_TC_IRQ_MASK (1 << 15) |
112 | | -#define PL080_CONFIG_ERR_IRQ_MASK (1 << 14) |
| 98 | +#define PL080N_CONFIG_ITPROT BIT(20) |
| 99 | +#define PL080N_CONFIG_SECPROT BIT(19) |
| 100 | +#define PL080_CONFIG_HALT BIT(18) |
| 101 | +#define PL080_CONFIG_ACTIVE BIT(17) /* RO */ |
| 102 | +#define PL080_CONFIG_LOCK BIT(16) |
| 103 | +#define PL080_CONFIG_TC_IRQ_MASK BIT(15) |
| 104 | +#define PL080_CONFIG_ERR_IRQ_MASK BIT(14) |
113 | 105 | #define PL080_CONFIG_FLOW_CONTROL_MASK (0x7 << 11) |
114 | 106 | #define PL080_CONFIG_FLOW_CONTROL_SHIFT (11) |
115 | 107 | #define PL080_CONFIG_DST_SEL_MASK (0xf << 6) |
116 | 108 | #define PL080_CONFIG_DST_SEL_SHIFT (6) |
117 | 109 | #define PL080_CONFIG_SRC_SEL_MASK (0xf << 1) |
118 | 110 | #define PL080_CONFIG_SRC_SEL_SHIFT (1) |
119 | | -#define PL080_CONFIG_ENABLE (1 << 0) |
| 111 | +#define PL080_CONFIG_ENABLE BIT(0) |
120 | 112 |
|
121 | 113 | #define PL080_FLOW_MEM2MEM (0x0) |
122 | 114 | #define PL080_FLOW_MEM2PER (0x1) |
|
0 commit comments