[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3) |
Date: |
Wed, 9 May 2018 02:36:39 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Hi Peter,
On 03/09/2018 02:03 PM, Peter Maydell wrote:
> On 9 March 2018 at 15:36, Philippe Mathieu-Daudé <address@hidden> wrote:
[...]
>> static void sd_function_switch(SDState *sd, uint32_t arg)
>> {
>> - int i, mode, new_func;
>> - mode = !!(arg & 0x80000000);
>> -
>> - sd->data[0] = 0x00; /* Maximum current consumption */
>> - sd->data[1] = 0x01;
>> - sd->data[2] = 0x80; /* Supported group 6 functions */
>> - sd->data[3] = 0x01;
[...]
>> +
>> + stw_be_p(sd->data + 0, 0x0001); /* Maximum current consumption */
>
> Previously we were writing 0x00, 0x01 to the first 2 bytes of data;
> now we will write 0x01, 0x00. Are you sure that's right ? I guess
> it's the difference between claiming 1mA and 256mA.
Using stw_be_p() we still write [0x00, 0x01] (16-bit big endian), is
this correct?
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3),
Philippe Mathieu-Daudé <=