diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-07-19 13:43:58 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-07-19 13:43:58 +0100 |
| commit | 6d60e295ef020759a03b90724d0342012c189ba2 (patch) | |
| tree | a50bcfd74adef238653a7927f6d9c4873225b81e /hw/ide/ahci.c | |
| parent | 988879b66ed8dfd1055492d36188f6c10c268644 (diff) | |
| parent | ff0ca962345ecdb87c331888a806cde49936fd9f (diff) | |
| download | focaccia-qemu-6d60e295ef020759a03b90724d0342012c189ba2.tar.gz focaccia-qemu-6d60e295ef020759a03b90724d0342012c189ba2.zip | |
Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging
# gpg: Signature made Tue 18 Jul 2017 17:11:07 BST # gpg: using RSA key 0x7DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jnsnow/tags/ide-pull-request: tests/ahci-test: Be mean with RAM ahci: split public and private interface ahci: Isolate public AHCI interface ahci: add ahci_get_num_ports Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ide/ahci.c')
| -rw-r--r-- | hw/ide/ahci.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 874d3fe280..406a1b5579 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -32,7 +32,7 @@ #include "sysemu/dma.h" #include "hw/ide/internal.h" #include "hw/ide/pci.h" -#include "hw/ide/ahci.h" +#include "hw/ide/ahci_internal.h" #define DEBUG_AHCI 0 @@ -1833,6 +1833,14 @@ static void sysbus_ahci_register_types(void) type_init(sysbus_ahci_register_types) +int32_t ahci_get_num_ports(PCIDevice *dev) +{ + AHCIPCIState *d = ICH_AHCI(dev); + AHCIState *ahci = &d->ahci; + + return ahci->ports; +} + void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd) { AHCIPCIState *d = ICH_AHCI(dev); |