Revision 8e129e07 hw/palm.c

b/hw/palm.c
57 57
};
58 58

  
59 59
/* Palm Tunsgten|E support */
60

  
61
/* Shared GPIOs */
62
#define PALMTE_USBDETECT_GPIO	0
63
#define PALMTE_USB_OR_DC_GPIO	1
64
#define PALMTE_TSC_GPIO		4
65
#define PALMTE_PINTDAV_GPIO	6
66
#define PALMTE_MMC_WP_GPIO	8
67
#define PALMTE_MMC_POWER_GPIO	9
68
#define PALMTE_HDQ_GPIO		11
69
#define PALMTE_HEADPHONES_GPIO	14
70
#define PALMTE_SPEAKER_GPIO	15
71
/* MPU private GPIOs */
72
#define PALMTE_DC_GPIO		2
73
#define PALMTE_MMC_SWITCH_GPIO	4
74
#define PALMTE_MMC1_GPIO	6
75
#define PALMTE_MMC2_GPIO	7
76
#define PALMTE_MMC3_GPIO	11
77

  
60 78
static void palmte_microwire_setup(struct omap_mpu_state_s *cpu)
61 79
{
62 80
}
......
90 108
                        !(keycode & 0x80));
91 109
}
92 110

  
111
static void palmte_mmc_cover(void *opaque, int line, int level)
112
{
113
    struct omap_mpu_state_s *cpu = (struct omap_mpu_state_s *) opaque;
114

  
115
    qemu_set_irq(omap_mpuio_in_get(cpu->mpuio)[PALMTE_MMC_SWITCH_GPIO],
116
                    !level);
117
}
118

  
93 119
static void palmte_init(int ram_size, int vga_ram_size, int boot_device,
94 120
                DisplayState *ds, const char **fd_filename, int snapshot,
95 121
                const char *kernel_filename, const char *kernel_cmdline,
......
132 158

  
133 159
    qemu_add_kbd_event_handler(palmte_button_event, cpu);
134 160

  
161
    omap_mmc_handlers(cpu->mmc, 0,
162
                    qemu_allocate_irqs(palmte_mmc_cover, cpu, 1)[0]);
163

  
135 164
    /* Setup initial (reset) machine state */
136 165
    if (nb_option_roms) {
137 166
        rom_size = get_image_size(option_rom[0]);

Also available in: Unified diff