From d836ec62fc71a5236f6d262a7714a5887105fb52 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Thu, 19 Jan 2017 13:14:15 +0800 Subject: [PATCH] del qemu/include/hw/irq.h --- qemu/include/hw/arm/arm.h | 6 ---- qemu/include/hw/hw.h | 1 - qemu/include/hw/irq.h | 64 ------------------------------------- qemu/include/hw/mips/mips.h | 22 ------------- qemu/include/hw/qdev-core.h | 19 ----------- 5 files changed, 112 deletions(-) delete mode 100644 qemu/include/hw/irq.h diff --git a/qemu/include/hw/arm/arm.h b/qemu/include/hw/arm/arm.h index 9e38953d..8b40c458 100644 --- a/qemu/include/hw/arm/arm.h +++ b/qemu/include/hw/arm/arm.h @@ -12,16 +12,10 @@ #define ARM_MISC_H 1 #include "exec/memory.h" -#include "hw/irq.h" void tosa_machine_init(struct uc_struct *uc); void machvirt_machine_init(struct uc_struct *uc); // ARM64 -/* armv7m.c */ -qemu_irq *armv7m_init(MemoryRegion *system_memory, - int flash_size, int sram_size, - const char *kernel_filename, const char *cpu_model); - /* arm_boot.c */ struct arm_boot_info { uint64_t ram_size; diff --git a/qemu/include/hw/hw.h b/qemu/include/hw/hw.h index c018c70c..54b25b6b 100644 --- a/qemu/include/hw/hw.h +++ b/qemu/include/hw/hw.h @@ -9,7 +9,6 @@ #endif #include "exec/ioport.h" -#include "hw/irq.h" #include "qemu/log.h" #ifdef NEED_CPU_H diff --git a/qemu/include/hw/irq.h b/qemu/include/hw/irq.h deleted file mode 100644 index 73227f17..00000000 --- a/qemu/include/hw/irq.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef QEMU_IRQ_H -#define QEMU_IRQ_H - -/* Generic IRQ/GPIO pin infrastructure. */ - -#define TYPE_IRQ "irq" - -typedef struct IRQState *qemu_irq; - -typedef void (*qemu_irq_handler)(void *opaque, int n, int level); - -void qemu_set_irq(qemu_irq irq, int level); - -static inline void qemu_irq_raise(qemu_irq irq) -{ -} - -static inline void qemu_irq_lower(qemu_irq irq) -{ - qemu_set_irq(irq, 0); -} - -static inline void qemu_irq_pulse(qemu_irq irq) -{ - qemu_set_irq(irq, 1); - qemu_set_irq(irq, 0); -} - -/* Returns an array of N IRQs. Each IRQ is assigned the argument handler and - * opaque data. - */ -qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n); - -/* - * Allocates a single IRQ. The irq is assigned with a handler, an opaque - * data and the interrupt number. - */ -qemu_irq qemu_allocate_irq(qemu_irq_handler handler, void *opaque, int n); - -/* Extends an Array of IRQs. Old IRQs have their handlers and opaque data - * preserved. New IRQs are assigned the argument handler and opaque data. - */ -qemu_irq *qemu_extend_irqs(qemu_irq *old, int n_old, qemu_irq_handler handler, - void *opaque, int n); - -void qemu_free_irqs(qemu_irq *s, int n); -void qemu_free_irq(qemu_irq irq); - -/* Returns a new IRQ with opposite polarity. */ -qemu_irq qemu_irq_invert(qemu_irq irq); - -/* Returns a new IRQ which feeds into both the passed IRQs */ -qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2); - -/* Returns a new IRQ set which connects 1:1 to another IRQ set, which - * may be set later. - */ -qemu_irq *qemu_irq_proxy(qemu_irq **target, int n); - -/* For internal use in qtest. Similar to qemu_irq_split, but operating - on an existing vector of qemu_irq. */ -void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n); - -#endif diff --git a/qemu/include/hw/mips/mips.h b/qemu/include/hw/mips/mips.h index db567596..e3fe0512 100644 --- a/qemu/include/hw/mips/mips.h +++ b/qemu/include/hw/mips/mips.h @@ -7,28 +7,6 @@ #include "exec/memory.h" -/* gt64xxx.c */ -PCIBus *gt64120_register(qemu_irq *pic); - -/* bonito.c */ -PCIBus *bonito_init(qemu_irq *pic); - -/* rc4030.c */ -typedef struct rc4030DMAState *rc4030_dma; -void rc4030_dma_memory_rw(void *opaque, hwaddr addr, uint8_t *buf, int len, int is_write); -void rc4030_dma_read(void *dma, uint8_t *buf, int len); -void rc4030_dma_write(void *dma, uint8_t *buf, int len); - -void *rc4030_init(qemu_irq timer, qemu_irq jazz_bus, - qemu_irq **irqs, rc4030_dma **dmas, - MemoryRegion *sysmem); - -/* dp8393x.c */ -void dp83932_init(NICInfo *nd, hwaddr base, int it_shift, - MemoryRegion *address_space, - qemu_irq irq, void* mem_opaque, - void (*memory_rw)(void *opaque, hwaddr addr, uint8_t *buf, int len, int is_write)); - void mips_machine_init(struct uc_struct *uc); void mips_cpu_register_types(void *opaque); diff --git a/qemu/include/hw/qdev-core.h b/qemu/include/hw/qdev-core.h index bfaf773b..780cbb90 100644 --- a/qemu/include/hw/qdev-core.h +++ b/qemu/include/hw/qdev-core.h @@ -5,7 +5,6 @@ #include "qemu/typedefs.h" #include "qemu/bitmap.h" #include "qom/object.h" -#include "hw/irq.h" #include "qapi/error.h" enum { @@ -132,7 +131,6 @@ typedef struct NamedGPIOList NamedGPIOList; struct NamedGPIOList { char *name; - qemu_irq *in; int num_in; int num_out; QLIST_ENTRY(NamedGPIOList) node; @@ -260,29 +258,12 @@ void qdev_unplug(DeviceState *dev, Error **errp); void qdev_machine_creation_done(void); bool qdev_machine_modified(void); -qemu_irq qdev_get_gpio_in(DeviceState *dev, int n); -qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const char *name, int n); - -void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin); -void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, - qemu_irq pin); -qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n); -qemu_irq qdev_intercept_gpio_out(DeviceState *dev, qemu_irq icpt, - const char *name, int n); - BusState *qdev_get_child_bus(DeviceState *dev, const char *name); /*** Device API. ***/ /* Register device properties. */ /* GPIO inputs also double as IRQ sinks. */ -void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handler handler, int n); -void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pins, int n); -void qdev_init_gpio_in_named(DeviceState *dev, qemu_irq_handler handler, - const char *name, int n); -void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, - const char *name, int n); - void qdev_pass_gpios(DeviceState *dev, DeviceState *container, const char *name);