Skip to content

Commit ff8faa8

Browse files
ambarusbroonie
authored andcommitted
spi: s3c64xx: define a magic value
Define a magic value, it will be used in the next patch as well. Signed-off-by: Tudor Ambarus <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 80a38bf commit ff8faa8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/spi/spi-s3c64xx.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
#define S3C64XX_SPI_INT_RX_FIFORDY_EN (1<<1)
7979
#define S3C64XX_SPI_INT_TX_FIFORDY_EN (1<<0)
8080

81+
#define S3C64XX_SPI_ST_TX_FIFO_LVL_SHIFT 6
8182
#define S3C64XX_SPI_ST_RX_OVERRUN_ERR (1<<5)
8283
#define S3C64XX_SPI_ST_RX_UNDERRUN_ERR (1<<4)
8384
#define S3C64XX_SPI_ST_TX_OVERRUN_ERR (1<<3)
@@ -108,7 +109,8 @@
108109
#define FIFO_LVL_MASK(i) ((i)->port_conf->fifo_lvl_mask[i->port_id])
109110
#define S3C64XX_SPI_ST_TX_DONE(v, i) (((v) & \
110111
(1 << (i)->port_conf->tx_st_done)) ? 1 : 0)
111-
#define TX_FIFO_LVL(v, i) (((v) >> 6) & FIFO_LVL_MASK(i))
112+
#define TX_FIFO_LVL(v, i) (((v) >> S3C64XX_SPI_ST_TX_FIFO_LVL_SHIFT) & \
113+
FIFO_LVL_MASK(i))
112114
#define RX_FIFO_LVL(v, i) (((v) >> (i)->port_conf->rx_lvl_offset) & \
113115
FIFO_LVL_MASK(i))
114116
#define FIFO_DEPTH(i) ((FIFO_LVL_MASK(i) >> 1) + 1)

0 commit comments

Comments
 (0)