|
34 | 34 | * Also check the comments in the interrupt routines for some gory details.
|
35 | 35 | */
|
36 | 36 |
|
| 37 | +#include <linux/bits.h> |
37 | 38 | #include <linux/clk.h>
|
38 | 39 | #include <linux/completion.h>
|
39 | 40 | #include <linux/err.h>
|
|
46 | 47 | #include <linux/pm_runtime.h>
|
47 | 48 | #include <linux/reset.h>
|
48 | 49 |
|
49 |
| -#define ICCR1_ICE 0x80 |
50 |
| -#define ICCR1_IICRST 0x40 |
51 |
| -#define ICCR1_SOWP 0x10 |
| 50 | +#define ICCR1_ICE BIT(7) |
| 51 | +#define ICCR1_IICRST BIT(6) |
| 52 | +#define ICCR1_SOWP BIT(4) |
52 | 53 |
|
53 |
| -#define ICCR2_BBSY 0x80 |
54 |
| -#define ICCR2_SP 0x08 |
55 |
| -#define ICCR2_RS 0x04 |
56 |
| -#define ICCR2_ST 0x02 |
| 54 | +#define ICCR2_BBSY BIT(7) |
| 55 | +#define ICCR2_SP BIT(3) |
| 56 | +#define ICCR2_RS BIT(2) |
| 57 | +#define ICCR2_ST BIT(1) |
57 | 58 |
|
58 | 59 | #define ICMR1_CKS_MASK 0x70
|
59 |
| -#define ICMR1_BCWP 0x08 |
| 60 | +#define ICMR1_BCWP BIT(3) |
60 | 61 | #define ICMR1_CKS(_x) ((((_x) << 4) & ICMR1_CKS_MASK) | ICMR1_BCWP)
|
61 | 62 |
|
62 |
| -#define ICMR3_RDRFS 0x20 |
63 |
| -#define ICMR3_ACKWP 0x10 |
64 |
| -#define ICMR3_ACKBT 0x08 |
| 63 | +#define ICMR3_RDRFS BIT(5) |
| 64 | +#define ICMR3_ACKWP BIT(4) |
| 65 | +#define ICMR3_ACKBT BIT(3) |
65 | 66 |
|
66 |
| -#define ICFER_FMPE 0x80 |
| 67 | +#define ICFER_FMPE BIT(7) |
67 | 68 |
|
68 |
| -#define ICIER_TIE 0x80 |
69 |
| -#define ICIER_TEIE 0x40 |
70 |
| -#define ICIER_RIE 0x20 |
71 |
| -#define ICIER_NAKIE 0x10 |
72 |
| -#define ICIER_SPIE 0x08 |
| 69 | +#define ICIER_TIE BIT(7) |
| 70 | +#define ICIER_TEIE BIT(6) |
| 71 | +#define ICIER_RIE BIT(5) |
| 72 | +#define ICIER_NAKIE BIT(4) |
| 73 | +#define ICIER_SPIE BIT(3) |
73 | 74 |
|
74 |
| -#define ICSR2_NACKF 0x10 |
| 75 | +#define ICSR2_NACKF BIT(4) |
75 | 76 |
|
76 | 77 | #define ICBR_RESERVED 0xe0 /* Should be 1 on writes */
|
77 | 78 |
|
|
0 commit comments