mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
spi/bcm63xx: properly prepare clocks before enabling them
Use proper clk_prepare/unprepare calls in preparation for switching to the generic clock framework. Signed-off-by: Jonas Gorski <jogo@openwrt.org> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
19533314f9
commit
4fbb82a76d
1 changed files with 5 additions and 5 deletions
|
@ -493,7 +493,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* Initialize hardware */
|
||||
clk_enable(bs->clk);
|
||||
clk_prepare_enable(bs->clk);
|
||||
bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS);
|
||||
|
||||
/* register and we are done */
|
||||
|
@ -509,7 +509,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
out_clk_disable:
|
||||
clk_disable(clk);
|
||||
clk_disable_unprepare(clk);
|
||||
out_err:
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
spi_master_put(master);
|
||||
|
@ -530,7 +530,7 @@ static int bcm63xx_spi_remove(struct platform_device *pdev)
|
|||
bcm_spi_writeb(bs, 0, SPI_INT_MASK);
|
||||
|
||||
/* HW shutdown */
|
||||
clk_disable(bs->clk);
|
||||
clk_disable_unprepare(bs->clk);
|
||||
clk_put(bs->clk);
|
||||
|
||||
platform_set_drvdata(pdev, 0);
|
||||
|
@ -549,7 +549,7 @@ static int bcm63xx_spi_suspend(struct device *dev)
|
|||
|
||||
spi_master_suspend(master);
|
||||
|
||||
clk_disable(bs->clk);
|
||||
clk_disable_unprepare(bs->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ static int bcm63xx_spi_resume(struct device *dev)
|
|||
platform_get_drvdata(to_platform_device(dev));
|
||||
struct bcm63xx_spi *bs = spi_master_get_devdata(master);
|
||||
|
||||
clk_enable(bs->clk);
|
||||
clk_prepare_enable(bs->clk);
|
||||
|
||||
spi_master_resume(master);
|
||||
|
||||
|
|
Loading…
Reference in a new issue