diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-10 10:12:00 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-10 10:12:00 +0000 |
commit | 22548760ca36e3c9c716bf725194a846d1073855 (patch) | |
tree | 57643945499692088cb5d186a1fd5579ef4b8bbc /hw/sun4m.c | |
parent | 9800ee2677ab1f6d506a03086a2fbfe66fe09f5c (diff) | |
download | qemu-22548760ca36e3c9c716bf725194a846d1073855.zip |
Fix compiler warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4404 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sun4m.c')
-rw-r--r-- | hw/sun4m.c | 59 |
1 files changed, 25 insertions, 34 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c index 6c7fa46fb1..76caa89605 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -32,6 +32,8 @@ #include "boards.h" #include "firmware_abi.h" #include "scsi.h" +#include "pc.h" +#include "isa.h" //#define DEBUG_IRQ @@ -123,13 +125,6 @@ struct sun4d_hwdef { const char * const default_cpu_model; }; -/* TSC handling */ - -uint64_t cpu_get_tsc() -{ - return qemu_get_clock(vm_clock); -} - int DMA_get_channel_mode (int nchan) { return 0; @@ -238,13 +233,13 @@ static void nvram_init(m48t59_t *nvram, uint8_t *macaddr, const char *cmdline, static void *slavio_intctl; -void pic_info() +void pic_info(void) { if (slavio_intctl) slavio_pic_info(slavio_intctl); } -void irq_info() +void irq_info(void) { if (slavio_intctl) slavio_irq_info(slavio_intctl); @@ -319,7 +314,6 @@ static void secondary_cpu_reset(void *opaque) } static unsigned long sun4m_load_kernel(const char *kernel_filename, - const char *kernel_cmdline, const char *initrd_filename) { int linux_boot; @@ -384,7 +378,7 @@ static void sun4m_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size, int ret; char buf[1024]; BlockDriverState *fd[MAX_FD]; - int index; + int drive_index; /* init CPUs */ if (!cpu_model) @@ -506,9 +500,9 @@ static void sun4m_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size, if (hwdef->fd_base != (target_phys_addr_t)-1) { /* there is zero or one floppy drive */ memset(fd, 0, sizeof(fd)); - index = drive_get_index(IF_FLOPPY, 0, 0); - if (index != -1) - fd[0] = drives_table[index].bdrv; + drive_index = drive_get_index(IF_FLOPPY, 0, 0); + if (drive_index != -1) + fd[0] = drives_table[drive_index].bdrv; sun4m_fdctrl_init(slavio_irq[hwdef->fd_irq], hwdef->fd_base, fd, fdc_tc); @@ -524,17 +518,16 @@ static void sun4m_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size, espdma, *espdma_irq, esp_reset); for (i = 0; i < ESP_MAX_DEVS; i++) { - index = drive_get_index(IF_SCSI, 0, i); - if (index == -1) + drive_index = drive_get_index(IF_SCSI, 0, i); + if (drive_index == -1) continue; - esp_scsi_attach(main_esp, drives_table[index].bdrv, i); + esp_scsi_attach(main_esp, drives_table[drive_index].bdrv, i); } if (hwdef->cs_base != (target_phys_addr_t)-1) cs_init(hwdef->cs_base, hwdef->cs_irq, slavio_intctl); - kernel_size = sun4m_load_kernel(kernel_filename, kernel_cmdline, - initrd_filename); + kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename); nvram_init(nvram, (uint8_t *)&nd_table[0].macaddr, kernel_cmdline, boot_device, RAM_size, kernel_size, graphic_width, @@ -561,7 +554,7 @@ static void sun4c_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size, int ret; char buf[1024]; BlockDriverState *fd[MAX_FD]; - int index; + int drive_index; /* init CPU */ if (!cpu_model) @@ -658,9 +651,9 @@ static void sun4c_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size, if (hwdef->fd_base != (target_phys_addr_t)-1) { /* there is zero or one floppy drive */ fd[1] = fd[0] = NULL; - index = drive_get_index(IF_FLOPPY, 0, 0); - if (index != -1) - fd[0] = drives_table[index].bdrv; + drive_index = drive_get_index(IF_FLOPPY, 0, 0); + if (drive_index != -1) + fd[0] = drives_table[drive_index].bdrv; sun4m_fdctrl_init(slavio_irq[hwdef->fd_irq], hwdef->fd_base, fd, fdc_tc); @@ -676,14 +669,13 @@ static void sun4c_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size, espdma, *espdma_irq, esp_reset); for (i = 0; i < ESP_MAX_DEVS; i++) { - index = drive_get_index(IF_SCSI, 0, i); - if (index == -1) + drive_index = drive_get_index(IF_SCSI, 0, i); + if (drive_index == -1) continue; - esp_scsi_attach(main_esp, drives_table[index].bdrv, i); + esp_scsi_attach(main_esp, drives_table[drive_index].bdrv, i); } - kernel_size = sun4m_load_kernel(kernel_filename, kernel_cmdline, - initrd_filename); + kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename); nvram_init(nvram, (uint8_t *)&nd_table[0].macaddr, kernel_cmdline, boot_device, RAM_size, kernel_size, graphic_width, @@ -1366,7 +1358,7 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size, unsigned long prom_offset, kernel_size; int ret; char buf[1024]; - int index; + int drive_index; /* init CPUs */ if (!cpu_model) @@ -1478,14 +1470,13 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size, espdma, *espdma_irq, esp_reset); for (i = 0; i < ESP_MAX_DEVS; i++) { - index = drive_get_index(IF_SCSI, 0, i); - if (index == -1) + drive_index = drive_get_index(IF_SCSI, 0, i); + if (drive_index == -1) continue; - esp_scsi_attach(main_esp, drives_table[index].bdrv, i); + esp_scsi_attach(main_esp, drives_table[drive_index].bdrv, i); } - kernel_size = sun4m_load_kernel(kernel_filename, kernel_cmdline, - initrd_filename); + kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename); nvram_init(nvram, (uint8_t *)&nd_table[0].macaddr, kernel_cmdline, boot_device, RAM_size, kernel_size, graphic_width, |