diff options
author | Manuel Lauss <manuel.lauss@gmail.com> | 2014-07-23 10:36:52 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-07-30 08:10:00 -0400 |
commit | 415e0fec7a388dbe224057c1134737e23710aa9b (patch) | |
tree | 64ba643ffd45da5c4503ce32d553060c52e51f39 /arch/mips/alchemy/devboards/db1300.c | |
parent | 8e21170581d99038c41c803af289e1a6491cb145 (diff) |
MIPS: Alchemy: db1x00: use clk framework
Make use of the clk framework to set up and enable all PSC clocks.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/7469/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards/db1300.c')
-rw-r--r-- | arch/mips/alchemy/devboards/db1300.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c index c80e5b94064e..ef93ee3f6a2c 100644 --- a/arch/mips/alchemy/devboards/db1300.c +++ b/arch/mips/alchemy/devboards/db1300.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * (c) 2009 Manuel Lauss <manuel.lauss@googlemail.com> | 4 | * (c) 2009 Manuel Lauss <manuel.lauss@googlemail.com> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/clk.h> | ||
7 | #include <linux/dma-mapping.h> | 8 | #include <linux/dma-mapping.h> |
8 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
9 | #include <linux/gpio_keys.h> | 10 | #include <linux/gpio_keys.h> |
@@ -731,6 +732,7 @@ static struct platform_device *db1300_dev[] __initdata = { | |||
731 | int __init db1300_dev_setup(void) | 732 | int __init db1300_dev_setup(void) |
732 | { | 733 | { |
733 | int swapped, cpldirq; | 734 | int swapped, cpldirq; |
735 | struct clk *c; | ||
734 | 736 | ||
735 | /* setup CPLD IRQ muxer */ | 737 | /* setup CPLD IRQ muxer */ |
736 | cpldirq = au1300_gpio_to_irq(AU1300_PIN_EXTCLK1); | 738 | cpldirq = au1300_gpio_to_irq(AU1300_PIN_EXTCLK1); |
@@ -761,6 +763,11 @@ int __init db1300_dev_setup(void) | |||
761 | (void __iomem *)KSEG1ADDR(AU1300_PSC2_PHYS_ADDR) + PSC_SEL_OFFSET); | 763 | (void __iomem *)KSEG1ADDR(AU1300_PSC2_PHYS_ADDR) + PSC_SEL_OFFSET); |
762 | wmb(); | 764 | wmb(); |
763 | /* I2C uses internal 48MHz EXTCLK1 */ | 765 | /* I2C uses internal 48MHz EXTCLK1 */ |
766 | c = clk_get(NULL, "psc3_intclk"); | ||
767 | if (!IS_ERR(c)) { | ||
768 | clk_prepare_enable(c); | ||
769 | clk_put(c); | ||
770 | } | ||
764 | __raw_writel(PSC_SEL_CLK_INTCLK, | 771 | __raw_writel(PSC_SEL_CLK_INTCLK, |
765 | (void __iomem *)KSEG1ADDR(AU1300_PSC3_PHYS_ADDR) + PSC_SEL_OFFSET); | 772 | (void __iomem *)KSEG1ADDR(AU1300_PSC3_PHYS_ADDR) + PSC_SEL_OFFSET); |
766 | wmb(); | 773 | wmb(); |