| From 9c30ff8daad8d73f4a02636fb1915e16a42f1346 Mon Sep 17 00:00:00 2001 |
| From: Wolfram Sang <wsa+renesas@sang-engineering.com> |
| Date: Tue, 14 Mar 2017 11:09:16 +0100 |
| Subject: [PATCH 117/286] mmc: host: tmio: use defines for |
| CTL_STOP_INTERNAL_ACTION values |
| |
| 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> |
| (cherry picked from commit 9afcbf4a6f1995f3b47088764eaef7b56154beb9) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/mmc/host/tmio_mmc.h | 4 ++++ |
| drivers/mmc/host/tmio_mmc_pio.c | 6 +++--- |
| 2 files changed, 7 insertions(+), 3 deletions(-) |
| |
| --- a/drivers/mmc/host/tmio_mmc.h |
| +++ b/drivers/mmc/host/tmio_mmc.h |
| @@ -49,6 +49,10 @@ |
| #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) |
| --- a/drivers/mmc/host/tmio_mmc_pio.c |
| +++ b/drivers/mmc/host/tmio_mmc_pio.c |
| @@ -340,7 +340,7 @@ static int tmio_mmc_start_command(struct |
| |
| /* 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 |
| 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_mm |
| |
| 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(); |
| } |