[Top] [All Lists]

[PATCH v2] MIPS: bcm63xx: clk: Add dummy clk_{set,round}_rate() function

To: <>
Subject: [PATCH v2] MIPS: bcm63xx: clk: Add dummy clk_{set,round}_rate() functions
From: Markos Chandras <>
Date: Tue, 2 Jul 2013 11:13:44 +0100
Cc: Markos Chandras <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
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 <>
Acked-by: Steven J. Hill <>
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

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)
+int clk_set_rate(struct clk *clk, unsigned long rate)
+       return 0;
+long clk_round_rate(struct clk *clk, unsigned long rate)
+       return 0;
 struct clk *clk_get(struct device *dev, const char *id)
        if (!strcmp(id, "enet0"))

<Prev in Thread] Current Thread [Next in Thread>