mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
20c570432e
commit
cc8d6a8481
4 changed files with 28 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue