Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42935C28D13 for ; Thu, 25 Aug 2022 06:42:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A83478485D; Thu, 25 Aug 2022 08:41:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="QydV7+q4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 74310845C0; Thu, 25 Aug 2022 08:41:51 +0200 (CEST) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3D953845EB for ; Thu, 25 Aug 2022 08:41:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ovpanait@gmail.com Received: by mail-ej1-x630.google.com with SMTP id bj12so20609047ejb.13 for ; Wed, 24 Aug 2022 23:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=4Ma9w5Xb+y5SPD5J9DxDlGE4lqdw9nqBGosNyibNQYg=; b=QydV7+q420Kgw/ZiuEACa9JeeSAKEDq6fVnOULcw+1hgRrVa1zTG9gtX4G8mEr6v+s dUBwCKoooV+MwI25Sf9ridqbmoklA8sqt/UeR6Ux/MFZVSRyzS7n8gdXMTeMC10UEan3 qgGid++LDgvdFGbAAxnSKWfvU33//Uo+LT0rv2OJ1hMnLzG+KXrKWBXO6s9sFSDhNn8P zYvLKB/lEYVqToDWAXvpBuHbFxl/wFIC01EaVr+BVOZDiWeg2OYj0nUm8NaLpUux3/+O ixqkkCnAAK2bbzsWKC9PbSmvEyu5F5wdcJWTOPP7MLvdAaQn/9wKZUerIOWfV3pmbZGY 996g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=4Ma9w5Xb+y5SPD5J9DxDlGE4lqdw9nqBGosNyibNQYg=; b=YFy3PamsR/3qti388YKYG4jk9GpGXYErXiRS2c1Q3Fb8QStgUFtPbuhSPLgEh9Av7k u+X1AB7jJSvaldMF74oWQdhFI9tT9lVTBZtatFWUZFNdEV/Od+qfUL+M39rl7kNKutWZ SxCgffIoYmevo2ySVNntSTPi4OerRCGmiFQFHKaSJM1dhu9OCePNiIIkzKMsiuMhhFgB Oh4LAHrBtxc3Q2meyEhIwdULWbnL68YvJsg6SHugWmrDcfqS5rvJ53nwy4cFB1QHITBq 3egX1AhJplG+i0uom9ilVIR2v/erUbOtiiEMhSlbjvcIHtdb3ns4/I+1ANKicEYU7Hd4 Yrgg== X-Gm-Message-State: ACgBeo1GSRF0BtF55dCmRwJ1vQfifzZ/0pUq8B+mhJwxVONDI3MrzYEz ZTZTT1VTgKYaBs46uLof2OUPNi9APbEJQw== X-Google-Smtp-Source: AA6agR6AO4Z10mpRWciP5KulWqaUVzelSRIOy0DC8npaWQ+3ct/1WyaI8KCruHWmCaMC6Mzz+rU/eQ== X-Received: by 2002:a17:907:da9:b0:731:1a5:8c66 with SMTP id go41-20020a1709070da900b0073101a58c66mr1498765ejc.80.1661409706837; Wed, 24 Aug 2022 23:41:46 -0700 (PDT) Received: from localhost.localdomain ([2a02:2f07:610e:db00:4487:9f7e:854:3f2c]) by smtp.gmail.com with ESMTPSA id x2-20020aa7d382000000b00446473adeacsm4201616edq.82.2022.08.24.23.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 23:41:46 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Michal Simek , Michal Simek Subject: [PATCH 4/4] microblaze: add arch_print_bdinfo() implementation Date: Thu, 25 Aug 2022 09:41:31 +0300 Message-Id: <20220825064131.673958-4-ovpanait@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220825064131.673958-1-ovpanait@gmail.com> References: <20220825064131.673958-1-ovpanait@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Allow bdinfo command to print icache/dcache information: U-Boot-mONStR> bdinfo boot_params = 0x00000000 DRAM bank = 0x00000000 -> start = 0x04000000 -> size = 0x04000000 flashstart = 0x00000000 flashsize = 0x00000000 flashoffset = 0x00000000 baudrate = 9600 bps relocaddr = 0x07f76000 reloc off = 0x02f76000 Build = 32-bit current eth = unknown ethaddr = (not set) IP addr = fdt_blob = 0x07fec7e0 new_fdt = 0x00000000 fdt_size = 0x00000000 lmb_dump_all: memory.cnt = 0x1 memory[0] [0x4000000-0x7ffffff], 0x04000000 bytes flags: 0 reserved.cnt = 0x1 reserved[0] [0x7e94b8c-0x7ffffff], 0x0016b474 bytes flags: 0 devicetree = embed icache = 32 KiB icache line = 4 Bytes dcache = 32 KiB dcache line = 4 Bytes Signed-off-by: Ovidiu Panait --- arch/microblaze/lib/Makefile | 1 + arch/microblaze/lib/bdinfo.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 arch/microblaze/lib/bdinfo.c diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index 05f447abba..dfd8135f4f 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile @@ -4,4 +4,5 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. obj-$(CONFIG_CMD_BOOTM) += bootm.o +obj-$(CONFIG_CMD_BDI) += bdinfo.o obj-y += muldi3.o diff --git a/arch/microblaze/lib/bdinfo.c b/arch/microblaze/lib/bdinfo.c new file mode 100644 index 0000000000..41b7a216a4 --- /dev/null +++ b/arch/microblaze/lib/bdinfo.c @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2022, Ovidiu Panait + */ +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +void arch_print_bdinfo(void) +{ + struct microblaze_cpuinfo *ci = gd_cpuinfo(); + + if (ci->icache_size) { + bdinfo_print_size("icache", ci->icache_size); + bdinfo_print_size("icache line", ci->icache_line_length); + } + + if (ci->dcache_size) { + bdinfo_print_size("dcache", ci->dcache_size); + bdinfo_print_size("dcache line", ci->dcache_line_length); + } +} -- 2.25.1