diff options
| -rw-r--r-- | drivers/mmc/host/dw_mmc-pci.c | 2 | ||||
| -rw-r--r-- | drivers/mmc/host/dw_mmc.c | 10 | ||||
| -rw-r--r-- | drivers/mmc/host/dw_mmc.h | 2 |
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 */ }; |
