SPL: FIT: factor out spl_load_fit_image() 90/147690/3
authorAndre Przywara <andre.przywara@arm.com>
Wed, 26 Apr 2017 00:32:36 +0000 (01:32 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 5 Sep 2017 09:11:50 +0000 (09:11 +0000)
commitb03d4cfe5a81e0bacb3704c3fa86ae83d0a8edc2
tree84de9dbc1e3f7cfd72cd1f8a594e027be409bc9a
parent8a74a0b8b28a84258bf0d164a3473bf93e92d51b
SPL: FIT: factor out spl_load_fit_image()

At the moment we load two images from a FIT image: the actual U-Boot
image and the .dtb file. Both times we have very similar code, that deals
with alignment requirements the media we load from imposes upon us.
Factor out this code into a new function, which we just call twice.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
[egukim: cherry-pick from mainline to support ATF]
Signed-off-by: egukim <egukim@dignsys.com>
Change-Id: I5db03011b8bd06edcc95a7d8ff9871d9e38ef7e2
common/spl/spl_fit.c