mirror of https://github.com/xemu-project/xemu.git
hw/usb/ohci: Use OHCIState type definition
Forward-define the type first, then use it for the ohci_die() handler. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230220150515.32549-3-philmd@linaro.org>
This commit is contained in:
parent
d9b934f21e
commit
4713720a78
|
@ -1827,7 +1827,7 @@ static USBBusOps ohci_bus_ops = {
|
||||||
void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports,
|
void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports,
|
||||||
dma_addr_t localmem_base, char *masterbus,
|
dma_addr_t localmem_base, char *masterbus,
|
||||||
uint32_t firstport, AddressSpace *as,
|
uint32_t firstport, AddressSpace *as,
|
||||||
void (*ohci_die_fn)(struct OHCIState *), Error **errp)
|
void (*ohci_die_fn)(OHCIState *), Error **errp)
|
||||||
{
|
{
|
||||||
Error *err = NULL;
|
Error *err = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -34,7 +34,9 @@ typedef struct OHCIPort {
|
||||||
uint32_t ctrl;
|
uint32_t ctrl;
|
||||||
} OHCIPort;
|
} OHCIPort;
|
||||||
|
|
||||||
typedef struct OHCIState {
|
typedef struct OHCIState OHCIState;
|
||||||
|
|
||||||
|
struct OHCIState {
|
||||||
USBBus bus;
|
USBBus bus;
|
||||||
qemu_irq irq;
|
qemu_irq irq;
|
||||||
MemoryRegion mem;
|
MemoryRegion mem;
|
||||||
|
@ -90,8 +92,8 @@ typedef struct OHCIState {
|
||||||
uint32_t async_td;
|
uint32_t async_td;
|
||||||
bool async_complete;
|
bool async_complete;
|
||||||
|
|
||||||
void (*ohci_die)(struct OHCIState *ohci);
|
void (*ohci_die)(OHCIState *ohci);
|
||||||
} OHCIState;
|
};
|
||||||
|
|
||||||
#define TYPE_SYSBUS_OHCI "sysbus-ohci"
|
#define TYPE_SYSBUS_OHCI "sysbus-ohci"
|
||||||
OBJECT_DECLARE_SIMPLE_TYPE(OHCISysBusState, SYSBUS_OHCI)
|
OBJECT_DECLARE_SIMPLE_TYPE(OHCISysBusState, SYSBUS_OHCI)
|
||||||
|
@ -113,7 +115,7 @@ extern const VMStateDescription vmstate_ohci_state;
|
||||||
void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports,
|
void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports,
|
||||||
dma_addr_t localmem_base, char *masterbus,
|
dma_addr_t localmem_base, char *masterbus,
|
||||||
uint32_t firstport, AddressSpace *as,
|
uint32_t firstport, AddressSpace *as,
|
||||||
void (*ohci_die_fn)(struct OHCIState *), Error **errp);
|
void (*ohci_die_fn)(OHCIState *), Error **errp);
|
||||||
void ohci_bus_stop(OHCIState *ohci);
|
void ohci_bus_stop(OHCIState *ohci);
|
||||||
void ohci_stop_endpoints(OHCIState *ohci);
|
void ohci_stop_endpoints(OHCIState *ohci);
|
||||||
void ohci_hard_reset(OHCIState *ohci);
|
void ohci_hard_reset(OHCIState *ohci);
|
||||||
|
|
Loading…
Reference in New Issue