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/spitz.c | |
parent | 38641a52f2335c470349c55d9b1679112da99399 (diff) |
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/spitz.c')
-rw-r--r-- | hw/spitz.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/hw/spitz.c b/hw/spitz.c index 73dccc9c65..14be70c708 100644 --- a/hw/spitz.c +++ b/hw/spitz.c @@ -1069,18 +1069,6 @@ static void spitz_lcd_hsync_handler(void *opaque, int line, int level) spitz_hsync ^= 1; } -static void spitz_mmc_coverswitch_change(void *opaque, int in) -{ - struct pxa2xx_state_s *cpu = (struct pxa2xx_state_s *) opaque; - qemu_set_irq(pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_DETECT], in); -} - -static void spitz_mmc_writeprotect_change(void *opaque, int wp) -{ - struct pxa2xx_state_s *cpu = (struct pxa2xx_state_s *) opaque; - qemu_set_irq(pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_WP], wp); -} - static void spitz_gpio_setup(struct pxa2xx_state_s *cpu, int slots) { qemu_irq lcd_hsync; @@ -1096,8 +1084,9 @@ static void spitz_gpio_setup(struct pxa2xx_state_s *cpu, int slots) pxa2xx_lcd_vsync_notifier(cpu->lcd, lcd_hsync); /* MMC/SD host */ - pxa2xx_mmci_handlers(cpu->mmc, cpu, spitz_mmc_writeprotect_change, - spitz_mmc_coverswitch_change); + pxa2xx_mmci_handlers(cpu->mmc, + pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_WP], + pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_DETECT]); /* Battery lock always closed */ qemu_irq_raise(pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_BAT_COVER]); |