diff options
| author | Linus Walleij <linus.walleij@stericsson.com> | 2010-05-07 04:40:53 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-25 02:23:14 -0400 |
| commit | 781c7b129b1beb876905f7212927aa0ee1b022e5 (patch) | |
| tree | 678bfc0d0a5cdd24c55024b5c2d2674eb5bea572 /include/linux/amba | |
| parent | 556f4aeb7d9dfac8573d0281dd555bd3210d8366 (diff) | |
spi/pl022: add support for the PL023 derivate
This adds support for a further ST variant of the PL022 called
PL023. Some differences in the control registers due to being
stripped down to SPI mode only, and a new clock feedback sample
delay config setting is available.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/amba')
| -rw-r--r-- | include/linux/amba/pl022.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index 612f3991334..abf26cc47a2 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h | |||
| @@ -182,8 +182,8 @@ enum ssp_microwire_wait_state { | |||
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | /** | 184 | /** |
| 185 | * enum Microwire - whether Full/Half Duplex, only available | 185 | * enum ssp_duplex - whether Full/Half Duplex on microwire, only |
| 186 | * in the ST Micro variant. | 186 | * available in the ST Micro variant. |
| 187 | * @SSP_MICROWIRE_CHANNEL_FULL_DUPLEX: SSPTXD becomes bi-directional, | 187 | * @SSP_MICROWIRE_CHANNEL_FULL_DUPLEX: SSPTXD becomes bi-directional, |
| 188 | * SSPRXD not used | 188 | * SSPRXD not used |
| 189 | * @SSP_MICROWIRE_CHANNEL_HALF_DUPLEX: SSPTXD is an output, SSPRXD is | 189 | * @SSP_MICROWIRE_CHANNEL_HALF_DUPLEX: SSPTXD is an output, SSPRXD is |
| @@ -195,6 +195,31 @@ enum ssp_duplex { | |||
| 195 | }; | 195 | }; |
| 196 | 196 | ||
| 197 | /** | 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 | /** | ||
| 198 | * CHIP select/deselect commands | 223 | * CHIP select/deselect commands |
| 199 | */ | 224 | */ |
| 200 | enum ssp_chip_select { | 225 | enum ssp_chip_select { |
| @@ -237,6 +262,8 @@ struct pl022_ssp_controller { | |||
| 237 | * @ctrl_len: Microwire interface: Control length | 262 | * @ctrl_len: Microwire interface: Control length |
| 238 | * @wait_state: Microwire interface: Wait state | 263 | * @wait_state: Microwire interface: Wait state |
| 239 | * @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 | ||
| 240 | * @cs_control: function pointer to board-specific function to | 267 | * @cs_control: function pointer to board-specific function to |
| 241 | * 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. |
| 242 | * @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) |
| @@ -260,6 +287,7 @@ struct pl022_config_chip { | |||
| 260 | enum ssp_microwire_ctrl_len ctrl_len; | 287 | enum ssp_microwire_ctrl_len ctrl_len; |
| 261 | enum ssp_microwire_wait_state wait_state; | 288 | enum ssp_microwire_wait_state wait_state; |
| 262 | enum ssp_duplex duplex; | 289 | enum ssp_duplex duplex; |
| 290 | enum ssp_clkdelay clkdelay; | ||
| 263 | void (*cs_control) (u32 control); | 291 | void (*cs_control) (u32 control); |
| 264 | }; | 292 | }; |
| 265 | 293 | ||
