xref: /openbmc/qemu/include/hw/sd/aspeed_sdhci.h (revision e6e03dcf)
1 /*
2  * Aspeed SD Host Controller
3  * Eddie James <eajames@linux.ibm.com>
4  *
5  * Copyright (C) 2019 IBM Corp
6  * SPDX-License-Identifer: GPL-2.0-or-later
7  */
8 
9 #ifndef ASPEED_SDHCI_H
10 #define ASPEED_SDHCI_H
11 
12 #include "hw/sd/sdhci.h"
13 
14 #define TYPE_ASPEED_SDHCI "aspeed.sdhci"
15 #define ASPEED_SDHCI(obj) OBJECT_CHECK(AspeedSDHCIState, (obj), \
16                                        TYPE_ASPEED_SDHCI)
17 
18 #define ASPEED_SDHCI_CAPABILITIES 0x01E80080
19 #define ASPEED_SDHCI_NUM_SLOTS    2
20 #define ASPEED_SDHCI_NUM_REGS     (ASPEED_SDHCI_REG_SIZE / sizeof(uint32_t))
21 #define ASPEED_SDHCI_REG_SIZE     0x100
22 
23 typedef struct AspeedSDHCIState {
24     SysBusDevice parent;
25 
26     SDHCIState slots[ASPEED_SDHCI_NUM_SLOTS];
27 
28     MemoryRegion iomem;
29     qemu_irq irq;
30 
31     uint32_t regs[ASPEED_SDHCI_NUM_REGS];
32 } AspeedSDHCIState;
33 
34 #endif /* ASPEED_SDHCI_H */
35