diff options
-rw-r--r-- | arch/arm/plat-pxa/include/plat/ssp.h | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/arch/arm/plat-pxa/include/plat/ssp.h b/arch/arm/plat-pxa/include/plat/ssp.h index 4c4ce62390d0..74f70c7cc4f0 100644 --- a/arch/arm/plat-pxa/include/plat/ssp.h +++ b/arch/arm/plat-pxa/include/plat/ssp.h | |||
@@ -40,10 +40,7 @@ | |||
40 | #define SSRSA (0x34) /* SSP Rx Timeslot Active */ | 40 | #define SSRSA (0x34) /* SSP Rx Timeslot Active */ |
41 | #define SSTSS (0x38) /* SSP Timeslot Status */ | 41 | #define SSTSS (0x38) /* SSP Timeslot Status */ |
42 | #define SSACD (0x3C) /* SSP Audio Clock Divider */ | 42 | #define SSACD (0x3C) /* SSP Audio Clock Divider */ |
43 | |||
44 | #if defined(CONFIG_PXA3xx) | ||
45 | #define SSACDD (0x40) /* SSP Audio Clock Dither Divider */ | 43 | #define SSACDD (0x40) /* SSP Audio Clock Dither Divider */ |
46 | #endif | ||
47 | 44 | ||
48 | /* Common PXA2xx bits first */ | 45 | /* Common PXA2xx bits first */ |
49 | #define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */ | 46 | #define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */ |
@@ -56,20 +53,17 @@ | |||
56 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ | 53 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ |
57 | #define SSCR0_SCR(x) ((x) << 8) /* Serial Clock Rate (mask) */ | 54 | #define SSCR0_SCR(x) ((x) << 8) /* Serial Clock Rate (mask) */ |
58 | 55 | ||
59 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | 56 | /* PXA27x, PXA3xx */ |
60 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ | 57 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ |
61 | #define SSCR0_NCS (1 << 21) /* Network clock select */ | 58 | #define SSCR0_NCS (1 << 21) /* Network clock select */ |
62 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | 59 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ |
63 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ | 60 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ |
64 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ | 61 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ |
65 | #define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */ | 62 | #define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */ |
63 | #define SSCR0_FPCKE (1 << 29) /* FIFO packing enable */ | ||
66 | #define SSCR0_ACS (1 << 30) /* Audio clock select */ | 64 | #define SSCR0_ACS (1 << 30) /* Audio clock select */ |
67 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ | 65 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ |
68 | #endif | ||
69 | 66 | ||
70 | #if defined(CONFIG_PXA3xx) | ||
71 | #define SSCR0_FPCKE (1 << 29) /* FIFO packing enable */ | ||
72 | #endif | ||
73 | 67 | ||
74 | #define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ | 68 | #define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ |
75 | #define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ | 69 | #define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ |
@@ -89,10 +83,6 @@ | |||
89 | #define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */ | 83 | #define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */ |
90 | #define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */ | 84 | #define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */ |
91 | 85 | ||
92 | #define SSCR0_TIM (1 << 23) /* Transmit FIFO Under Run Interrupt Mask */ | ||
93 | #define SSCR0_RIM (1 << 22) /* Receive FIFO Over Run interrupt Mask */ | ||
94 | #define SSCR0_NCS (1 << 21) /* Network Clock Select */ | ||
95 | #define SSCR0_EDSS (1 << 20) /* Extended Data Size Select */ | ||
96 | 86 | ||
97 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ | 87 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ |
98 | #define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ | 88 | #define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ |
@@ -122,27 +112,26 @@ | |||
122 | #define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */ | 112 | #define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */ |
123 | #define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ | 113 | #define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ |
124 | 114 | ||
125 | #if defined(CONFIG_PXA3xx) | ||
126 | #define SSPSP_EDMYSTOP(x) ((x) << 28) /* Extended Dummy Stop */ | ||
127 | #define SSPSP_EDMYSTRT(x) ((x) << 26) /* Extended Dummy Start */ | ||
128 | #endif | ||
129 | 115 | ||
130 | #define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */ | ||
131 | #define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */ | ||
132 | #define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */ | ||
133 | #define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */ | ||
134 | #define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */ | ||
135 | #define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */ | ||
136 | #define SSPSP_ETDS (1 << 3) /* End of Transfer data State */ | ||
137 | #define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */ | ||
138 | #define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */ | 116 | #define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */ |
117 | #define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */ | ||
118 | #define SSPSP_ETDS (1 << 3) /* End of Transfer data State */ | ||
119 | #define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */ | ||
120 | #define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */ | ||
121 | #define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */ | ||
122 | #define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */ | ||
123 | #define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */ | ||
124 | #define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */ | ||
125 | |||
126 | /* PXA3xx */ | ||
127 | #define SSPSP_EDMYSTRT(x) ((x) << 26) /* Extended Dummy Start */ | ||
128 | #define SSPSP_EDMYSTOP(x) ((x) << 28) /* Extended Dummy Stop */ | ||
129 | #define SSPSP_TIMING_MASK (0x7f8001f0) | ||
139 | 130 | ||
140 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ | 131 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ |
141 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ | 132 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ |
142 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ | 133 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ |
143 | #if defined(CONFIG_PXA3xx) | ||
144 | #define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ | 134 | #define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ |
145 | #endif | ||
146 | 135 | ||
147 | enum pxa_ssp_type { | 136 | enum pxa_ssp_type { |
148 | SSP_UNDEFINED = 0, | 137 | SSP_UNDEFINED = 0, |