|
20 | 20 |
|
21 | 21 | /* CGU register offsets */
|
22 | 22 | #define CGU_REG_CLOCKCONTROL 0x00
|
23 |
| -#define CGU_REG_LCR 0x04 |
24 |
| -#define CGU_REG_APLL 0x10 |
25 |
| -#define CGU_REG_MPLL 0x14 |
26 |
| -#define CGU_REG_EPLL 0x18 |
27 |
| -#define CGU_REG_VPLL 0x1c |
28 |
| -#define CGU_REG_CLKGR0 0x20 |
29 |
| -#define CGU_REG_OPCR 0x24 |
30 |
| -#define CGU_REG_CLKGR1 0x28 |
31 |
| -#define CGU_REG_DDRCDR 0x2c |
32 |
| -#define CGU_REG_VPUCDR 0x30 |
33 |
| -#define CGU_REG_USBPCR 0x3c |
34 |
| -#define CGU_REG_USBRDT 0x40 |
35 |
| -#define CGU_REG_USBVBFIL 0x44 |
36 |
| -#define CGU_REG_USBPCR1 0x48 |
37 |
| -#define CGU_REG_LP0CDR 0x54 |
38 |
| -#define CGU_REG_I2SCDR 0x60 |
39 |
| -#define CGU_REG_LP1CDR 0x64 |
40 |
| -#define CGU_REG_MSC0CDR 0x68 |
41 |
| -#define CGU_REG_UHCCDR 0x6c |
42 |
| -#define CGU_REG_SSICDR 0x74 |
43 |
| -#define CGU_REG_CIMCDR 0x7c |
44 |
| -#define CGU_REG_PCMCDR 0x84 |
45 |
| -#define CGU_REG_GPUCDR 0x88 |
46 |
| -#define CGU_REG_HDMICDR 0x8c |
47 |
| -#define CGU_REG_MSC1CDR 0xa4 |
48 |
| -#define CGU_REG_MSC2CDR 0xa8 |
49 |
| -#define CGU_REG_BCHCDR 0xac |
50 |
| -#define CGU_REG_CLOCKSTATUS 0xd4 |
| 23 | +#define CGU_REG_LCR 0x04 |
| 24 | +#define CGU_REG_APLL 0x10 |
| 25 | +#define CGU_REG_MPLL 0x14 |
| 26 | +#define CGU_REG_EPLL 0x18 |
| 27 | +#define CGU_REG_VPLL 0x1c |
| 28 | +#define CGU_REG_CLKGR0 0x20 |
| 29 | +#define CGU_REG_OPCR 0x24 |
| 30 | +#define CGU_REG_CLKGR1 0x28 |
| 31 | +#define CGU_REG_DDRCDR 0x2c |
| 32 | +#define CGU_REG_VPUCDR 0x30 |
| 33 | +#define CGU_REG_USBPCR 0x3c |
| 34 | +#define CGU_REG_USBRDT 0x40 |
| 35 | +#define CGU_REG_USBVBFIL 0x44 |
| 36 | +#define CGU_REG_USBPCR1 0x48 |
| 37 | +#define CGU_REG_LP0CDR 0x54 |
| 38 | +#define CGU_REG_I2SCDR 0x60 |
| 39 | +#define CGU_REG_LP1CDR 0x64 |
| 40 | +#define CGU_REG_MSC0CDR 0x68 |
| 41 | +#define CGU_REG_UHCCDR 0x6c |
| 42 | +#define CGU_REG_SSICDR 0x74 |
| 43 | +#define CGU_REG_CIMCDR 0x7c |
| 44 | +#define CGU_REG_PCMCDR 0x84 |
| 45 | +#define CGU_REG_GPUCDR 0x88 |
| 46 | +#define CGU_REG_HDMICDR 0x8c |
| 47 | +#define CGU_REG_MSC1CDR 0xa4 |
| 48 | +#define CGU_REG_MSC2CDR 0xa8 |
| 49 | +#define CGU_REG_BCHCDR 0xac |
| 50 | +#define CGU_REG_CLOCKSTATUS 0xd4 |
51 | 51 |
|
52 | 52 | /* bits within the OPCR register */
|
53 |
| -#define OPCR_SPENDN0 BIT(7) |
54 |
| -#define OPCR_SPENDN1 BIT(6) |
| 53 | +#define OPCR_SPENDN0 BIT(7) |
| 54 | +#define OPCR_SPENDN1 BIT(6) |
55 | 55 |
|
56 | 56 | /* bits within the USBPCR register */
|
57 |
| -#define USBPCR_USB_MODE BIT(31) |
| 57 | +#define USBPCR_USB_MODE BIT(31) |
58 | 58 | #define USBPCR_IDPULLUP_MASK (0x3 << 28)
|
59 |
| -#define USBPCR_COMMONONN BIT(25) |
60 |
| -#define USBPCR_VBUSVLDEXT BIT(24) |
| 59 | +#define USBPCR_COMMONONN BIT(25) |
| 60 | +#define USBPCR_VBUSVLDEXT BIT(24) |
61 | 61 | #define USBPCR_VBUSVLDEXTSEL BIT(23)
|
62 |
| -#define USBPCR_POR BIT(22) |
63 |
| -#define USBPCR_SIDDQ BIT(21) |
64 |
| -#define USBPCR_OTG_DISABLE BIT(20) |
| 62 | +#define USBPCR_POR BIT(22) |
| 63 | +#define USBPCR_SIDDQ BIT(21) |
| 64 | +#define USBPCR_OTG_DISABLE BIT(20) |
65 | 65 | #define USBPCR_COMPDISTUNE_MASK (0x7 << 17)
|
66 |
| -#define USBPCR_OTGTUNE_MASK (0x7 << 14) |
| 66 | +#define USBPCR_OTGTUNE_MASK (0x7 << 14) |
67 | 67 | #define USBPCR_SQRXTUNE_MASK (0x7 << 11)
|
68 | 68 | #define USBPCR_TXFSLSTUNE_MASK (0xf << 7)
|
69 | 69 | #define USBPCR_TXPREEMPHTUNE BIT(6)
|
|
80 | 80 | #define USBPCR1_REFCLKDIV_48 (0x2 << USBPCR1_REFCLKDIV_SHIFT)
|
81 | 81 | #define USBPCR1_REFCLKDIV_24 (0x1 << USBPCR1_REFCLKDIV_SHIFT)
|
82 | 82 | #define USBPCR1_REFCLKDIV_12 (0x0 << USBPCR1_REFCLKDIV_SHIFT)
|
83 |
| -#define USBPCR1_USB_SEL BIT(28) |
84 |
| -#define USBPCR1_WORD_IF0 BIT(19) |
85 |
| -#define USBPCR1_WORD_IF1 BIT(18) |
| 83 | +#define USBPCR1_USB_SEL BIT(28) |
| 84 | +#define USBPCR1_WORD_IF0 BIT(19) |
| 85 | +#define USBPCR1_WORD_IF1 BIT(18) |
86 | 86 |
|
87 | 87 | /* bits within the USBRDT register */
|
88 |
| -#define USBRDT_VBFIL_LD_EN BIT(25) |
89 |
| -#define USBRDT_USBRDT_MASK 0x7fffff |
| 88 | +#define USBRDT_VBFIL_LD_EN BIT(25) |
| 89 | +#define USBRDT_USBRDT_MASK 0x7fffff |
90 | 90 |
|
91 | 91 | /* bits within the USBVBFIL register */
|
92 | 92 | #define USBVBFIL_IDDIGFIL_SHIFT 16
|
93 | 93 | #define USBVBFIL_IDDIGFIL_MASK (0xffff << USBVBFIL_IDDIGFIL_SHIFT)
|
94 | 94 | #define USBVBFIL_USBVBFIL_MASK (0xffff)
|
95 | 95 |
|
96 | 96 | /* bits within the LCR register */
|
97 |
| -#define LCR_PD_SCPU BIT(31) |
98 |
| -#define LCR_SCPUS BIT(27) |
| 97 | +#define LCR_PD_SCPU BIT(31) |
| 98 | +#define LCR_SCPUS BIT(27) |
99 | 99 |
|
100 | 100 | /* bits within the CLKGR1 register */
|
101 |
| -#define CLKGR1_CORE1 BIT(15) |
| 101 | +#define CLKGR1_CORE1 BIT(15) |
102 | 102 |
|
103 | 103 | static struct ingenic_cgu *cgu;
|
104 | 104 |
|
|
0 commit comments