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)
commit1f63ee656698724bcdc4e711b4ccd267f6bf64ab
tree576af1c3b66ae32e6b02dd3be90f3aa2c993c617
parent2c72bf21c66692cf0b9c305c27ac4a5218a4dd01
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