diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2010-07-27 15:24:47 +0900 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-07-30 23:09:49 +0200 |
commit | 64e835fefcb16106c826f93962d3ef18cc9e044e (patch) | |
tree | 97d47e05107147536fa858dab65670b283563243 /hw/mips_fulong2e.c | |
parent | e77bf852ee827634d5849c4e721a403fb1d2bd3d (diff) | |
download | qemu-64e835fefcb16106c826f93962d3ef18cc9e044e.tar.gz qemu-64e835fefcb16106c826f93962d3ef18cc9e044e.tar.bz2 qemu-64e835fefcb16106c826f93962d3ef18cc9e044e.zip |
mips64el: fulong: PCI_DEVFN() clean up.
Use PCI_DEVFN() where appropriate.
The resulted stripped binary remains same
with/without thie patch.
Cc: Huacai Chen <zltjiangshi@gmail.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/mips_fulong2e.c')
-rw-r--r-- | hw/mips_fulong2e.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index a9bbff64b3..c6c13ca997 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -219,8 +219,8 @@ uint8_t eeprom_spd[0x80] = { #ifdef HAS_AUDIO static void audio_init (PCIBus *pci_bus) { - vt82c686b_ac97_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 5); - vt82c686b_mc97_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 6); + vt82c686b_ac97_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 5)); + vt82c686b_mc97_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 6)); } #endif @@ -349,18 +349,18 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS); } - via_devfn = vt82c686b_init(pci_bus, FULONG2E_VIA_SLOT << 3); + via_devfn = vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0)); if (via_devfn < 0) { fprintf(stderr, "vt82c686b_init error \n"); exit(1); } isa_bus_irqs(i8259); - vt82c686b_ide_init(pci_bus, hd, (FULONG2E_VIA_SLOT << 3) + 1); - usb_uhci_vt82c686b_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 2); - usb_uhci_vt82c686b_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 3); + vt82c686b_ide_init(pci_bus, hd, PCI_DEVFN(FULONG2E_VIA_SLOT, 1)); + usb_uhci_vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 2)); + usb_uhci_vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 3)); - smbus = vt82c686b_pm_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 4, + smbus = vt82c686b_pm_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 4), 0xeee1, NULL); eeprom_buf = qemu_mallocz(8 * 256); /* XXX: make this persistent */ memcpy(eeprom_buf, eeprom_spd, sizeof(eeprom_spd)); |