aboutsummaryrefslogtreecommitdiffstats
path: root/hw/android_arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/android_arm.c')
-rw-r--r--hw/android_arm.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/hw/android_arm.c b/hw/android_arm.c
index 32f6925..4ef4a10 100644
--- a/hw/android_arm.c
+++ b/hw/android_arm.c
@@ -42,7 +42,18 @@ static struct goldfish_device nand_device = {
/* Board init. */
-#define TEST_SWITCH 1
+static void goldfish_sdcard_init(int n, unsigned base)
+{
+ int idx = drive_get_index( IF_IDE, 0, n );
+
+ goldfish_mmc_init(base, n);
+
+ if (idx >= 0) {
+ goldfish_mmc_insert(n, drives_table[idx].bdrv);
+ }
+}
+
+// #define TEST_SWITCH 1
#if TEST_SWITCH
uint32_t switch_test_write(void *opaque, uint32_t state)
{
@@ -113,11 +124,9 @@ static void android_arm_init_(ram_addr_t ram_size,
#ifdef HAS_AUDIO
goldfish_audio_init(0xff004000, 0, audio_input_source);
#endif
- {
- int idx = drive_get_index( IF_IDE, 0, 0 );
- if (idx >= 0)
- goldfish_mmc_init(0xff005000, 0, drives_table[idx].bdrv);
- }
+
+ goldfish_sdcard_init(0, 0xff005000);
+ goldfish_sdcard_init(1, 0xff007000);
goldfish_memlog_init(0xff006000);