* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef HW_USB_EHCI_H
-#define HW_USB_EHCI_H 1
+
+#ifndef HW_USB_HCD_EHCI_H
+#define HW_USB_HCD_EHCI_H
#include "hw/hw.h"
#include "qemu/timer.h"
#include "hw/usb.h"
-#include "monitor/monitor.h"
#include "sysemu/dma.h"
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
MemoryRegion mem_opreg;
MemoryRegion mem_ports;
int companion_count;
+ bool companion_enable;
uint16_t capsbase;
uint16_t opregbase;
uint16_t portscbase;
*/
QEMUTimer *frame_timer;
QEMUBH *async_bh;
+ bool working;
uint32_t astate; /* Current state in asynchronous schedule */
uint32_t pstate; /* Current state in periodic schedule */
USBPort ports[NB_PORTS];
uint32_t async_stepdown;
uint32_t periodic_sched_active;
bool int_req_by_async;
+ VMChangeStateEntry *vmstate;
};
extern const VMStateDescription vmstate_ehci;
void usb_ehci_init(EHCIState *s, DeviceState *dev);
+void usb_ehci_finalize(EHCIState *s);
void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp);
+void usb_ehci_unrealize(EHCIState *s, DeviceState *dev, Error **errp);
+void ehci_reset(void *opaque);
#define TYPE_PCI_EHCI "pci-ehci-usb"
#define PCI_EHCI(obj) OBJECT_CHECK(EHCIPCIState, (obj), TYPE_PCI_EHCI)