mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
qtest/ahci: finalize AHCIQState consolidation
Move barsize, ahci_fingerprint and capabilities registers into the AHCIQState object, removing global ahci-related state from the ahci-test.c file. More churn, less globals. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1421698563-6977-10-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
6100ddb0f9
commit
8d5eeceddc
2 changed files with 42 additions and 47 deletions
|
@ -249,6 +249,10 @@ typedef struct AHCIQState {
|
|||
QOSState *parent;
|
||||
QPCIDevice *dev;
|
||||
void *hba_base;
|
||||
uint64_t barsize;
|
||||
uint32_t fingerprint;
|
||||
uint32_t cap;
|
||||
uint32_t cap2;
|
||||
} AHCIQState;
|
||||
|
||||
/**
|
||||
|
@ -340,11 +344,6 @@ typedef struct PRD {
|
|||
uint32_t dbc; /* Data Byte Count (0-indexed) & Interrupt Flag (bit 2^31) */
|
||||
} PRD;
|
||||
|
||||
typedef struct HBACap {
|
||||
uint32_t cap;
|
||||
uint32_t cap2;
|
||||
} HBACap;
|
||||
|
||||
/*** Macro Utilities ***/
|
||||
#define BITANY(data, mask) (((data) & (mask)) != 0)
|
||||
#define BITSET(data, mask) (((data) & (mask)) == (mask))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue