mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
hw:sdhci: Introduce a new "capareg" class member to set the different Capability Registers
Currently, it set the hardcode value of capability registers to all ASPEED SOCs However, the value of capability registers should be different for all ASPEED SOCs. For example: the bit 28 of the Capability Register 1 should be 1 for 64-bits System Bus support for AST2700. Introduce a new "capareg" class member whose data type is uint_64 to set the different Capability Registers to all ASPEED SOCs. The value of Capability Register is "0x0000000001e80080" for AST2400 and AST2500. The value of Capability Register is "0x0000000701f80080" for AST2600. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241204084453.610660-4-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
0178d1198f
commit
6a0238a473
4 changed files with 61 additions and 8 deletions
|
@ -13,9 +13,11 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_ASPEED_SDHCI "aspeed.sdhci"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(AspeedSDHCIState, ASPEED_SDHCI)
|
||||
#define TYPE_ASPEED_2400_SDHCI TYPE_ASPEED_SDHCI "-ast2400"
|
||||
#define TYPE_ASPEED_2500_SDHCI TYPE_ASPEED_SDHCI "-ast2500"
|
||||
#define TYPE_ASPEED_2600_SDHCI TYPE_ASPEED_SDHCI "-ast2600"
|
||||
OBJECT_DECLARE_TYPE(AspeedSDHCIState, AspeedSDHCIClass, ASPEED_SDHCI)
|
||||
|
||||
#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
|
||||
|
@ -32,4 +34,10 @@ struct AspeedSDHCIState {
|
|||
uint32_t regs[ASPEED_SDHCI_NUM_REGS];
|
||||
};
|
||||
|
||||
struct AspeedSDHCIClass {
|
||||
SysBusDeviceClass parent_class;
|
||||
|
||||
uint64_t capareg;
|
||||
};
|
||||
|
||||
#endif /* ASPEED_SDHCI_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue