summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2026-01-06 05:17:00 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2026-02-23 14:06:54 +0300
commitec6d8bb39dc8d8ee976d65349290411cab209764 (patch)
tree463bfe6afc6637d1e4dd07508a07fe49db71b6c3
parentd3fcd6362aafe5f30d85c2f1639cdcb7288ca4bf (diff)
downloadlinux-ec6d8bb39dc8d8ee976d65349290411cab209764.tar.xz
mmc: dw_mmc: Remove bus_hz from struct dw_mci_board
struct dw_mci already keeps one, reuse it. Now, as dw_mmc-pci still provide struct dw_mci_board, so host->bus_hz will not be overwritten. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/dw_mmc-pci.c2
-rw-r--r--drivers/mmc/host/dw_mmc.c10
-rw-r--r--drivers/mmc/host/dw_mmc.h2
3 files changed, 5 insertions, 9 deletions
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c
index 616804a07821..95e91f816ccf 100644
--- a/drivers/mmc/host/dw_mmc-pci.c
+++ b/drivers/mmc/host/dw_mmc-pci.c
@@ -26,7 +26,6 @@
static struct dw_mci_board pci_board_data = {
.caps = DW_MCI_CAPABILITIES,
- .bus_hz = 33 * 1000 * 1000,
};
static int dw_mci_pci_probe(struct pci_dev *pdev,
@@ -48,6 +47,7 @@ static int dw_mci_pci_probe(struct pci_dev *pdev,
host->pdata = &pci_board_data;
host->fifo_depth = 32;
host->detect_delay_ms = 200;
+ host->bus_hz = 33 * 1000 * 1000;
ret = pcim_iomap_regions(pdev, 1 << PCI_BAR_NO, pci_name(pdev));
if (ret)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index e67d785a2ff6..a5a7ef696d52 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3183,7 +3183,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
host->wm_aligned = true;
if (!device_property_read_u32(dev, "clock-frequency", &clock_frequency))
- pdata->bus_hz = clock_frequency;
+ host->bus_hz = clock_frequency;
if (drv_data && drv_data->parse_dt) {
ret = drv_data->parse_dt(host);
@@ -3273,8 +3273,6 @@ int dw_mci_probe(struct dw_mci *host)
ret = PTR_ERR(host->ciu_clk);
if (ret == -EPROBE_DEFER)
goto err_clk_biu;
-
- host->bus_hz = host->pdata->bus_hz;
} else {
ret = clk_prepare_enable(host->ciu_clk);
if (ret) {
@@ -3282,12 +3280,12 @@ int dw_mci_probe(struct dw_mci *host)
goto err_clk_biu;
}
- if (host->pdata->bus_hz) {
- ret = clk_set_rate(host->ciu_clk, host->pdata->bus_hz);
+ if (host->bus_hz) {
+ ret = clk_set_rate(host->ciu_clk, host->bus_hz);
if (ret)
dev_warn(host->dev,
"Unable to set bus rate to %uHz\n",
- host->pdata->bus_hz);
+ host->bus_hz);
}
host->bus_hz = clk_get_rate(host->ciu_clk);
}
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index e364b1696c17..cb0e06b01d22 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -270,8 +270,6 @@ struct dw_mci_dma_ops {
/* Board platform data */
struct dw_mci_board {
- unsigned int bus_hz; /* Clock speed at the cclk_in pad */
-
u32 caps; /* Capabilities */
};