u-boot/arch/arm
Francesco Dolcini 09dbac8174 mx6: ddr: Restore ralat/walat in write level calibration
The current DDR write level calibration routine always overwrite
the ralat/walat fields to their maximum value, just save
the existing values at the beginning of the calibration routine
and restore it at the end.

In case the delay is estimated by the user to be more than one cycle the
walat should be configured according to that, this is not
automatically done.  From the i.MX6 RM:

   The user should read the results of the associated delay-line at
   MPWLDECTRL#[WL_DL_ABS_OFFSET#] and in case the user estimates that the
   reasonable delay may be above 1 cycle then the user should indicate it at
   MPWLDECTRL#[WL_CYC_DEL#]. Moreover the user should indicate it in
   MDMISC[WALAT] field. For example, if the result of the write leveling calibration
   is 100/256 parts of a cycle, but the user estimates that the delay is above 2 cycles
   then MPWLDECTRL#[WL_CYC_DEL#] should be configured to 2, so the total
   delay will be 2 and 100/256 parts of a cycle

Probably it would just possible to not overwrite the mdmisc register in
the first place, since this is not present in the write_level_calib() example
in NXP AN4467 nor in the i.MX6 RM (44.11.6.1 Hardware Write Leveling
Calibration).

Fixes: d339f16911 ("arm: imx6: Add DDR3 calibration code for MX6 Q/D/DL")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-04-12 19:10:43 +02:00
..
cpu Layerscape: Enable Job ring driver model. 2022-04-12 11:20:01 +02:00
dts arm: dts: imx8mm_evk: add pwm1/backlight support 2022-04-12 17:33:55 +02:00
include imx: dynamic setting mmcdev and mmcroot 2022-04-12 19:10:43 +02:00
lib arm: init: save previous bootloader data 2022-04-04 14:53:26 -04:00
mach-apple arm: apple: Fix mem layout 2022-03-28 08:22:17 -04:00
mach-aspeed ast2600: spl: Locate load buffer in DRAM space 2021-11-17 17:05:00 -05:00
mach-at91 at91: Remove unused LED code 2022-04-08 09:05:20 -04:00
mach-bcm283x doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-bcmstb
mach-cortina
mach-davinci Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
mach-exynos exynos: Drop CONFIG_CLK_* 2022-04-01 10:28:47 -04:00
mach-highbank
mach-imx mx6: ddr: Restore ralat/walat in write level calibration 2022-04-12 19:10:43 +02:00
mach-integrator arm: integrator: Migrate platform-specific options and cleanup armcoremodule.h 2022-04-08 09:05:19 -04:00
mach-ipq40xx
mach-k3 Merge branch '2022-04-04-platform-updates' 2022-04-05 13:45:22 -04:00
mach-keystone arch/arm/mach-keystone/ddr3.c: Fix spelling of "resetting". 2022-01-13 07:57:50 -05:00
mach-kirkwood keymile: Move sourcing of common Kconfig 2022-04-01 10:28:46 -04:00
mach-lpc32xx
mach-mediatek arm: mediatek: merge board Kconfigs into mach-mediatek 2021-09-23 14:15:32 -04:00
mach-meson ARM: amlogic: add sm efuse write support and cmd for read/write efuse 2021-10-29 14:06:45 +02:00
mach-mvebu controlcenterdc: Migrate CUSTOMER_BOARD_SUPPORT to Kconfig 2022-04-08 10:46:22 -04:00
mach-nexell video: Drop references to CONFIG_VIDEO et al 2022-03-28 20:17:07 +02:00
mach-octeontx Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-octeontx2 Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-omap2 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi 2022-04-05 08:33:32 -04:00
mach-orion5x Convert CONFIG_88F5182 et al to Kconfig 2021-12-27 16:20:19 -05:00
mach-owl
mach-qemu
mach-rmobile armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
mach-rockchip spl: mmc: extend spl_mmc_boot_mode() to take mmc argument 2022-04-04 23:24:17 +01:00
mach-s5pc1xx doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-snapdragon board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board 2021-10-31 11:25:38 -04:00
mach-socfpga spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig 2022-04-08 10:46:22 -04:00
mach-sti
mach-stm32 serial: Rename SERIAL_SUPPORT to SERIAL 2021-09-04 12:26:01 -04:00
mach-stm32mp spl: mmc: extend spl_mmc_boot_mode() to take mmc argument 2022-04-04 23:24:17 +01:00
mach-sunxi sunxi: eMMC: Improve automatic boot source detection 2022-04-05 00:08:40 +01:00
mach-tegra tegra: Migrate CI_UDC_HAS_HOSTPC to Kconfig 2022-04-08 09:05:19 -04:00
mach-u8500 board: stemmy: Update documentation 2021-09-01 19:25:37 -04:00
mach-uniphier spl: mmc: extend spl_mmc_boot_mode() to take mmc argument 2022-04-04 23:24:17 +01:00
mach-versal xilinx: Remove GPIO_EXTRA_HEADER selection 2022-02-15 13:06:13 +01:00
mach-versatile WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
mach-zynq ARM: zynq: Fix debug uart initialization 2022-02-21 13:20:24 +01:00
mach-zynqmp arm64: zynqmp: Fix debug uart initialization 2022-02-21 13:20:29 +01:00
mach-zynqmp-r5 Convert CONFIG_CPU_FREQ_HZ to Kconfig 2021-12-27 16:20:19 -05:00
thumb1/include/asm/proc-armv
config.mk ARM: Prevent the compiler from using NEON registers 2021-09-02 11:19:58 -04:00
Kconfig crypto/fsl: i.MX8: Enable Job ring driver model. 2022-04-12 11:19:21 +02:00
Kconfig.debug
Makefile arm: apple: Add initial support for Apple's M1 SoC 2021-10-31 08:46:44 -04:00