aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-ehci-sysbus.c
diff options
context:
space:
mode:
authorKuo-Jung Su <dantesu@faraday-tech.com>2013-06-06 15:41:12 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-06-24 08:33:11 +0200
commitcc8d6a8481e64ec53d06245f249235bcaaa73b27 (patch)
treed76794ad670f239d88ccf2549069e817e3b95e0b /hw/usb/hcd-ehci-sysbus.c
parent20c570432e995313874eaeabc3d0251dab40e16f (diff)
usb/hcd-ehci: Replace PORTSC macros with variables
Replace PORTSC macros with variables which could then be configured in ehci_xxxx_class_init(...) Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-ehci-sysbus.c')
-rw-r--r--hw/usb/hcd-ehci-sysbus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c
index 68667b5929..bad9ca61bf 100644
--- a/hw/usb/hcd-ehci-sysbus.c
+++ b/hw/usb/hcd-ehci-sysbus.c
@@ -51,6 +51,8 @@ static void ehci_sysbus_init(Object *obj)
s->capsbase = sec->capsbase;
s->opregbase = sec->opregbase;
+ s->portscbase = sec->portscbase;
+ s->portnr = sec->portnr;
s->as = &address_space_memory;
usb_ehci_init(s, DEVICE(obj));
@@ -60,6 +62,10 @@ static void ehci_sysbus_init(Object *obj)
static void ehci_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(klass);
+
+ sec->portscbase = 0x44;
+ sec->portnr = NB_PORTS;
dc->realize = usb_ehci_sysbus_realize;
dc->vmsd = &vmstate_ehci_sysbus;