xref: /openbmc/qemu/include/hw/sd/aspeed_sdhci.h (revision 3ab5a6ec)
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     uint8_t num_slots;
28 
29     MemoryRegion iomem;
30     qemu_irq irq;
31 
32     uint32_t regs[ASPEED_SDHCI_NUM_REGS];
33 } AspeedSDHCIState;
34 
35 #endif /* ASPEED_SDHCI_H */
36