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

version 1.1.1.1, 2018/04/24 16:53:39 version 1.1.1.2, 2018/04/24 17:24:46
Line 23 Line 23
  * GNU General Public License for more details.   * GNU General Public License for more details.
  *   *
  * You should have received a copy of the GNU General Public License along   * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,   * with this program; if not, see <http://www.gnu.org/licenses/>.
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.  
  */   */
 #include "hw.h"  #include "hw.h"
 #include "sysemu.h"  #include "sysemu.h"
Line 115  static struct arm_boot_info sx1_binfo =  Line 114  static struct arm_boot_info sx1_binfo = 
     .board_id = 0x265,      .board_id = 0x265,
 };  };
   
 static void sx1_init(ram_addr_t ram_size, int vga_ram_size,  static void sx1_init(ram_addr_t ram_size,
                 const char *boot_device,                  const char *boot_device,
                 const char *kernel_filename, const char *kernel_cmdline,                  const char *kernel_filename, const char *kernel_cmdline,
                 const char *initrd_filename, const char *cpu_model,                  const char *initrd_filename, const char *cpu_model,
Line 142  static void sx1_init(ram_addr_t ram_size Line 141  static void sx1_init(ram_addr_t ram_size
     cpu_register_physical_memory(OMAP_CS0_BASE, flash_size,      cpu_register_physical_memory(OMAP_CS0_BASE, flash_size,
                     (phys_flash = qemu_ram_alloc(flash_size)) | IO_MEM_ROM);                      (phys_flash = qemu_ram_alloc(flash_size)) | IO_MEM_ROM);
   
     io = cpu_register_io_memory(0, static_readfn, static_writefn, &cs0val);      io = cpu_register_io_memory(static_readfn, static_writefn, &cs0val);
     cpu_register_physical_memory(OMAP_CS0_BASE + flash_size,      cpu_register_physical_memory(OMAP_CS0_BASE + flash_size,
                     OMAP_CS0_SIZE - flash_size, io);                      OMAP_CS0_SIZE - flash_size, io);
     io = cpu_register_io_memory(0, static_readfn, static_writefn, &cs2val);      io = cpu_register_io_memory(static_readfn, static_writefn, &cs2val);
     cpu_register_physical_memory(OMAP_CS2_BASE, OMAP_CS2_SIZE, io);      cpu_register_physical_memory(OMAP_CS2_BASE, OMAP_CS2_SIZE, io);
     io = cpu_register_io_memory(0, static_readfn, static_writefn, &cs3val);      io = cpu_register_io_memory(static_readfn, static_writefn, &cs3val);
     cpu_register_physical_memory(OMAP_CS3_BASE, OMAP_CS3_SIZE, io);      cpu_register_physical_memory(OMAP_CS3_BASE, OMAP_CS3_SIZE, io);
   
     fl_idx = 0;      fl_idx = 0;
Line 167  static void sx1_init(ram_addr_t ram_size Line 166  static void sx1_init(ram_addr_t ram_size
         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);
         io = cpu_register_io_memory(0, static_readfn, static_writefn, &cs1val);          io = cpu_register_io_memory(static_readfn, static_writefn, &cs1val);
         cpu_register_physical_memory(OMAP_CS1_BASE + flash1_size,          cpu_register_physical_memory(OMAP_CS1_BASE + flash1_size,
                         OMAP_CS1_SIZE - flash1_size, io);                          OMAP_CS1_SIZE - flash1_size, io);
   
Line 179  static void sx1_init(ram_addr_t ram_size Line 178  static void sx1_init(ram_addr_t ram_size
         }          }
         fl_idx++;          fl_idx++;
     } else {      } else {
         io = cpu_register_io_memory(0, static_readfn, static_writefn, &cs1val);          io = cpu_register_io_memory(static_readfn, static_writefn, &cs1val);
         cpu_register_physical_memory(OMAP_CS1_BASE, OMAP_CS1_SIZE, io);          cpu_register_physical_memory(OMAP_CS1_BASE, OMAP_CS1_SIZE, io);
     }      }
   
Line 205  static void sx1_init(ram_addr_t ram_size Line 204  static void sx1_init(ram_addr_t ram_size
     //~ qemu_console_resize(ds, 640, 480);      //~ qemu_console_resize(ds, 640, 480);
 }  }
   
 static void sx1_init_v1(ram_addr_t ram_size, int vga_ram_size,  static void sx1_init_v1(ram_addr_t ram_size,
                 const char *boot_device,                  const char *boot_device,
                 const char *kernel_filename, const char *kernel_cmdline,                  const char *kernel_filename, const char *kernel_cmdline,
                 const char *initrd_filename, const char *cpu_model)                  const char *initrd_filename, const char *cpu_model)
 {  {
     sx1_init(ram_size, vga_ram_size, boot_device, kernel_filename,      sx1_init(ram_size, boot_device, kernel_filename,
                 kernel_cmdline, initrd_filename, cpu_model, 1);                  kernel_cmdline, initrd_filename, cpu_model, 1);
 }  }
   
 static void sx1_init_v2(ram_addr_t ram_size, int vga_ram_size,  static void sx1_init_v2(ram_addr_t ram_size,
                 const char *boot_device,                  const char *boot_device,
                 const char *kernel_filename, const char *kernel_cmdline,                  const char *kernel_filename, const char *kernel_cmdline,
                 const char *initrd_filename, const char *cpu_model)                  const char *initrd_filename, const char *cpu_model)
 {  {
     sx1_init(ram_size, vga_ram_size, boot_device, kernel_filename,      sx1_init(ram_size, boot_device, kernel_filename,
                 kernel_cmdline, initrd_filename, cpu_model, 2);                  kernel_cmdline, initrd_filename, cpu_model, 2);
 }  }
   
 QEMUMachine sx1_machine_v2 = {  static QEMUMachine sx1_machine_v2 = {
     .name = "sx1",      .name = "sx1",
     .desc = "Siemens SX1 (OMAP310) V2",      .desc = "Siemens SX1 (OMAP310) V2",
     .init = sx1_init_v2,      .init = sx1_init_v2,
     .ram_require = total_ram_v2 | RAMSIZE_FIXED,  
 };  };
   
 QEMUMachine sx1_machine_v1 = {  static QEMUMachine sx1_machine_v1 = {
     .name = "sx1-v1",      .name = "sx1-v1",
     .desc = "Siemens SX1 (OMAP310) V1",      .desc = "Siemens SX1 (OMAP310) V1",
     .init = sx1_init_v1,      .init = sx1_init_v1,
     .ram_require = total_ram_v1 | RAMSIZE_FIXED,  
 };  };
   
   static void sx1_machine_init(void)
   {
       qemu_register_machine(&sx1_machine_v2);
       qemu_register_machine(&sx1_machine_v1);
   }
   
   machine_init(sx1_machine_init);

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


unix.superglobalmegacorp.com