Skip to content

OMAP2/3 SDRC/clock: control CORE M2 divider, clean up SDRC

Paul Walmsley linux-omap 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9OMAP2 SDRC: move mach-omap2/memory.h into include/asm-arm/arch-omap/sdrc.harch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock24xx.c arch/arm/mach-omap2/clock34xx.c +6 more+47 -570 replies
2/9OMAP2 SDRC: rename memory.c to sdrc2xxx.carch/arm/mach-omap2/Makefile arch/arm/mach-omap2/memory.c arch/arm/mach-omap2/sdrc2xxx.c+186 -1870 replies
3/9OMAP2 SDRC: separate common OMAP2/3 code from OMAP2xxx codearch/arm/mach-omap2/Makefile arch/arm/mach-omap2/clock24xx.c arch/arm/mach-omap2/io.c +5 more+106 -620 replies
4/9OMAP2 SDRC: add SDRAM timing parameter infrastructurearch/arm/mach-omap2/board-2430sdp.c arch/arm/mach-omap2/board-3430sdp.c arch/arm/mach-omap2/board-apollon.c +11 more+74 -140 replies
5/9OMAP2 SDRC: add timing data for Micron MT46H32M32LF-6arch/arm/mach-omap2/board-omap3beagle.c arch/arm/mach-omap2/board-omap3evm.c arch/arm/mach-omap2/sdram-micron-mt46h32m32lf-6.h +1 more+62 -32 replies
6/9OMAP2 SDRC: add timing data for Qimonda HYB18M512160AF-6arch/arm/mach-omap2/board-3430sdp.c arch/arm/mach-omap2/sdram-qimonda-hyb18m512160af-6.h+58 -10 replies
7/9OMAP3 SRAM: remove unused functions; rename remainderarch/arm/mach-omap2/sdram-micron-mt46h32m32lf-6.h arch/arm/mach-omap2/sram34xx.S arch/arm/plat-omap/sram.c +1 more+57 -1150 replies
8/9OMAP3 clock/SRAM: fix CORE DPLL M2 divider maskarch/arm/mach-omap2/sram34xx.S+1 -10 replies
9/9OMAP3 clock: add omap3_core_dpll_m2_set_rate()arch/arm/mach-omap2/clock34xx.c arch/arm/mach-omap2/clock34xx.h+69 -61 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/9] OMAP2/3 SDRC/clock: control CORE M2 divider, clean up SDRC

This patch series has three main objectives:

- connect Rajendra Nayak's existing OMAP3 SRAM code for CORE DPLL M2 divider reprogramming to the OMAP3 clock tree;

- create a sane method to pass SDRAM timing parameters from board-*.c files into the SDRC, to allow optimal timing parameters to be set for a given clock rate;

- clean up the existing OMAP2/3 SDRC code.

A few notes:

- The M2 divider switch does not seem to work consistently on the 3430SDP I use to test. In particular, the switch back to M2=1 results in a hung console.

- Four SDRC rates are currently defined for the two SDRAM chip registers included in this patch set. The 165MHz and 83MHz rates are unusual and are intended to match the TI OPP rates set by the u-boot installation on the local 3430SDP. 133MHz and 66MHz rates are also present; per CDP 12.17, apparently these are used on Beagle and OMAP3EVM - not sure if these rates should also be derated slightly?

The SDRAM timing parameter infrastructure is currently only used for OMAP3, but can be also extended to OMAP2 devices once information on the SDRAM parts used on those boards is available.

Thanks to Rajendra Nayak <[email protected]> and Igor Stoppa <[email protected]> for finding some of the SDRAM datasheets for this patch set.

Compile-tested for N800, 2430SDP, OMAP3430SDP, OMAP3EVM, OMAP3 Beagle. Runtime-tested on OMAP3430SDP ES2.

If you have the debugfs set_rate patch, you can test the M2 divider code on OMAP3430SDP via:

cd /debug/clock/virt_26m_ck/osc_sys_ck/sys_ck/dpll3_ck/dpll3_m2_ck

# Switch to M2 = 2 (assuming DPLL3 at 331MHz)
echo -n 165941176 > rate

# Switch back to M2 = 1
echo -n 331882352 > rate

---

size:
text data bss dec hex filename

3404220  159104  108240 3671564  38060c vmlinux.3430sdp
3403080  159200  108208 3670488  3801d8 vmlinux.3430sdp.patched

diffstat:

 arch/arm/mach-omap2/Makefile                       |    6 +
 arch/arm/mach-omap2/board-2430sdp.c                |    2 
 arch/arm/mach-omap2/board-3430sdp.c                |    4 
 arch/arm/mach-omap2/board-apollon.c                |    2 
 arch/arm/mach-omap2/board-generic.c                |    2 
 arch/arm/mach-omap2/board-h4.c                     |    2 
 arch/arm/mach-omap2/board-ldp.c                    |    2 
 arch/arm/mach-omap2/board-n800.c                   |    2 
 arch/arm/mach-omap2/board-omap2evm.c               |    2 
 arch/arm/mach-omap2/board-omap3beagle.c            |    4 
 arch/arm/mach-omap2/board-omap3evm.c               |    4 
 arch/arm/mach-omap2/clock.c                        |    2 
 arch/arm/mach-omap2/clock24xx.c                    |   25 +--
 arch/arm/mach-omap2/clock34xx.c                    |   68 +++++++-
 arch/arm/mach-omap2/clock34xx.h                    |    9 -
 arch/arm/mach-omap2/gpmc.c                         |    2 
 arch/arm/mach-omap2/io.c                           |    8 -
 arch/arm/mach-omap2/memory.c                       |  179 --------------------
 arch/arm/mach-omap2/memory.h                       |   43 -----
 arch/arm/mach-omap2/sdram-micron-mt46h32m32lf-6.h  |   55 ++++++
 .../mach-omap2/sdram-qimonda-hyb18m512160af-6.h    |   55 ++++++
 arch/arm/mach-omap2/sdrc.c                         |   93 ++++++++++
 arch/arm/mach-omap2/sdrc2xxx.c                     |  164 ++++++++++++++++++
 arch/arm/mach-omap2/sram34xx.S                     |   84 +++------
 arch/arm/plat-omap/common.c                        |    2 
 arch/arm/plat-omap/sram.c                          |   63 ++-----
 include/asm-arm/arch-omap/common.h                 |    2 
 include/asm-arm/arch-omap/gpmc.h                   |    1 
 include/asm-arm/arch-omap/io.h                     |    4 
 include/asm-arm/arch-omap/sdrc.h                   |   64 ++++++-
 include/asm-arm/arch-omap/sram.h                   |   25 +--
 31 files changed, 597 insertions(+), 383 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/memory.c
 delete mode 100644 arch/arm/mach-omap2/memory.h
 create mode 100644 arch/arm/mach-omap2/sdram-micron-mt46h32m32lf-6.h
 create mode 100644 arch/arm/mach-omap2/sdram-qimonda-hyb18m512160af-6.h
 create mode 100644 arch/arm/mach-omap2/sdrc.c
 create mode 100644 arch/arm/mach-omap2/sdrc2xxx.c