Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1203634 > unrolled thread
| Started by | Hauke Mehrtens <hauke@hauke-m.de> |
|---|---|
| First post | 2015-08-09 14:30 +0200 |
| Last post | 2015-08-19 23:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 5/5] MIPS: ath79: Use the common clk API Hauke Mehrtens <hauke@hauke-m.de> - 2015-08-09 14:30 +0200
Re: [PATCH v2 5/5] MIPS: ath79: Use the common clk API Ralf Baechle <ralf@linux-mips.org> - 2015-08-19 23:10 +0200
MIPS: ath79: Use the common clk API Ralf Baechle <ralf@linux-mips.org> - 2015-08-19 23:30 +0200
| From | Hauke Mehrtens <hauke@hauke-m.de> |
|---|---|
| Date | 2015-08-09 14:30 +0200 |
| Subject | Re: [PATCH v2 5/5] MIPS: ath79: Use the common clk API |
| Message-ID | <pVxTI-5YJ-5@gated-at.bofh.it> |
On 04/19/2015 02:30 PM, Alban Bedel wrote: > Make the code simpler and open the way for device tree clocks. > > Signed-off-by: Alban Bedel <albeu@free.fr> > --- > arch/mips/Kconfig | 1 + > arch/mips/ath79/clock.c | 29 ++--------------------------- > 2 files changed, 3 insertions(+), 27 deletions(-) > I think this should be send at least to stable 4.1, because it fixes a linking problem we are seeing in OpenWrt. ath79 does not export clk_set_rate() and clk_round_rate(), but some drivers are using it and they are not using the inline dummy method, because CONFIG_HAVE_CLK is set for ath79. ERROR: "clk_set_rate" [drivers/usb/phy/phy-generic.ko] undefined! ERROR: "clk_round_rate" [drivers/media/v4l2-core/videodev.ko] undefined! ERROR: "clk_set_rate" [drivers/media/v4l2-core/videodev.ko] undefined! Hauke -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Date | 2015-08-19 23:10 +0200 |
| Message-ID | <pZiMr-ID-15@gated-at.bofh.it> |
| In reply to | #1203634 |
On Sun, Aug 09, 2015 at 02:21:11PM +0200, Hauke Mehrtens wrote: > Date: Sun, 09 Aug 2015 14:21:11 +0200 > From: Hauke Mehrtens <hauke@hauke-m.de> > To: Alban Bedel <albeu@free.fr>, linux-mips@linux-mips.org, Ralf Baechle > <ralf@linux-mips.org> > CC: Andrew Bresticker <abrestic@chromium.org>, Qais Yousef > <qais.yousef@imgtec.com>, Wolfram Sang <wsa@the-dreams.de>, Sergey > Ryazanov <ryazanov.s.a@gmail.com>, Gabor Juhos <juhosg@openwrt.org>, > linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2 5/5] MIPS: ath79: Use the common clk API > Content-Type: text/plain; charset=windows-1252 > > On 04/19/2015 02:30 PM, Alban Bedel wrote: > > Make the code simpler and open the way for device tree clocks. > > > > Signed-off-by: Alban Bedel <albeu@free.fr> > > --- > > arch/mips/Kconfig | 1 + > > arch/mips/ath79/clock.c | 29 ++--------------------------- > > 2 files changed, 3 insertions(+), 27 deletions(-) > > > > I think this should be send at least to stable 4.1, because it fixes a > linking problem we are seeing in OpenWrt. > > ath79 does not export clk_set_rate() and clk_round_rate(), but some > drivers are using it and they are not using the inline dummy method, > because CONFIG_HAVE_CLK is set for ath79. > > ERROR: "clk_set_rate" [drivers/usb/phy/phy-generic.ko] undefined! > ERROR: "clk_round_rate" [drivers/media/v4l2-core/videodev.ko] undefined! > ERROR: "clk_set_rate" [drivers/media/v4l2-core/videodev.ko] undefined! Ok. Will post the the patch in a separate email. Ralf -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Date | 2015-08-19 23:30 +0200 |
| Subject | MIPS: ath79: Use the common clk API |
| Message-ID | <pZj5N-15x-31@gated-at.bofh.it> |
| In reply to | #1210025 |
From: Alban Bedel <albeu@free.fr>
Make the code simpler and open the way for device tree clocks.
[ralf@linux-mips.org: Resolved conflict with 2a552da6 (MIPS/IRQCHIP: Move
irq_chip from arch/mips to drivers/irqchip.)]
In 4.1 this also fixes the following build error:
ERROR: "clk_set_rate" [drivers/usb/phy/phy-generic.ko] undefined!
ERROR: "clk_round_rate" [drivers/media/v4l2-core/videodev.ko] undefined!
ERROR: "clk_set_rate" [drivers/media/v4l2-core/videodev.ko] undefined!
Signed-off-by: Alban Bedel <albeu@free.fr>
Cc: linux-mips@linux-mips.org
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Qais Yousef <qais.yousef@imgtec.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9774/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
Upstream commit 411520af8ec9456886359b42628e583ac58e7e44
arch/mips/Kconfig | 1 +
arch/mips/ath79/clock.c | 29 ++---------------------------
2 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 1c053e2..11cdbac 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -123,6 +123,7 @@ config ATH79
select CSRC_R4K
select DMA_NONCOHERENT
select HAVE_CLK
+ select COMMON_CLK
select CLKDEV_LOOKUP
select IRQ_CPU
select MIPS_MACHINE
diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c
index 26479f4..d59009d 100644
--- a/arch/mips/ath79/clock.c
+++ b/arch/mips/ath79/clock.c
@@ -17,6 +17,7 @@
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
+#include <linux/clk-provider.h>
#include <asm/div64.h>
@@ -28,21 +29,15 @@
#define AR724X_BASE_FREQ 5000000
#define AR913X_BASE_FREQ 5000000
-struct clk {
- unsigned long rate;
-};
-
static void __init ath79_add_sys_clkdev(const char *id, unsigned long rate)
{
struct clk *clk;
int err;
- clk = kzalloc(sizeof(*clk), GFP_KERNEL);
+ clk = clk_register_fixed_rate(NULL, id, NULL, CLK_IS_ROOT, rate);
if (!clk)
panic("failed to allocate %s clock structure", id);
- clk->rate = rate;
-
err = clk_register_clkdev(clk, id, NULL);
if (err)
panic("unable to register %s clock device", id);
@@ -468,23 +463,3 @@ ath79_get_sys_clk_rate(const char *id)
return rate;
}
-
-/*
- * Linux clock API
- */
-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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web