All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: bcm63xx: clk: Add dummy clk_{set,round}_rate() functions
@ 2013-07-02 10:13 ` Markos Chandras
  0 siblings, 0 replies; 4+ messages in thread
From: Markos Chandras @ 2013-07-02 10:13 UTC (permalink / raw)
  To: linux-mips; +Cc: Markos Chandras

Several drivers use the clk_{set,round}_rate() functions
that need to be defined in the platform's clock code.
The Broadcom BCM63xx platform hardcodes the clock rate so
we create new clk_{set,round}_rate() functions
which just return 0 like those in include/linux/clk.h
for the common clock framework do.

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 <markos.chandras@imgtec.com>
Acked-by: Steven J. Hill <Steven.Hill@imgtec.com>
---
Changes since v1:
- Return 0 instead of -EINVAL for clk_set_rate to be compatible with
the common clock framework interfaces
- Add dummy clk_round_rate
http://www.linux-mips.org/archives/linux-mips/2013-07/msg00006.html

This patch is for the upstream-sfr/mips-for-linux-next tree
---
 arch/mips/bcm63xx/clk.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-02 14:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 10:13 [PATCH v2] MIPS: bcm63xx: clk: Add dummy clk_{set,round}_rate() functions Markos Chandras
2013-07-02 10:13 ` Markos Chandras
2013-07-02 10:46 ` Florian Fainelli
2013-07-02 14:32   ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.