mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
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>
This commit is contained in:
parent
d3fcd6362a
commit
ec6d8bb39d
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user