diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-17 14:34:44 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-17 14:34:44 +0000 |
commit | 02ce600c1e485a7da4a26166b5a75b68c6013fe1 (patch) | |
tree | bbaf336b9ed4300dc842ab6f1ed3beaeec66a5fd /hw/omap_mmc.c | |
parent | 38641a52f2335c470349c55d9b1679112da99399 (diff) | |
download | qemu-02ce600c1e485a7da4a26166b5a75b68c6013fe1.zip qemu-02ce600c1e485a7da4a26166b5a75b68c6013fe1.tar.gz qemu-02ce600c1e485a7da4a26166b5a75b68c6013fe1.tar.bz2 |
Convert SD cards code to use qemu_irq too.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3671 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/omap_mmc.c')
-rw-r--r-- | hw/omap_mmc.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/hw/omap_mmc.c b/hw/omap_mmc.c index 406b404..30ba9b6 100644 --- a/hw/omap_mmc.c +++ b/hw/omap_mmc.c @@ -25,7 +25,6 @@ struct omap_mmc_s { target_phys_addr_t base; qemu_irq irq; qemu_irq *dma; - qemu_irq handler[2]; omap_clk clk; SDState *card; uint16_t last_cmd; @@ -507,22 +506,6 @@ void omap_mmc_reset(struct omap_mmc_s *host) host->transfer = 0; } -static void omap_mmc_ro_cb(void *opaque, int level) -{ - struct omap_mmc_s *s = (struct omap_mmc_s *) opaque; - - if (s->handler[0]) - qemu_set_irq(s->handler[0], level); -} - -static void omap_mmc_cover_cb(void *opaque, int level) -{ - struct omap_mmc_s *s = (struct omap_mmc_s *) opaque; - - if (s->handler[1]) - qemu_set_irq(s->handler[1], level); -} - struct omap_mmc_s *omap_mmc_init(target_phys_addr_t base, qemu_irq irq, qemu_irq dma[], omap_clk clk) { @@ -542,13 +525,10 @@ struct omap_mmc_s *omap_mmc_init(target_phys_addr_t base, /* Instantiate the storage */ s->card = sd_init(sd_bdrv); - sd_set_cb(s->card, s, omap_mmc_ro_cb, omap_mmc_cover_cb); - return s; } void omap_mmc_handlers(struct omap_mmc_s *s, qemu_irq ro, qemu_irq cover) { - s->handler[0] = ro; - s->handler[1] = cover; + sd_set_cb(s->card, ro, cover); } |