diff options
Diffstat (limited to 'include/linux/amba')
-rw-r--r-- | include/linux/amba/pl022.h | 32 | ||||
-rw-r--r-- | include/linux/amba/pl330.h | 45 |
2 files changed, 76 insertions, 1 deletions
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index e4836c6b3dd7..abf26cc47a2b 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h | |||
@@ -71,6 +71,7 @@ struct ssp_clock_params { | |||
71 | 71 | ||
72 | /** | 72 | /** |
73 | * enum ssp_rx_endian - endianess of Rx FIFO Data | 73 | * enum ssp_rx_endian - endianess of Rx FIFO Data |
74 | * this feature is only available in ST versionf of PL022 | ||
74 | */ | 75 | */ |
75 | enum ssp_rx_endian { | 76 | enum ssp_rx_endian { |
76 | SSP_RX_MSB, | 77 | SSP_RX_MSB, |
@@ -181,7 +182,8 @@ enum ssp_microwire_wait_state { | |||
181 | }; | 182 | }; |
182 | 183 | ||
183 | /** | 184 | /** |
184 | * enum Microwire - whether Full/Half Duplex | 185 | * enum ssp_duplex - whether Full/Half Duplex on microwire, only |
186 | * available in the ST Micro variant. | ||
185 | * @SSP_MICROWIRE_CHANNEL_FULL_DUPLEX: SSPTXD becomes bi-directional, | 187 | * @SSP_MICROWIRE_CHANNEL_FULL_DUPLEX: SSPTXD becomes bi-directional, |
186 | * SSPRXD not used | 188 | * SSPRXD not used |
187 | * @SSP_MICROWIRE_CHANNEL_HALF_DUPLEX: SSPTXD is an output, SSPRXD is | 189 | * @SSP_MICROWIRE_CHANNEL_HALF_DUPLEX: SSPTXD is an output, SSPRXD is |
@@ -193,6 +195,31 @@ enum ssp_duplex { | |||
193 | }; | 195 | }; |
194 | 196 | ||
195 | /** | 197 | /** |
198 | * enum ssp_clkdelay - an optional clock delay on the feedback clock | ||
199 | * only available in the ST Micro PL023 variant. | ||
200 | * @SSP_FEEDBACK_CLK_DELAY_NONE: no delay, the data coming in from the | ||
201 | * slave is sampled directly | ||
202 | * @SSP_FEEDBACK_CLK_DELAY_1T: the incoming slave data is sampled with | ||
203 | * a delay of T-dt | ||
204 | * @SSP_FEEDBACK_CLK_DELAY_2T: dito with a delay if 2T-dt | ||
205 | * @SSP_FEEDBACK_CLK_DELAY_3T: dito with a delay if 3T-dt | ||
206 | * @SSP_FEEDBACK_CLK_DELAY_4T: dito with a delay if 4T-dt | ||
207 | * @SSP_FEEDBACK_CLK_DELAY_5T: dito with a delay if 5T-dt | ||
208 | * @SSP_FEEDBACK_CLK_DELAY_6T: dito with a delay if 6T-dt | ||
209 | * @SSP_FEEDBACK_CLK_DELAY_7T: dito with a delay if 7T-dt | ||
210 | */ | ||
211 | enum ssp_clkdelay { | ||
212 | SSP_FEEDBACK_CLK_DELAY_NONE, | ||
213 | SSP_FEEDBACK_CLK_DELAY_1T, | ||
214 | SSP_FEEDBACK_CLK_DELAY_2T, | ||
215 | SSP_FEEDBACK_CLK_DELAY_3T, | ||
216 | SSP_FEEDBACK_CLK_DELAY_4T, | ||
217 | SSP_FEEDBACK_CLK_DELAY_5T, | ||
218 | SSP_FEEDBACK_CLK_DELAY_6T, | ||
219 | SSP_FEEDBACK_CLK_DELAY_7T | ||
220 | }; | ||
221 | |||
222 | /** | ||
196 | * CHIP select/deselect commands | 223 | * CHIP select/deselect commands |
197 | */ | 224 | */ |
198 | enum ssp_chip_select { | 225 | enum ssp_chip_select { |
@@ -235,6 +262,8 @@ struct pl022_ssp_controller { | |||
235 | * @ctrl_len: Microwire interface: Control length | 262 | * @ctrl_len: Microwire interface: Control length |
236 | * @wait_state: Microwire interface: Wait state | 263 | * @wait_state: Microwire interface: Wait state |
237 | * @duplex: Microwire interface: Full/Half duplex | 264 | * @duplex: Microwire interface: Full/Half duplex |
265 | * @clkdelay: on the PL023 variant, the delay in feeback clock cycles | ||
266 | * before sampling the incoming line | ||
238 | * @cs_control: function pointer to board-specific function to | 267 | * @cs_control: function pointer to board-specific function to |
239 | * assert/deassert I/O port to control HW generation of devices chip-select. | 268 | * assert/deassert I/O port to control HW generation of devices chip-select. |
240 | * @dma_xfer_type: Type of DMA xfer (Mem-to-periph or Periph-to-Periph) | 269 | * @dma_xfer_type: Type of DMA xfer (Mem-to-periph or Periph-to-Periph) |
@@ -258,6 +287,7 @@ struct pl022_config_chip { | |||
258 | enum ssp_microwire_ctrl_len ctrl_len; | 287 | enum ssp_microwire_ctrl_len ctrl_len; |
259 | enum ssp_microwire_wait_state wait_state; | 288 | enum ssp_microwire_wait_state wait_state; |
260 | enum ssp_duplex duplex; | 289 | enum ssp_duplex duplex; |
290 | enum ssp_clkdelay clkdelay; | ||
261 | void (*cs_control) (u32 control); | 291 | void (*cs_control) (u32 control); |
262 | }; | 292 | }; |
263 | 293 | ||
diff --git a/include/linux/amba/pl330.h b/include/linux/amba/pl330.h new file mode 100644 index 000000000000..cbee7de7dd36 --- /dev/null +++ b/include/linux/amba/pl330.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* linux/include/linux/amba/pl330.h | ||
2 | * | ||
3 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef __AMBA_PL330_H_ | ||
13 | #define __AMBA_PL330_H_ | ||
14 | |||
15 | #include <asm/hardware/pl330.h> | ||
16 | |||
17 | struct dma_pl330_peri { | ||
18 | /* | ||
19 | * Peri_Req i/f of the DMAC that is | ||
20 | * peripheral could be reached from. | ||
21 | */ | ||
22 | u8 peri_id; /* {0, 31} */ | ||
23 | enum pl330_reqtype rqtype; | ||
24 | |||
25 | /* For M->D and D->M Channels */ | ||
26 | int burst_sz; /* in power of 2 */ | ||
27 | dma_addr_t fifo_addr; | ||
28 | }; | ||
29 | |||
30 | struct dma_pl330_platdata { | ||
31 | /* | ||
32 | * Number of valid peripherals connected to DMAC. | ||
33 | * This may be different from the value read from | ||
34 | * CR0, as the PL330 implementation might have 'holes' | ||
35 | * in the peri list or the peri could also be reached | ||
36 | * from another DMAC which the platform prefers. | ||
37 | */ | ||
38 | u8 nr_valid_peri; | ||
39 | /* Array of valid peripherals */ | ||
40 | struct dma_pl330_peri *peri; | ||
41 | /* Bytes to allocate for MC buffer */ | ||
42 | unsigned mcbuf_sz; | ||
43 | }; | ||
44 | |||
45 | #endif /* __AMBA_PL330_H_ */ | ||