Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-21 Thread amit daniel kachhap
On Fri, Jun 20, 2014 at 11:17 PM, Doug Anderson wrote: > Hi, > > On Fri, Jun 20, 2014 at 4:19 AM, amit daniel kachhap > wrote: >> On Fri, Jun 20, 2014 at 1:45 PM, Will Deacon wrote: >>> On Thu, Jun 19, 2014 at 05:40:49PM +0100, Tomasz Figa wrote: On 19.06.2014 18:31, Doug Anderson wrote: >>

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-20 Thread Doug Anderson
Hi, On Fri, Jun 20, 2014 at 4:19 AM, amit daniel kachhap wrote: > On Fri, Jun 20, 2014 at 1:45 PM, Will Deacon wrote: >> On Thu, Jun 19, 2014 at 05:40:49PM +0100, Tomasz Figa wrote: >>> On 19.06.2014 18:31, Doug Anderson wrote: >>> >>> My personal vote would be to submit a patch to change "cycle

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-20 Thread amit daniel kachhap
On Fri, Jun 20, 2014 at 1:45 PM, Will Deacon wrote: > On Thu, Jun 19, 2014 at 05:40:49PM +0100, Tomasz Figa wrote: >> On 19.06.2014 18:31, Doug Anderson wrote: >> >>> My personal vote would be to submit a patch to change "cycles_t" to >> >>> always be 32-bits. Given that 32-bits was fine for udel

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-20 Thread Will Deacon
On Thu, Jun 19, 2014 at 05:40:49PM +0100, Tomasz Figa wrote: > On 19.06.2014 18:31, Doug Anderson wrote: > >>> My personal vote would be to submit a patch to change "cycles_t" to > >>> always be 32-bits. Given that 32-bits was fine for udelay() for ARM > >>> that seems sane and simple. If someone

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Tomasz Figa
On 19.06.2014 18:31, Doug Anderson wrote: > Tomasz, > > On Thu, Jun 19, 2014 at 9:17 AM, Tomasz Figa wrote: >> On 19.06.2014 18:01, Doug Anderson wrote: >>> Hi, >>> >>> On Thu, Jun 19, 2014 at 3:21 AM, Tomasz Figa wrote: > +static struct delay_timer exynos4_delay_timer; > + > +static

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Doug Anderson
Tomasz, On Thu, Jun 19, 2014 at 9:17 AM, Tomasz Figa wrote: > On 19.06.2014 18:01, Doug Anderson wrote: >> Hi, >> >> On Thu, Jun 19, 2014 at 3:21 AM, Tomasz Figa wrote: +static struct delay_timer exynos4_delay_timer; + +static unsigned long exynos4_read_current_timer(void) >> >> N

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Tomasz Figa
On 19.06.2014 18:01, Doug Anderson wrote: > Hi, > > On Thu, Jun 19, 2014 at 3:21 AM, Tomasz Figa wrote: >>> +static struct delay_timer exynos4_delay_timer; >>> + >>> +static unsigned long exynos4_read_current_timer(void) > > Note: I think this should return a cycles_t, not an unsigned long. > Th

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Doug Anderson
Hi, On Thu, Jun 19, 2014 at 3:21 AM, Tomasz Figa wrote: >> +static struct delay_timer exynos4_delay_timer; >> + >> +static unsigned long exynos4_read_current_timer(void) Note: I think this should return a cycles_t, not an unsigned long. They're the same (right now), but probably shouldn't be (se

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread amit daniel kachhap
On Thu, Jun 19, 2014 at 4:00 PM, Daniel Lezcano wrote: > On 06/19/2014 12:21 PM, amit daniel kachhap wrote: >> >> On Thu, Jun 19, 2014 at 2:41 PM, Daniel Lezcano >> wrote: >>> >>> On 06/19/2014 10:39 AM, Amit Daniel Kachhap wrote: This patch register the exynos mct clocksource as t

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Daniel Lezcano
On 06/19/2014 12:21 PM, amit daniel kachhap wrote: On Thu, Jun 19, 2014 at 2:41 PM, Daniel Lezcano wrote: On 06/19/2014 10:39 AM, Amit Daniel Kachhap wrote: This patch register the exynos mct clocksource as the current timer as it has constant clock rate. This will generate correct udelay for

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Arnd Bergmann
On Thursday 19 June 2014 15:51:58 amit daniel kachhap wrote: > I also didn't want to use macros but used as a last option. you want > me to put more comments here? > Or something like below is also possible for checking the size of > (unsigned long) in runtime. > > unsigned long x; > unsigned int

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Tomasz Figa
Hi Amit, Please see my comments inline. On 19.06.2014 10:39, Amit Daniel Kachhap wrote: > This patch register the exynos mct clocksource as the current timer > as it has constant clock rate. This will generate correct udelay for the > exynos platform and avoid using unnecessary calibrated jiffies

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread amit daniel kachhap
On Thu, Jun 19, 2014 at 2:41 PM, Daniel Lezcano wrote: > On 06/19/2014 10:39 AM, Amit Daniel Kachhap wrote: >> >> This patch register the exynos mct clocksource as the current timer >> as it has constant clock rate. This will generate correct udelay for the >> exynos platform and avoid using unnec

Re: [PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Daniel Lezcano
On 06/19/2014 10:39 AM, Amit Daniel Kachhap wrote: This patch register the exynos mct clocksource as the current timer as it has constant clock rate. This will generate correct udelay for the exynos platform and avoid using unnecessary calibrated jiffies. This change has been tested on exynos5420

[PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

2014-06-19 Thread Amit Daniel Kachhap
This patch register the exynos mct clocksource as the current timer as it has constant clock rate. This will generate correct udelay for the exynos platform and avoid using unnecessary calibrated jiffies. This change has been tested on exynos5420 based board and udelay is very close to expected. S