Skip to content

OMAP2/3 clock: fix module IDLEST code for unusual devs

Paul Walmsley linux-omap 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3OMAP2/3 clock: split, rename omap2_wait_clock_ready()arch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h arch/arm/mach-omap2/prcm.c +2 more+131 -770 replies
2/3OMAP2 clock: 2430 I2CHS uses non-standard CM_IDLEST registerarch/arm/mach-omap2/clock24xx.c arch/arm/mach-omap2/clock24xx.h+37 -40 replies
3/3OMAP3 clock: correct module IDLEST bits: SSI; DSS; USBHOST; HSOTGUSBarch/arm/mach-omap2/clock34xx.c arch/arm/mach-omap2/clock34xx.h+185 -180 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/3] OMAP2/3 clock: fix module IDLEST code for unusual devs

Hello,

After Linux enables an OMAP device's clocks, it must wait for the device to leave the 'idle' state, or register accesses may result in an interconnect error and subsequent system crash. Code to do this is currently in the OMAP clock code, but is overgeneralized, and will not work correctly for several exception cases - one on 2430, and four on OMAP3.

This series fixes these bugs by modularizing omap2_clk_wait_ready(), allowing custom CM_IDLEST register and bit shift data to be supplied on a per-clock basis, if necessary. (This was originally fixed in the linux-omap kernel during 2.6.29 in a slightly different manner.)

In the medium term, the module wait code will be moved to omap_hwmod or a similar OMAP device layer.

Tested on BeagleBoard rev C2 (OMAP3530 ES3); compile-tested with the N800 defconfig.

This second version fills in the clock.c documentation and removes one of the custom find_idlest functions (since DSS and USBHOST use the same target IDLEST shift).

- Paul

---

size:
text data bss dec hex filename
3405015 191408 103632 3700055 387557 vmlinux.beagle.orig
3405475 192144 103632 3701251 387a03 vmlinux.beagle

Paul Walmsley (3):
OMAP3 clock: correct module IDLEST bits: SSI; DSS; USBHOST; HSOTGUSB OMAP2 clock: 2430 I2CHS uses non-standard CM_IDLEST register OMAP2/3 clock: split, rename omap2_wait_clock_ready()

 arch/arm/mach-omap2/clock.c             |  156 ++++++++++++++++---------------
 arch/arm/mach-omap2/clock.h             |    6 +
 arch/arm/mach-omap2/clock24xx.c         |   37 +++++++
 arch/arm/mach-omap2/clock24xx.h         |    4 -
 arch/arm/mach-omap2/clock34xx.c         |  118 ++++++++++++++++++++++-
 arch/arm/mach-omap2/clock34xx.h         |   85 +++++++++++++++--
 arch/arm/mach-omap2/prcm.c              |   43 +++++++++
 arch/arm/plat-omap/include/mach/clock.h |    2 
 arch/arm/plat-omap/include/mach/prcm.h  |    1 
 9 files changed, 353 insertions(+), 99 deletions(-)