Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / hw / sd / cadence_sdhci.h
blobcd8288b7d807066513937d2669e7efd99ecd79b4
1 /*
2 * Cadence SDHCI emulation
4 * Copyright (c) 2020 Wind River Systems, Inc.
6 * Author:
7 * Bin Meng <bin.meng@windriver.com>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 or
12 * (at your option) version 3 of the License.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifndef CADENCE_SDHCI_H
24 #define CADENCE_SDHCI_H
26 #include "hw/sd/sdhci.h"
28 #define CADENCE_SDHCI_REG_SIZE 0x100
29 #define CADENCE_SDHCI_NUM_REGS (CADENCE_SDHCI_REG_SIZE / sizeof(uint32_t))
31 typedef struct CadenceSDHCIState {
32 SysBusDevice parent;
34 MemoryRegion container;
35 MemoryRegion iomem;
36 BusState *bus;
38 uint32_t regs[CADENCE_SDHCI_NUM_REGS];
40 SDHCIState sdhci;
41 } CadenceSDHCIState;
43 #define TYPE_CADENCE_SDHCI "cadence.sdhci"
44 #define CADENCE_SDHCI(obj) OBJECT_CHECK(CadenceSDHCIState, (obj), \
45 TYPE_CADENCE_SDHCI)
47 #endif /* CADENCE_SDHCI_H */