diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-30 15:09:32 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-06 08:46:39 +0100 |
commit | c98459876a96e471b1f82a8faa4c110b77cdac36 (patch) | |
tree | baf9a2e061b4db08e92dc8e8776140843ea3734c /drivers/mci | |
parent | 5814d394f99cdbdded2930e93cbe3313fe325f2f (diff) | |
download | barebox-c98459876a96e471b1f82a8faa4c110b77cdac36.tar.gz barebox-c98459876a96e471b1f82a8faa4c110b77cdac36.tar.xz |
mci: imx-esdhc: make clkidx configurable
Other architectures using this driver may need a different clk_id to
find its clock. Make this configurable as a preparation for layerscape
support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci')
-rw-r--r-- | drivers/mci/imx-esdhc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index 8027f46262..06fc69f405 100644 --- a/drivers/mci/imx-esdhc.c +++ b/drivers/mci/imx-esdhc.c @@ -87,6 +87,7 @@ struct esdhc_soc_data { u32 flags; + const char *clkidx; }; struct fsl_esdhc_host { @@ -617,7 +618,7 @@ static int fsl_esdhc_probe(struct device_d *dev) dma_set_mask(dev, DMA_BIT_MASK(32)); - host->clk = clk_get(dev, "per"); + host->clk = clk_get(dev, socdata->clkidx); if (IS_ERR(host->clk)) return PTR_ERR(host->clk); @@ -679,25 +680,30 @@ static int fsl_esdhc_probe(struct device_d *dev) static struct esdhc_soc_data esdhc_imx25_data = { .flags = ESDHC_FLAG_ENGCM07207, + .clkidx = "per", }; static struct esdhc_soc_data esdhc_imx53_data = { .flags = ESDHC_FLAG_MULTIBLK_NO_INT, + .clkidx = "per", }; static struct esdhc_soc_data usdhc_imx6q_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING, + .clkidx = "per", }; static struct esdhc_soc_data usdhc_imx6sl_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536 | ESDHC_FLAG_HS200, + .clkidx = "per", }; static struct esdhc_soc_data usdhc_imx6sx_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200, + .clkidx = "per", }; static __maybe_unused struct of_device_id fsl_esdhc_compatible[] = { |