Skip to contentSkip to conversation

hw/sd/sdcard: Remove sd_set_cb()

PATCH In review Cédric Le Goater 4 participants 6 messages Jan 8, 2025 – Jan 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/sd/sdcard: Remove sd_set_cb()

Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
Remove omap2_mmc device").

---
 include/hw/sd/sdcard_legacy.h | 1 -
 hw/sd/sd.c                    | 8 --------
 2 files changed, 9 deletions(-)
include/hw/sd/sdcard_legacy.h +0 -1
index 0dc388955512..a121232560d7 100644
@@ -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
hw/sd/sd.c +0 -8
index 3e8fa1e35764..6765f743e118 100644
@@ -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);
Signature · 1 line
2.47.1
#2 lore raw
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 2 lines · Cédric Le Goater

Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
Remove omap2_mmc device").

https://lore.kernel.org/qemu-devel/[email protected]/
;)

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.

#3 lore raw
Quoted 6 lines · Cédric Le Goater
Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 2 lines · Cédric Le Goater

Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
Remove omap2_mmc device").

Quoted 7 lines
Quoted 3 lines

https://lore.kernel.org/qemu-devel/[email protected]/
;)

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

#4 lore raw
In reply to Philippe Mathieu-Daudé

Am 8. Januar 2025 10:43:07 UTC schrieb "Philippe Mathieu-Daudé" <[email protected]>:

Quoted 6 lines · Cédric Le Goater
Quoted 2 lines

Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
Remove omap2_mmc device").

https://lore.kernel.org/qemu-devel/[email protected]/
;)

https://lore.kernel.org/qemu-devel/[email protected]/ ;)

Quoted 9 lines
Quoted 7 lines
---
  include/hw/sd/sdcard_legacy.h | 1 -
  hw/sd/sd.c                    | 8 --------
  2 files changed, 9 deletions(-)
#5 lore raw
Quoted 11 lines · Bernhard Beschow

Am 8. Januar 2025 10:43:07 UTC schrieb "Philippe Mathieu-Daudé" <[email protected]>:

Quoted 6 lines · Cédric Le Goater
Quoted 2 lines

Last user of sd_set_cb() was removed in commit ce5dd27534b0 ("hw/sd:
Remove omap2_mmc device").

https://lore.kernel.org/qemu-devel/[email protected]/
;)

https://lore.kernel.org/qemu-devel/[email protected]/ ;)

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

Thanks,

C.