]> git.baikalelectronics.ru Git - uboot.git/commit
imx: rom api: fix image offset computation
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Wed, 13 May 2020 14:02:28 +0000 (16:02 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 8 Jun 2020 08:42:14 +0000 (10:42 +0200)
commit6d1818d9d6067186860056f375be6beca30a4f20
tree576af1c3b66ae32e6b02dd3be90f3aa2c993c617
parentfa70f35267a1a8ba73a7fe8504fec86857720e23
imx: rom api: fix image offset computation

When not booting from FlexSPI, the offset computation is:

offset = image_offset + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8000;

When booting from SD card or eMMC user partition, image_offset is
0x8000. It is useless to add and remove 0x8000.
When booting from other device, image_offset is 0 so this computation is wrong.

Simplfy this computation to work on all booting devices.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
arch/arm/mach-imx/spl_imx_romapi.c