aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-27 02:41:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-27 02:41:50 -0400
commit18974369cfe23acf16d0fb79e0d1fba7a9a95ec0 (patch)
tree22367984dbd4c79e9635035e268c428444c40e76 /drivers/spi
parent7e0a6fd5a4723c79cc46c9541e343092302e0e5b (diff)
parent196a57c2749119be4732cc2b2adb8aafcb4fcb14 (diff)
Merge branch 'clk' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'clk' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: ARM: 7131/1: clkdev: Add Common Macro for clk_lookup clk: spi-pl022: convert to clk_prepare()/clk_unprepare() clk: timer-sp: convert to clk_prepare()/clk_unprepare() clk: sa1111: convert to clk_prepare()/clk_unprepare() clk: mmci: convert to clk_prepare()/clk_unprepare() clk: amba-pl011: convert to clk_prepare()/clk_unprepare() clk: amba-pl010: convert to clk_prepare()/clk_unprepare() clk: amba-clcd: convert to clk_prepare()/clk_unprepare() clk: amba bus: convert to clk_prepare()/clk_unprepare() clk: provide prepare/unprepare functions
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-pl022.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 3520cf955b95..1ab2fa0d37fd 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2187,6 +2187,13 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
2187 dev_err(&adev->dev, "could not retrieve SSP/SPI bus clock\n"); 2187 dev_err(&adev->dev, "could not retrieve SSP/SPI bus clock\n");
2188 goto err_no_clk; 2188 goto err_no_clk;
2189 } 2189 }
2190
2191 status = clk_prepare(pl022->clk);
2192 if (status) {
2193 dev_err(&adev->dev, "could not prepare SSP/SPI bus clock\n");
2194 goto err_clk_prep;
2195 }
2196
2190 /* Disable SSP */ 2197 /* Disable SSP */
2191 writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)), 2198 writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
2192 SSP_CR1(pl022->virtbase)); 2199 SSP_CR1(pl022->virtbase));
@@ -2238,6 +2245,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
2238 pl022_dma_remove(pl022); 2245 pl022_dma_remove(pl022);
2239 free_irq(adev->irq[0], pl022); 2246 free_irq(adev->irq[0], pl022);
2240 err_no_irq: 2247 err_no_irq:
2248 clk_unprepare(pl022->clk);
2249 err_clk_prep:
2241 clk_put(pl022->clk); 2250 clk_put(pl022->clk);
2242 err_no_clk: 2251 err_no_clk:
2243 iounmap(pl022->virtbase); 2252 iounmap(pl022->virtbase);
@@ -2271,6 +2280,7 @@ pl022_remove(struct amba_device *adev)
2271 pl022_dma_remove(pl022); 2280 pl022_dma_remove(pl022);
2272 free_irq(adev->irq[0], pl022); 2281 free_irq(adev->irq[0], pl022);
2273 clk_disable(pl022->clk); 2282 clk_disable(pl022->clk);
2283 clk_unprepare(pl022->clk);
2274 clk_put(pl022->clk); 2284 clk_put(pl022->clk);
2275 iounmap(pl022->virtbase); 2285 iounmap(pl022->virtbase);
2276 amba_release_regions(adev); 2286 amba_release_regions(adev);