From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 13 Apr 2017 17:44:38 +0200 Subject: [U-Boot] [PATCH 6/8] mips: bmips: fix first CPU check In-Reply-To: <1492098280-3259-1-git-send-email-noltari@gmail.com> References: <1492098280-3259-1-git-send-email-noltari@gmail.com> Message-ID: <1492098280-3259-7-git-send-email-noltari@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de CFE checks CPU Thread in a different way (using register $22): mfc0 t1, C0_BCM_CONFIG, 3 # $22 li t2, CP0_CMT_TPID # (1 << 31) and t1, t2 bnez t1, 2f # if we are running on thread 1, skip init nop Signed-off-by: Álvaro Fernández Rojas --- arch/mips/cpu/start.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S index 6740fdf..d91913b 100644 --- a/arch/mips/cpu/start.S +++ b/arch/mips/cpu/start.S @@ -151,8 +151,13 @@ reset: mfc0 t0, CP0_GLOBALNUMBER #endif +#ifdef CONFIG_ARCH_BMIPS +1: mfc0 t0, CP0_DIAGNOSTIC, 3 + and t0, t0, (1 << 31) +#else 1: mfc0 t0, CP0_EBASE and t0, t0, EBASE_CPUNUM +#endif /* Hang if this isn't the first CPU in the system */ 2: beqz t0, 4f -- 2.1.4