Commit dc9774c9 authored by Richard Zhao's avatar Richard Zhao Committed by Sascha Hauer

ARM: mxc: ahci: add clk_prepare/clk_unprepare

It's for migrating to generic clk framework API.
Signed-off-by: default avatarRichard Zhao <richard.zhao@linaro.org>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 46f417de
......@@ -60,9 +60,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
dev_err(dev, "no sata clock.\n");
return PTR_ERR(sata_clk);
}
ret = clk_enable(sata_clk);
ret = clk_prepare_enable(sata_clk);
if (ret) {
dev_err(dev, "can't enable sata clock.\n");
dev_err(dev, "can't prepare/enable sata clock.\n");
goto put_sata_clk;
}
......@@ -73,9 +73,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
ret = PTR_ERR(sata_ref_clk);
goto release_sata_clk;
}
ret = clk_enable(sata_ref_clk);
ret = clk_prepare_enable(sata_ref_clk);
if (ret) {
dev_err(dev, "can't enable sata ref clock.\n");
dev_err(dev, "can't prepare/enable sata ref clock.\n");
goto put_sata_ref_clk;
}
......@@ -104,11 +104,11 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
return 0;
release_sata_ref_clk:
clk_disable(sata_ref_clk);
clk_disable_unprepare(sata_ref_clk);
put_sata_ref_clk:
clk_put(sata_ref_clk);
release_sata_clk:
clk_disable(sata_clk);
clk_disable_unprepare(sata_clk);
put_sata_clk:
clk_put(sata_clk);
......@@ -117,10 +117,10 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
static void imx_sata_exit(struct device *dev)
{
clk_disable(sata_ref_clk);
clk_disable_unprepare(sata_ref_clk);
clk_put(sata_ref_clk);
clk_disable(sata_clk);
clk_disable_unprepare(sata_clk);
clk_put(sata_clk);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment