From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Date: Mon, 19 Dec 2016 01:50:14 +0000 Subject: [U-Boot] [PATCH v3 24/26] ARM: SPL/FIT: differentiate between arm and arm64 arch properties In-Reply-To: <1482112216-12983-1-git-send-email-andre.przywara@arm.com> References: <1482112216-12983-1-git-send-email-andre.przywara@arm.com> Message-ID: <1482112216-12983-25-git-send-email-andre.przywara@arm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Since the SPL FIT loader can now differentiate between different architectures, teach it how to tell arm and arm64 apart when a FIT image is used. We just support those two for now, as these are so far the only sensible alternatives. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- arch/arm/lib/spl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index e606d47..45d285c 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -63,3 +63,18 @@ void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void *arg) image_entry(0, machid, arg); } #endif + +/* This overwrites the weak definition in spl_fit.c */ +u8 spl_genimg_get_arch_id(const char *arch_str) +{ + if (!arch_str) + return IH_ARCH_DEFAULT; + + if (!strcmp(arch_str, "arm")) + return IH_ARCH_ARM; + + if (!strcmp(arch_str, "arm64")) + return IH_ARCH_ARM64; + + return IH_ARCH_DEFAULT; +} -- 2.8.2