spi/pxa: add clk_prepare/clk_unprepare calls to spi-pxa2xx
Subsystems (4)
PATCH 1/1 spi/pxa: add clk_prepare/clk_unprepare calls to spi-pxa2xx
This patch adds clk_prepare/clk_unprepare calls to the spi-pxa2xx driver by using the helper functions clk_prepare_enable and clk_disable_unprepare.
Signed-off-by Philipp Zabel <[email protected]>
Cc Eric Miao <[email protected]>
Cc Russell King <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Grant Likely <[email protected]>
--- drivers/spi/spi-pxa2xx.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/spi/spi-pxa2xx.c +5 -5
@@ -1625,7 +1625,7 @@ static int __devinit pxa2xx_spi_probe(struct platform_device *pdev) }/* Enable SOC clock */ -clk_enable (ssp->clk); +clk_prepare_enable (ssp->clk);/* Load default SSP configuration */ write_SSCR0 (0 , drv_data->ioaddr);
@@ -1666,7 +1666,7 @@ out_error_queue_alloc:destroy_queue (drv_data); out_error_clock_enabled: -clk_disable (ssp->clk); +clk_disable_unprepare (ssp->clk); out_error_dma_alloc:if (drv_data->tx_channel !=-1 )
@@ -1709,7 +1709,7 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)/* Disable the SSP at the peripheral and SOC level */ write_SSCR0 (0 , drv_data->ioaddr); -clk_disable (ssp->clk); +clk_disable_unprepare (ssp->clk);/* Release DMA */ if (drv_data->master_info->enable_dma) {
@@ -1753,7 +1753,7 @@ static int pxa2xx_spi_suspend(struct device *dev)if (status !=0 )return status;write_SSCR0 (0 , drv_data->ioaddr); -clk_disable (ssp->clk); +clk_disable_unprepare (ssp->clk);return 0 ; }
@@ -1772,7 +1772,7 @@ static int pxa2xx_spi_resume(struct device *dev)DRCMR_MAPVLD | drv_data->tx_channel;/* Enable the SSP clock */ -clk_enable (ssp->clk); +clk_prepare_enable (ssp->clk);/* Start the queue running */ status =start_queue (drv_data);
Signature · 1 line
1.7.9.1