Skip to content

Runtime constants: define (some) OMAP address bases at runtime rather than compile time for multiboot

Paul Walmsley linux-omap 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/24 patches 4 repliesIn review
  2. v1 posting 1/24 patches 3 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Runtime constants: introduce omap2_set_globals_*()arch/arm/mach-omap2/board-2430osk.c arch/arm/mach-omap2/board-2430sdp.c arch/arm/mach-omap2/board-3430sdp.c +8 more+32 -30 replies
2/4Runtime constants: use runtime-computed SDRC basearch/arm/mach-omap2/memory.c arch/arm/mach-omap2/sdrc.h arch/arm/plat-omap/common.c +3 more+78 -460 replies
3/4Runtime constants: use runtime-computed SMS basearch/arm/mach-omap2/memory.c arch/arm/mach-omap2/sdrc.h arch/arm/plat-omap/common.c +3 more+42 -110 replies
4/4Runtime constants: use runtime-computed system control module basearch/arm/mach-omap2/board-h4.c arch/arm/mach-omap2/clock34xx.h arch/arm/mach-omap2/control.h +11 more+198 -750 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RESEND 0/4] Runtime constants: define (some) OMAP address bases at runtime rather than compile time for multiboot

The OMAP2/3 kernel builds define several preprocessor macros for module base virtual addresses (e.g., OMAP2_CTRL_BASE). These macros are substituted with virtual addresses at compile-time, depending on what OMAP architecture the kernel is built for. This technique is simple and works well for single-OMAP kernels, but cannot be used to build a multi-OMAP kernel.

So, convert the users of these defines to use runtime-computed global variables where possible. Where not possible (e.g., in static initializers), use chip-specific preprocessor macros. The global variables are set up early in the board-*.c files in the map_io() code, before almost everything else.

This series converts SDRC, SMS, and System Control Module accesses. Forthcoming patch series will convert PRCM and 32K sync timer register access.

Boot-tested on N800 and 3430SDP. Thanks to Kevin Hilman, who tested an earlier version of this against 2430SDP. This series has been refreshed against git 0945b0b (current HEAD).

Comments welcome,

- Paul

---

diffstat:

 arch/arm/mach-omap2/board-2430osk.c  |    1
 arch/arm/mach-omap2/board-2430sdp.c  |    1
 arch/arm/mach-omap2/board-3430sdp.c  |    1
 arch/arm/mach-omap2/board-apollon.c  |    1
 arch/arm/mach-omap2/board-generic.c  |    1
 arch/arm/mach-omap2/board-h4.c       |    4 +
 arch/arm/mach-omap2/board-n800.c     |    1
 arch/arm/mach-omap2/clock34xx.h      |   30 ++++--------
 arch/arm/mach-omap2/control.h        |   41 +++++++++++++++++
 arch/arm/mach-omap2/id.c             |    4 +
 arch/arm/mach-omap2/memory.c         |   10 ++--
 arch/arm/mach-omap2/pm.c             |    6 +-
 arch/arm/mach-omap2/sdrc.h           |   66 +++++++++-------------------
 arch/arm/plat-omap/common.c          |   36 +++++++++++++++
 arch/arm/plat-omap/devices.c         |   12 +++--
 arch/arm/plat-omap/mux.c             |   13 +++--
 arch/arm/plat-omap/sram.c            |    6 +-
 arch/arm/plat-omap/usb.c             |   66 ++++++++++++++++++++++------
 include/asm-arm/arch-omap/common.h   |    4 +
 include/asm-arm/arch-omap/control.h  |   58 +++++++++++++++++++++++++
 include/asm-arm/arch-omap/omap24xx.h |   18 -------
 include/asm-arm/arch-omap/omap34xx.h |   19 +-------
 include/asm-arm/arch-omap/sdrc.h     |   81 ++++++++++++++++++++++++++++++++++-
 include/asm-arm/arch-omap/usb.h      |    5 --
 24 files changed, 350 insertions(+), 135 deletions(-)

size:

text data bss dec hex filename

2925408  152936   85112 3163456  304540 vmlinux.orig.n800
2925664  152936   85144 3163744  304660 vmlinux.patched.n800