[PATCH v2 06/14] mci: core: save the set clock as actual_clock
Steffen Trumtrar
s.trumtrar at pengutronix.de
Thu Mar 14 11:47:29 PDT 2024
Linux mmc_host saves the actual_clock set on the HC. Do the same to use
it later.
Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
---
drivers/mci/mci-core.c | 2 ++
include/mci.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 2b39985d5e..6c473d21bf 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -867,6 +867,8 @@ static void mci_set_ios(struct mci *mci)
};
host->set_ios(host, &ios);
+
+ host->actual_clock = host->clock;
}
/**
diff --git a/include/mci.h b/include/mci.h
index 91460b7ef6..fe0bd26888 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -460,6 +460,7 @@ struct mci_host {
unsigned f_min; /**< host interface lower limit */
unsigned f_max; /**< host interface upper limit */
unsigned clock; /**< Current clock used to talk to the card */
+ unsigned actual_clock;
enum mci_bus_width bus_width; /**< used data bus width to the card */
enum mci_timing timing; /**< used timing specification to the card */
unsigned max_req_size;
--
2.40.1
More information about the barebox
mailing list