diff options
| -rw-r--r-- | drivers/spi/pxa2xx_spi.c | 2 | ||||
| -rw-r--r-- | include/linux/pxa2xx_ssp.h | 32 |
2 files changed, 26 insertions, 8 deletions
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index ed212c2583ab..81cfbbc58e94 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
| @@ -43,8 +43,6 @@ MODULE_ALIAS("platform:pxa2xx-spi"); | |||
| 43 | 43 | ||
| 44 | #define MAX_BUSES 3 | 44 | #define MAX_BUSES 3 |
| 45 | 45 | ||
| 46 | #define RX_THRESH_DFLT 8 | ||
| 47 | #define TX_THRESH_DFLT 8 | ||
| 48 | #define TIMOUT_DFLT 1000 | 46 | #define TIMOUT_DFLT 1000 |
| 49 | 47 | ||
| 50 | #define DMA_INT_MASK (DCSR_ENDINTR | DCSR_STARTINTR | DCSR_BUSERR) | 48 | #define DMA_INT_MASK (DCSR_ENDINTR | DCSR_STARTINTR | DCSR_BUSERR) |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 84465d4a51b7..c3aa334cbb9b 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h | |||
| @@ -71,10 +71,6 @@ | |||
| 71 | #define SSCR1_SPO (1 << 3) /* Motorola SPI SSPSCLK polarity setting */ | 71 | #define SSCR1_SPO (1 << 3) /* Motorola SPI SSPSCLK polarity setting */ |
| 72 | #define SSCR1_SPH (1 << 4) /* Motorola SPI SSPSCLK phase setting */ | 72 | #define SSCR1_SPH (1 << 4) /* Motorola SPI SSPSCLK phase setting */ |
| 73 | #define SSCR1_MWDS (1 << 5) /* Microwire Transmit Data Size */ | 73 | #define SSCR1_MWDS (1 << 5) /* Microwire Transmit Data Size */ |
| 74 | #define SSCR1_TFT (0x000003c0) /* Transmit FIFO Threshold (mask) */ | ||
| 75 | #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..16] */ | ||
| 76 | #define SSCR1_RFT (0x00003c00) /* Receive FIFO Threshold (mask) */ | ||
| 77 | #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..16] */ | ||
| 78 | 74 | ||
| 79 | #define SSSR_TNF (1 << 2) /* Transmit FIFO Not Full */ | 75 | #define SSSR_TNF (1 << 2) /* Transmit FIFO Not Full */ |
| 80 | #define SSSR_RNE (1 << 3) /* Receive FIFO Not Empty */ | 76 | #define SSSR_RNE (1 << 3) /* Receive FIFO Not Empty */ |
| @@ -82,8 +78,32 @@ | |||
| 82 | #define SSSR_TFS (1 << 5) /* Transmit FIFO Service Request */ | 78 | #define SSSR_TFS (1 << 5) /* Transmit FIFO Service Request */ |
| 83 | #define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */ | 79 | #define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */ |
| 84 | #define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */ | 80 | #define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */ |
| 85 | #define SSSR_TFL_MASK (0xf << 8) /* Transmit FIFO Level mask */ | 81 | |
| 86 | #define SSSR_RFL_MASK (0xf << 12) /* Receive FIFO Level mask */ | 82 | #ifdef CONFIG_ARCH_PXA |
| 83 | #define RX_THRESH_DFLT 8 | ||
| 84 | #define TX_THRESH_DFLT 8 | ||
| 85 | |||
| 86 | #define SSSR_TFL_MASK (0xf << 8) /* Transmit FIFO Level mask */ | ||
| 87 | #define SSSR_RFL_MASK (0xf << 12) /* Receive FIFO Level mask */ | ||
| 88 | |||
| 89 | #define SSCR1_TFT (0x000003c0) /* Transmit FIFO Threshold (mask) */ | ||
| 90 | #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..16] */ | ||
| 91 | #define SSCR1_RFT (0x00003c00) /* Receive FIFO Threshold (mask) */ | ||
| 92 | #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..16] */ | ||
| 93 | |||
| 94 | #else | ||
| 95 | |||
| 96 | #define RX_THRESH_DFLT 2 | ||
| 97 | #define TX_THRESH_DFLT 2 | ||
| 98 | |||
| 99 | #define SSSR_TFL_MASK (0x3 << 8) /* Transmit FIFO Level mask */ | ||
| 100 | #define SSSR_RFL_MASK (0x3 << 12) /* Receive FIFO Level mask */ | ||
| 101 | |||
| 102 | #define SSCR1_TFT (0x000000c0) /* Transmit FIFO Threshold (mask) */ | ||
| 103 | #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..4] */ | ||
| 104 | #define SSCR1_RFT (0x00000c00) /* Receive FIFO Threshold (mask) */ | ||
| 105 | #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..4] */ | ||
| 106 | #endif | ||
| 87 | 107 | ||
| 88 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ | 108 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ |
| 89 | #define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ | 109 | #define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ |
