2013-02-04 10:19:55 +00:00
|
|
|
From 5aeb6273a610f8aab090b3499827177eb41311ba Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jonas Gorski <jonas.gorski@gmail.com>
|
|
|
|
Date: Sat, 12 Nov 2011 12:19:09 +0100
|
|
|
|
Subject: [PATCH 53/79] MIPS: BCM63XX: expose the HS SPI clock
|
|
|
|
|
|
|
|
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
|
|
|
---
|
|
|
|
arch/mips/bcm63xx/clk.c | 22 ++++++++++++++++++++++
|
|
|
|
1 file changed, 22 insertions(+)
|
|
|
|
|
|
|
|
--- a/arch/mips/bcm63xx/clk.c
|
|
|
|
+++ b/arch/mips/bcm63xx/clk.c
|
2013-04-23 13:55:36 +00:00
|
|
|
@@ -236,6 +236,26 @@ static struct clk clk_spi = {
|
2013-02-04 10:19:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
+ * SPI clock
|
|
|
|
+ */
|
|
|
|
+static void hsspi_set(struct clk *clk, int enable)
|
|
|
|
+{
|
|
|
|
+ u32 mask;
|
|
|
|
+
|
|
|
|
+ if (BCMCPU_IS_6328())
|
|
|
|
+ mask = CKCTL_6328_HSSPI_EN;
|
|
|
|
+ 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)
|
2013-04-23 13:55:36 +00:00
|
|
|
@@ -344,6 +364,8 @@ struct clk *clk_get(struct device *dev,
|
2013-02-04 10:19:55 +00:00
|
|
|
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"))
|