From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 4/8] mci: imx-esdhc: make clkidx configurable
Date: Wed, 6 Feb 2019 08:49:17 +0100 [thread overview]
Message-ID: <20190206074921.11115-5-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20190206074921.11115-1-s.hauer@pengutronix.de>
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>
---
drivers/mci/imx-esdhc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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[] = {
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-02-06 7:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 7:49 [PATCH 0/8] MMC: esdhc: Add Layerscape support Sascha Hauer
2019-02-06 7:49 ` [PATCH 1/8] mci: imx-esdhc: Do not reset twice Sascha Hauer
2019-02-06 7:49 ` [PATCH 2/8] mci: imx-esdhc: use dev_id Sascha Hauer
2019-02-06 7:49 ` [PATCH 3/8] mci: imx-esdhc: move platform_data Sascha Hauer
2019-02-06 7:49 ` Sascha Hauer [this message]
2019-02-06 7:49 ` [PATCH 5/8] mci: imx-esdhc: remove unnecessary include Sascha Hauer
2019-02-06 7:49 ` [PATCH 6/8] mci: imx-esdhc: implement static inline io wrappers Sascha Hauer
2019-02-07 0:55 ` Andrey Smirnov
2019-02-07 7:56 ` Sascha Hauer
2019-02-06 7:49 ` [PATCH 7/8] mci: imx-esdhc: Add bigendian register access support Sascha Hauer
2019-02-06 7:49 ` [PATCH 8/8] mci: imx-esdhc: Add layerscape support Sascha Hauer
2019-02-07 1:02 ` Andrey Smirnov
2019-02-12 8:42 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190206074921.11115-5-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox