[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2019 11:57:14 +0100
From: "Enrico Weigelt, metux IT consult" <lkml@...ux.net>
To: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: CONFIG_COMMON_CLK vs CONFIG_HAVE_CLK
On 12.12.19 03:09, Kuninori Morimoto wrote:
> I noticed that there are some CONFIG_HAVE_CLK vs CONFIG_COMMON_CLK mismatch.
> Because of it, I got compile error at clk_set_min_rate() on SH.
> SH will have HAVE_CLK, but doesn't have COMMON_CLK.
>
> > ARCH=sh make allyesconfig
> > make
> ...
> drivers/devfreq/tegra30-devfreq.o: In function `tegra_devfreq_target':
> tegra30-devfreq.c:(.text+0x368): undefined reference to `clk_set_min_rate'
>
> clk_set_min_rate() is under HAVE_CLK at clk.h
>
> --- clk.h ---
> => #ifdef CONFIG_HAVE_CLK
> ...
> int clk_set_min_rate(struct clk *clk, unsigned long rate);
> ...
> #else /* !CONFIG_HAVE_CLK */
> static inline int clk_set_min_rate(struct clk *clk, unsigned long rate)
> ...
> -------------
>
> It is implemented at clk.c.
> But it will be compiled via COMMON_CLK
>
> --- Makefile ---
> ...
> => obj-$(CONFIG_COMMON_CLK) += clk.o
You've got CONFIG_HAVE_CLK enabled, but CONFIG_COMMON_CLK disabled ?
hmm, the whole CONFIG_HAVE_CLK looks a bit weird to me. I wonder what's
the actual purpose of having this arch-specific.
IMHO, we should sort out whether there are some things that some arch
really *needs*, and what could be optional - then split that into
separate modules along this line.
It seems that clk_set_min_rate() belongs to CONFIG_COMMON_CLK, and
tegra30-devfreq.c needds to depend on CONFIG_COMMON_CLK.
--mtx
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@...ux.net -- +49-151-27565287
Powered by blists - more mailing lists