qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 16/18] sdcard: add a 'uhs' property, update t


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v3 16/18] sdcard: add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit
Date: Thu, 25 Jan 2018 07:37:59 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/25/2018 07:30 AM, Philippe Mathieu-Daudé wrote:
> On 01/23/2018 12:30 AM, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>> ---
>>  hw/sd/sd.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
>> index 27176ba33e..b3b6859bc4 100644
>> --- a/hw/sd/sd.c
>> +++ b/hw/sd/sd.c
>> @@ -93,6 +93,7 @@ struct SDState {
>>      /* Configurable properties */
>>      BlockBackend *blk;
>>      bool spi;
>> +    uint8_t uhs_supported;
>>  
>>      uint32_t mode;    /* current card mode, one of SDCardModes */
>>      int32_t state;    /* current card state, one of SDCardStates */
>> @@ -289,6 +290,8 @@ static void sd_reset_ocr(SDState *sd)
>>  {
>>      /* All voltages OK */
>>      sd->ocr = R_OCR_VDD_VOLTAGE_WIN_HI_MASK;
>> +
>> +    sd->ocr = FIELD_DP32(sd->ocr, OCR, ACCEPT_SWITCH_1V8, 
>> !!sd->uhs_supported);
> 
> This patch has to go after this series #17 "sdcard: implement the UHS-I
> SWITCH_FUNCTION entries (Spec v3)"

Also although the SD interface is working/tested, the MMC interface is
missing from this series, and UHS enabled MMC cards are not usable:

kernel: mmc0: SDHCI controller on PCI [0000:00:05.0] using ADMA
kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
kernel: mmc0: Skipping voltage switch
[mmc kthread looping]

> 
>>  }
>>  
>>  static void sd_ocr_powerup(void *opaque)
>> @@ -2107,6 +2110,7 @@ static Property sd_properties[] = {
>>       * board to ensure that ssi transfers only occur when the chip select
>>       * is asserted.  */
>>      DEFINE_PROP_BOOL("spi", SDState, spi, false),
>> +    DEFINE_PROP_UINT8("uhs", SDState, uhs_supported, UHS_NOT_SUPPORTED),
>>      DEFINE_PROP_END_OF_LIST()
>>  };
>>  
>>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]