Skip to content

Commit d3fdb9a

Browse files
committed
Revert "mmc: sdhci-of-dwcmshc: define sdio timeout clocks"
This reverts commit 39b865a.
1 parent 8f3fbc5 commit d3fdb9a

File tree

3 files changed

+3
-62
lines changed

3 files changed

+3
-62
lines changed

drivers/mmc/host/sdhci-of-dwcmshc.c

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ struct rk35xx_priv {
221221

222222
struct dwcmshc_priv {
223223
struct clk *bus_clk;
224-
struct clk *sdio_clk;
225224
int vendor_specific_area1; /* P_VENDOR_SPECIFIC_AREA1 reg */
226225
int vendor_specific_area2; /* P_VENDOR_SPECIFIC_AREA2 reg */
227226

@@ -290,17 +289,6 @@ static void dwcmshc_adma_write_desc(struct sdhci_host *host, void **desc,
290289
sdhci_adma_write_desc(host, desc, addr, len, cmd);
291290
}
292291

293-
static void dwcmshc_set_clock(struct sdhci_host *host, unsigned int clock)
294-
{
295-
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
296-
struct dwcmshc_priv *priv = sdhci_pltfm_priv(pltfm_host);
297-
298-
if (priv->sdio_clk)
299-
clk_set_rate(priv->sdio_clk, clock);
300-
301-
sdhci_set_clock(host, clock);
302-
}
303-
304292
static unsigned int dwcmshc_get_max_clock(struct sdhci_host *host)
305293
{
306294
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -1150,11 +1138,10 @@ static int sg2042_init(struct device *dev, struct sdhci_host *host,
11501138
}
11511139

11521140
static const struct sdhci_ops sdhci_dwcmshc_ops = {
1153-
.set_clock = dwcmshc_set_clock,
1141+
.set_clock = sdhci_set_clock,
11541142
.set_bus_width = sdhci_set_bus_width,
11551143
.set_uhs_signaling = dwcmshc_set_uhs_signaling,
11561144
.get_max_clock = dwcmshc_get_max_clock,
1157-
.get_timeout_clock = sdhci_pltfm_clk_get_timeout_clock,
11581145
.reset = sdhci_reset,
11591146
.adma_write_desc = dwcmshc_adma_write_desc,
11601147
.irq = dwcmshc_cqe_irq_handler,
@@ -1227,10 +1214,8 @@ static const struct sdhci_ops sdhci_dwcmshc_sg2042_ops = {
12271214
static const struct dwcmshc_pltfm_data sdhci_dwcmshc_pdata = {
12281215
.pdata = {
12291216
.ops = &sdhci_dwcmshc_ops,
1230-
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
1231-
SDHCI_QUIRK_BROKEN_CARD_DETECTION,
1232-
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
1233-
SDHCI_QUIRK2_BROKEN_HS200,
1217+
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
1218+
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
12341219
},
12351220
};
12361221

@@ -1245,15 +1230,6 @@ static const struct dwcmshc_pltfm_data sdhci_dwcmshc_bf3_pdata = {
12451230
};
12461231
#endif
12471232

1248-
static const struct sdhci_pltfm_data sdhci_dwcmshc_rp1_pdata = {
1249-
.ops = &sdhci_dwcmshc_ops,
1250-
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
1251-
SDHCI_QUIRK_BROKEN_CARD_DETECTION,
1252-
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
1253-
SDHCI_QUIRK2_BROKEN_HS200 |
1254-
SDHCI_QUIRK2_SPURIOUS_INT_RESP,
1255-
};
1256-
12571233
static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk35xx_pdata = {
12581234
.pdata = {
12591235
.ops = &sdhci_dwcmshc_rk35xx_ops,
@@ -1376,10 +1352,6 @@ static void dwcmshc_cqhci_init(struct sdhci_host *host, struct platform_device *
13761352
}
13771353

13781354
static const struct of_device_id sdhci_dwcmshc_dt_ids[] = {
1379-
{
1380-
.compatible = "raspberrypi,rp1-dwcmshc",
1381-
.data = &sdhci_dwcmshc_rp1_pdata,
1382-
},
13831355
{
13841356
.compatible = "rockchip,rk3588-dwcmshc",
13851357
.data = &sdhci_dwcmshc_rk35xx_pdata,
@@ -1473,32 +1445,13 @@ static int dwcmshc_probe(struct platform_device *pdev)
14731445
priv->bus_clk = devm_clk_get(dev, "bus");
14741446
if (!IS_ERR(priv->bus_clk))
14751447
clk_prepare_enable(priv->bus_clk);
1476-
1477-
pltfm_host->timeout_clk = devm_clk_get(dev, "timeout");
1478-
if (!IS_ERR(pltfm_host->timeout_clk))
1479-
err = clk_prepare_enable(pltfm_host->timeout_clk);
1480-
if (err)
1481-
goto free_pltfm;
1482-
1483-
priv->sdio_clk = devm_clk_get_optional(&pdev->dev, "sdio");
1484-
}
1485-
1486-
pltfm_host->timeout_clk = devm_clk_get(&pdev->dev, "timeout");
1487-
if (IS_ERR(pltfm_host->timeout_clk)) {
1488-
err = PTR_ERR(pltfm_host->timeout_clk);
1489-
dev_err(&pdev->dev, "failed to get timeout clk: %d\n", err);
1490-
goto free_pltfm;
14911448
}
1492-
err = clk_prepare_enable(pltfm_host->timeout_clk);
1493-
if (err)
1494-
goto free_pltfm;
14951449

14961450
err = mmc_of_parse(host->mmc);
14971451
if (err)
14981452
goto err_clk;
14991453

15001454
sdhci_get_of_property(pdev);
1501-
sdhci_enable_v4_mode(host);
15021455

15031456
priv->vendor_specific_area1 =
15041457
sdhci_readl(host, DWCMSHC_P_VENDOR_AREA1) & DWCMSHC_AREA1_MASK;
@@ -1558,7 +1511,6 @@ static int dwcmshc_probe(struct platform_device *pdev)
15581511
pm_runtime_put_noidle(dev);
15591512
err_clk:
15601513
clk_disable_unprepare(pltfm_host->clk);
1561-
clk_disable_unprepare(pltfm_host->timeout_clk);
15621514
clk_disable_unprepare(priv->bus_clk);
15631515
clk_bulk_disable_unprepare(priv->num_other_clks, priv->other_clks);
15641516
free_pltfm:

drivers/mmc/host/sdhci-pltfm.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host)
3232
}
3333
EXPORT_SYMBOL_GPL(sdhci_pltfm_clk_get_max_clock);
3434

35-
unsigned int sdhci_pltfm_clk_get_timeout_clock(struct sdhci_host *host)
36-
{
37-
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
38-
39-
return clk_get_rate(pltfm_host->timeout_clk);
40-
}
41-
EXPORT_SYMBOL_GPL(sdhci_pltfm_clk_get_timeout_clock);
42-
4335
static const struct sdhci_ops sdhci_pltfm_ops = {
4436
.set_clock = sdhci_set_clock,
4537
.set_bus_width = sdhci_set_bus_width,

drivers/mmc/host/sdhci-pltfm.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct sdhci_pltfm_data {
2020

2121
struct sdhci_pltfm_host {
2222
struct clk *clk;
23-
struct clk *timeout_clk;
2423

2524
/* migrate from sdhci_of_host */
2625
unsigned int clock;
@@ -107,8 +106,6 @@ extern void sdhci_pltfm_remove(struct platform_device *pdev);
107106

108107
extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host);
109108

110-
extern unsigned int sdhci_pltfm_clk_get_timeout_clock(struct sdhci_host *host);
111-
112109
static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
113110
{
114111
return host->private;

0 commit comments

Comments
 (0)