On Wed, Dec 13, 2017 at 11:58 AM, Philippe Mathieu-Daudé
<f4...@amsat.org> wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Reviewed-by: Alistair Francis <alistair.fran...@xilinx.com>

Alistair

> ---
>  hw/sd/sdhci-internal.h | 1 +
>  hw/sd/sdhci.c          | 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h
> index 248fd027f9..e941bc2386 100644
> --- a/hw/sd/sdhci-internal.h
> +++ b/hw/sd/sdhci-internal.h
> @@ -43,6 +43,7 @@
>  #define SDHC_TRNS_ACMD12               0x0004
>  #define SDHC_TRNS_READ                 0x0010
>  #define SDHC_TRNS_MULTI                0x0020
> +#define SDHC_TRNMOD_MASK               0x0037
>
>  /* R/W Command Register 0x0 */
>  #define SDHC_CMDREG                    0x0E
> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
> index 295a89e5d3..a56c0c273e 100644
> --- a/hw/sd/sdhci.c
> +++ b/hw/sd/sdhci.c
> @@ -120,7 +120,6 @@
>      (SDHC_CAPAB_BASECLKFREQ << 8) | (SDHC_CAPAB_TOUNIT << 7) | \
>      (SDHC_CAPAB_TOCLKFREQ))
>
> -#define MASK_TRNMOD     0x0037
>  #define MASKED_WRITE(reg, mask, val)  (reg = (reg & (mask)) | (val))
>
>  static uint8_t sdhci_slotint(SDHCIState *s)
> @@ -1043,7 +1042,7 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, 
> unsigned size)
>          if (!(s->capareg & SDHC_CAN_DO_DMA)) {
>              value &= ~SDHC_TRNS_DMA;
>          }
> -        MASKED_WRITE(s->trnmod, mask, value & MASK_TRNMOD);
> +        MASKED_WRITE(s->trnmod, mask, value & SDHC_TRNMOD_MASK);
>          MASKED_WRITE(s->cmdreg, mask >> 16, value >> 16);
>
>          /* Writing to the upper byte of CMDREG triggers SD command 
> generation */
> --
> 2.15.1
>
>

Reply via email to