9
0
Fork 0

i.MX: esdhc: Request "per" clock explicitly

Calling clk_get() with NULL as the second argument will give us "ipg"
clock as a result. The actual clock feeding into the peripheral is "per"
and, depending on the SoC, "ipg" and "per" may be separated by a clock
divider, so querying "ipg"'s rate may not result in rate that does not
represent the actual peripheral clock rate.

Change the code to request "per" as our peripheral clock to avoid
aforementioned problem.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Andrey Smirnov 2016-11-09 08:14:09 -08:00 committed by Sascha Hauer
parent 39f7a7ee8b
commit 05f625a9e1
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ static int fsl_esdhc_probe(struct device_d *dev)
if (!host->socdata)
return -EINVAL;
host->clk = clk_get(dev, NULL);
host->clk = clk_get(dev, "per");
if (IS_ERR(host->clk))
return PTR_ERR(host->clk);