Diff for /qemu/hw/omap_sx1.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 17:24:46 version 1.1.1.3, 2018/04/24 17:39:27
Line 88  static void static_write(void *opaque, t Line 88  static void static_write(void *opaque, t
 #endif  #endif
 }  }
   
 static CPUReadMemoryFunc *static_readfn[] = {  static CPUReadMemoryFunc * const static_readfn[] = {
     static_readb,      static_readb,
     static_readh,      static_readh,
     static_readw,      static_readw,
 };  };
   
 static CPUWriteMemoryFunc *static_writefn[] = {  static CPUWriteMemoryFunc * const static_writefn[] = {
     static_write,      static_write,
     static_write,      static_write,
     static_write,      static_write,
Line 127  static void sx1_init(ram_addr_t ram_size Line 127  static void sx1_init(ram_addr_t ram_size
     static uint32_t cs2val = 0x00001139;      static uint32_t cs2val = 0x00001139;
     static uint32_t cs3val = 0x00001139;      static uint32_t cs3val = 0x00001139;
     ram_addr_t phys_flash;      ram_addr_t phys_flash;
     int index;      DriveInfo *dinfo;
     int fl_idx;      int fl_idx;
     uint32_t flash_size = flash0_size;      uint32_t flash_size = flash0_size;
   
Line 151  static void sx1_init(ram_addr_t ram_size Line 151  static void sx1_init(ram_addr_t ram_size
   
     fl_idx = 0;      fl_idx = 0;
   
     if ((index = drive_get_index(IF_PFLASH, 0, fl_idx)) > -1) {      if ((dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
         if (!pflash_cfi01_register(OMAP_CS0_BASE, qemu_ram_alloc(flash_size),          if (!pflash_cfi01_register(OMAP_CS0_BASE, qemu_ram_alloc(flash_size),
             drives_table[index].bdrv, sector_size, flash_size / sector_size,              dinfo->bdrv, sector_size, flash_size / sector_size,
             4, 0, 0, 0, 0)) {              4, 0, 0, 0, 0)) {
             fprintf(stderr, "qemu: Error registering flash memory %d.\n",              fprintf(stderr, "qemu: Error registering flash memory %d.\n",
                            fl_idx);                             fl_idx);
Line 162  static void sx1_init(ram_addr_t ram_size Line 162  static void sx1_init(ram_addr_t ram_size
     }      }
   
     if ((version == 1) &&      if ((version == 1) &&
             (index = drive_get_index(IF_PFLASH, 0, fl_idx)) > -1) {              (dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
         cpu_register_physical_memory(OMAP_CS1_BASE, flash1_size,          cpu_register_physical_memory(OMAP_CS1_BASE, flash1_size,
                         (phys_flash = qemu_ram_alloc(flash1_size)) |                          (phys_flash = qemu_ram_alloc(flash1_size)) |
                         IO_MEM_ROM);                          IO_MEM_ROM);
Line 171  static void sx1_init(ram_addr_t ram_size Line 171  static void sx1_init(ram_addr_t ram_size
                         OMAP_CS1_SIZE - flash1_size, io);                          OMAP_CS1_SIZE - flash1_size, io);
   
         if (!pflash_cfi01_register(OMAP_CS1_BASE, qemu_ram_alloc(flash1_size),          if (!pflash_cfi01_register(OMAP_CS1_BASE, qemu_ram_alloc(flash1_size),
             drives_table[index].bdrv, sector_size, flash1_size / sector_size,              dinfo->bdrv, sector_size, flash1_size / sector_size,
             4, 0, 0, 0, 0)) {              4, 0, 0, 0, 0)) {
             fprintf(stderr, "qemu: Error registering flash memory %d.\n",              fprintf(stderr, "qemu: Error registering flash memory %d.\n",
                            fl_idx);                             fl_idx);

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


unix.superglobalmegacorp.com