Subject: [PATCH] MIPS: bcm63xx: clk: Add dummy clk_set_rate() function

From: Markos Chandras <[email-masked]>
Date: Mon, 1 Jul 2013 11:57:24 +0100

Several drivers use the clk_set_rate() function that needs
to be defined in the platform's clock code. The Broadcom
BCM63xx platform hardcodes the clock rate so we create a new
dummy clk_set_rate() function which just returns -EINVAL.

Also fixes the following build problem on a randconfig:
drivers/built-in.o: In function `nop_usb_xceiv_probe':
phy-nop.c:(.text+0x3ec26c): undefined reference to `clk_set_rate'

Signed-off-by: Markos Chandras <[email-masked]>
Acked-by: Steven J. Hill <[email-masked]> 
---
This patch is for the upstream-sfr/mips-for-linux-next tree
---
 arch/mips/bcm63xx/clk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index c726a97..70dcc52 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -318,6 +318,12 @@ unsigned long clk_get_rate(struct clk *clk)
 
 EXPORT_SYMBOL(clk_get_rate);
 
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+	return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(clk_set_rate);
+
 struct clk *clk_get(struct device *dev, const char *id)
 {
 	if (!strcmp(id, "enet0"))
-- 
1.8.2.1

---

From: Lars-Peter Clausen <[email-masked]>
Date: Mon, 01 Jul 2013 13:06:02 +0200

> Acked-by: Steven J. Hill <[email-masked]> 

To make the set complete clk_round_rate() should be added as well

---

From: Markos Chandras <[email-masked]>
Date: Mon, 1 Jul 2013 14:06:06 +0100

>>   	if (!strcmp(id, "enet0"))

Hi Lars,

Thanks. I will submit a new patch