diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 04:51:10 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 04:51:10 +0000 |
commit | e4bcb14c79fb63a35aef3eb39e02c16c19b8b28d (patch) | |
tree | 06bee4b9dbf4c7b50e20c9996924d7d132cdfec2 /hw/integratorcp.c | |
parent | 7233b355571ad2a8e7aec7eb19db5f530e81f052 (diff) |
Add -drive parameter, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/integratorcp.c')
-rw-r--r-- | hw/integratorcp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/integratorcp.c b/hw/integratorcp.c index f1d71ff873..549cc25df8 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -478,6 +478,7 @@ static void integratorcp_init(int ram_size, int vga_ram_size, uint32_t bios_offset; qemu_irq *pic; qemu_irq *cpu_pic; + int sd; if (!cpu_model) cpu_model = "arm926"; @@ -506,7 +507,12 @@ static void integratorcp_init(int ram_size, int vga_ram_size, icp_control_init(0xcb000000); pl050_init(0x18000000, pic[3], 0); pl050_init(0x19000000, pic[4], 1); - pl181_init(0x1c000000, sd_bdrv, pic[23], pic[24]); + sd = drive_get_index(IF_SD, 0, 0); + if (sd == -1) { + fprintf(stderr, "qemu: missing SecureDigital card\n"); + exit(1); + } + pl181_init(0x1c000000, drives_table[sd].bdrv, pic[23], pic[24]); if (nd_table[0].vlan) { if (nd_table[0].model == NULL || strcmp(nd_table[0].model, "smc91c111") == 0) { |