From patchwork Wed Jan 2 13:31:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume GARDET X-Patchwork-Id: 1019981 X-Patchwork-Delegate: promsoft@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43VBmB4lsFz9s4s for ; Thu, 3 Jan 2019 00:31:51 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 9F9F5C21DD3; Wed, 2 Jan 2019 13:31:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 29449C21C2C; Wed, 2 Jan 2019 13:31:45 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2C8DFC21C27; Wed, 2 Jan 2019 13:31:44 +0000 (UTC) Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by lists.denx.de (Postfix) with ESMTPS id 56E76C21BE5 for ; Wed, 2 Jan 2019 13:31:43 +0000 (UTC) Received: from localhost.localdomain (unknown [91.163.92.88]) by smtp1-g21.free.fr (Postfix) with ESMTP id CF90AB0057F; Wed, 2 Jan 2019 14:31:42 +0100 (CET) From: Guillaume GARDET To: u-boot@lists.denx.de Date: Wed, 2 Jan 2019 14:31:41 +0100 Message-Id: <20190102133141.29927-1-guillaume.gardet@free.fr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Guillaume GARDET , Tom Rini Subject: [U-Boot] [PATCH] exynos: allow SPL to build in thumb mode X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Building peach-pi smdk5420 and peach-pit with thumb mode for SPL ends-up in the following error: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#0x13|0xC0' Use an intermediate register to be able to use thumb for exynos5 SPL. Signed-off-by: Guillaume GARDET Cc: Albert Aribaud Cc: Minkyu Kang Cc: Tom Rini --- arch/arm/mach-exynos/include/mach/system.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/include/mach/system.h b/arch/arm/mach-exynos/include/mach/system.h index 4837781957..81fa9800b4 100644 --- a/arch/arm/mach-exynos/include/mach/system.h +++ b/arch/arm/mach-exynos/include/mach/system.h @@ -58,7 +58,8 @@ struct exynos5_sysreg { /* Move 0xd3 value to CPSR register to enable SVC mode */ #define svc32_mode_en() __asm__ __volatile__ \ ("@ I&F disable, Mode: 0x13 - SVC\n\t" \ - "msr cpsr_c, #0x13|0xC0\n\t" : : ) + "mov r0, #0x13|0xC0\n\t" \ + "msr cpsr_c, r0\n\t" : : ) /* Set program counter with the given value */ #define set_pc(x) __asm__ __volatile__ ("mov pc, %0\n\t" : : "r"(x))