mmc: tmio: use CTL_STATUS consistently
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 27 Apr 2016 16:51:25 +0000 (18:51 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 2 May 2016 08:36:02 +0000 (10:36 +0200)
To prevent confusion, use the virtual u32 CTL_STATUS in card_busy() the
same way as in other parts of this driver.

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>
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_pio.c

index 74945c1a66ce81ec5b8db8f533d247bd0cb2a925..55f251fdb786230d5d9a7cbef40d12149c7a111e 100644 (file)
 #define TMIO_STAT_RXOVERFLOW    BIT(20)
 #define TMIO_STAT_TXUNDERRUN    BIT(21)
 #define TMIO_STAT_CMDTIMEOUT    BIT(22)
+#define TMIO_STAT_DAT0         BIT(23) /* only known on R-Car so far */
 #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)
-
 #define        CLK_CTL_DIV_MASK        0xff
 #define        CLK_CTL_SCLKEN          BIT(8)
 
index 3635940bc31d1bb06012520a77e8f1f0f19abfc7..57d350744459683eac1ffc86f6b7bbdba2a0676b 100644 (file)
@@ -964,7 +964,7 @@ static int tmio_mmc_card_busy(struct mmc_host *mmc)
 {
        struct tmio_mmc_host *host = mmc_priv(mmc);
 
-       return !(sd_ctrl_read16_and_16_as_32(host, CTL_STATUS2) & TMIO_STATUS2_DAT0);
+       return !(sd_ctrl_read16_and_16_as_32(host, CTL_STATUS) & TMIO_STAT_DAT0);
 }
 
 static struct mmc_host_ops tmio_mmc_ops = {