]> git.baikalelectronics.ru Git - uboot.git/commit
imx8m: fix reading of DDR4 MR registers [again]
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Thu, 6 Oct 2022 12:56:50 +0000 (14:56 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 24 Oct 2022 09:34:33 +0000 (11:34 +0200)
commit50240777fb52101b5bb34b8c6fb9060c157dd2e5
tree517dbefa7219c0e3ff2a89cd9e30a1a3164f0388
parent70a6b5f47d8e79d25ad17ad354ff3d1fe188023c
imx8m: fix reading of DDR4 MR registers [again]

Commit 6c9427e030 (imx8m: fix reading of DDR4 MR registers) lifted a
private definition of lpddr4_mr_read() from imx8mm-cl-iot-gate board
code to drivers/ddr/imx/imx8m/ddrphy_utils.c, because that version
actually seems to work in practice.

However, commit 5852ed81e8 (ddr: imx: Add i.MX9 DDR controller driver)
reintroduced the broken version in drivers/ddr/imx/imx8m/ddr_init.c,
copied most of the rest of ddrphy_utils.c to
drivers/ddr/imx/phy/ddrphy_utils.c, and stopped building
drivers/ddr/imx/imx8m/ddrphy_utils.c [and that file was then finally
completely removed with 8381a97114 (imx8m: ddrphy_utils: Remove unused
file)].

I assume this must have broken the imx8mm-cl-iot-gate board, at least
those that have not had their eeprom programmed with the proper
information. It certainly did break our out-of-tree board which always
reads back the ID register and uses that for a sanity check.

So apply the fix from 6c9427e030 once again.

Fixes: 5852ed81e8 (ddr: imx: Add i.MX9 DDR controller driver)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Fabio Estevam <festevam@denx.de>
drivers/ddr/imx/imx8m/ddr_init.c