Re: [PATCH] clocks: add clock debugging file

2010-11-22 Thread Yong Shen
Hi Jeremy, Your suggestion is better in the architecture view and it is clean and neat, on the other side, mine is only concerning about the minimal changing of previous code. I will try your way and give your feedback. Yong On Mon, Nov 22, 2010 at 10:46 AM, Jeremy Kerr wrote: > Hi Yong, > > >

Re: [PATCH] clocks: add clock debugging file

2010-11-21 Thread Jeremy Kerr
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

Re: [PATCH] clocks: add clock debugging file

2010-11-17 Thread Yong Shen
Hi Jeremy, In that case, I keep both, but add a condition checking in clkdev_add. See below: >From b8e2babd1cc30ffc1ca5fe3cc6a542a18b0ec7fa Mon Sep 17 00:00:00 2001 From: Yong Shen Date: Thu, 18 Nov 2010 14:54:49 +0800 Subject: [PATCH] export clock debug information to user space create a tree-

Re: [PATCH] clocks: add clock debugging file

2010-11-17 Thread Jeremy Kerr
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

Re: [PATCH] clocks: add clock debugging file

2010-11-17 Thread Yong Shen
Hi Jeremy, > + help > > + export clk debug information to user space > > diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c > > index 9e4c4d9..5f4a309 100644 > > --- a/arch/arm/common/clkdev.c > > +++ b/arch/arm/common/clkdev.c > > This is still arm-specific? Looks like you've move

Re: [PATCH] clocks: add clock debugging file

2010-11-16 Thread Yong Shen
> > > > Is mutt going crazy or is the indentation here completely off? > > The same thing throughout the patch. > > It is the email client's problem, I will also put patch in attachment from now on, for better looking. Yong ___ linaro-dev mailing list li

Re: [PATCH] clocks: add clock debugging file

2010-11-16 Thread Amit Kucheria
On 10 Nov 17, Yong Shen wrote: > Hi Jeremy, > > Great ideal to make it beyond ARM specific. > Below is the updated patch as per your comments. > > From 5a3e2d3bf577e3059c9254a61d671910ab170623 Mon Sep 17 00:00:00 2001 > From: Yong Shen > Date: Tue, 16 Nov 2010 15:00:28 +0800 > Subject: [PATCH] e

Re: [PATCH] clocks: add clock debugging file

2010-11-16 Thread Jeremy Kerr
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

Re: [PATCH] clocks: add clock debugging file

2010-11-16 Thread Yong Shen
Hi Jeremy, Great ideal to make it beyond ARM specific. Below is the updated patch as per your comments. >From 5a3e2d3bf577e3059c9254a61d671910ab170623 Mon Sep 17 00:00:00 2001 From: Yong Shen Date: Tue, 16 Nov 2010 15:00:28 +0800 Subject: [PATCH] export clock debug information to user space cre

Re: [PATCH] clocks: add clock debugging file

2010-11-16 Thread Jeremy Kerr
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

Re: [PATCH] clocks: add clock debugging file

2010-11-16 Thread Amit Arora
On Tue, Nov 16, 2010 at 1:12 PM, Yong Shen wrote: Hi Yong, > After this patch, powerdebug (developed by Amit Arora in power management > group of Linaro) generates information on imx51 platform like this: You seem to be using a bit older version of PowerDebug. Please do a git pull. New features

Re: [PATCH] clocks: add clock debugging file

2010-11-15 Thread Yong Shen
Hi Jeremy, Thanks for those comments. I attached a formal patch below for further review, hope I catched all your points right. Du to that I am behind a firewall, my free internet access is problematic, so I send out patch review by copying it to email. After this patch, powerdebug (developed by A

Re: [PATCH] clocks: add clock debugging file

2010-11-15 Thread Jeremy Kerr
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

Re: [PATCH] clocks: add clock debugging file

2010-11-15 Thread Amit Kucheria
On 10 Nov 15, Jeremy Kerr wrote: > /* If we're using the common struct clk, we define the base clk object here > */ > @@ -64,14 +66,25 @@ struct clk { > struct mutexmutex; > spinlock_t spinlock; > } lock; > +#ifdef CONFIG_CLK_DEBUG > + const char

Re: [PATCH] clocks: add clock debugging file

2010-11-15 Thread Jeremy Kerr
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

Re: [PATCH] clocks: add clock debugging file

2010-11-14 Thread Yong Shen
Hi Jeremy, Thanks a lot. 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. Below is my draft impleme

[PATCH] clocks: add clock debugging file

2010-11-14 Thread Jeremy Kerr
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/clk.c | 9