diff options
author | Kuo-Jung Su <dantesu@faraday-tech.com> | 2013-06-06 15:41:12 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-06-24 08:33:11 +0200 |
commit | cc8d6a8481e64ec53d06245f249235bcaaa73b27 (patch) | |
tree | d76794ad670f239d88ccf2549069e817e3b95e0b /hw/usb/hcd-ehci.h | |
parent | 20c570432e995313874eaeabc3d0251dab40e16f (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.h')
-rw-r--r-- | hw/usb/hcd-ehci.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 2c03e8ff2c..1fb948395c 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -40,11 +40,7 @@ #define MMIO_SIZE 0x1000 #define CAPA_SIZE 0x10 -#define PORTSC 0x0044 -#define PORTSC_BEGIN PORTSC -#define PORTSC_END (PORTSC + 4 * NB_PORTS) - -#define NB_PORTS 6 /* Number of downstream ports */ +#define NB_PORTS 6 /* Max. Number of downstream ports */ typedef struct EHCIPacket EHCIPacket; typedef struct EHCIQueue EHCIQueue; @@ -268,6 +264,8 @@ struct EHCIState { int companion_count; uint16_t capsbase; uint16_t opregbase; + uint16_t portscbase; + uint16_t portnr; /* properties */ uint32_t maxframes; @@ -278,7 +276,7 @@ struct EHCIState { */ uint8_t caps[CAPA_SIZE]; union { - uint32_t opreg[PORTSC_BEGIN/sizeof(uint32_t)]; + uint32_t opreg[0x44/sizeof(uint32_t)]; struct { uint32_t usbcmd; uint32_t usbsts; @@ -363,6 +361,8 @@ typedef struct SysBusEHCIClass { uint16_t capsbase; uint16_t opregbase; + uint16_t portscbase; + uint16_t portnr; } SysBusEHCIClass; #endif |