From: Bernhard Beschow <shentey@gmail.com>
Drop the "IMX_" part of the names since these are actually {E,U}SDHC
specific and apply for PowerPC-based SoCs as well. While at it
consolidate all ESDHC constants into the ESDHC section.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-ID: <20260112145418.220506-7-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/sd/sdhci-internal.h | 1 -
hw/sd/sdhci.c | 9 +++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h
index 3e81821dd1e..f24532eed28 100644
--- a/hw/sd/sdhci-internal.h
+++ b/hw/sd/sdhci-internal.h
@@ -75,7 +75,6 @@
#define SDHC_CMD_INHIBIT 0x00000001
#define SDHC_DATA_INHIBIT 0x00000002
#define SDHC_DAT_LINE_ACTIVE 0x00000004
-#define SDHC_IMX_CLOCK_GATE_OFF 0x00000080
#define SDHC_DOING_WRITE 0x00000100
#define SDHC_DOING_READ 0x00000200
#define SDHC_SPACE_AVAILABLE 0x00000400
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index ccdfc59af85..779f411babe 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1642,7 +1642,7 @@ static void sdhci_bus_class_init(ObjectClass *klass, const void *data)
#define ESDHC_MIX_CTRL 0x48
#define ESDHC_VENDOR_SPEC 0xc0
-#define ESDHC_IMX_FRC_SDCLK_ON (1 << 8)
+#define ESDHC_FRC_SDCLK_ON (1 << 8)
#define ESDHC_DLL_CTRL 0x60
@@ -1657,6 +1657,7 @@ static void sdhci_bus_class_init(ObjectClass *klass, const void *data)
#define ESDHC_CTRL_8BITBUS (0x2 << 1)
#define ESDHC_PRNSTS_SDSTB (1 << 3)
+#define ESDHC_PRNSTS_CLOCK_GATE_OFF BIT(7)
static uint64_t usdhc_read(void *opaque, hwaddr offset, unsigned size)
{
@@ -1731,10 +1732,10 @@ usdhc_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
case ESDHC_VENDOR_SPEC:
s->vendor_spec = value;
- if (value & ESDHC_IMX_FRC_SDCLK_ON) {
- s->prnsts &= ~SDHC_IMX_CLOCK_GATE_OFF;
+ if (value & ESDHC_FRC_SDCLK_ON) {
+ s->prnsts &= ~ESDHC_PRNSTS_CLOCK_GATE_OFF;
} else {
- s->prnsts |= SDHC_IMX_CLOCK_GATE_OFF;
+ s->prnsts |= ESDHC_PRNSTS_CLOCK_GATE_OFF;
}
break;
--
2.52.0