arm: imx: imx8m: imx9: Fix DRAM size calculation due to rom_pointer
authorElena Popa <elena.popa@nxp.com>
Tue, 8 Aug 2023 11:58:26 +0000 (14:58 +0300)
committerStefano Babic <stefano.babic@swupdate.org>
Mon, 4 Sep 2023 08:21:20 +0000 (10:21 +0200)
commit07908bf5e547ed3a78ab4fb579c8cd623f8af6e5
tree7cb6fa47d95cddf638df7ebd6f7ebde3e93ed10f
parentf58b0c853482e26682158c3b0422cd33dfeb434a
arm: imx: imx8m: imx9: Fix DRAM size calculation due to rom_pointer

If dram_init_banksize() is called from SPL, the rom_pointer, at that
point, is not correctly initialized. This causes wrong calculation of
DRAM start and size in dram_init_banksize(). The issue became apparent
only in Falcon Mode. Added an extra condition to prevent using
rom_pointer in SPL.

Signed-off-by: Elena Popa <elena.popa@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
arch/arm/mach-imx/imx8m/soc.c
arch/arm/mach-imx/imx9/soc.c