[U-Boot] [PATCH v2 00/11] Add SPL support including DDR init for Marvell Armada 38x

Stefan Roese sr at denx.de
Mon Jul 20 10:17:42 CEST 2015


This patch-set adds the DDR3 setup and training code taken from the Marvell
U-Boot repository. This code used to be included as a binary (bin_hdr) into
the A38x boot image. Not linked with the main U-Boot. With this code
addition and the also included SERDES / PHY setup code, the Armada 38x
support in mainline U-Boot is finally self-contained. So the complete image
for booting can be built from mainline U-Boot. Without any additional
external inclusion.

Tested on Marvell Armada 38x DB-88F6820-GP using onboard soldered SDRAM.

Thanks,
Stefan

Changes in v2:
- New patch "arm: mvebu: Call timer_init early before PHY and DDR init"
- New patch "arm: mvebu: a38x: Use correct PEX register access macros"
- Rebased on top of current version (v2015.07)

Stefan Roese (11):
  arm: mvebu: Use default reg base address for SPL on A38x
  arm: mvebu: spl.c: Add call to board_early_init_f()
  arm: mvebu: Disable MMU before changing register base address
  Makefile: Fix mvebu build target to use SPL load and exe-address
  arm: mvebu: serdes: Move Armada XP SERDES / PHY init code into new
    directory
  arm: mvebu: Add Armada 38x SERDES / PHY init code from Marvell bin_hdr
  arm: mvebu: drivers/ddr: Move Armada XP DDR init code into new
    directory
  arm: mvebu: Add Armada 38x DDR3 training code from Marvell bin_hdr
  arm: mvebu: Call timer_init early before PHY and DDR init
  arm: mvebu: a38x: Use correct PEX register access macros
  arm: mvebu: db-88f6820: Add SPL support with DDR init code

 Makefile                                           |    2 +-
 arch/arm/mach-mvebu/Makefile                       |    4 +-
 arch/arm/mach-mvebu/cpu.c                          |   18 +
 arch/arm/mach-mvebu/include/mach/cpu.h             |    2 +-
 arch/arm/mach-mvebu/include/mach/soc.h             |   10 +
 arch/arm/mach-mvebu/serdes/a38x/Makefile           |   10 +
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c         |  347 +++
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h         |   86 +
 .../serdes/a38x/high_speed_env_spec-38x.c          |  158 ++
 .../mach-mvebu/serdes/a38x/high_speed_env_spec.c   | 2228 +++++++++++++++++
 .../mach-mvebu/serdes/a38x/high_speed_env_spec.h   |  251 ++
 .../serdes/a38x/high_speed_topology_spec-38x.c     | 1009 ++++++++
 .../serdes/a38x/high_speed_topology_spec.h         |  124 +
 arch/arm/mach-mvebu/serdes/a38x/seq_exec.c         |  170 ++
 arch/arm/mach-mvebu/serdes/a38x/seq_exec.h         |   65 +
 arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c      |  388 +++
 arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h      |  372 +++
 arch/arm/mach-mvebu/serdes/{ => axp}/Makefile      |    0
 .../mach-mvebu/serdes/{ => axp}/board_env_spec.h   |    0
 .../serdes/{ => axp}/high_speed_env_lib.c          |    0
 .../serdes/{ => axp}/high_speed_env_spec.c         |    0
 .../serdes/{ => axp}/high_speed_env_spec.h         |    2 +-
 arch/arm/mach-mvebu/spl.c                          |    9 +
 arch/arm/mach-mvebu/timer.c                        |    7 +
 board/Marvell/db-88f6820-gp/README                 |   18 +
 board/Marvell/db-88f6820-gp/db-88f6820-gp.c        |   31 +
 board/Marvell/db-88f6820-gp/kwbimage.cfg           |    2 +-
 board/maxbcm/maxbcm.c                              |    4 +-
 configs/db-88f6820-gp_defconfig                    |    1 +
 drivers/ddr/marvell/a38x/Makefile                  |   19 +
 drivers/ddr/marvell/a38x/ddr3_a38x.c               |  741 ++++++
 drivers/ddr/marvell/a38x/ddr3_a38x.h               |   98 +
 drivers/ddr/marvell/a38x/ddr3_a38x_mc_static.h     |  226 ++
 drivers/ddr/marvell/a38x/ddr3_a38x_topology.h      |   22 +
 drivers/ddr/marvell/a38x/ddr3_a38x_training.c      |   40 +
 drivers/ddr/marvell/a38x/ddr3_debug.c              | 1551 ++++++++++++
 drivers/ddr/marvell/a38x/ddr3_hws_hw_training.c    |  148 ++
 drivers/ddr/marvell/a38x/ddr3_hws_hw_training.h    |   49 +
 .../ddr/marvell/a38x/ddr3_hws_hw_training_def.h    |  467 ++++
 drivers/ddr/marvell/a38x/ddr3_hws_sil_training.h   |   17 +
 drivers/ddr/marvell/a38x/ddr3_init.c               |  852 +++++++
 drivers/ddr/marvell/a38x/ddr3_init.h               |  395 +++
 drivers/ddr/marvell/a38x/ddr3_logging_def.h        |  101 +
 drivers/ddr/marvell/a38x/ddr3_patterns_64bit.h     |  924 +++++++
 drivers/ddr/marvell/a38x/ddr3_topology_def.h       |   76 +
 drivers/ddr/marvell/a38x/ddr3_training.c           | 2644 ++++++++++++++++++++
 drivers/ddr/marvell/a38x/ddr3_training_bist.c      |  289 +++
 .../marvell/a38x/ddr3_training_centralization.c    |  714 ++++++
 drivers/ddr/marvell/a38x/ddr3_training_db.c        |  652 +++++
 drivers/ddr/marvell/a38x/ddr3_training_hw_algo.c   |  686 +++++
 drivers/ddr/marvell/a38x/ddr3_training_hw_algo.h   |   14 +
 drivers/ddr/marvell/a38x/ddr3_training_ip.h        |  180 ++
 drivers/ddr/marvell/a38x/ddr3_training_ip_bist.h   |   54 +
 .../marvell/a38x/ddr3_training_ip_centralization.h |   15 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_db.h     |   34 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_def.h    |  173 ++
 drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c | 1354 ++++++++++
 drivers/ddr/marvell/a38x/ddr3_training_ip_engine.h |   85 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h   |  349 +++
 drivers/ddr/marvell/a38x/ddr3_training_ip_pbs.h    |   41 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_prv_if.h |  107 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_static.h |   31 +
 drivers/ddr/marvell/a38x/ddr3_training_leveling.c  | 1836 ++++++++++++++
 drivers/ddr/marvell/a38x/ddr3_training_leveling.h  |   17 +
 drivers/ddr/marvell/a38x/ddr3_training_pbs.c       |  995 ++++++++
 drivers/ddr/marvell/a38x/ddr3_training_static.c    |  538 ++++
 drivers/ddr/marvell/a38x/ddr_topology_def.h        |  112 +
 drivers/ddr/marvell/a38x/ddr_training_ip_db.h      |   16 +
 drivers/ddr/marvell/a38x/silicon_if.h              |   17 +
 drivers/ddr/marvell/a38x/xor.c                     |  356 +++
 drivers/ddr/marvell/a38x/xor.h                     |   92 +
 drivers/ddr/marvell/a38x/xor_regs.h                |  236 ++
 drivers/ddr/{mvebu => marvell/axp}/Makefile        |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_axp.h      |    0
 .../ddr/{mvebu => marvell/axp}/ddr3_axp_config.h   |    0
 .../{mvebu => marvell/axp}/ddr3_axp_mc_static.h    |    0
 .../axp}/ddr3_axp_training_static.h                |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_axp_vars.h |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_dfs.c      |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_dqs.c      |    0
 .../ddr/{mvebu => marvell/axp}/ddr3_hw_training.c  |    0
 .../ddr/{mvebu => marvell/axp}/ddr3_hw_training.h  |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_init.c     |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_init.h     |    0
 .../{mvebu => marvell/axp}/ddr3_patterns_64bit.h   |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_pbs.c      |    0
 .../{mvebu => marvell/axp}/ddr3_read_leveling.c    |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_sdram.c    |    0
 drivers/ddr/{mvebu => marvell/axp}/ddr3_spd.c      |    0
 .../{mvebu => marvell/axp}/ddr3_write_leveling.c   |    0
 drivers/ddr/{mvebu => marvell/axp}/xor.c           |    0
 drivers/ddr/{mvebu => marvell/axp}/xor.h           |    0
 drivers/ddr/{mvebu => marvell/axp}/xor_regs.h      |    0
 include/configs/db-88f6820-gp.h                    |   35 +
 include/configs/db-mv784mp-gp.h                    |    2 +-
 include/configs/maxbcm.h                           |    2 +-
 scripts/Makefile.spl                               |    3 +-
 97 files changed, 22713 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/Makefile
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec-38x.c
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec.h
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/seq_exec.h
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
 create mode 100644 arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
 rename arch/arm/mach-mvebu/serdes/{ => axp}/Makefile (100%)
 rename arch/arm/mach-mvebu/serdes/{ => axp}/board_env_spec.h (100%)
 rename arch/arm/mach-mvebu/serdes/{ => axp}/high_speed_env_lib.c (100%)
 rename arch/arm/mach-mvebu/serdes/{ => axp}/high_speed_env_spec.c (100%)
 rename arch/arm/mach-mvebu/serdes/{ => axp}/high_speed_env_spec.h (97%)
 create mode 100644 board/Marvell/db-88f6820-gp/README
 create mode 100644 drivers/ddr/marvell/a38x/Makefile
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_a38x.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_a38x.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_a38x_mc_static.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_a38x_topology.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_a38x_training.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_debug.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_hws_hw_training.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_hws_hw_training.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_hws_hw_training_def.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_hws_sil_training.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_init.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_init.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_logging_def.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_patterns_64bit.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_topology_def.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_bist.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_centralization.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_db.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_hw_algo.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_hw_algo.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_bist.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_centralization.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_db.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_def.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_engine.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_pbs.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_prv_if.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_ip_static.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_leveling.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_leveling.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_pbs.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr3_training_static.c
 create mode 100644 drivers/ddr/marvell/a38x/ddr_topology_def.h
 create mode 100644 drivers/ddr/marvell/a38x/ddr_training_ip_db.h
 create mode 100644 drivers/ddr/marvell/a38x/silicon_if.h
 create mode 100644 drivers/ddr/marvell/a38x/xor.c
 create mode 100644 drivers/ddr/marvell/a38x/xor.h
 create mode 100644 drivers/ddr/marvell/a38x/xor_regs.h
 rename drivers/ddr/{mvebu => marvell/axp}/Makefile (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_axp.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_axp_config.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_axp_mc_static.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_axp_training_static.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_axp_vars.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_dfs.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_dqs.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_hw_training.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_hw_training.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_init.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_init.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_patterns_64bit.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_pbs.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_read_leveling.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_sdram.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_spd.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/ddr3_write_leveling.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/xor.c (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/xor.h (100%)
 rename drivers/ddr/{mvebu => marvell/axp}/xor_regs.h (100%)

-- 
2.4.6



More information about the U-Boot mailing list