[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/18] hw/sd: sd: Correctly set the high capacity bit
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 08/18] hw/sd: sd: Correctly set the high capacity bit |
Date: |
Sat, 15 Aug 2020 10:38:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 8/14/20 6:40 PM, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> Per the SD spec, Standard Capacity SD Memory Card (SDSC) supports
> capacity up to and including 2 GiB.
>
Fixes: 2d7adea4fe ("hw/sd: Support SDHC size cards")
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
> hw/sd/sd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 51f5900..5e7fc3f 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -313,7 +313,7 @@ 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 * GiB) {
> + if (sd->size > 2 * GiB) {
But you need to fix sd_set_csd() too, else this is incomplete.
Thanks,
Phil.
> sd->ocr = FIELD_DP32(sd->ocr, OCR, CARD_CAPACITY, 1);
> }
> }
>
- [PATCH 04/18] hw/riscv: Initial support for Microchip PolarFire SoC Icicle Kit board, (continued)
- [PATCH 04/18] hw/riscv: Initial support for Microchip PolarFire SoC Icicle Kit board, Bin Meng, 2020/08/14
- [PATCH 05/18] hw/char: Add Microchip PolarFire SoC MMUART emulation, Bin Meng, 2020/08/14
- [PATCH 06/18] hw/riscv: microchip_pfsoc: Connect 5 MMUARTs, Bin Meng, 2020/08/14
- [PATCH 07/18] hw/sd: sd: Fix incorrect populated function switch status data structure, Bin Meng, 2020/08/14
- [PATCH 08/18] hw/sd: sd: Correctly set the high capacity bit, Bin Meng, 2020/08/14
- Re: [PATCH 08/18] hw/sd: sd: Correctly set the high capacity bit,
Philippe Mathieu-Daudé <=
- [PATCH 09/18] hw/sd: sdhci: Make sdhci_poweron_reset() internal visible, Bin Meng, 2020/08/14
- [PATCH 10/18] hw/sd: Add Cadence SDHCI emulation, Bin Meng, 2020/08/14
- [PATCH 11/18] hw/riscv: microchip_pfsoc: Connect a Cadence SDHCI controller and an SD card, Bin Meng, 2020/08/14
- [PATCH 12/18] hw/dma: Add Microchip PolarFire Soc DMA controller emulation, Bin Meng, 2020/08/14