You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
11 years ago
|
From f0df10fb498c21bbb201bc81dd209ea646b5a311 Mon Sep 17 00:00:00 2001
|
||
|
From: Jonas Gorski <jogo@openwrt.org>
|
||
11 years ago
|
Date: Sat, 12 Nov 2011 12:19:09 +0100
|
||
11 years ago
|
Subject: [PATCH 1/5] MIPS: BCM63XX: expose the HSSPI clock
|
||
11 years ago
|
|
||
11 years ago
|
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||
11 years ago
|
---
|
||
11 years ago
|
arch/mips/bcm63xx/clk.c | 24 ++++++++++++++++++++++++
|
||
|
1 file changed, 24 insertions(+)
|
||
11 years ago
|
|
||
|
--- a/arch/mips/bcm63xx/clk.c
|
||
|
+++ b/arch/mips/bcm63xx/clk.c
|
||
11 years ago
|
@@ -226,6 +226,28 @@ static struct clk clk_spi = {
|
||
11 years ago
|
};
|
||
|
|
||
|
/*
|
||
11 years ago
|
+ * HSSPI clock
|
||
11 years ago
|
+ */
|
||
|
+static void hsspi_set(struct clk *clk, int enable)
|
||
|
+{
|
||
|
+ u32 mask;
|
||
|
+
|
||
|
+ if (BCMCPU_IS_6328())
|
||
|
+ mask = CKCTL_6328_HSSPI_EN;
|
||
11 years ago
|
+ else if (BCMCPU_IS_6362())
|
||
|
+ mask = CKCTL_6362_HSSPI_EN;
|
||
11 years ago
|
+ else
|
||
|
+ return;
|
||
|
+
|
||
|
+ bcm_hwclock_set(mask, enable);
|
||
|
+}
|
||
|
+
|
||
|
+static struct clk clk_hsspi = {
|
||
|
+ .set = hsspi_set,
|
||
|
+};
|
||
|
+
|
||
|
+
|
||
|
+/*
|
||
|
* XTM clock
|
||
|
*/
|
||
|
static void xtm_set(struct clk *clk, int enable)
|
||
11 years ago
|
@@ -334,6 +356,8 @@ struct clk *clk_get(struct device *dev,
|
||
11 years ago
|
return &clk_usbd;
|
||
|
if (!strcmp(id, "spi"))
|
||
|
return &clk_spi;
|
||
|
+ if (!strcmp(id, "hsspi"))
|
||
|
+ return &clk_hsspi;
|
||
|
if (!strcmp(id, "xtm"))
|
||
|
return &clk_xtm;
|
||
|
if (!strcmp(id, "periph"))
|