mirror of
https://github.com/mii443/qemu.git
synced 2025-09-01 14:49:23 +00:00
usb-musb: Take a DeviceState* in init function
Initialise usb-musb by passing it a DeviceState* and the offset of the IRQs in its gpio array, rather than a plain pointer to an irq array. This is simpler for callers and also allows us to pass in a valid parent to usb_bus_new(), so the USB bus actually appears in the qdev tree. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
Gerd Hoffmann
parent
9147b75288
commit
406c20754a
2
hw/usb.h
2
hw/usb.h
@ -343,7 +343,7 @@ enum musb_irq_source_e {
|
||||
};
|
||||
|
||||
typedef struct MUSBState MUSBState;
|
||||
MUSBState *musb_init(qemu_irq *irqs);
|
||||
MUSBState *musb_init(DeviceState *parent_device, int gpio_base);
|
||||
uint32_t musb_core_intr_get(MUSBState *s);
|
||||
void musb_core_intr_clear(MUSBState *s, uint32_t mask);
|
||||
void musb_set_size(MUSBState *s, int epnum, int size, int is_tx);
|
||||
|
Reference in New Issue
Block a user