]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(imx8m): fix the current fsp init
authorJacky Bai <ping.bai@nxp.com>
Mon, 3 Aug 2020 05:31:26 +0000 (13:31 +0800)
committerJacky Bai <ping.bai@nxp.com>
Tue, 28 Feb 2023 06:26:39 +0000 (14:26 +0800)
The dfimisc reg value should be shift right 8 bit to
get the current fsp.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
Change-Id: I4c8c166bc3ad4cc1376961cbf47631c68b5900cc

plat/imx/imx8m/ddr/dram.c

index 1fea69db80d5fdf6d25877855b2eed6b34a09cca..6780bed9c5e697ab5fed6dfb3add64659797ba3a 100644 (file)
@@ -152,7 +152,8 @@ void dram_info_init(unsigned long dram_timing_base)
                DDRC_ACTIVE_TWO_RANK : DDRC_ACTIVE_ONE_RANK;
 
        /* Get current fsp info */
-       current_fsp = mmio_read_32(DDRC_DFIMISC(0)) & 0xf;
+       current_fsp = mmio_read_32(DDRC_DFIMISC(0));
+       current_fsp = (current_fsp >> 8) & 0xf;
        dram_info.boot_fsp = current_fsp;
        dram_info.current_fsp = current_fsp;