linux-mips
[Top] [All Lists]

Re: [PATCH 4/4] MIPS: loongson1: more clk support and add select HAVE_CL

To: Yoichi Yuasa <yuasa@linux-mips.org>
Subject: Re: [PATCH 4/4] MIPS: loongson1: more clk support and add select HAVE_CLK
From: Kelvin Cheung <keguang.zhang@gmail.com>
Date: Wed, 1 Aug 2012 17:08:17 +0800
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Bj60G/UZlMc2ZsqiubipID2IyLdVrHQ16esi6Z6uk9Y=; b=mBZvRyCKjAqF94jMgFwVrwtHtYSJg6u4T0HsJDdcXhwtk7kXiGsf+UgQTf+WDZRLE3 3zGH8tCKKVgWdu3b+MtHlOxX4HAae2RqzN6yqsX+bOCprsyV1T4a0Q/LMqlyKrIhBkYu fqH/ah8QctLqwEFogPCrDNYo/awugZEN8AHdoNn7WeMnnpE5YUBgxTE3vo/hGheBEsq2 1veJwgd56hs009YByjlXzb977kbQNdVMOBWs47sYhwgKd8KGCGjiBGrkunKA7JtRdDB1 ZokM9kMZkE6/WrcbN7kKT7/eiHRF1Xqxym/VHqM1haaaKIav1D1c5ooZowbIaG0XIj0f VP8w==
In-reply-to: <20120801154216.294110ab8af9f733752e85f3@linux-mips.org>
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>
References: <20120801153800.22d81b6d674d6722b2392574@linux-mips.org> <20120801154216.294110ab8af9f733752e85f3@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
Hi Yoichi,

Thanks for fixing this problem.
I kind of regretted that I did not follow Ralf's advice.

Now, I'm tring to use common clock framework in drivers/clk.

2012/8/1 Yoichi Yuasa <yuasa@linux-mips.org>
fix redefinition of clk_*

arch/mips/loongson1/common/clock.c:23:13: error: redefinition of 'clk_get'
include/linux/clk.h:281:27: note: previous definition of 'clk_get' was here
arch/mips/loongson1/common/clock.c:41:15: error: redefinition of 'clk_get_rate'
include/linux/clk.h:302:29: note: previous definition of 'clk_get_rate' was here
make[3]: *** [arch/mips/loongson1/common/clock.o] Error 1

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
---
 arch/mips/loongson1/Kconfig        |    1 +
 arch/mips/loongson1/common/clock.c |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/mips/loongson1/Kconfig b/arch/mips/loongson1/Kconfig
index 237fa21..a9a14d6 100644
--- a/arch/mips/loongson1/Kconfig
+++ b/arch/mips/loongson1/Kconfig
@@ -15,6 +15,7 @@ config LOONGSON1_LS1B
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select SYS_SUPPORTS_HIGHMEM
        select SYS_HAS_EARLY_PRINTK
+       select HAVE_CLK

 endchoice

diff --git a/arch/mips/loongson1/common/clock.c b/arch/mips/loongson1/common/clock.c
index 2d98fb0..1bbbbec 100644
--- a/arch/mips/loongson1/common/clock.c
+++ b/arch/mips/loongson1/common/clock.c
@@ -38,12 +38,28 @@ struct clk *clk_get(struct device *dev, const char *name)
 }
 EXPORT_SYMBOL(clk_get);

+int clk_enable(struct clk *clk)
+{
+       return 0;
+}
+EXPORT_SYMBOL(clk_enable);
+
+void clk_disable(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_disable);
+
 unsigned long clk_get_rate(struct clk *clk)
 {
        return clk->rate;
 }
 EXPORT_SYMBOL(clk_get_rate);

+void clk_put(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_put);
+
 static void pll_clk_init(struct clk *clk)
 {
        u32 pll;
--
1.7.0.4





--
Best Regards!
Kelvin



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