Skip to content

Commit 135111c

Browse files
lyakhcjb
authored andcommitted
mmc: sh_mmcif: simplify bitmask macros
Purely cosmetic readability improvement, no functional change. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
1 parent 7f52421 commit 135111c

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

include/linux/mmc/sh_mmcif.h

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,15 @@ struct sh_mmcif_plat_data {
7777

7878
/* CE_CLK_CTRL */
7979
#define CLK_ENABLE (1 << 24) /* 1: output mmc clock */
80-
#define CLK_CLEAR ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16))
81-
#define CLK_SUP_PCLK ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16))
82-
#define CLKDIV_4 (1<<16) /* mmc clock frequency.
83-
* n: bus clock/(2^(n+1)) */
84-
#define CLKDIV_256 (7<<16) /* mmc clock frequency. (see above) */
85-
#define SRSPTO_256 ((1 << 13) | (0 << 12)) /* resp timeout */
86-
#define SRBSYTO_29 ((1 << 11) | (1 << 10) | \
87-
(1 << 9) | (1 << 8)) /* resp busy timeout */
88-
#define SRWDTO_29 ((1 << 7) | (1 << 6) | \
89-
(1 << 5) | (1 << 4)) /* read/write timeout */
90-
#define SCCSTO_29 ((1 << 3) | (1 << 2) | \
91-
(1 << 1) | (1 << 0)) /* ccs timeout */
80+
#define CLK_CLEAR (0xf << 16)
81+
#define CLK_SUP_PCLK (0xf << 16)
82+
#define CLKDIV_4 (1 << 16) /* mmc clock frequency.
83+
* n: bus clock/(2^(n+1)) */
84+
#define CLKDIV_256 (7 << 16) /* mmc clock frequency. (see above) */
85+
#define SRSPTO_256 (2 << 12) /* resp timeout */
86+
#define SRBSYTO_29 (0xf << 8) /* resp busy timeout */
87+
#define SRWDTO_29 (0xf << 4) /* read/write timeout */
88+
#define SCCSTO_29 (0xf << 0) /* ccs timeout */
9289

9390
/* CE_VERSION */
9491
#define SOFT_RST_ON (1 << 31)

0 commit comments

Comments
 (0)