]> git.dujemihanovic.xyz Git - u-boot.git/commit
mx6: ddr: Allow changing REFSEL and REFR fields
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 29 Aug 2016 23:37:15 +0000 (20:37 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 6 Sep 2016 16:22:48 +0000 (18:22 +0200)
commitedf0093732225c2fd0791c3864e9a3eef1f92f19
tree1a5bce06d282527778b608f35c39aa68065bd98e
parent946db0cbd01090b35eb1439fa7c4ca7e015fc18b
mx6: ddr: Allow changing REFSEL and REFR fields

Currently MX6 SPL DDR initialization hardcodes the REF_SEL and
REFR fields of the MDREF register as 1 and 7, respectively for
DDR3 and 0 and 3 for LPDDR2.

Looking at the MDREF initialization done via DCD we see that
boards do need to initialize these fields differently:

$ git grep 0x021b0020 board/
board/bachmann/ot1200/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800
board/ccv/xpress/imximage.cfg:DATA 4 0x021b0020 0x00000800 /* MMDC0_MDREF */
board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x7800
board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/mx6qp.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6sabresd/mx6dlsabresd.cfg:DATA 4      0x021b0020 0x00005800
board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6slevk/imximage.cfg:DATA 4 0x021b0020 0x00001800
board/freescale/mx6sxsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00000800
board/freescale/mx6sxsabresd/imximage.cfg:DATA 4 0x021b0020 0x00000800
board/warp/imximage.cfg:DATA 4 0x021b0020 0x00001800

So introduce a mechanism for users to be able to configure
REFSEL and REFR fields as needed.

Keep all the mx6 SPL users in their current REF_SEL and REFR values,
so no functional changes for the existing users.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
19 files changed:
arch/arm/cpu/armv7/mx6/ddr.c
arch/arm/include/asm/arch-mx6/mx6-ddr.h
board/bachmann/ot1200/ot1200_spl.c
board/barco/platinum/spl_picon.c
board/barco/platinum/spl_titanium.c
board/ccv/xpress/spl.c
board/compulab/cm_fx6/spl.c
board/congatec/cgtqmx6eval/cgtqmx6eval.c
board/el/el6x/el6x.c
board/freescale/mx6sabresd/mx6sabresd.c
board/freescale/mx6slevk/mx6slevk.c
board/freescale/mx6sxsabresd/mx6sxsabresd.c
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
board/gateworks/gw_ventana/gw_ventana_spl.c
board/kosagi/novena/novena_spl.c
board/phytec/pcm058/pcm058.c
board/solidrun/mx6cuboxi/mx6cuboxi.c
board/udoo/udoo_spl.c
board/wandboard/spl.c