From patchwork Tue Mar 28 16:27:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 746806 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3vy9Ny3dzDz9s9c for ; Tue, 4 Apr 2017 23:51:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="e9sSVdBN"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 420C7C21C96; Tue, 4 Apr 2017 13:37:46 +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=KHOP_BIG_TO_CC, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID 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 138B8C21CD3; Tue, 4 Apr 2017 13:28:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A37F1C21C55; Tue, 28 Mar 2017 16:27:49 +0000 (UTC) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) by lists.denx.de (Postfix) with ESMTPS id 87A87C21C36 for ; Tue, 28 Mar 2017 16:27:44 +0000 (UTC) Received: by mail-ot0-f177.google.com with SMTP id a5so55542825oth.1 for ; Tue, 28 Mar 2017 09:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=R7V2Nz6KqUerEOswRwHKGu30zLYTWOgRKJMSsM2Ev9E=; b=e9sSVdBNmb/IboKj7YqKZigxCyoe2h7Hy2csdiW8tYAt2EacdscGRbLmIGI79k3jFv 6A2SP8rX/8Gd/zc9fz1fDlxys+wqiI304RmabIMMNSF1t/Q8X/OJ3nEDd5kacOKHeHl7 cXFSDlZ0DqMDfLBHle3/BU81UrLMlfXZ76wgTcfb1hCl5ib1MbFMvNsigWmya6TCPgkx iucboidqP1TeHwX9/WqW4jur7AV/xyT0ErQLmS73UB70WmmRc0xfgTfwvyLAKmDQfQGM /cDlrks/kRerFOFtjB+dhUV8DdLZ8YD3FhrlSx11kNliRuqfvQRketEKK8+SEwSHdgbd AnoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=R7V2Nz6KqUerEOswRwHKGu30zLYTWOgRKJMSsM2Ev9E=; b=XQy+RqZobWO5gtsw27Y/N+vPS4/CKa9uCecXOj4D1AV8QNtb7C6QHiFsb5RifiaMzw Bfq4u7sHKLPlZD+SH8oWKmDcmyRS7Q//kl7532wJxcN6NkPe0z47KaOcVTULkD2bbHrL iBCEb2BQ7bOshrmzTa8eIZpbBmeywmbwWu64n3g+LwYiwFZjekoQmZEO/JDnMrZU3mWp EnqPhHwTQprChByRMcLCtzZCHEgr4RMsYPxxZHBaqwk2mYleCgTJYD70tJwPe0Pkt7dh d94nB/izi7tgF36kPWDvrGgPkbAzEmnU/xWjpzfRkT09hP6qsD16iQ+KTpUs8fW7LJ/T kOzQ== X-Gm-Message-State: AFeK/H3NCuCK53Xz6cQ8HQkC7vl9UeUQ1XlfOEU8iVGnAsErrDZ5xlVPTlmHHHPlUiEA9g9m X-Received: by 10.157.32.129 with SMTP id x1mr13767297ota.185.1490718463252; Tue, 28 Mar 2017 09:27:43 -0700 (PDT) Received: from kaki.bld.corp.google.com ([2620:0:1005:11:f454:ab6f:d1a8:a9fe]) by smtp.gmail.com with ESMTPSA id s3sm1887664oia.19.2017.03.28.09.27.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 09:27:41 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 23DA243B6D; Tue, 28 Mar 2017 10:27:38 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 28 Mar 2017 10:27:27 -0600 Message-Id: <20170328162733.20905-12-sjg@chromium.org> X-Mailer: git-send-email 2.12.2.564.g063fe858b8-goog In-Reply-To: <20170328162733.20905-1-sjg@chromium.org> References: <20170328162733.20905-1-sjg@chromium.org> X-Mailman-Approved-At: Tue, 04 Apr 2017 13:27:36 +0000 Cc: Andy Fleming , Stefan Roese , Marek Vasut , Tom Rini , Angelo Dureghello , Kumar Gala , Andre Przywara , Vladimir Zapolskiy , Chris Packham , Chris Zankel , Kim Phillips , Joe Hershberger , Darwin Dingel Subject: [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function is called just before checkcpu() on MPX83xx. Move it to the code for that arch. Signed-off-by: Simon Glass --- arch/powerpc/cpu/mpc83xx/cpu.c | 5 +++++ arch/powerpc/cpu/mpc83xx/cpu_init.c | 1 + arch/powerpc/include/asm/processor.h | 2 ++ common/board_f.c | 3 --- include/common.h | 2 -- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index c87f0fdd29..cb82621ec4 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -33,6 +33,7 @@ int checkcpu(void) u32 pvr = get_pvr(); u32 spridr; char buf[32]; + int ret; int i; const struct cpu_type { @@ -61,6 +62,10 @@ int checkcpu(void) immr = (immap_t *)CONFIG_SYS_IMMR; + ret = prt_83xx_rsr(); + if (ret) + return ret; + puts("CPU: "); switch (pvr & 0xffff0000) { diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c index 3a0916bdbf..2a9db0c51b 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c @@ -8,6 +8,7 @@ #include #include #include +#include #ifdef CONFIG_USB_EHCI_FSL #include #endif diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 81bae6f008..c032726df1 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -1354,6 +1354,8 @@ void ll_puts(const char *); /* In misc.c */ void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val); +int prt_83xx_rsr(void); + #endif /* ndef ASSEMBLY*/ #ifdef CONFIG_MACH_SPECIFIC diff --git a/common/board_f.c b/common/board_f.c index cbd9f67709..74cdef0ddb 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -864,9 +864,6 @@ static const init_fnc_t init_sequence_f[] = { prt_8260_rsr, prt_8260_clks, #endif /* CONFIG_MPC8260 */ -#if defined(CONFIG_MPC83xx) - prt_83xx_rsr, -#endif #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH) checkcpu, #endif diff --git a/include/common.h b/include/common.h index 684083510b..6f08110b74 100644 --- a/include/common.h +++ b/include/common.h @@ -715,8 +715,6 @@ ulong cpu_init_f(void); int cpu_init_r (void); #if defined(CONFIG_MPC8260) int prt_8260_rsr (void); -#elif defined(CONFIG_MPC83xx) -int prt_83xx_rsr (void); #endif /* $(CPU)/interrupts.c */