aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-3.9/005-spi-bcm63xx-properly-prepare-clocks-before-enabling-.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-05-19 18:32:13 +0000
committerJonas Gorski <jogo@openwrt.org>2013-05-19 18:32:13 +0000
commit0a62b7c1484ee963726ffab11a86da4b2fe35a46 (patch)
tree6b553a9636a4b125e04e7ef6942d889c0dcbdd6c /target/linux/brcm63xx/patches-3.9/005-spi-bcm63xx-properly-prepare-clocks-before-enabling-.patch
parent1f4e5f77a0d5bc3cce01c501409ccfdce08b0382 (diff)
downloadupstream-0a62b7c1484ee963726ffab11a86da4b2fe35a46.tar.gz
upstream-0a62b7c1484ee963726ffab11a86da4b2fe35a46.tar.bz2
upstream-0a62b7c1484ee963726ffab11a86da4b2fe35a46.zip
bcm63xx: add 3.9 support
Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 36660
Diffstat (limited to 'target/linux/brcm63xx/patches-3.9/005-spi-bcm63xx-properly-prepare-clocks-before-enabling-.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.9/005-spi-bcm63xx-properly-prepare-clocks-before-enabling-.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.9/005-spi-bcm63xx-properly-prepare-clocks-before-enabling-.patch b/target/linux/brcm63xx/patches-3.9/005-spi-bcm63xx-properly-prepare-clocks-before-enabling-.patch
new file mode 100644
index 0000000000..b75a57c0fd
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.9/005-spi-bcm63xx-properly-prepare-clocks-before-enabling-.patch
@@ -0,0 +1,61 @@
+From e504d3ed9b35f43e61cf239b103667d87cd7bf3c Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Mon, 10 Sep 2012 01:26:55 +0200
+Subject: [PATCH 03/12] 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>
+---
+ drivers/spi/spi-bcm63xx.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/drivers/spi/spi-bcm63xx.c
++++ b/drivers/spi/spi-bcm63xx.c
+@@ -493,7 +493,7 @@ static int bcm63xx_spi_probe(struct plat
+ }
+
+ /* 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 plat
+ 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 pla
+ 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 de
+
+ 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 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);
+