2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-05 20:24:09 +08:00

nand: mxc_nand: Use clk_prepare_enable/clk_disable_unprepare

Prepare the clock before enabling it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Fabio Estevam 2012-05-25 20:14:50 -03:00 committed by David Woodhouse
parent 1696e6bc2a
commit 3d059693f6

View File

@ -784,7 +784,7 @@ static void mxc_nand_select_chip_v2(struct mtd_info *mtd, int chip)
if (chip == -1) { if (chip == -1) {
/* Disable the NFC clock */ /* Disable the NFC clock */
if (host->clk_act) { if (host->clk_act) {
clk_disable(host->clk); clk_disable_unprepare(host->clk);
host->clk_act = 0; host->clk_act = 0;
} }
return; return;
@ -792,7 +792,7 @@ static void mxc_nand_select_chip_v2(struct mtd_info *mtd, int chip)
if (!host->clk_act) { if (!host->clk_act) {
/* Enable the NFC clock */ /* Enable the NFC clock */
clk_enable(host->clk); clk_prepare_enable(host->clk);
host->clk_act = 1; host->clk_act = 1;
} }