aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-08-03 11:26:08 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-17 17:52:42 -0400
commitf83b73806579c666fe6f1a4ed4800092c89e81db (patch)
tree2f50cf45ae5da854a2a0ab821292bd68f956c13e /include/linux/spi
parent600a991f98d94c97f72870f85df687c517c3af53 (diff)
mmc: spi: Add necessary bits into mxs-spi.h
Add missing register bits and registers into mxs-spi.h . These will be used by the SPI driver. Based on previous attempt by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Chris Ball <cjb@laptop.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/spi')
-rw-r--r--include/linux/spi/mxs-spi.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
index c08aef57c7ce..7dfa1d7d1a78 100644
--- a/include/linux/spi/mxs-spi.h
+++ b/include/linux/spi/mxs-spi.h
@@ -30,12 +30,14 @@
30#define HW_SSP_CTRL0 0x000 30#define HW_SSP_CTRL0 0x000
31#define BM_SSP_CTRL0_RUN (1 << 29) 31#define BM_SSP_CTRL0_RUN (1 << 29)
32#define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28) 32#define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28)
33#define BM_SSP_CTRL0_LOCK_CS (1 << 27)
33#define BM_SSP_CTRL0_IGNORE_CRC (1 << 26) 34#define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)
34#define BM_SSP_CTRL0_READ (1 << 25) 35#define BM_SSP_CTRL0_READ (1 << 25)
35#define BM_SSP_CTRL0_DATA_XFER (1 << 24) 36#define BM_SSP_CTRL0_DATA_XFER (1 << 24)
36#define BP_SSP_CTRL0_BUS_WIDTH 22 37#define BP_SSP_CTRL0_BUS_WIDTH 22
37#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22) 38#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22)
38#define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21) 39#define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)
40#define BM_SSP_CTRL0_WAIT_FOR_CMD (1 << 20)
39#define BM_SSP_CTRL0_LONG_RESP (1 << 19) 41#define BM_SSP_CTRL0_LONG_RESP (1 << 19)
40#define BM_SSP_CTRL0_GET_RESP (1 << 17) 42#define BM_SSP_CTRL0_GET_RESP (1 << 17)
41#define BM_SSP_CTRL0_ENABLE (1 << 16) 43#define BM_SSP_CTRL0_ENABLE (1 << 16)
@@ -64,8 +66,12 @@
64#define BM_SSP_TIMING_TIMEOUT (0xffff << 16) 66#define BM_SSP_TIMING_TIMEOUT (0xffff << 16)
65#define BP_SSP_TIMING_CLOCK_DIVIDE 8 67#define BP_SSP_TIMING_CLOCK_DIVIDE 8
66#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8) 68#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8)
69#define BF_SSP_TIMING_CLOCK_DIVIDE(v) \
70 (((v) << 8) & BM_SSP_TIMING_CLOCK_DIVIDE)
67#define BP_SSP_TIMING_CLOCK_RATE 0 71#define BP_SSP_TIMING_CLOCK_RATE 0
68#define BM_SSP_TIMING_CLOCK_RATE 0xff 72#define BM_SSP_TIMING_CLOCK_RATE 0xff
73#define BF_SSP_TIMING_CLOCK_RATE(v) \
74 (((v) << 0) & BM_SSP_TIMING_CLOCK_RATE)
69#define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080) 75#define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080)
70#define BM_SSP_CTRL1_SDIO_IRQ (1 << 31) 76#define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)
71#define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30) 77#define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
@@ -84,11 +90,26 @@
84#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15) 90#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15)
85#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14) 91#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)
86#define BM_SSP_CTRL1_DMA_ENABLE (1 << 13) 92#define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)
93#define BM_SSP_CTRL1_PHASE (1 << 10)
87#define BM_SSP_CTRL1_POLARITY (1 << 9) 94#define BM_SSP_CTRL1_POLARITY (1 << 9)
88#define BP_SSP_CTRL1_WORD_LENGTH 4 95#define BP_SSP_CTRL1_WORD_LENGTH 4
89#define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4) 96#define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4)
97#define BF_SSP_CTRL1_WORD_LENGTH(v) \
98 (((v) << 4) & BM_SSP_CTRL1_WORD_LENGTH)
99#define BV_SSP_CTRL1_WORD_LENGTH__FOUR_BITS 0x3
100#define BV_SSP_CTRL1_WORD_LENGTH__EIGHT_BITS 0x7
101#define BV_SSP_CTRL1_WORD_LENGTH__SIXTEEN_BITS 0xF
90#define BP_SSP_CTRL1_SSP_MODE 0 102#define BP_SSP_CTRL1_SSP_MODE 0
91#define BM_SSP_CTRL1_SSP_MODE 0xf 103#define BM_SSP_CTRL1_SSP_MODE 0xf
104#define BF_SSP_CTRL1_SSP_MODE(v) \
105 (((v) << 0) & BM_SSP_CTRL1_SSP_MODE)
106#define BV_SSP_CTRL1_SSP_MODE__SPI 0x0
107#define BV_SSP_CTRL1_SSP_MODE__SSI 0x1
108#define BV_SSP_CTRL1_SSP_MODE__SD_MMC 0x3
109#define BV_SSP_CTRL1_SSP_MODE__MS 0x4
110
111#define HW_SSP_DATA(h) (ssp_is_old(h) ? 0x070 : 0x090)
112
92#define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0) 113#define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0)
93#define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0) 114#define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0)
94#define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0) 115#define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0)
@@ -96,6 +117,7 @@
96#define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100) 117#define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100)
97#define BM_SSP_STATUS_CARD_DETECT (1 << 28) 118#define BM_SSP_STATUS_CARD_DETECT (1 << 28)
98#define BM_SSP_STATUS_SDIO_IRQ (1 << 17) 119#define BM_SSP_STATUS_SDIO_IRQ (1 << 17)
120#define BM_SSP_STATUS_FIFO_EMPTY (1 << 5)
99 121
100#define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field) 122#define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
101 123