aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-03-11 19:13:38 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-12 15:14:35 -0400
commit4fbb82a76db3ef0ec8f5d2e01e288b7821eff687 (patch)
treebf32596ebe22b49f45e77a01bd40cd15ff8c1fc2 /drivers
parent19533314f9fcb52b619a1513491b691a67b40721 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-bcm63xx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index d7df435d962e..ef9b89fc2f32 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -493,7 +493,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
493 } 493 }
494 494
495 /* Initialize hardware */ 495 /* Initialize hardware */
496 clk_enable(bs->clk); 496 clk_prepare_enable(bs->clk);
497 bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS); 497 bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS);
498 498
499 /* register and we are done */ 499 /* register and we are done */
@@ -509,7 +509,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
509 return 0; 509 return 0;
510 510
511out_clk_disable: 511out_clk_disable:
512 clk_disable(clk); 512 clk_disable_unprepare(clk);
513out_err: 513out_err:
514 platform_set_drvdata(pdev, NULL); 514 platform_set_drvdata(pdev, NULL);
515 spi_master_put(master); 515 spi_master_put(master);
@@ -530,7 +530,7 @@ static int bcm63xx_spi_remove(struct platform_device *pdev)
530 bcm_spi_writeb(bs, 0, SPI_INT_MASK); 530 bcm_spi_writeb(bs, 0, SPI_INT_MASK);
531 531
532 /* HW shutdown */ 532 /* HW shutdown */
533 clk_disable(bs->clk); 533 clk_disable_unprepare(bs->clk);
534 clk_put(bs->clk); 534 clk_put(bs->clk);
535 535
536 platform_set_drvdata(pdev, 0); 536 platform_set_drvdata(pdev, 0);
@@ -549,7 +549,7 @@ static int bcm63xx_spi_suspend(struct device *dev)
549 549
550 spi_master_suspend(master); 550 spi_master_suspend(master);
551 551
552 clk_disable(bs->clk); 552 clk_disable_unprepare(bs->clk);
553 553
554 return 0; 554 return 0;
555} 555}
@@ -560,7 +560,7 @@ static int bcm63xx_spi_resume(struct device *dev)
560 platform_get_drvdata(to_platform_device(dev)); 560 platform_get_drvdata(to_platform_device(dev));
561 struct bcm63xx_spi *bs = spi_master_get_devdata(master); 561 struct bcm63xx_spi *bs = spi_master_get_devdata(master);
562 562
563 clk_enable(bs->clk); 563 clk_prepare_enable(bs->clk);
564 564
565 spi_master_resume(master); 565 spi_master_resume(master);
566 566