xref: /openbmc/qemu/include/hw/sd/aspeed_sdhci.h (revision ffe98631)
1 /*
2  * Aspeed SD Host Controller
3  * Eddie James <eajames@linux.ibm.com>
4  *
5  * Copyright (C) 2019 IBM Corp
6  * SPDX-License-Identifier: 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 #include "qom/object.h"
14 
15 #define TYPE_ASPEED_SDHCI "aspeed.sdhci"
16 OBJECT_DECLARE_SIMPLE_TYPE(AspeedSDHCIState, 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 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 };
34 
35 #endif /* ASPEED_SDHCI_H */
36