[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 01/18] sdcard: Don't always set the high capa
From: |
Alistair Francis |
Subject: |
Re: [Qemu-devel] [PATCH v3 01/18] sdcard: Don't always set the high capacity bit |
Date: |
Wed, 31 Jan 2018 08:15:53 -0800 |
On Mon, Jan 22, 2018 at 7:30 PM, Philippe Mathieu-Daudé <address@hidden> wrote:
> Don't set the high capacity bit by default as it will be set if required
> in the sd_set_csd() function.
>
> [based on a patch from Alistair Francis <address@hidden>
> and Peter Ogden <address@hidden> from qemu/xilinx tag xilinx-v2015.4]
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> hw/sd/sd.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 437ce25f79..20764451f2 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -289,6 +289,10 @@ static void sd_ocr_powerup(void *opaque)
>
> /* card power-up OK */
> sd->ocr = FIELD_DP32(sd->ocr, OCR, CARD_POWER_UP, 1);
> +
> + if (sd->size > 1 * G_BYTE) {
> + sd->ocr = FIELD_DP32(sd->ocr, OCR, CARD_CAPACITY, 1);
> + }
> }
>
> static void sd_reset_scr(SDState *sd)
> @@ -393,7 +397,6 @@ static void sd_reset_csd(SDState *sd, uint64_t size)
> sd->csd[13] = 0x40;
> sd->csd[14] = 0x00;
> sd->csd[15] = 0x00;
> - sd->ocr |= 1 << 30; /* High Capacity SD Memory Card */
> }
> }
>
> --
> 2.15.1
>
>
- [Qemu-devel] [PATCH v3 00/18] SDCard: bugfixes, support UHS-I (part 5), Philippe Mathieu-Daudé, 2018/01/22
- [Qemu-devel] [PATCH v3 01/18] sdcard: Don't always set the high capacity bit, Philippe Mathieu-Daudé, 2018/01/22
- Re: [Qemu-devel] [PATCH v3 01/18] sdcard: Don't always set the high capacity bit,
Alistair Francis <=
- [Qemu-devel] [PATCH v3 02/18] sdcard: update the CSD CRC register regardless the CSD structure version, Philippe Mathieu-Daudé, 2018/01/22
- [Qemu-devel] [PATCH v3 03/18] sdcard: fix the 'maximum data transfer rate' to 25MHz, Philippe Mathieu-Daudé, 2018/01/22
- [Qemu-devel] [PATCH v3 04/18] sdcard: clean the SCR register and add few comments, Philippe Mathieu-Daudé, 2018/01/22
- [Qemu-devel] [PATCH v3 05/18] sdcard: remove commands from unsupported old MMC specification, Philippe Mathieu-Daudé, 2018/01/22
- [Qemu-devel] [PATCH v3 06/18] sdcard: simplify using the ldst API, Philippe Mathieu-Daudé, 2018/01/22
- [Qemu-devel] [PATCH v3 07/18] sdcard: use the correct masked OCR in the R3 reply, Philippe Mathieu-Daudé, 2018/01/22