diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2018-01-10 08:31:59 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-11 09:44:07 +0100 |
commit | 93111f8dba5b00cfd2f185044db6794985ae0caf (patch) | |
tree | fa7a673524c01bde1f9518c000c11d9ed8aa3c64 | |
parent | d00d7b3d30590a94f8009c86910462b01164bf4e (diff) | |
download | barebox-93111f8dba5b00cfd2f185044db6794985ae0caf.tar.gz barebox-93111f8dba5b00cfd2f185044db6794985ae0caf.tar.xz |
i.MX: ecspi: Enable imx->clk as a part of initialization
Some SoCs (e. g. i.MX7) do not enable this clock by default, so add
code to take care of that in the driver.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/spi/imx_spi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c index 0827de7786..10621d00c8 100644 --- a/drivers/spi/imx_spi.c +++ b/drivers/spi/imx_spi.c @@ -624,6 +624,13 @@ static int imx_spi_probe(struct device_d *dev) goto err_free; } + ret = clk_enable(imx->clk); + if (ret) { + dev_err(dev, "Failed to enable clock: %s\n", + strerror(ret)); + return ret; + } + imx->chipselect = devdata->chipselect; imx->xchg_single = devdata->xchg_single; imx->do_transfer = devdata->do_transfer; |