diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-27 02:41:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-27 02:41:50 -0400 |
commit | 18974369cfe23acf16d0fb79e0d1fba7a9a95ec0 (patch) | |
tree | 22367984dbd4c79e9635035e268c428444c40e76 /arch | |
parent | 7e0a6fd5a4723c79cc46c9541e343092302e0e5b (diff) | |
parent | 196a57c2749119be4732cc2b2adb8aafcb4fcb14 (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 'arch')
-rw-r--r-- | arch/arm/common/sa1111.c | 9 | ||||
-rw-r--r-- | arch/arm/common/timer-sp.c | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 0569de6acfba..61691cdbdcf2 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -718,6 +718,10 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
718 | goto err_free; | 718 | goto err_free; |
719 | } | 719 | } |
720 | 720 | ||
721 | ret = clk_prepare(sachip->clk); | ||
722 | if (ret) | ||
723 | goto err_clkput; | ||
724 | |||
721 | spin_lock_init(&sachip->lock); | 725 | spin_lock_init(&sachip->lock); |
722 | 726 | ||
723 | sachip->dev = me; | 727 | sachip->dev = me; |
@@ -733,7 +737,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
733 | sachip->base = ioremap(mem->start, PAGE_SIZE * 2); | 737 | sachip->base = ioremap(mem->start, PAGE_SIZE * 2); |
734 | if (!sachip->base) { | 738 | if (!sachip->base) { |
735 | ret = -ENOMEM; | 739 | ret = -ENOMEM; |
736 | goto err_clkput; | 740 | goto err_clk_unprep; |
737 | } | 741 | } |
738 | 742 | ||
739 | /* | 743 | /* |
@@ -809,6 +813,8 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
809 | 813 | ||
810 | err_unmap: | 814 | err_unmap: |
811 | iounmap(sachip->base); | 815 | iounmap(sachip->base); |
816 | err_clk_unprep: | ||
817 | clk_unprepare(sachip->clk); | ||
812 | err_clkput: | 818 | err_clkput: |
813 | clk_put(sachip->clk); | 819 | clk_put(sachip->clk); |
814 | err_free: | 820 | err_free: |
@@ -835,6 +841,7 @@ static void __sa1111_remove(struct sa1111 *sachip) | |||
835 | sa1111_writel(0, irqbase + SA1111_WAKEEN1); | 841 | sa1111_writel(0, irqbase + SA1111_WAKEEN1); |
836 | 842 | ||
837 | clk_disable(sachip->clk); | 843 | clk_disable(sachip->clk); |
844 | clk_unprepare(sachip->clk); | ||
838 | 845 | ||
839 | if (sachip->irq != NO_IRQ) { | 846 | if (sachip->irq != NO_IRQ) { |
840 | irq_set_chained_handler(sachip->irq, NULL); | 847 | irq_set_chained_handler(sachip->irq, NULL); |
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index 41df47875122..2393b5bc96fa 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -41,9 +41,17 @@ static long __init sp804_get_clock_rate(const char *name) | |||
41 | return PTR_ERR(clk); | 41 | return PTR_ERR(clk); |
42 | } | 42 | } |
43 | 43 | ||
44 | err = clk_prepare(clk); | ||
45 | if (err) { | ||
46 | pr_err("sp804: %s clock failed to prepare: %d\n", name, err); | ||
47 | clk_put(clk); | ||
48 | return err; | ||
49 | } | ||
50 | |||
44 | err = clk_enable(clk); | 51 | err = clk_enable(clk); |
45 | if (err) { | 52 | if (err) { |
46 | pr_err("sp804: %s clock failed to enable: %d\n", name, err); | 53 | pr_err("sp804: %s clock failed to enable: %d\n", name, err); |
54 | clk_unprepare(clk); | ||
47 | clk_put(clk); | 55 | clk_put(clk); |
48 | return err; | 56 | return err; |
49 | } | 57 | } |
@@ -52,6 +60,7 @@ static long __init sp804_get_clock_rate(const char *name) | |||
52 | if (rate < 0) { | 60 | if (rate < 0) { |
53 | pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate); | 61 | pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate); |
54 | clk_disable(clk); | 62 | clk_disable(clk); |
63 | clk_unprepare(clk); | ||
55 | clk_put(clk); | 64 | clk_put(clk); |
56 | } | 65 | } |
57 | 66 | ||