Hi Yong,
> To do so, I need to make somethings done, and some of them are related to
> common clock code, for which I am more than happy to hear your comments.
Definitely, I'm happy to help out.
> 1. Create clock information based on common clock device, more specific,
> based on struct clk_look
Hi Yong,
> This means that you have already forced each SOC to have a unified
> 'struct clk', or at least force some fields inside the struct tp be unified,
> right?
> My understanding is that leaving 'struct clk' definition to SOC related
> code is to give freedom for 'struct clk' definition to S
Add a debugfs file to expose system clocks.
Signed-off-by: Jeremy Kerr
---
Yong: as promised, here's the sample debug code for the common struck clk
---
arch/Kconfig |4 +
arch/arm/common/clkdev.c |2
include/linux/clk.h | 20
kernel/
Hi Yong,
> Yes, it's also nice to have a file containing all the clock information
> which you have implemented in the email.
> Since we expect more features like enable/disable clocks in the debugfs, we
> also like to have tree-like debugfs for clock information.
Sure; if you want the extended f
Hi Amit,
> > @@ -64,14 +66,25 @@ struct clk {
> >
> > struct mutexmutex;
> > spinlock_t spinlock;
> >
> > } lock;
> >
> > +#ifdef CONFIG_CLK_DEBUG
> > + const char name[CLK_NAME_LEN];
> > + struct list_headlist;
> > +#endif /* CO
Hi Yong,
Looks good, just a couple of things:
> diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
> index 9e4c4d9..cf81e70 100644
> --- a/arch/arm/common/clkdev.c
> +++ b/arch/arm/common/clkdev.c
Why not do this in the core clock code (kernel/clk.c) instead? No need to make
it AR
Hi Yong,
A few more comments:
> diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
> index 0a34c81..0300c95 100644
> --- a/arch/arm/common/Kconfig
> +++ b/arch/arm/common/Kconfig
> @@ -41,3 +41,10 @@ config SHARP_SCOOP
> config COMMON_CLKDEV
> bool
> select HAVE_CLK
> +
> +config
Hi Yong,
> the time of clock registering (normally at board initialization or other
> early stage of boot up), debug fs system has not been initialized (happends
> in core_initcall). Therefore, it is better to leave it in a standalone
> function which will be called in late_initcall.
If you rely
Hi Yong,
> diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
> index 9e4c4d9..936684f 100644
> --- a/arch/arm/common/clkdev.c
> +++ b/arch/arm/common/clkdev.c
> @@ -19,6 +19,9 @@
> #include
> #include
> #include
> +#ifdef CONFIG_CLK_DEBUG
> +#include
> +#endif
With changes s
Hi Yong,
We're getting pretty close - just a couple of changes:
> + } else {
> + struct preinit_clk *p;
> + mutex_lock(&preinit_lock);
> + p = kmalloc(sizeof(*p), GFP_KERNEL);
> + if (!p)
> + goto unlock;
> +
Hi Yong,
> >> +static int __init clk_debugfs_init(void)
> >> +{
> >> + struct preinit_clk *pclk, *tmp;
> >> +
> >> + if (debugfs_initialized())
> >> + init_done = 1;
> >
> > No need to check debugfs_initialised() here; if it's not initialised
> > we're in trouble anyway.
>
>
11 matches
Mail list logo