linux-mips
[Top] [All Lists]

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

To: Markos Chandras <markos.chandras@imgtec.com>
Subject: Re: [PATCH] MIPS: bcm63xx: clk: Add dummy clk_set_rate() function
From: Lars-Peter Clausen <lars@metafoo.de>
Date: Mon, 01 Jul 2013 13:06:02 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <1372676244-1399-1-git-send-email-markos.chandras@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1372676244-1399-1-git-send-email-markos.chandras@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
On 07/01/2013 12:57 PM, Markos Chandras wrote:
> 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 <markos.chandras@imgtec.com>
> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> 

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

> ---
> 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"))


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