aboutsummaryrefslogtreecommitdiffstats
path: root/hw/r2d.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-04-11 22:27:23 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-04-13 20:17:24 +0200
commit612b2bd0ac17aeefa8041fadff3f094cf0f1f501 (patch)
treee744abf20ece813af63f2b859d199150b6f9f3ee /hw/r2d.c
parent7277e027bbbf708979c82c44714f9105bf8e62d7 (diff)
r2d: always enable IDE and flash
IDE and flash are part of the R2D board, and can't be removed. Emulate them even if there is no hard-drive plugged to the IDE or if the flash content is empty.
Diffstat (limited to 'hw/r2d.c')
-rw-r--r--hw/r2d.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/hw/r2d.c b/hw/r2d.c
index f3594dfcd..74b718a5c 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -253,18 +253,16 @@ static void r2d_init(ram_addr_t ram_size,
sm501_init(0x10000000, SM501_VRAM_SIZE, irq[SM501], serial_hds[2]);
/* onboard CF (True IDE mode, Master only). */
- if ((dinfo = drive_get(IF_IDE, 0, 0)) != NULL)
- mmio_ide_init(0x14001000, 0x1400080c, irq[CF_IDE], 1,
- dinfo, NULL);
+ dinfo = drive_get(IF_IDE, 0, 0);
+ mmio_ide_init(0x14001000, 0x1400080c, irq[CF_IDE], 1,
+ dinfo, NULL);
/* onboard flash memory */
- if ((dinfo = drive_get(IF_PFLASH, 0, 0)) != NULL) {
- pflash_cfi02_register(0x0, qemu_ram_alloc(FLASH_SIZE),
- dinfo->bdrv, (16 * 1024),
- FLASH_SIZE >> 16,
- 1, 4, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x555, 0x2aa, 0);
- }
+ pflash_cfi02_register(0x0, qemu_ram_alloc(FLASH_SIZE),
+ dinfo ? dinfo->bdrv : NULL, (16 * 1024),
+ FLASH_SIZE >> 16,
+ 1, 4, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x555, 0x2aa, 0);
/* NIC: rtl8139 on-board, and 2 slots. */
for (i = 0; i < nb_nics; i++)