All of lore.kernel.org
 help / color / mirror / Atom feed
From: biju.das@bp.renesas.com (Biju Das)
To: cip-dev@lists.cip-project.org
Subject: [cip-dev] [PATCH 4.4.y-cip 22/83] mmc: tmio: use BIT() within defines
Date: Thu,  7 Nov 2019 08:31:51 +0000	[thread overview]
Message-ID: <1573115572-13513-23-git-send-email-biju.das@bp.renesas.com> (raw)
In-Reply-To: <1573115572-13513-1-git-send-email-biju.das@bp.renesas.com>

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

commit 2cafc5cb4fcbe648d0d16ec5039ee292d85d7bfa upstream.

BIT() makes it easier to match the bits to the datasheet. This is
especially important here, since some variants have different names in
their datasheets (like with Renesas R-Car).

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 drivers/mmc/host/tmio_mmc.h | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index e75e5ca..74945c1a 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -49,27 +49,29 @@
 #define CTL_RESET_SDIO 0x1e0
 
 /* Definitions for values the CTRL_STATUS register can take. */
-#define TMIO_STAT_CMDRESPEND    0x00000001
-#define TMIO_STAT_DATAEND       0x00000004
-#define TMIO_STAT_CARD_REMOVE   0x00000008
-#define TMIO_STAT_CARD_INSERT   0x00000010
-#define TMIO_STAT_SIGSTATE      0x00000020
-#define TMIO_STAT_WRPROTECT     0x00000080
-#define TMIO_STAT_CARD_REMOVE_A 0x00000100
-#define TMIO_STAT_CARD_INSERT_A 0x00000200
-#define TMIO_STAT_SIGSTATE_A    0x00000400
-#define TMIO_STAT_CMD_IDX_ERR   0x00010000
-#define TMIO_STAT_CRCFAIL       0x00020000
-#define TMIO_STAT_STOPBIT_ERR   0x00040000
-#define TMIO_STAT_DATATIMEOUT   0x00080000
-#define TMIO_STAT_RXOVERFLOW    0x00100000
-#define TMIO_STAT_TXUNDERRUN    0x00200000
-#define TMIO_STAT_CMDTIMEOUT    0x00400000
-#define TMIO_STAT_RXRDY         0x01000000
-#define TMIO_STAT_TXRQ          0x02000000
-#define TMIO_STAT_ILL_FUNC      0x20000000
-#define TMIO_STAT_CMD_BUSY      0x40000000
-#define TMIO_STAT_ILL_ACCESS    0x80000000
+#define TMIO_STAT_CMDRESPEND    BIT(0)
+#define TMIO_STAT_DATAEND       BIT(2)
+#define TMIO_STAT_CARD_REMOVE   BIT(3)
+#define TMIO_STAT_CARD_INSERT   BIT(4)
+#define TMIO_STAT_SIGSTATE      BIT(5)
+#define TMIO_STAT_WRPROTECT     BIT(7)
+#define TMIO_STAT_CARD_REMOVE_A BIT(8)
+#define TMIO_STAT_CARD_INSERT_A BIT(9)
+#define TMIO_STAT_SIGSTATE_A    BIT(10)
+
+/* These belong technically to CTRL_STATUS2, but the driver merges them */
+#define TMIO_STAT_CMD_IDX_ERR   BIT(16)
+#define TMIO_STAT_CRCFAIL       BIT(17)
+#define TMIO_STAT_STOPBIT_ERR   BIT(18)
+#define TMIO_STAT_DATATIMEOUT   BIT(19)
+#define TMIO_STAT_RXOVERFLOW    BIT(20)
+#define TMIO_STAT_TXUNDERRUN    BIT(21)
+#define TMIO_STAT_CMDTIMEOUT    BIT(22)
+#define TMIO_STAT_RXRDY         BIT(24)
+#define TMIO_STAT_TXRQ          BIT(25)
+#define TMIO_STAT_ILL_FUNC      BIT(29)
+#define TMIO_STAT_CMD_BUSY      BIT(30)
+#define TMIO_STAT_ILL_ACCESS    BIT(31)
 
 #define TMIO_STATUS2_DAT0	BIT(7)
 
-- 
2.7.4

  parent reply	other threads:[~2019-11-07  8:31 UTC|newest]

Thread overview: 127+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  8:31 [cip-dev] [PATCH 4.4.y-cip 00/83] Add RZ/G1C SD/eMMC support Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 01/83] mmc: tmio_mmc_dma: don't print invalid DMA cookie Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 02/83] mmc: tmio_dma: remove debug messages with little information Biju Das
2019-11-08  9:07   ` Pavel Machek
2019-11-08  9:15     ` Biju Das
2019-11-08 11:37       ` Pavel Machek
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 03/83] mmc: tmio: add flag to reduce delay after changing clock status Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 04/83] mmc: tmio: remove stale comments Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 05/83] mmc: tmio: refactor set_clock a little Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 06/83] mmc: tmio: disable clock before changing it Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 07/83] mmc: sdhi: use faster clock handling on RCar Gen2 Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 08/83] mmc: sdhi: error message on ENOMEM is superfluous Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 09/83] mmc: sdhi: Add r8a7795 support Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 10/83] mmc: tmio, sh_mobile_sdhi: Pass tmio_mmc_host ptr to clk_{enable, disable} ops Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 11/83] mmc: tmio, sh_mobile_sdhi: Add support for variable input clock frequency Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 12/83] mmc: tmio: Add UHS-I mode support Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 13/83] mmc: sh_mobile_sdhi: " Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 14/83] mmc: tmio: always start clock after frequency calculation Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 15/83] mmc: tmio: stop clock when 0Hz is requested Biju Das
2019-11-08  9:15   ` Pavel Machek
2019-11-08 12:50     ` Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 16/83] mmc: tmio: Remove redundant runtime PM calls Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 17/83] mmc: sh_mobile_sdhi: remove obsolete irq_by_name registration Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 18/83] mmc: tmio: remove now unneeded seperate irq handlers Biju Das
2019-11-08  9:18   ` Pavel Machek
2019-11-08 12:53     ` Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 19/83] mmc: tmio: simplify irq handler Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 20/83] mmc: tmio: merge distributed include files Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 21/83] mmc: tmio: give read32/write32 functions more descriptive names Biju Das
2019-11-07  8:31 ` Biju Das [this message]
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 23/83] mmc: tmio: use CTL_STATUS consistently Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 24/83] mmc: tmio/sdhi: distinguish between SCLKDIVEN and ILL_FUNC Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 25/83] mmc: tmio: document CTL_STATUS handling Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 26/83] mmc: tmio/sdhi: introduce flag for RCar 2+ specific features Biju Das
2019-11-08  9:20   ` Pavel Machek
2019-11-08 12:54     ` Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 27/83] mmc: sh_mobile_sdhi: make clk_update function more compact Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 28/83] mmc: sh_mobile_sdhi: only change the clock on RCar Gen2+ Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 29/83] mmc: sh_mobile_sdhi: check return value when changing clk Biju Das
2019-11-07  8:31 ` [cip-dev] [PATCH 4.4.y-cip 30/83] mmc: sh_mobile_sdhi: properly document R-Car versions Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 31/83] mmc: host: sh_mobile_sdhi: move card_busy from tmio to sdhi Biju Das
2019-11-08  9:22   ` Pavel Machek
2019-11-08 12:56     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 32/83] mmc: host: sh_mobile_sdhi: don't populate unneeded functions Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 33/83] mmc: tmio: add eMMC support Biju Das
2019-11-08  9:24   ` Pavel Machek
2019-11-08 12:58     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 34/83] mmc: tmio-mmc: add support for 32bit data port Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 35/83] mmc: add define for R1 response without CRC Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 36/83] mmc: sh_mobile_sdhi: add ocr_mask option Biju Das
2019-11-08  9:28   ` Pavel Machek
2019-11-19  8:39     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 37/83] mmc: tmio: enhance illegal sequence handling Biju Das
2019-11-08  9:30   ` Pavel Machek
2019-11-08 13:17     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 38/83] mmc: tmio: document mandatory and optional callbacks Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 39/83] mmc: tmio: Add hw reset support Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 40/83] mmc: core: Add helper to see if a host can be retuned Biju Das
2019-11-08  9:31   ` Pavel Machek
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 41/83] mmc: tmio: Add tuning support Biju Das
2019-11-08  9:36   ` Pavel Machek
2019-11-08 13:20     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 42/83] mmc: sh_mobile_sdhi: " Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 43/83] mmc: tmio: fix wrong bitmask for SDIO irqs Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 44/83] mmc: tmio: remove SDIO from TODO list Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 45/83] mmc: tmio: use SDIO master interrupt bit only when allowed Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 46/83] mmc: sh_mobile_sdhi: simplify accessing DT data Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 47/83] mmc: sh_mobile_sdhi: improve prerequisite for hw_reset Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 48/83] mmc: sh_mobile_sdhi: remove superfluous check in hw_reset Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 49/83] mmc: sh_mobile_sdhi: improve prerequisites for tuning Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 50/83] mmc: sh_mobile_sdhi: remove superfluous check in SCC error check Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 51/83] mmc: sh_mobile_sdhi: remove superfluous check in init_tuning Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 52/83] mmc: sh_mobile_sdhi: enable HS200 Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 53/83] mmc: host: tmio: drop superfluous exit path Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 54/83] mmc: tmio: Remove redundant check of mmc->slot.cd_irq Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 55/83] mmc: host: tmio: disable clocks when unbinding Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 56/83] mmc: host: tmio: refactor calls to sdio irq Biju Das
2019-11-08  9:42   ` Pavel Machek
2019-11-08 13:26     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 57/83] mmc: host: tmio: SDIO_STATUS_QUIRK is rather SDIO_STATUS_SETBITS Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 58/83] mmc: tmio: discard obsolete SDIO irqs before enabling irqs Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 59/83] mmc: tmio: ensure end of DMA and SD access are in sync Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 60/83] mmc: host: tmio: use defines for CTL_STOP_INTERNAL_ACTION values Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 61/83] mmc: host: tmio: don't BUG on unsupported stop commands Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 62/83] mmc: host: tmio: fill in response from auto cmd12 Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 63/83] mmc: tmio: always get number of taps Biju Das
2019-11-08  9:44   ` Pavel Machek
2019-11-08 13:28     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 64/83] mmc: tmio: drop filenames from comment at top of source Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 65/83] mmc: renesas-sdhi, tmio: make dma more modular Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 66/83] mmc: tmio: rename tmio_mmc_{pio => core}.c Biju Das
2019-11-08  9:47   ` Pavel Machek
2019-11-08 13:33     ` Biju Das
2019-11-08 20:02       ` Pavel Machek
2019-11-11 13:52         ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 67/83] mmc: renesas-sdhi: rename tmio_mmc_dma.c => renesas_sdhi_sys_dmac.c Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 68/83] mmc: renesas-sdhi: rename sh_mobile_sdhi.c => renesas_sdhi_core.c Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 69/83] mmc: renesas-sdhi: make renesas_sdhi_sys_dmac main module file Biju Das
2019-11-08  9:56   ` Pavel Machek
2019-11-08 13:34     ` Biju Das
2019-11-08 20:05       ` Pavel Machek
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 70/83] mmc: renesas-sdhi: improve checkpatch cleanness Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 71/83] mmc: tmio, renesas-sdhi: add max_{segs, blk_count} to tmio_mmc_data Biju Das
2019-11-08 10:03   ` Pavel Machek
2019-11-08 13:41     ` Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 72/83] mmc: tmio, renesas-sdhi: add dataend to DMA ops Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 73/83] mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 74/83] mmc: tmio-mmc: fix bad pointer math Biju Das
2019-11-08 10:38   ` Pavel Machek
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 75/83] mmc: renesas_sdhi: consolidate DMAC CONFIG options Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 76/83] dt-bindings: mmc: renesas_sdhi: add R-Car Gen[123] fallback compatibility strings Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 77/83] mmc: renesas_sdhi: implement " Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 78/83] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 79/83] mmc: renesas_sdhi: Add r8a77470 SDHI1 support Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 80/83] ARM: dts: r8a77470: Add SDHI2 support Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 81/83] ARM: dts: r8a77470: Add SDHI0 support Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 82/83] ARM: dts: r8a77470: Add SDHI1 support Biju Das
2019-11-07  8:32 ` [cip-dev] [PATCH 4.4.y-cip 83/83] ARM: dts: iwg23s-sbc: Add uSD and eMMC support Biju Das
2019-11-07 21:01 ` [cip-dev] [PATCH 4.4.y-cip 00/83] Add RZ/G1C SD/eMMC support Pavel Machek
2019-11-08 10:32   ` Chris Paterson
2019-11-08 11:32     ` Pavel Machek
2019-11-08 13:43       ` Biju Das
2019-11-08 19:58         ` Pavel Machek
2019-11-14 16:13           ` Biju Das
     [not found]             ` <20191115123012.GA29996@duo.ucw.cz>
     [not found]               ` <OSBPR01MB2103290FD10A0643F9A78824B8700@OSBPR01MB2103.jpnprd01.prod.outlook.com>
2019-11-15 21:10                 ` Pavel Machek
2019-11-18  7:42                   ` Biju Das
2019-11-18 10:38                     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1573115572-13513-23-git-send-email-biju.das@bp.renesas.com \
    --to=biju.das@bp.renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.