From patchwork Wed Apr 29 18:36:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 1279559 X-Patchwork-Delegate: alexey.brodkin@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=aZZHT5Pe; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49C6gX6rTqz9sSK for ; Thu, 30 Apr 2020 04:37:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9603D82127; Wed, 29 Apr 2020 20:37:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="aZZHT5Pe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B245A82138; Wed, 29 Apr 2020 20:36:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.87.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6404682116 for ; Wed, 29 Apr 2020 20:36:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugeniy.Paltsev@synopsys.com Received: from mailhost.synopsys.com (mdc-mailhost1.synopsys.com [10.225.0.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 6CE52C0339 for ; Wed, 29 Apr 2020 18:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1588185409; bh=EgOehqqZeOGQYEpKOlFsz21kIHLYGDnSaAdy7rcVfrc=; h=From:To:Cc:Subject:Date:From; b=aZZHT5PeIQXQwwJ+gC5i0mGYxChVbdffV+ITMHs7IkxWh3jLHUdU6a0/cvF+mAc3H nof6paowGRvHU2JaRpjQYtEw0V0XCWTSHYuIVducqFSWl7PfNkmVqkNKb33ju3w0Ne t87Oy2qvZmJloluClcgQtrort3vCvsmhsaewlyFJiFkTjEsmDsZF3xe3x6RJpwHCVA wbrSgyJcFMJAuPbS9gg1urdymrMnXfjq4n6Q3iJfZNnp3MMnxJVtpeSyNy0R2AWDdr yyFsaq0yXat7KXf/ZcjuLgcwM17rtGhME3o4NqwKtiIlCYvtYp/Uvt4oxrSf8gFepl xczQDix4u4Efw== Received: from paltsev-e7480.internal.synopsys.com (ru20-e7250.internal.synopsys.com [10.225.50.108]) by mailhost.synopsys.com (Postfix) with ESMTP id 3E035A005B; Wed, 29 Apr 2020 18:36:47 +0000 (UTC) From: Eugeniy Paltsev To: Alexey Brodkin Cc: u-boot@lists.denx.de, uboot-snps-arc@synopsys.com, Eugeniy Paltsev Subject: [PATCH] ARC: HSDK: anounce state of BIM switch Date: Wed, 29 Apr 2020 21:36:44 +0300 Message-Id: <20200429183644.19487-1-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Anounce state of BIM switch which defines if U-boot is loaded and started by preloader or not. Signed-off-by: Eugeniy Paltsev --- board/synopsys/hsdk/hsdk.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index a3e0563ff45..8ccd84ca600 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -42,6 +42,8 @@ DECLARE_GLOBAL_DATA_PTR; #define CREG_CPU_START_MASK 0xF #define CREG_CPU_START_POL BIT(4) +#define CREG_CORE_BOOT_IMAGE GENMASK(5, 4) + #define CREG_CPU_0_ENTRY (CREG_BASE + 0x404) #define SDIO_BASE (ARC_PERIPHERAL_BASE + 0xA000) @@ -1241,11 +1243,16 @@ int board_late_init(void) int checkboard(void) { + u32 reg; + printf("Board: Synopsys %s\n", board_name(get_board_type_runtime())); if (board_mismatch()) printf("WARN: U-boot is configured NOT for this board but for %s!\n", board_name(get_board_type_config())); + reg = readl(CREG_AXI_M_HS_CORE_BOOT) & CREG_CORE_BOOT_IMAGE; + printf("U-boot autostart: %s\n", reg ? "enabled" : "disabled"); + return 0; };