[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 4/7] hw:sdhci: Directly set sd_spec_version instead of propert
From: |
Jamin Lin |
Subject: |
[PATCH v3 4/7] hw:sdhci: Directly set sd_spec_version instead of property |
Date: |
Wed, 4 Dec 2024 16:05:20 +0800 |
Directly set sd_spec_version instead of property and remove
unused local variable.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
hw/sd/aspeed_sdhci.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c
index ccaeefa75b..4e64e2537a 100644
--- a/hw/sd/aspeed_sdhci.c
+++ b/hw/sd/aspeed_sdhci.c
@@ -160,13 +160,9 @@ static void aspeed_sdhci_realize(DeviceState *dev, Error
**errp)
sysbus_init_mmio(sbd, &sdhci->iomem);
for (int i = 0; i < sdhci->num_slots; ++i) {
- Object *sdhci_slot = OBJECT(&sdhci->slots[i]);
SysBusDevice *sbd_slot = SYS_BUS_DEVICE(&sdhci->slots[i]);
- if (!object_property_set_int(sdhci_slot, "sd-spec-version", 2, errp)) {
- return;
- }
-
+ sdhci->slots[i].sd_spec_version = 2;
sdhci->slots[i].capareg = asc->capareg;
if (!sysbus_realize(sbd_slot, errp)) {
--
2.34.1
- [PATCH v3 0/7] Support SDHCI and eMMC for ast2700, Jamin Lin, 2024/12/04
- [PATCH v3 1/7] hw/sd/aspeed_sdhci: Fix coding style, Jamin Lin, 2024/12/04
- [PATCH v3 2/7] hw/arm/aspeed: Fix coding style, Jamin Lin, 2024/12/04
- [PATCH v3 3/7] hw:sdhci: Introduce a new "capareg" class member to set the different Capability Registers, Jamin Lin, 2024/12/04
- [PATCH v3 4/7] hw:sdhci: Directly set sd_spec_version instead of property,
Jamin Lin <=
- [PATCH v3 5/7] hw/sd/aspeed_sdhci: Add AST2700 Support, Jamin Lin, 2024/12/04
- [PATCH v3 6/7] aspeed/soc: Support SDHCI for AST2700, Jamin Lin, 2024/12/04
- [PATCH v3 7/7] aspeed/soc: Support eMMC for AST2700, Jamin Lin, 2024/12/04