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 BB7CDECAAD2 for ; Mon, 29 Aug 2022 17:02:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F1B9684987; Mon, 29 Aug 2022 19:02:25 +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="JlrvNEJI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6A7668495B; Mon, 29 Aug 2022 19:02:19 +0200 (CEST) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 911CB84950 for ; Mon, 29 Aug 2022 19:02:16 +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-ed1-x52c.google.com with SMTP id u6so10930322eda.12 for ; Mon, 29 Aug 2022 10:02:16 -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=dadFCl8Gz+NUoo51Oe4dOewDWVAUbCBfqfBpHe+QraI=; b=JlrvNEJIjC3k2vIIRLyJmYhI20kSU4B+l/iYG7HCwpB/7GJqJzu2k58HdDcY25QDhx E/Wd7SOigpkVqkCIRVQahBkyD9mBekxgnpFkH/+OsgT80SAZ0TiSGk5mknwF/Ih76OzY NE4aE9dWfdukKkazhXDFvY+FThcy1LUZcJTc5f8j1i8FCFrXLQotxq4k0mfrK6Nv8hiw pWQF+aTU0RXKLwh9FixtECDqCog7hXkV7XUOvn129nL3hBaUv7XfTYtfRprT0kd5/Lvp 2TnXjpf3PxSdgPnl8jBxfXoTC8esWH/D1M/lD9jl9LMv9NWnz2Dd1KlMvoKzyaYIA2RA QcaA== 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=dadFCl8Gz+NUoo51Oe4dOewDWVAUbCBfqfBpHe+QraI=; b=QgSRYTNjTL+vTbEUv3SnXHFoZHxnmWcBBN0TgiMPEc3ETKr6HgDCXAlHCceCnX1Efd 9hBPCJPVvupkoNN4rcJE2tW7YN+xUx4X6hJQveywdCqIkF7M1IfWEWwHBCg8gYk4J+N2 LwYJawl39XvCZ43LbTPvMHIVUUha5dclUAz7f/znS11dTwM+CQwoELUZqarpu0JptuHq vJe/S9rsxu1BEmb7OsbAIaHoJHYUmOC+EbbgbYCy/DoNjNM+lPfBvvQDrhVgFTBV1nGl aoSWKlIVAT0ry2cRVPunz+2TVD0dzU1rEbN/yr6oVeK4FVoEX7B9hzX1XlHZv1+tAXfk Qx5A== X-Gm-Message-State: ACgBeo0o6wx3aWCD+X2jg1WYdNrgsBxhYOXvxnEQ00AMLQ/GG1I2lmO8 fd83kR4ac0OwD/wKsskej7EA4v532aHznQ== X-Google-Smtp-Source: AA6agR5sZwsYYUYgSHe7qkmbrpxwe4UnSCbGyvbnhkH1fUGaBr7FDL8GRY3yBUBmIdSYRBox2hLWPw== X-Received: by 2002:a05:6402:3408:b0:43c:2dd3:d86b with SMTP id k8-20020a056402340800b0043c2dd3d86bmr17525402edc.108.1661792536127; Mon, 29 Aug 2022 10:02:16 -0700 (PDT) Received: from wsdell.corp.ad.wrs.com ([2a02:2f07:610e:db00:a66a:9c69:59fb:17ec]) by smtp.gmail.com with ESMTPSA id g24-20020a50d0d8000000b0044786c2c5c1sm6012852edf.3.2022.08.29.10.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 10:02:15 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Michal Simek , Michal Simek Subject: [PATCH v2 4/4] microblaze: add arch_print_bdinfo() implementation Date: Mon, 29 Aug 2022 20:02:05 +0300 Message-Id: <20220829170205.1274484-4-ovpanait@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829170205.1274484-1-ovpanait@gmail.com> References: <20220829170205.1274484-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 --- (no changes since v1) 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