summaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/db1300.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@gmail.com>2014-08-20 21:36:32 +0200
committerRalf Baechle <ralf@linux-mips.org>2014-09-22 13:35:47 +0200
commitc02a505e5a7787ee7aa871152ba571e6c1d1dc62 (patch)
tree5eb900f8a3f1e9cc442b80421342379b65d6720c /arch/mips/alchemy/devboards/db1300.c
parent7ec32e4965ae69976de0fb0f340496904e23e113 (diff)
downloadblackbird-op-linux-c02a505e5a7787ee7aa871152ba571e6c1d1dc62.tar.gz
blackbird-op-linux-c02a505e5a7787ee7aa871152ba571e6c1d1dc62.zip
MIPS: Alchemy: DB1xxx: Explicitly set 50MHz clock for I2C/SPI units.
Add an explicit call to set the desired rate to get the correct clock routing for the PSC clocks. It wasn't broken before, but now it's less affected by bootloader changes. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Cc: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/7554/ 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c
index ef93ee3f6a2c..e476ae9472b9 100644
--- a/arch/mips/alchemy/devboards/db1300.c
+++ b/arch/mips/alchemy/devboards/db1300.c
@@ -762,9 +762,10 @@ int __init db1300_dev_setup(void)
__raw_writel(PSC_SEL_CLK_SERCLK,
(void __iomem *)KSEG1ADDR(AU1300_PSC2_PHYS_ADDR) + PSC_SEL_OFFSET);
wmb();
- /* I2C uses internal 48MHz EXTCLK1 */
+ /* I2C driver wants 50MHz, get as close as possible */
c = clk_get(NULL, "psc3_intclk");
if (!IS_ERR(c)) {
+ clk_set_rate(c, 50000000);
clk_prepare_enable(c);
clk_put(c);
}
OpenPOWER on IntegriCloud