]> git.proxmox.com Git - qemu.git/blobdiff - hw/mcf5208.c
usb-ehci: Connect Status bit is read only, don't allow changing it by the guest
[qemu.git] / hw / mcf5208.c
index 46bcfe75a6c8cb6b5cc310d7091d5c95fe72ef41..17a692d4a33e8911a3cdc73f30841dcfec84b7a8 100644 (file)
@@ -42,7 +42,7 @@ static void m5208_timer_update(m5208_timer_state *s)
         qemu_irq_lower(s->irq);
 }
 
-static void m5208_timer_write(void *opaque, a_target_phys_addr offset,
+static void m5208_timer_write(void *opaque, target_phys_addr_t offset,
                               uint32_t value)
 {
     m5208_timer_state *s = (m5208_timer_state *)opaque;
@@ -104,7 +104,7 @@ static void m5208_timer_trigger(void *opaque)
     m5208_timer_update(s);
 }
 
-static uint32_t m5208_timer_read(void *opaque, a_target_phys_addr addr)
+static uint32_t m5208_timer_read(void *opaque, target_phys_addr_t addr)
 {
     m5208_timer_state *s = (m5208_timer_state *)opaque;
     switch (addr) {
@@ -132,7 +132,7 @@ static CPUWriteMemoryFunc * const m5208_timer_writefn[] = {
    m5208_timer_write
 };
 
-static uint32_t m5208_sys_read(void *opaque, a_target_phys_addr addr)
+static uint32_t m5208_sys_read(void *opaque, target_phys_addr_t addr)
 {
     switch (addr) {
     case 0x110: /* SDCS0 */
@@ -153,7 +153,7 @@ static uint32_t m5208_sys_read(void *opaque, a_target_phys_addr addr)
     }
 }
 
-static void m5208_sys_write(void *opaque, a_target_phys_addr addr,
+static void m5208_sys_write(void *opaque, target_phys_addr_t addr,
                             uint32_t value)
 {
     hw_error("m5208_sys_write: Bad offset 0x%x\n", (int)addr);
@@ -179,7 +179,8 @@ static void mcf5208_sys_init(qemu_irq *pic)
     int i;
 
     iomemtype = cpu_register_io_memory(m5208_sys_readfn,
-                                       m5208_sys_writefn, NULL);
+                                       m5208_sys_writefn, NULL,
+                                       DEVICE_NATIVE_ENDIAN);
     /* SDRAMC.  */
     cpu_register_physical_memory(0xfc0a8000, 0x00004000, iomemtype);
     /* Timers.  */
@@ -188,14 +189,15 @@ static void mcf5208_sys_init(qemu_irq *pic)
         bh = qemu_bh_new(m5208_timer_trigger, s);
         s->timer = ptimer_init(bh);
         iomemtype = cpu_register_io_memory(m5208_timer_readfn,
-                                           m5208_timer_writefn, s);
+                                           m5208_timer_writefn, s,
+                                           DEVICE_NATIVE_ENDIAN);
         cpu_register_physical_memory(0xfc080000 + 0x4000 * i, 0x00004000,
                                      iomemtype);
         s->irq = pic[4 + i];
     }
 }
 
-static void mcf5208evb_init(a_ram_addr ram_size,
+static void mcf5208evb_init(ram_addr_t ram_size,
                      const char *boot_device,
                      const char *kernel_filename, const char *kernel_cmdline,
                      const char *initrd_filename, const char *cpu_model)
@@ -203,7 +205,7 @@ static void mcf5208evb_init(a_ram_addr ram_size,
     CPUState *env;
     int kernel_size;
     uint64_t elf_entry;
-    a_target_phys_addr entry;
+    target_phys_addr_t entry;
     qemu_irq *pic;
 
     if (!cpu_model)
@@ -220,11 +222,11 @@ static void mcf5208evb_init(a_ram_addr ram_size,
 
     /* DRAM at 0x40000000 */
     cpu_register_physical_memory(0x40000000, ram_size,
-        qemu_ram_alloc(ram_size) | IO_MEM_RAM);
+        qemu_ram_alloc(NULL, "mcf5208.ram", ram_size) | IO_MEM_RAM);
 
     /* Internal SRAM.  */
     cpu_register_physical_memory(0x80000000, 16384,
-        qemu_ram_alloc(16384) | IO_MEM_RAM);
+        qemu_ram_alloc(NULL, "mcf5208.sram", 16384) | IO_MEM_RAM);
 
     /* Internal peripherals.  */
     pic = mcf_intc_init(0xfc048000, env);
@@ -270,8 +272,8 @@ static void mcf5208evb_init(a_ram_addr ram_size,
         exit(1);
     }
 
-    kernel_size = load_elf(kernel_filename, 0, &elf_entry, NULL, NULL,
-                           1, ELF_MACHINE, 0);
+    kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
+                           NULL, NULL, 1, ELF_MACHINE, 0);
     entry = elf_entry;
     if (kernel_size < 0) {
         kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL);