diff mbox series

hw/sd/sdcard: Remove sd_set_cb()

Message ID 20250108100240.960593-1-clg@redhat.com (mailing list archive)
State New
Headers show
Series hw/sd/sdcard: Remove sd_set_cb() | expand

Commit Message

Cédric Le Goater Jan. 8, 2025, 10:02 a.m. UTC
Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
Remove omap2_mmc device").

Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
 include/hw/sd/sdcard_legacy.h | 1 -
 hw/sd/sd.c                    | 8 --------
 2 files changed, 9 deletions(-)

Comments

Philippe Mathieu-Daudé Jan. 8, 2025, 10:43 a.m. UTC | #1
On 8/1/25 11:02, Cédric Le Goater wrote:
> Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
> Remove omap2_mmc device").

https://lore.kernel.org/qemu-devel/20240903200446.25921-2-philmd@linaro.org/
;)

> 
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>   include/hw/sd/sdcard_legacy.h | 1 -
>   hw/sd/sd.c                    | 8 --------
>   2 files changed, 9 deletions(-)
Cédric Le Goater Jan. 8, 2025, 10:46 a.m. UTC | #2
On 1/8/25 11:43, Philippe Mathieu-Daudé wrote:
> On 8/1/25 11:02, Cédric Le Goater wrote:
>> Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
>> Remove omap2_mmc device").
> 
> https://lore.kernel.org/qemu-devel/20240903200446.25921-2-philmd@linaro.org/
> ;)
> 

Ah ! good. I was wondering what to do of the '*_cb' IRQs and
'me_no_qdev_me_kill_mammoth_with_rocks' too. You dropped them
all.

Thanks,

C.
Peter Maydell Jan. 8, 2025, 12:20 p.m. UTC | #3
On Wed, 8 Jan 2025 at 10:47, Cédric Le Goater <clg@redhat.com> wrote:
>
> On 1/8/25 11:43, Philippe Mathieu-Daudé wrote:
> > On 8/1/25 11:02, Cédric Le Goater wrote:
> >> Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
> >> Remove omap2_mmc device").
> >
> > https://lore.kernel.org/qemu-devel/20240903200446.25921-2-philmd@linaro.org/
> > ;)
> >
>
> Ah ! good. I was wondering what to do of the '*_cb' IRQs and
> 'me_no_qdev_me_kill_mammoth_with_rocks' too. You dropped them
> all.

Yeah, but we still have a caller of sd_init()...

I was vaguely planning to do the qdev conversion of
omap_mmc (should be straightforward since we now have a
functional test that exercises sd card boot so we can
be confident we don't break it in the process), which would
then let us drop sd_init() entirely. I don't think this is
much work, but I don't expect to get to it this month because
I have a chunk of higher-priority stuff I need to focus on
first.

thanks
-- PMM
Bernhard Beschow Jan. 9, 2025, 10:22 a.m. UTC | #4
Am 8. Januar 2025 10:43:07 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>On 8/1/25 11:02, Cédric Le Goater wrote:
>> Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
>> Remove omap2_mmc device").
>
>https://lore.kernel.org/qemu-devel/20240903200446.25921-2-philmd@linaro.org/
>;)

https://lore.kernel.org/qemu-devel/20250108092538.11474-8-shentey@gmail.com/ ;)

>
>> 
>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>> ---
>>   include/hw/sd/sdcard_legacy.h | 1 -
>>   hw/sd/sd.c                    | 8 --------
>>   2 files changed, 9 deletions(-)
>
>
Cédric Le Goater Jan. 9, 2025, 10:34 a.m. UTC | #5
On 1/9/25 11:22, Bernhard Beschow wrote:
> 
> 
> Am 8. Januar 2025 10:43:07 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>> On 8/1/25 11:02, Cédric Le Goater wrote:
>>> Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
>>> Remove omap2_mmc device").
>>
>> https://lore.kernel.org/qemu-devel/20240903200446.25921-2-philmd@linaro.org/
>> ;)
> 
> https://lore.kernel.org/qemu-devel/20250108092538.11474-8-shentey@gmail.com/ ;)

OK. I'll let you decide what should be done in SD.
It's a real maze for me.

Thanks,

C.
diff mbox series

Patch

diff --git a/include/hw/sd/sdcard_legacy.h b/include/hw/sd/sdcard_legacy.h
index 0dc388955512..a121232560d7 100644
--- a/include/hw/sd/sdcard_legacy.h
+++ b/include/hw/sd/sdcard_legacy.h
@@ -36,7 +36,6 @@  SDState *sd_init(BlockBackend *blk, bool is_spi);
 int sd_do_command(SDState *card, SDRequest *request, uint8_t *response);
 void sd_write_byte(SDState *card, uint8_t value);
 uint8_t sd_read_byte(SDState *card);
-void sd_set_cb(SDState *card, qemu_irq readonly, qemu_irq insert);
 
 /* sd_enable should not be used -- it is only used on the nseries boards,
  * where it is part of a broken implementation of the MMC card slot switch
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 3e8fa1e35764..6765f743e118 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1034,14 +1034,6 @@  SDState *sd_init(BlockBackend *blk, bool is_spi)
     return sd;
 }
 
-void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq insert)
-{
-    sd->readonly_cb = readonly;
-    sd->inserted_cb = insert;
-    qemu_set_irq(readonly, sd->blk ? !blk_is_writable(sd->blk) : 0);
-    qemu_set_irq(insert, sd->blk ? blk_is_inserted(sd->blk) : 0);
-}
-
 static void sd_blk_read(SDState *sd, uint64_t addr, uint32_t len)
 {
     trace_sdcard_read_block(addr, len);