Revision 02ce600c hw/spitz.c

b/hw/spitz.c
1069 1069
    spitz_hsync ^= 1;
1070 1070
}
1071 1071

  
1072
static void spitz_mmc_coverswitch_change(void *opaque, int in)
1073
{
1074
    struct pxa2xx_state_s *cpu = (struct pxa2xx_state_s *) opaque;
1075
    qemu_set_irq(pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_DETECT], in);
1076
}
1077

  
1078
static void spitz_mmc_writeprotect_change(void *opaque, int wp)
1079
{
1080
    struct pxa2xx_state_s *cpu = (struct pxa2xx_state_s *) opaque;
1081
    qemu_set_irq(pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_WP], wp);
1082
}
1083

  
1084 1072
static void spitz_gpio_setup(struct pxa2xx_state_s *cpu, int slots)
1085 1073
{
1086 1074
    qemu_irq lcd_hsync;
......
1096 1084
    pxa2xx_lcd_vsync_notifier(cpu->lcd, lcd_hsync);
1097 1085

  
1098 1086
    /* MMC/SD host */
1099
    pxa2xx_mmci_handlers(cpu->mmc, cpu, spitz_mmc_writeprotect_change,
1100
                    spitz_mmc_coverswitch_change);
1087
    pxa2xx_mmci_handlers(cpu->mmc,
1088
                    pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_WP],
1089
                    pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_SD_DETECT]);
1101 1090

  
1102 1091
    /* Battery lock always closed */
1103 1092
    qemu_irq_raise(pxa2xx_gpio_in_get(cpu->gpio)[SPITZ_GPIO_BAT_COVER]);

Also available in: Unified diff