X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fppc_prep.c;h=7cb92c77fb3a9addb5a680c8ce32c240ea50768b;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=16d8915e5fda1695bc44c606ddbfd812496fe060;hpb=1192dad8798e4e4b72b14ff3a93c11cbb26eae5b;p=qemu diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index 16d8915..7cb92c7 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -107,7 +107,7 @@ static void _PPC_intack_write (void *opaque, // printf("%s: 0x%08x => 0x%08x\n", __func__, addr, value); } -static inline uint32_t _PPC_intack_read (target_phys_addr_t addr) +static always_inline uint32_t _PPC_intack_read (target_phys_addr_t addr) { uint32_t retval = 0; @@ -412,8 +412,9 @@ static uint32_t PREP_io_800_readb (void *opaque, uint32_t addr) return retval; } -static inline target_phys_addr_t prep_IO_address (sysctrl_t *sysctrl, - target_phys_addr_t addr) +static always_inline target_phys_addr_t prep_IO_address (sysctrl_t *sysctrl, + target_phys_addr_t + addr) { if (sysctrl->contiguous_map == 0) { /* 64 KB contiguous space for IOs */ @@ -632,16 +633,11 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, int boot_device, if (nb_nics1 > NE2000_NB_MAX) nb_nics1 = NE2000_NB_MAX; for(i = 0; i < nb_nics1; i++) { - if (nd_table[0].model == NULL - || strcmp(nd_table[0].model, "ne2k_isa") == 0) { + if (nd_table[i].model == NULL + || strcmp(nd_table[i].model, "ne2k_isa") == 0) { isa_ne2000_init(ne2000_io[i], i8259[ne2000_irq[i]], &nd_table[i]); - } else if (strcmp(nd_table[0].model, "?") == 0) { - fprintf(stderr, "qemu: Supported NICs: ne2k_isa\n"); - exit (1); } else { - /* Why ? */ - cpu_abort(env, "qemu: Unsupported NIC: %s\n", nd_table[0].model); - exit (1); + pci_nic_init(pci_bus, &nd_table[i], -1); } }