[PATCH 00/03] ARM: shmobile: Use shmobile_init_delay() on r8a7791
Simon Horman
horms at verge.net.au
Tue May 13 22:00:43 PDT 2014
On Wed, May 14, 2014 at 12:46:27PM +0900, Magnus Damm wrote:
> On Wed, May 14, 2014 at 12:28 PM, Simon Horman <horms at verge.net.au> wrote:
> > I wonder if the following is any good.
> >
> > From: Simon Horman <horms+renesas at verge.net.au>
> >
> > [PATCH] ARM: shmobile: Set clock frequency in HZ from OF nodes
> >
> > shmobile_init_delay() looks for OF "clock-frequency" to determine
> > the delay which is set by calling shmobile_setup_delay().
> >
> > Unfortunately this seems to be incorrect in detail as
> > "clock-frequency" node values are in HZ whereas the frequency
> > argument to shmobile_setup_delay() is in MHz.
> >
> > Provide a variant of shmobile_setup_delay() that accepts HZ to
> > correct this problem.
> >
> > Signed-off-by: Simon Horman <horms+renesas at verge.net.au>
> >
> > ---
> > v2
> > * As suggested by Geert Uytterhoeven
> > - Don't ignore the potential for integer overflow.
> > To this end I have taken Geert's suggestion of dividing by
> > a large "value" in the HZ case.
> > And I have let the original function unchanged for the MHz case:
> > it should eventually be removed anyway.
>
> Hi Simon and Geert,
>
> Thanks for dealing with the fallout of my cosmetic changes. Nice to
> see that you managed to track it down!
>
> I think this patch looks perfect, please merge unless anyone objects.
Thanks, I will go ahead and merge it.
More information about the linux-arm-kernel
mailing list