Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-21 Thread Uwe Kleine-König
Hello, On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: > On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: > > On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: > > > On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: > > > > If no best divider is normally

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-21 Thread Uwe Kleine-König
Hello, On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: If no best divider is normally found, we

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-20 Thread Russell King - ARM Linux
On Fri, Feb 20, 2015 at 11:13:06AM -0800, Mike Turquette wrote: > Quoting Russell King - ARM Linux (2015-02-16 03:27:24) > > On Fri, Feb 13, 2015 at 07:57:13PM +0100, Sascha Hauer wrote: > > > I agree that it's a bit odd, but I think it has to be like this. > > > Consider that you request a rate

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-20 Thread Mike Turquette
Quoting Russell King - ARM Linux (2015-02-16 03:27:24) > On Fri, Feb 13, 2015 at 07:57:13PM +0100, Sascha Hauer wrote: > > I agree that it's a bit odd, but I think it has to be like this. > > Consider that you request a rate of 100Hz, but the clock can only > > produce 99.5Hz, so due to rounding

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-20 Thread Mike Turquette
Quoting Russell King - ARM Linux (2015-02-16 03:27:24) On Fri, Feb 13, 2015 at 07:57:13PM +0100, Sascha Hauer wrote: I agree that it's a bit odd, but I think it has to be like this. Consider that you request a rate of 100Hz, but the clock can only produce 99.5Hz, so due to rounding

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-20 Thread Russell King - ARM Linux
On Fri, Feb 20, 2015 at 11:13:06AM -0800, Mike Turquette wrote: Quoting Russell King - ARM Linux (2015-02-16 03:27:24) On Fri, Feb 13, 2015 at 07:57:13PM +0100, Sascha Hauer wrote: I agree that it's a bit odd, but I think it has to be like this. Consider that you request a rate of 100Hz,

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-17 Thread Sascha Hauer
On Mon, Feb 16, 2015 at 01:18:13PM +0200, Tomi Valkeinen wrote: > On 13/02/15 20:57, Sascha Hauer wrote: > > On Fri, Feb 13, 2015 at 04:35:36PM +0200, Tomi Valkeinen wrote: > >> On 12/02/15 15:41, Sascha Hauer wrote: > >> > >>> Tomis patch is based on the assumption that > >>>

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-17 Thread Sascha Hauer
On Mon, Feb 16, 2015 at 01:18:13PM +0200, Tomi Valkeinen wrote: On 13/02/15 20:57, Sascha Hauer wrote: On Fri, Feb 13, 2015 at 04:35:36PM +0200, Tomi Valkeinen wrote: On 12/02/15 15:41, Sascha Hauer wrote: Tomis patch is based on the assumption that clk_set_rate(clk_round_rate(rate))

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-16 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 07:57:13PM +0100, Sascha Hauer wrote: > I agree that it's a bit odd, but I think it has to be like this. > Consider that you request a rate of 100Hz, but the clock can only > produce 99.5Hz, so due to rounding clk_round_rate() returns 99Hz. > Now when you request 99Hz from

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-16 Thread Tomi Valkeinen
On 13/02/15 20:57, Sascha Hauer wrote: > On Fri, Feb 13, 2015 at 04:35:36PM +0200, Tomi Valkeinen wrote: >> On 12/02/15 15:41, Sascha Hauer wrote: >> >>> Tomis patch is based on the assumption that >>> clk_set_rate(clk_round_rate(rate)) >>> is equal to clk_round_rate(rate). So when this

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-16 Thread Tomi Valkeinen
On 13/02/15 20:57, Sascha Hauer wrote: On Fri, Feb 13, 2015 at 04:35:36PM +0200, Tomi Valkeinen wrote: On 12/02/15 15:41, Sascha Hauer wrote: Tomis patch is based on the assumption that clk_set_rate(clk_round_rate(rate)) is equal to clk_round_rate(rate). So when this assumption is wrong

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-16 Thread Russell King - ARM Linux
On Fri, Feb 13, 2015 at 07:57:13PM +0100, Sascha Hauer wrote: I agree that it's a bit odd, but I think it has to be like this. Consider that you request a rate of 100Hz, but the clock can only produce 99.5Hz, so due to rounding clk_round_rate() returns 99Hz. Now when you request 99Hz from

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-13 Thread Sascha Hauer
On Fri, Feb 13, 2015 at 04:35:36PM +0200, Tomi Valkeinen wrote: > On 12/02/15 15:41, Sascha Hauer wrote: > > > Tomis patch is based on the assumption that > > clk_set_rate(clk_round_rate(rate)) > > is equal to clk_round_rate(rate). So when this assumption is wrong then > > it should simply be

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-13 Thread Tomi Valkeinen
On 12/02/15 15:41, Sascha Hauer wrote: > Tomis patch is based on the assumption that clk_set_rate(clk_round_rate(rate)) > is equal to clk_round_rate(rate). So when this assumption is wrong then > it should simply be reverted. When is it not equal? I agree that doing clk_set_rate(clk,

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-13 Thread Tomi Valkeinen
On 12/02/15 15:41, Sascha Hauer wrote: Tomis patch is based on the assumption that clk_set_rate(clk_round_rate(rate)) is equal to clk_round_rate(rate). So when this assumption is wrong then it should simply be reverted. When is it not equal? I agree that doing clk_set_rate(clk,

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-13 Thread Sascha Hauer
On Fri, Feb 13, 2015 at 04:35:36PM +0200, Tomi Valkeinen wrote: On 12/02/15 15:41, Sascha Hauer wrote: Tomis patch is based on the assumption that clk_set_rate(clk_round_rate(rate)) is equal to clk_round_rate(rate). So when this assumption is wrong then it should simply be reverted.

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Travis
Travis liked your message with Boxer for Android. On Feb 12, 2015 8:58 PM, Liu Ying wrote: > > On Thu, Feb 12, 2015 at 10:06:27PM +0800, Liu Ying wrote: > > On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: > > > On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 10:06:27PM +0800, Liu Ying wrote: > On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: > > On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: > > > On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: > > > > On Thu, Feb 12, 2015

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: > On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: > > On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: > > > On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: > > > > On Thu, Feb 12, 2015

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Sascha Hauer
On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: > On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: > > On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: > > > On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: > > > > On Thu, Feb 12, 2015

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Russell King - ARM Linux
On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: > On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: > > On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: > > > On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: > > > > If no best divider is normally found,

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Sascha Hauer
On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: > On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: > > On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: > > > If no best divider is normally found, we will try to use the maximum > > > divider. > > > We should not set

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: > On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: > > If no best divider is normally found, we will try to use the maximum > > divider. > > We should not set the parent clock rate to be 1Hz by force for being > > rounded. >

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Sascha Hauer
On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: > If no best divider is normally found, we will try to use the maximum divider. > We should not set the parent clock rate to be 1Hz by force for being rounded. > Instead, we should take the maximum divider as a base and calculate a correct

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: If no best divider is normally found, we will try to use the maximum divider. We should not set the parent clock rate to be 1Hz by force for being rounded. Instead,

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Sascha Hauer
On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: If no best divider is normally found, we will try to use the maximum divider. We should not set the parent clock rate to be 1Hz by force for being rounded. Instead, we should take the maximum divider as a base and calculate a correct

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 10:06:27PM +0800, Liu Ying wrote: On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Travis
Travis liked your message with Boxer for Android. On Feb 12, 2015 8:58 PM, Liu Ying ying@freescale.com wrote: On Thu, Feb 12, 2015 at 10:06:27PM +0800, Liu Ying wrote: On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: On Thu, Feb 12, 2015 at

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Russell King - ARM Linux
On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: If no best divider is normally found, we will

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Sascha Hauer
On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at

Re: [PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Sascha Hauer
On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: If no best divider is normally found, we will try to use the maximum divider. We should not set the parent

[PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-11 Thread Liu Ying
If no best divider is normally found, we will try to use the maximum divider. We should not set the parent clock rate to be 1Hz by force for being rounded. Instead, we should take the maximum divider as a base and calculate a correct parent clock rate for being rounded. Signed-off-by: Liu Ying

[PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-11 Thread Liu Ying
If no best divider is normally found, we will try to use the maximum divider. We should not set the parent clock rate to be 1Hz by force for being rounded. Instead, we should take the maximum divider as a base and calculate a correct parent clock rate for being rounded. Signed-off-by: Liu Ying