aboutsummaryrefslogtreecommitdiffstats
path: root/hw/goldfish_device.h
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-12-05 09:54:44 -0800
committerSan Mehat <san@google.com>2009-12-07 14:48:32 -0800
commit68a8f7b5ed6ee2bbbc7b67070b9c401c2276426f (patch)
tree59d93e62f0ee5789b80986b347cc1c52dbefb21a /hw/goldfish_device.h
parentdc3dd741551c323bb853782656c0d693db98ecdc (diff)
downloadexternal_qemu-68a8f7b5ed6ee2bbbc7b67070b9c401c2276426f.zip
external_qemu-68a8f7b5ed6ee2bbbc7b67070b9c401c2276426f.tar.gz
external_qemu-68a8f7b5ed6ee2bbbc7b67070b9c401c2276426f.tar.bz2
qemu: android: Add support for multiple SD cards
Add commandline support for an additional SD card, and plumb support to the MMC emulation layer. This patch also reworks the way the hw emulation layer registers devices. Previously, the mmc virtual hardware was only created if the sdcard image existed. Now, two virtual MMC controllers are *always* created as on real hardware. When a request is made to one of our controllers which has no image file bound to it, a new interrupt status indicating a command timeout is sent to the guest driver, as is standard with MMC controllers. This patch also sets the stage for supporting hot-add / hot-remove. Signed-off-by: San Mehat <san@google.com> qemu: android: Integrate card detect into the virtual mmc hardware and wire it up to the STATE_CHANGE irq status Signed-off-by: San Mehat <san@google.com> fixups from review - mmc now works with legacy drivers Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'hw/goldfish_device.h')
-rw-r--r--hw/goldfish_device.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/goldfish_device.h b/hw/goldfish_device.h
index d04a166..7eb21de 100644
--- a/hw/goldfish_device.h
+++ b/hw/goldfish_device.h
@@ -46,7 +46,11 @@ void goldfish_audio_init(uint32_t base, int id, const char* input_source);
void goldfish_battery_init();
void goldfish_battery_set_prop(int ac, int property, int value);
void goldfish_battery_display(void (* callback)(void *data, const char* string), void *data);
-void goldfish_mmc_init(uint32_t base, int id, BlockDriverState* bs);
+
+void goldfish_mmc_init(uint32_t base, int id);
+void goldfish_mmc_insert(int id, BlockDriverState* bs);
+void goldfish_mmc_remove(int id, BlockDriverState *bs);
+
void *goldfish_switch_add(char *name, uint32_t (*writefn)(void *opaque, uint32_t state), void *writeopaque, int id);
void goldfish_switch_set_state(void *opaque, uint32_t state);