From patchwork Thu Aug 25 06:41:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 1670075 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Ow3rUCJf; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MCtg05Nfzz1yg7 for ; Thu, 25 Aug 2022 16:42:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 25A9A84823; 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=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="Ow3rUCJf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A26C845EB; Thu, 25 Aug 2022 08:41:45 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 5244E84522 for ; Thu, 25 Aug 2022 08:41:43 +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-x530.google.com with SMTP id r4so24803628edi.8 for ; Wed, 24 Aug 2022 23:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=6ggWztdMBpqYWrequm7Cu5JVpY4x2zwYXL/TAsqywvY=; b=Ow3rUCJf2GmkPPpEK5uNnA4sXp9z1n7EppLfsOhcOWFS/Vp0hdAPe8ncuUKEOvj5yA MoLD81ITE6bFjKo/Hrzn7FAkolm2TwCDWyCilcmRVZCQ54Y+VkUOqJIutN9ZQ+zOiuCh /GxNcdX6RzWW3XkWccMiGtEX/NPsMmWbHeCbrfAsOqi/YWKW50RUx5ZD0qqzlnZId54F mhQomIPNzIuevfrwgNuVht2q0yts2MZH+fYf2lFGctqAYl0pJMNjco3mGaEFHA9K4Hqc dDUjBR5zPf93wnrAVhxlrjgbPq3tkJOX1abdOqhrj00B8a16/4WYD1FFCvwC6CMGhMci mcpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=6ggWztdMBpqYWrequm7Cu5JVpY4x2zwYXL/TAsqywvY=; b=y0tA3AMwijbcFU/+AxgsYome6KtGzCT2tonuShdsr+4gIwPZqgzzJCg05UN5VhjJgQ sTMBPrWCUvU1Z8RBYn+AVrxwjKCF9666LDjN7PXZSvCl/SVGgM9g0L9L4VFuJpEr67P8 qCLnGZXFRTwjjKirKH5rvXddfXyg1eXforXkpPgYnGFD0/G/2+L2NtCxo+JpUlydNksd kckoI0Sutu62BphewS0+bqSdcadTu37TrtdBhooijIO1RGPaMRVtVNzNkRAVjW8Yn37L +P0ZmxZ0z9oak0omA24eURQ/GVP98xMKgjEW9eg9gB8EVMy5MB7EnYYXQVb6alsNK50G yjEQ== X-Gm-Message-State: ACgBeo0BW8zyGYeN1Ohu1ITyLeiWUWossvX8164BCe68YOxcn6v1+5Xx Ey2JEjIGWyLdctMqAf43+uclZvZLMD8= X-Google-Smtp-Source: AA6agR4XoUPG3yvCERMRN88mUhkrj2yNcHhh8kSrwN1NVQl2r4JHzSvdRdbRa5jS757Oss7UrESQDQ== X-Received: by 2002:a05:6402:5190:b0:447:284c:b3a9 with SMTP id q16-20020a056402519000b00447284cb3a9mr1910778edd.428.1661409702941; Wed, 24 Aug 2022 23:41:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 23:41:42 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Michal Simek , Michal Simek Subject: [PATCH 1/4] microblaze: drop CONFIG_SYS_INIT_RAM_ADDR and CONFIG_SYS_INIT_RAM_SIZE Date: Thu, 25 Aug 2022 09:41:28 +0300 Message-Id: <20220825064131.673958-1-ovpanait@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 These macros don't seem to be used by microblaze code anymore, so remove them. Signed-off-by: Ovidiu Panait --- include/configs/microblaze-generic.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 8eaac4f8bc..dfae8cea7b 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -97,10 +97,4 @@ #define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE -/* SP location before relocation, must use scratch RAM */ -/* BRAM start */ -#define CONFIG_SYS_INIT_RAM_ADDR 0x0 -/* BRAM size - will be generated */ -#define CONFIG_SYS_INIT_RAM_SIZE 0x100000 - #endif /* __CONFIG_H */ From patchwork Thu Aug 25 06:41:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 1670076 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=WdC93SAL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MCtg05Z8Mz1yhC for ; Thu, 25 Aug 2022 16:42:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 61025845D3; Thu, 25 Aug 2022 08:41:53 +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="WdC93SAL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A5685845EB; Thu, 25 Aug 2022 08:41:46 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 7D6D7845D3 for ; Thu, 25 Aug 2022 08:41:44 +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-x535.google.com with SMTP id b16so24832111edd.4 for ; Wed, 24 Aug 2022 23:41:44 -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=lKXwAlIvpFgEjcapDAeCUVtUNfSQZijtMr3owK5FCAA=; b=WdC93SALyH4gHbjLAQQg1IeLLFo3cotgSHwSec+cPkYMGfeCoPenwhE53SIG65Pau0 aGDhd0XdtZL0DSlFGbbbRIZ7JVfDTwh4S1sCOK6TILY56imzqgB4UAQ/T4utihXE+yhT 508+uQKuY+tpv5Zc6mAha/P+RZ2aCVYchJqQARd3vqVkv7GPnbP5RdKnf27sig+Ar8/0 c2RH23jkNmVynXyduu+EN3Nd293uzOK4WWUEFy0Ca4zl+3snJj/eC6bdsOKCnd3g82Oe wX0VYq0Z0ApJrKPJ6b8Il8xC0zTK51ar4j7soT3z/gKLy0x0jUxDGJbJZmx/L/+5UDKh HA7g== 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=lKXwAlIvpFgEjcapDAeCUVtUNfSQZijtMr3owK5FCAA=; b=MUj14if1MWa516VaEbyDxFNL9IlKV80YY8umRA69jh2M4K6db4tpqnnwgk1MM0ozwg x55ZekKVTBKRHz7J5AH8SbIgzqt6981jw2secOz/Y+v3l6IlcDVPbhIyBUvFFZXpJNTu w9XgVpC1K9VKhVbwZ0b+arPcrAHEZ0kp8KpW8ZdP7KkTV0AJ+opVEHv/M1QKGzZ3UCj3 7Q5wEE354eyH/0iKYCfuDeOMqpbOW7XYAhMf4qDETrF/gIekwibp22aLdIKMi0q+covr H02DlvOlSaXp8hyFuVGcExYZdZhKoBujHpx/cl3CCMig4/wFBkwrldngOlOW76cH2n+q WstA== X-Gm-Message-State: ACgBeo3Or9zGugeZscAazRCMzU+QInDSdeK6TXZfQJ2tFn2vqugHx5W7 bx1QA9prIWR6XhqSGfgHaLM0oyW/t8o= X-Google-Smtp-Source: AA6agR44qziXo9oLZzPaTwAVjqS9K4/aIpGknfJlzT9EMiiCtCdwq5t81qlHABRJXLY5WEWKFmCvVA== X-Received: by 2002:a50:aa82:0:b0:445:dbba:6cb1 with SMTP id q2-20020a50aa82000000b00445dbba6cb1mr1962023edc.267.1661409704181; Wed, 24 Aug 2022 23:41:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 23:41:43 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Michal Simek , Michal Simek Subject: [PATCH 2/4] cpu: microblaze: remove unused ret variable Date: Thu, 25 Aug 2022 09:41:29 +0300 Message-Id: <20220825064131.673958-2-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 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 Drop the unused ret variable from microblaze_cpu_get_desc(). Signed-off-by: Ovidiu Panait --- drivers/cpu/microblaze_cpu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/cpu/microblaze_cpu.c b/drivers/cpu/microblaze_cpu.c index 969a1047e5..4eae06a8a6 100644 --- a/drivers/cpu/microblaze_cpu.c +++ b/drivers/cpu/microblaze_cpu.c @@ -88,15 +88,14 @@ static int microblaze_cpu_get_desc(const struct udevice *dev, char *buf, struct microblaze_cpuinfo *ci = gd_cpuinfo(); const char *cpu_ver, *fpga_family; u32 cpu_freq_mhz; - int ret; cpu_freq_mhz = ci->cpu_freq / 1000000; cpu_ver = microblaze_lookup_cpu_version_string(ci->ver_code); fpga_family = microblaze_lookup_fpga_family_string(ci->fpga_code); - ret = snprintf(buf, size, - "MicroBlaze @ %uMHz, Rev: %s, FPGA family: %s", - cpu_freq_mhz, cpu_ver, fpga_family); + snprintf(buf, size, + "MicroBlaze @ %uMHz, Rev: %s, FPGA family: %s", + cpu_freq_mhz, cpu_ver, fpga_family); return 0; } From patchwork Thu Aug 25 06:41:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 1670077 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=JpeImfmS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MCtg92nwGz1yg7 for ; Thu, 25 Aug 2022 16:42:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18BDD84865; Thu, 25 Aug 2022 08:41:56 +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="JpeImfmS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6717E8484F; Thu, 25 Aug 2022 08:41:48 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 1E6E384522 for ; Thu, 25 Aug 2022 08:41:46 +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-x52a.google.com with SMTP id e21so19962222edc.7 for ; Wed, 24 Aug 2022 23:41:46 -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=4V4jRJyYolEnrIly4BodAYzfR2odPk5m95NvCpE5kNg=; b=JpeImfmSdbkmi61dY1Ci94nFAslJaiG2tEj06fm67/7zRax3J0Ft8cW0jhN8opZuUv bbVFSvUihFaQtkwRw6JTu87J511nAquBZHSq776D0BJpI8mx+LKJWXIaAkC9ayqPzHEc 5Ebx9QmPXFplvAtHZormsWzNoVo58qYxoCu0zYZ+1aKyQXzqIE93yYe9WGE8jZwbl9Rg DMMQTKpIbfH5eNaiWbsqWol5sEwMvRT/yblqbNEJW//asp1OsHR7B0WxqGknlW/HaKCY VsyM3UiCIxsKt8Gc871zv8POlT59V0o9fv5ZIEJ7DJlfBUgl8Rr1YI+F5COGTX8UmNJx Mjyw== 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=4V4jRJyYolEnrIly4BodAYzfR2odPk5m95NvCpE5kNg=; b=vYXUchTWiks6Qw2YZBlHE1gE8HfQm79w/tM3emOapoEq5iCzs6i/eWXccQgEaXfx+y h3/Jw1UXIee+89iiyWXODu9eS0+OY422kcU5gEM+AxvIrleZ2RYT32gIdpjUX10/N3RZ olFJgUpHHZ8l3Wi0ogWtv0UgYTP29tIo6bCIRnnFHHzACZbpPfQcopUfT/IulJw+gtVw hKROMGHhS66P+uURK82gsyR5TuO+hnC9m6mqA1h+tJpIyiq00Y0AGHR998u4f/Oj2zE5 qO9l/GewuBAKS8p5fZ8NAnO4toDHkLKAbv0KzqyJ4cpNrVas+egOByA0GD/ClFEiIs+n znZw== X-Gm-Message-State: ACgBeo0Oz1gKD2DGaFEXCr4NUrrGtS3QIzn6DSE5wcv7v3X6xw/BN4P1 AL416v/uCGDf++3B3KqMundw0lculjjbyA== X-Google-Smtp-Source: AA6agR4FfgF4gWA8pDNb0Lu9ifgddoCa07UK6OluyEhWmdgw9tr0KHCiTMnDSVnIvTZjMpaEMJpAOw== X-Received: by 2002:a05:6402:11cb:b0:43c:c7a3:ff86 with SMTP id j11-20020a05640211cb00b0043cc7a3ff86mr1956358edw.383.1661409705667; Wed, 24 Aug 2022 23:41:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 23:41:45 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Andy Shevchenko , Dzmitry Sankouski , Heinrich Schuchardt , Jason Liu , Simon Glass Subject: [PATCH 3/4] cmd: bdinfo: introduce bdinfo_print_size() helper Date: Thu, 25 Aug 2022 09:41:30 +0300 Message-Id: <20220825064131.673958-3-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 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 Add bdinfo_print_size() helper to display size variables (such as cache sizes) in bdinfo format. The size is printed as "xxx Bytes", "xxx KiB", "xxx MiB", "xxx GiB", etc as needed; Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- cmd/bdinfo.c | 7 +++++++ include/init.h | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 37cd8a57eb..9e23c4dd8f 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -16,9 +16,16 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; +void bdinfo_print_size(const char *name, uint64_t size) +{ + printf("%-12s= ", name); + print_size(size, "\n"); +} + void bdinfo_print_num_l(const char *name, ulong value) { printf("%-12s= 0x%0*lx\n", name, 2 * (int)sizeof(value), value); diff --git a/include/init.h b/include/init.h index 7b8f62c121..02bb4ce13e 100644 --- a/include/init.h +++ b/include/init.h @@ -343,6 +343,19 @@ void bdinfo_print_num_ll(const char *name, unsigned long long value); /* Print a clock speed in MHz */ void bdinfo_print_mhz(const char *name, unsigned long hz); +/** + * bdinfo_print_size - print size variables in bdinfo format + * @name: string to print before the size + * @size: size to print + * + * Helper function for displaying size variables as properly formatted bdinfo + * entries. The size is printed as "xxx Bytes", "xxx KiB", "xxx MiB", + * "xxx GiB", etc. as needed; + * + * For use in arch_print_bdinfo(). + */ +void bdinfo_print_size(const char *name, uint64_t size); + /* Show arch-specific information for the 'bd' command */ void arch_print_bdinfo(void); From patchwork Thu Aug 25 06:41:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 1670078 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=QydV7+q4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MCtgP1zMNz1yg7 for ; Thu, 25 Aug 2022 16:42:25 +1000 (AEST) 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 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 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); + } +}