|
45 | 45 | #define ICDMAER 0x3c /* DMA enable (Gen3) */
|
46 | 46 |
|
47 | 47 | /* ICSCR */
|
48 |
| -#define SDBS (1 << 3) /* slave data buffer select */ |
49 |
| -#define SIE (1 << 2) /* slave interface enable */ |
50 |
| -#define GCAE (1 << 1) /* general call address enable */ |
51 |
| -#define FNA (1 << 0) /* forced non acknowledgment */ |
| 48 | +#define SDBS BIT(3) /* slave data buffer select */ |
| 49 | +#define SIE BIT(2) /* slave interface enable */ |
| 50 | +#define GCAE BIT(1) /* general call address enable */ |
| 51 | +#define FNA BIT(0) /* forced non acknowledgment */ |
52 | 52 |
|
53 | 53 | /* ICMCR */
|
54 |
| -#define MDBS (1 << 7) /* non-fifo mode switch */ |
55 |
| -#define FSCL (1 << 6) /* override SCL pin */ |
56 |
| -#define FSDA (1 << 5) /* override SDA pin */ |
57 |
| -#define OBPC (1 << 4) /* override pins */ |
58 |
| -#define MIE (1 << 3) /* master if enable */ |
59 |
| -#define TSBE (1 << 2) |
60 |
| -#define FSB (1 << 1) /* force stop bit */ |
61 |
| -#define ESG (1 << 0) /* enable start bit gen */ |
| 54 | +#define MDBS BIT(7) /* non-fifo mode switch */ |
| 55 | +#define FSCL BIT(6) /* override SCL pin */ |
| 56 | +#define FSDA BIT(5) /* override SDA pin */ |
| 57 | +#define OBPC BIT(4) /* override pins */ |
| 58 | +#define MIE BIT(3) /* master if enable */ |
| 59 | +#define TSBE BIT(2) |
| 60 | +#define FSB BIT(1) /* force stop bit */ |
| 61 | +#define ESG BIT(0) /* enable start bit gen */ |
62 | 62 |
|
63 | 63 | /* ICSSR (also for ICSIER) */
|
64 |
| -#define GCAR (1 << 6) /* general call received */ |
65 |
| -#define STM (1 << 5) /* slave transmit mode */ |
66 |
| -#define SSR (1 << 4) /* stop received */ |
67 |
| -#define SDE (1 << 3) /* slave data empty */ |
68 |
| -#define SDT (1 << 2) /* slave data transmitted */ |
69 |
| -#define SDR (1 << 1) /* slave data received */ |
70 |
| -#define SAR (1 << 0) /* slave addr received */ |
| 64 | +#define GCAR BIT(6) /* general call received */ |
| 65 | +#define STM BIT(5) /* slave transmit mode */ |
| 66 | +#define SSR BIT(4) /* stop received */ |
| 67 | +#define SDE BIT(3) /* slave data empty */ |
| 68 | +#define SDT BIT(2) /* slave data transmitted */ |
| 69 | +#define SDR BIT(1) /* slave data received */ |
| 70 | +#define SAR BIT(0) /* slave addr received */ |
71 | 71 |
|
72 | 72 | /* ICMSR (also for ICMIE) */
|
73 |
| -#define MNR (1 << 6) /* nack received */ |
74 |
| -#define MAL (1 << 5) /* arbitration lost */ |
75 |
| -#define MST (1 << 4) /* sent a stop */ |
76 |
| -#define MDE (1 << 3) |
77 |
| -#define MDT (1 << 2) |
78 |
| -#define MDR (1 << 1) |
79 |
| -#define MAT (1 << 0) /* slave addr xfer done */ |
| 73 | +#define MNR BIT(6) /* nack received */ |
| 74 | +#define MAL BIT(5) /* arbitration lost */ |
| 75 | +#define MST BIT(4) /* sent a stop */ |
| 76 | +#define MDE BIT(3) |
| 77 | +#define MDT BIT(2) |
| 78 | +#define MDR BIT(1) |
| 79 | +#define MAT BIT(0) /* slave addr xfer done */ |
80 | 80 |
|
81 | 81 | /* ICDMAER */
|
82 |
| -#define RSDMAE (1 << 3) /* DMA Slave Received Enable */ |
83 |
| -#define TSDMAE (1 << 2) /* DMA Slave Transmitted Enable */ |
84 |
| -#define RMDMAE (1 << 1) /* DMA Master Received Enable */ |
85 |
| -#define TMDMAE (1 << 0) /* DMA Master Transmitted Enable */ |
| 82 | +#define RSDMAE BIT(3) /* DMA Slave Received Enable */ |
| 83 | +#define TSDMAE BIT(2) /* DMA Slave Transmitted Enable */ |
| 84 | +#define RMDMAE BIT(1) /* DMA Master Received Enable */ |
| 85 | +#define TMDMAE BIT(0) /* DMA Master Transmitted Enable */ |
86 | 86 |
|
87 | 87 | /* ICFBSCR */
|
88 | 88 | #define TCYC17 0x0f /* 17*Tcyc delay 1st bit between SDA and SCL */
|
|
97 | 97 | #define RCAR_IRQ_RECV (MNR | MAL | MST | MAT | MDR)
|
98 | 98 | #define RCAR_IRQ_STOP (MST)
|
99 | 99 |
|
100 |
| -#define ID_LAST_MSG (1 << 0) |
101 |
| -#define ID_DONE (1 << 2) |
102 |
| -#define ID_ARBLOST (1 << 3) |
103 |
| -#define ID_NACK (1 << 4) |
104 |
| -#define ID_EPROTO (1 << 5) |
| 100 | +#define ID_LAST_MSG BIT(0) |
| 101 | +#define ID_DONE BIT(2) |
| 102 | +#define ID_ARBLOST BIT(3) |
| 103 | +#define ID_NACK BIT(4) |
| 104 | +#define ID_EPROTO BIT(5) |
105 | 105 | /* persistent flags */
|
106 | 106 | #define ID_P_HOST_NOTIFY BIT(28)
|
107 | 107 | #define ID_P_REP_AFTER_RD BIT(29)
|
|
0 commit comments