aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2014-06-20 06:16:16 -0400
committerMark Brown <broonie@linaro.org>2014-06-21 06:17:34 -0400
commit2e2b36872d7b45b1f88a590283b14c67931b777f (patch)
tree4905d84ec9343a0caa0325825b0e77b6a5817d44
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
spi: sh-msiof: Add more register documentation
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/spi/spi-sh-msiof.c54
1 files changed, 53 insertions, 1 deletions
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index 45b09142afe2..38824a994131 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -113,9 +113,61 @@ struct sh_msiof_spi_priv {
113#define CTR_TXE 0x00000200 /* Transmit Enable */ 113#define CTR_TXE 0x00000200 /* Transmit Enable */
114#define CTR_RXE 0x00000100 /* Receive Enable */ 114#define CTR_RXE 0x00000100 /* Receive Enable */
115 115
116/* STR and IER */ 116/* FCTR */
117#define FCTR_TFWM_MASK 0xe0000000 /* Transmit FIFO Watermark */
118#define FCTR_TFWM_64 0x00000000 /* Transfer Request when 64 empty stages */
119#define FCTR_TFWM_32 0x20000000 /* Transfer Request when 32 empty stages */
120#define FCTR_TFWM_24 0x40000000 /* Transfer Request when 24 empty stages */
121#define FCTR_TFWM_16 0x60000000 /* Transfer Request when 16 empty stages */
122#define FCTR_TFWM_12 0x80000000 /* Transfer Request when 12 empty stages */
123#define FCTR_TFWM_8 0xa0000000 /* Transfer Request when 8 empty stages */
124#define FCTR_TFWM_4 0xc0000000 /* Transfer Request when 4 empty stages */
125#define FCTR_TFWM_1 0xe0000000 /* Transfer Request when 1 empty stage */
126#define FCTR_TFUA_MASK 0x07f00000 /* Transmit FIFO Usable Area */
127#define FCTR_TFUA_SHIFT 20
128#define FCTR_TFUA(i) ((i) << FCTR_TFUA_SHIFT)
129#define FCTR_RFWM_MASK 0x0000e000 /* Receive FIFO Watermark */
130#define FCTR_RFWM_1 0x00000000 /* Transfer Request when 1 valid stages */
131#define FCTR_RFWM_4 0x00002000 /* Transfer Request when 4 valid stages */
132#define FCTR_RFWM_8 0x00004000 /* Transfer Request when 8 valid stages */
133#define FCTR_RFWM_16 0x00006000 /* Transfer Request when 16 valid stages */
134#define FCTR_RFWM_32 0x00008000 /* Transfer Request when 32 valid stages */
135#define FCTR_RFWM_64 0x0000a000 /* Transfer Request when 64 valid stages */
136#define FCTR_RFWM_128 0x0000c000 /* Transfer Request when 128 valid stages */
137#define FCTR_RFWM_256 0x0000e000 /* Transfer Request when 256 valid stages */
138#define FCTR_RFUA_MASK 0x00001ff0 /* Receive FIFO Usable Area (0x40 = full) */
139#define FCTR_RFUA_SHIFT 4
140#define FCTR_RFUA(i) ((i) << FCTR_RFUA_SHIFT)
141
142/* STR */
143#define STR_TFEMP 0x20000000 /* Transmit FIFO Empty */
144#define STR_TDREQ 0x10000000 /* Transmit Data Transfer Request */
117#define STR_TEOF 0x00800000 /* Frame Transmission End */ 145#define STR_TEOF 0x00800000 /* Frame Transmission End */
146#define STR_TFSERR 0x00200000 /* Transmit Frame Synchronization Error */
147#define STR_TFOVF 0x00100000 /* Transmit FIFO Overflow */
148#define STR_TFUDF 0x00080000 /* Transmit FIFO Underflow */
149#define STR_RFFUL 0x00002000 /* Receive FIFO Full */
150#define STR_RDREQ 0x00001000 /* Receive Data Transfer Request */
118#define STR_REOF 0x00000080 /* Frame Reception End */ 151#define STR_REOF 0x00000080 /* Frame Reception End */
152#define STR_RFSERR 0x00000020 /* Receive Frame Synchronization Error */
153#define STR_RFUDF 0x00000010 /* Receive FIFO Underflow */
154#define STR_RFOVF 0x00000008 /* Receive FIFO Overflow */
155
156/* IER */
157#define IER_TDMAE 0x80000000 /* Transmit Data DMA Transfer Req. Enable */
158#define IER_TFEMPE 0x20000000 /* Transmit FIFO Empty Enable */
159#define IER_TDREQE 0x10000000 /* Transmit Data Transfer Request Enable */
160#define IER_TEOFE 0x00800000 /* Frame Transmission End Enable */
161#define IER_TFSERRE 0x00200000 /* Transmit Frame Sync Error Enable */
162#define IER_TFOVFE 0x00100000 /* Transmit FIFO Overflow Enable */
163#define IER_TFUDFE 0x00080000 /* Transmit FIFO Underflow Enable */
164#define IER_RDMAE 0x00008000 /* Receive Data DMA Transfer Req. Enable */
165#define IER_RFFULE 0x00002000 /* Receive FIFO Full Enable */
166#define IER_RDREQE 0x00001000 /* Receive Data Transfer Request Enable */
167#define IER_REOFE 0x00000080 /* Frame Reception End Enable */
168#define IER_RFSERRE 0x00000020 /* Receive Frame Sync Error Enable */
169#define IER_RFUDFE 0x00000010 /* Receive FIFO Underflow Enable */
170#define IER_RFOVFE 0x00000008 /* Receive FIFO Overflow Enable */
119 171
120 172
121static u32 sh_msiof_read(struct sh_msiof_spi_priv *p, int reg_offs) 173static u32 sh_msiof_read(struct sh_msiof_spi_priv *p, int reg_offs)