]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mmc: host: tmio: use defines for CTL_STOP_INTERNAL_ACTION values
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 14 Mar 2017 10:09:16 +0000 (11:09 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:41:14 +0000 (21:41 +0200)
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 891d400d2a7cf21b129afdc28699928faeef8e5b..a484ed87bcd0244bf1e183cfde0dff988f936fb0 100644 (file)
 #define CTL_CLK_AND_WAIT_CTL 0x138
 #define CTL_RESET_SDIO 0x1e0
 
+/* Definitions for values the CTL_STOP_INTERNAL_ACTION register can take */
+#define TMIO_STOP_STP          BIT(0)
+#define TMIO_STOP_SEC          BIT(8)
+
 /* Definitions for values the CTRL_STATUS register can take. */
 #define TMIO_STAT_CMDRESPEND    BIT(0)
 #define TMIO_STAT_DATAEND       BIT(2)
index c41f2252945eb74c56c2e9242641338266076a67..c655c9de1dde6993d854a174c8b598a9a60e9acc 100644 (file)
@@ -340,7 +340,7 @@ static int tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command
 
        /* CMD12 is handled by hardware */
        if (cmd->opcode == MMC_STOP_TRANSMISSION && !cmd->arg) {
-               sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0x001);
+               sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, TMIO_STOP_STP);
                return 0;
        }
 
@@ -367,7 +367,7 @@ static int tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command
        if (data) {
                c |= DATA_PRESENT;
                if (data->blocks > 1) {
-                       sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0x100);
+                       sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, TMIO_STOP_SEC);
                        c |= TRANSFER_MULTI;
 
                        /*
@@ -554,7 +554,7 @@ void tmio_mmc_do_data_irq(struct tmio_mmc_host *host)
 
        if (stop) {
                if (stop->opcode == MMC_STOP_TRANSMISSION && !stop->arg)
-                       sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0x000);
+                       sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0);
                else
                        BUG();
        }