diff --git a/qemu/hw/mc1322x.c b/qemu/hw/mc1322x.c index 39bf026d5..b1e0ca2a4 100644 --- a/qemu/hw/mc1322x.c +++ b/qemu/hw/mc1322x.c @@ -11,6 +11,7 @@ #include "sysemu.h" #include "boards.h" #include "flash.h" +#include "block.h" static const int sector_len = 128 * 1024; @@ -36,9 +37,17 @@ struct mc1322x_state_s *mc1322x_init(void) cpu_register_physical_memory(MC1322X_RAMBASE, MC1322X_RAMSIZE, qemu_ram_alloc(MC1322X_RAMSIZE) | IO_MEM_RAM); + index = drive_get_index(IF_MTD, 0, 0); + fprintf(stderr, "rom device index %d\n",index); + cpu_register_physical_memory(MC1322X_ROMBASE, MC1322X_ROMSIZE,0); + if(0