qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 08/14] hw/sd/sd: Allow for inverting polarities of presence a


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 08/14] hw/sd/sd: Allow for inverting polarities of presence and write-protect GPIOs
Date: Sun, 12 Jan 2025 19:06:04 +0100
User-agent: Mozilla Thunderbird

On 9/1/25 17:20, Bernhard Beschow wrote:


Am 9. Januar 2025 11:40:10 UTC schrieb "Philippe Mathieu-Daudé" 
<philmd@linaro.org>:
Hi Bernhard,

On 8/1/25 10:25, Bernhard Beschow wrote:
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
   hw/sd/sd.c | 12 ++++++++----
   1 file changed, 8 insertions(+), 4 deletions(-)


@@ -876,8 +878,8 @@ static void sd_reset(DeviceState *dev)
       sd->cmd_line = true;
       sd->multi_blk_cnt = 0;
   -    qemu_set_irq(sd->readonly_cb, sd_get_readonly(sd));
-    qemu_set_irq(sd->inserted_cb, sd_get_inserted(sd));
+    qemu_set_irq(sd->readonly_cb, sd_get_readonly(sd) ^ 
sd->readonly_active_low);

Please embed in sd_get_readonly(),

+    qemu_set_irq(sd->inserted_cb, sd_get_inserted(sd) ^ 
sd->inserted_active_low);

and sd_get_inserted().

Are you sure? I deliberately implemented it as is because embedding would 
change the internal logic of the device as well as SDCardClass::{get_inserted, 
get_readonly}.

Yes, this is why I requested that change. Why don't you think it is correct?


Best regards,
Bernhard

With the requested changes:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>





reply via email to

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