2019-09-25 16:32:27 +02:00
|
|
|
/*
|
|
|
|
* Aspeed SD Host Controller
|
|
|
|
* Eddie James <eajames@linux.ibm.com>
|
|
|
|
*
|
|
|
|
* Copyright (C) 2019 IBM Corp
|
2021-02-01 21:01:47 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2019-09-25 16:32:27 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ASPEED_SDHCI_H
|
|
|
|
#define ASPEED_SDHCI_H
|
|
|
|
|
|
|
|
#include "hw/sd/sdhci.h"
|
2020-09-03 22:43:22 +02:00
|
|
|
#include "qom/object.h"
|
2019-09-25 16:32:27 +02:00
|
|
|
|
|
|
|
#define TYPE_ASPEED_SDHCI "aspeed.sdhci"
|
2020-09-16 20:25:19 +02:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(AspeedSDHCIState, ASPEED_SDHCI)
|
2019-09-25 16:32:27 +02:00
|
|
|
|
|
|
|
#define ASPEED_SDHCI_CAPABILITIES 0x01E80080
|
|
|
|
#define ASPEED_SDHCI_NUM_SLOTS 2
|
|
|
|
#define ASPEED_SDHCI_NUM_REGS (ASPEED_SDHCI_REG_SIZE / sizeof(uint32_t))
|
|
|
|
#define ASPEED_SDHCI_REG_SIZE 0x100
|
|
|
|
|
2020-09-03 22:43:22 +02:00
|
|
|
struct AspeedSDHCIState {
|
2019-09-25 16:32:27 +02:00
|
|
|
SysBusDevice parent;
|
|
|
|
|
|
|
|
SDHCIState slots[ASPEED_SDHCI_NUM_SLOTS];
|
2020-01-30 17:02:02 +01:00
|
|
|
uint8_t num_slots;
|
2019-09-25 16:32:27 +02:00
|
|
|
|
|
|
|
MemoryRegion iomem;
|
|
|
|
qemu_irq irq;
|
|
|
|
|
|
|
|
uint32_t regs[ASPEED_SDHCI_NUM_REGS];
|
2020-09-03 22:43:22 +02:00
|
|
|
};
|
2019-09-25 16:32:27 +02:00
|
|
|
|
|
|
|
#endif /* ASPEED_SDHCI_H */
|