xref: /openbmc/qemu/include/hw/ide/ahci-sysbus.h (revision ecd6f6a8)
1 /*
2  * QEMU AHCI Emulation (MMIO-mapped devices)
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  */
6 #ifndef HW_IDE_AHCI_SYSBUS_H
7 #define HW_IDE_AHCI_SYSBUS_H
8 
9 #include "qom/object.h"
10 #include "hw/sysbus.h"
11 #include "hw/ide/ahci.h"
12 
13 #define TYPE_SYSBUS_AHCI "sysbus-ahci"
14 OBJECT_DECLARE_SIMPLE_TYPE(SysbusAHCIState, SYSBUS_AHCI)
15 
16 struct SysbusAHCIState {
17     SysBusDevice parent_obj;
18 
19     AHCIState ahci;
20 };
21 
22 #define TYPE_ALLWINNER_AHCI "allwinner-ahci"
23 OBJECT_DECLARE_SIMPLE_TYPE(AllwinnerAHCIState, ALLWINNER_AHCI)
24 
25 #define ALLWINNER_AHCI_MMIO_OFF  0x80
26 #define ALLWINNER_AHCI_MMIO_SIZE 0x80
27 
28 struct AllwinnerAHCIState {
29     SysbusAHCIState parent_obj;
30 
31     MemoryRegion mmio;
32     uint32_t regs[ALLWINNER_AHCI_MMIO_SIZE / 4];
33 };
34 
35 #endif
36