aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.18/0047-spi-bcm2708-Prepare-for-Common-Clock-Framework-migra.patch
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-11 10:17:55 +0000
commitc291f76d24a4190551a42b7b77a2cfeb3f4d36f9 (patch)
tree8f9211217d7e2cbaa78d10b596d81e646b3b9aad /target/linux/brcm2708/patches-3.18/0047-spi-bcm2708-Prepare-for-Common-Clock-Framework-migra.patch
parent0e26998162921c65cbfe2814e500c81ca7b50dad (diff)
downloadupstream-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.gz
upstream-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.tar.bz2
upstream-c291f76d24a4190551a42b7b77a2cfeb3f4d36f9.zip
brcm2708: update to v3.18
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44392 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0047-spi-bcm2708-Prepare-for-Common-Clock-Framework-migra.patch')
-rwxr-xr-xtarget/linux/brcm2708/patches-3.18/0047-spi-bcm2708-Prepare-for-Common-Clock-Framework-migra.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0047-spi-bcm2708-Prepare-for-Common-Clock-Framework-migra.patch b/target/linux/brcm2708/patches-3.18/0047-spi-bcm2708-Prepare-for-Common-Clock-Framework-migra.patch
new file mode 100755
index 0000000000..b6dc5562b1
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.18/0047-spi-bcm2708-Prepare-for-Common-Clock-Framework-migra.patch
@@ -0,0 +1,50 @@
+From d828fe6d765939e457e87d7f348adfe69cfd4175 Mon Sep 17 00:00:00 2001
+From: notro <notro@tronnes.org>
+Date: Sun, 6 Jul 2014 12:07:25 +0200
+Subject: [PATCH 047/114] spi-bcm2708: Prepare for Common Clock Framework
+ migration
+
+As part of migrating to use the Common Clock Framework, replace clk_enable()
+with clk_prepare_enable() and clk_disable() with clk_disable_unprepare().
+This does not affect behaviour under the current clock implementation.
+
+Also add a missing clk_disable_unprepare() in the probe error path.
+
+Signed-off-by: Noralf Tronnes <notro@tronnes.org>
+---
+ drivers/spi/spi-bcm2708.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/spi/spi-bcm2708.c b/drivers/spi/spi-bcm2708.c
+index b04a57d..349d21f 100644
+--- a/drivers/spi/spi-bcm2708.c
++++ b/drivers/spi/spi-bcm2708.c
+@@ -545,7 +545,7 @@ static int bcm2708_spi_probe(struct platform_device *pdev)
+ }
+
+ /* initialise the hardware */
+- clk_enable(clk);
++ clk_prepare_enable(clk);
+ bcm2708_wr(bs, SPI_CS, SPI_CS_REN | SPI_CS_CLEAR_RX | SPI_CS_CLEAR_TX);
+
+ err = spi_register_master(master);
+@@ -561,6 +561,7 @@ static int bcm2708_spi_probe(struct platform_device *pdev)
+
+ out_free_irq:
+ free_irq(bs->irq, master);
++ clk_disable_unprepare(bs->clk);
+ out_workqueue:
+ destroy_workqueue(bs->workq);
+ out_iounmap:
+@@ -585,7 +586,7 @@ static int bcm2708_spi_remove(struct platform_device *pdev)
+
+ flush_work(&bs->work);
+
+- clk_disable(bs->clk);
++ clk_disable_unprepare(bs->clk);
+ clk_put(bs->clk);
+ free_irq(bs->irq, master);
+ iounmap(bs->base);
+--
+1.8.3.2
+