[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: |
Mon, 12 Mar 2018 13:36:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/09/2018 06:06 PM, Peter Maydell wrote:
> On 9 March 2018 at 15:36, Philippe Mathieu-Daudé <address@hidden> wrote:
>> [based on a patch from Alistair Francis <address@hidden>
>> from qemu/xilinx tag xilinx-v2015.2]
>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>> ---
>> hw/sd/sd.c | 148
>> +++++++++++++++++++++++++++++++++++++++++++++--------
>> hw/sd/trace-events | 1 +
>> 2 files changed, 127 insertions(+), 22 deletions(-)
>>
>> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
>> index 235e0518d6..b907d62aef 100644
>> --- a/hw/sd/sd.c
>> +++ b/hw/sd/sd.c
>> @@ -124,6 +124,7 @@ struct SDState {
>> bool enable;
>> uint8_t dat_lines;
>> bool cmd_line;
>> + bool uhs_enabled;
>
> Oh, and what's the difference between s->uhs_enabled = false
> (this patch) and s->uhs_mode = UHS_NOT_SUPPORTED (next patch) ?
>
> Do we need both? If so, a comment noting the difference would help
> people to know which one various bits of code should be checking.
Ok.
The 'uhs_mode' is a read-only property before realize().
Now if the sdcard supports any UHS, the host may negotiate to switch to
UHS mode.
To enter this mode with voltage level adjusted, the card needs to
'soft-reset' itself in the new mode. We use 'uhs_enabled' to track this
runtime state. Maybe 'uhs_active' is more explicit?
I intended to keep the properties vs runtime fields separated in the
SDState.
>
> thanks
> -- PMM
>
- [Qemu-devel] [PATCH 3/8] sdcard: Display which protocol is used when tracing (SD or SPI), (continued)
- [Qemu-devel] [PATCH 3/8] sdcard: Display which protocol is used when tracing (SD or SPI), Philippe Mathieu-Daudé, 2018/03/09
- [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Philippe Mathieu-Daudé, 2018/03/09
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Peter Maydell, 2018/03/09
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Edgar E. Iglesias, 2018/03/09
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Philippe Mathieu-Daudé, 2018/03/09
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Philippe Mathieu-Daudé, 2018/03/12
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Philippe Mathieu-Daudé, 2018/03/12
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Peter Maydell, 2018/03/12
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Philippe Mathieu-Daudé, 2018/03/12
- Re: [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3), Peter Maydell, 2018/03/09
[Qemu-devel] [PATCH 8/8] MAINTAINERS: Add entries for SD (SDHCI, SDBus, SDCard), Philippe Mathieu-Daudé, 2018/03/09
Re: [Qemu-devel] [PATCH 0/8] SDCard: improve tracing, support UHS-I, Peter Maydell, 2018/03/09