Skip to content

ARM: shmobile: Use shmobile_init_delay() on r8a7791

Simon Horman linux-arm-kernel linux-sh 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/03] ARM: shmobile: Use shmobile_init_delay() on r8a7791
Quoted 28 lines · Magnus Damm
Quoted 18 lines · Simon Horman

I wonder if the following is any good.

From: Simon Horman <[email protected]>

[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.

Quoted 8 lines

---
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.

Quoted 6 lines

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.