From patchwork Wed Aug 21 16:18:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975007 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Pt4oEsQI; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps466wYrz1yXf for ; Thu, 22 Aug 2024 02:19:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2FBED88E0A; Wed, 21 Aug 2024 18:19:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Pt4oEsQI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EEB4688E0A; Wed, 21 Aug 2024 18:19:39 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 B0A1588C05 for ; Wed, 21 Aug 2024 18:19:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-70943b07c2cso3863091a34.1 for ; Wed, 21 Aug 2024 09:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257176; x=1724861976; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oZOaxOWgCRZnzfHu3nJerpfmZkHRW68UST8KIHRI/0M=; b=Pt4oEsQIqJUsZjlLst5FDOG/WAx2MRMBvzCYfCQrCZfBa636UYO5J2oCGFg3I1ngD7 MkdEvPCHcJD/lvfp8R4HahS4rcWoLLlgcerzHUCNW3lEoTxSb6sSDEbw/blG2Tl1pWqH 4QiP1vg/tkiyEAKICPNynYWrl+1K/wwxgKKzI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257176; x=1724861976; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oZOaxOWgCRZnzfHu3nJerpfmZkHRW68UST8KIHRI/0M=; b=WcZ9WTt/+uOBawpLfaxMuKNA5RTw4E8S+0PtPL53cOnCKeUNL1QRiQDLuJKdRO2xWG CHWx8o7GlsVC/XnTYNxn6+jiwd2mK7qFHbtCovXLWF6bYU3YQWQtMUcajbv0289HOd+X /94P322QDQtfLvZPESx+1vWPKhZ1na5zSKiaphSOowARg5IQvnaTUhDPHJHgqTVrBBPY rQm8aazK8llA+A0kLttpjwbkAZGlym1gFG8g0FBUX85d9REggq/+3dpaIVWHTEjod33n ZGDx4BLLTRScFJ/xvCm2p9VzzI356vHojyolfwOMRogT7P3rt3OpcQT8Abg0ifjh4WH0 5LUw== X-Gm-Message-State: AOJu0YxcvCVpF8Vnp2IXuWO7Nz3ZQlrCmcClUT0q2LhlnEUPCw0HIC2V GKYV0kglgeTQu7Ox6kxiV/gsFRqDpHBTkHu9pjYOp50qdaDbWmaDWUs3laI4wCq4XLeZPVg5bY4 = X-Google-Smtp-Source: AGHT+IFLEmZ4Ifz5j5DH5ILGXOo8oHpExKG+su6or/+p4q7hRngsQ3Gz31/NTtoAg6FQ4gQ85MZWsw== X-Received: by 2002:a05:6830:6189:b0:703:5dbc:1aa9 with SMTP id 46e09a7af769-70df87015a0mr3770507a34.13.1724257176313; Wed, 21 Aug 2024 09:19:36 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:36 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 01/35] global_data: Move pci_clk to m68k and powerpc Date: Wed, 21 Aug 2024 10:18:53 -0600 Message-Id: <20240821161927.695717-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Only m68k and powerpc use this field, so move it to the arch-specific info, to reduce the size for other archs. Signed-off-by: Simon Glass --- (no changes since v1) arch/m68k/cpu/mcf5445x/cpu.c | 2 +- arch/m68k/include/asm/global_data.h | 2 ++ arch/m68k/lib/bdinfo.c | 2 +- arch/powerpc/cpu/mpc83xx/pci.c | 4 ++-- arch/powerpc/cpu/mpc83xx/speed.c | 2 +- arch/powerpc/include/asm/global_data.h | 2 ++ drivers/clk/mpc83xx_clk.c | 2 +- include/asm-generic/global_data.h | 5 ----- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c index b811ac355e4..3fbd6a58c7d 100644 --- a/arch/m68k/cpu/mcf5445x/cpu.c +++ b/arch/m68k/cpu/mcf5445x/cpu.c @@ -92,7 +92,7 @@ int print_cpuinfo(void) strmhz(buf3, gd->arch.flb_clk)); #ifdef CONFIG_PCI printf(" PCI CLK %s MHz INP CLK %s MHz VCO CLK %s MHz\n", - strmhz(buf1, gd->pci_clk), + strmhz(buf1, gd->arch.pci_clk), strmhz(buf2, gd->arch.inp_clk), strmhz(buf3, gd->arch.vco_clk)); #else diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h index 93efc722ba8..4ac886933c6 100644 --- a/arch/m68k/include/asm/global_data.h +++ b/arch/m68k/include/asm/global_data.h @@ -26,6 +26,8 @@ struct arch_global_data { #if defined(CONFIG_FSL_ESDHC) unsigned long sdhc_per_clk; #endif + /** @pci_clk: PCI clock rate in Hz */ + unsigned long pci_clk; }; #include diff --git a/arch/m68k/lib/bdinfo.c b/arch/m68k/lib/bdinfo.c index cf6ae5adddf..891e94bbd3f 100644 --- a/arch/m68k/lib/bdinfo.c +++ b/arch/m68k/lib/bdinfo.c @@ -22,7 +22,7 @@ int arch_setup_bdinfo(void) bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */ if (IS_ENABLED(CONFIG_PCI)) - bd->bi_pcifreq = gd->pci_clk; + bd->bi_pcifreq = gd->arch.pci_clk; #if defined(CONFIG_EXTRA_CLOCK) bd->bi_inpfreq = gd->arch.inp_clk; /* input Freq in Hz */ diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c index 6f378c4e221..aef1123a2b7 100644 --- a/arch/powerpc/cpu/mpc83xx/pci.c +++ b/arch/powerpc/cpu/mpc83xx/pci.c @@ -45,7 +45,7 @@ void ft_pci_setup(void *blob, struct bd_info *bd) do_fixup_by_path(blob, path, "bus-range", &tmp, sizeof(tmp), 1); - tmp[0] = cpu_to_be32(gd->pci_clk); + tmp[0] = cpu_to_be32(gd->arch.pci_clk); do_fixup_by_path(blob, path, "clock-frequency", &tmp, sizeof(tmp[0]), 1); } @@ -60,7 +60,7 @@ void ft_pci_setup(void *blob, struct bd_info *bd) do_fixup_by_path(blob, path, "bus-range", &tmp, sizeof(tmp), 1); - tmp[0] = cpu_to_be32(gd->pci_clk); + tmp[0] = cpu_to_be32(gd->arch.pci_clk); do_fixup_by_path(blob, path, "clock-frequency", &tmp, sizeof(tmp[0]), 1); } diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index 72464962613..0185ab50ad9 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -456,7 +456,7 @@ int get_clocks(void) #if defined(CONFIG_ARCH_MPC837X) gd->arch.sata_clk = sata_clk; #endif - gd->pci_clk = pci_sync_in; + gd->arch.pci_clk = pci_sync_in; gd->cpu_clk = gd->arch.core_clk; gd->bus_clk = gd->arch.csb_clk; return 0; diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index a9efbbdd3d4..cc2ce617350 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -87,6 +87,8 @@ struct arch_global_data { #if defined(CONFIG_LWMON5) unsigned long kbd_status; #endif + /** @pci_clk: PCI clock rate in Hz */ + unsigned long pci_clk; }; #include diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c index a29ad0d7a68..a43fff2e7ed 100644 --- a/drivers/clk/mpc83xx_clk.c +++ b/drivers/clk/mpc83xx_clk.c @@ -358,7 +358,7 @@ static int mpc83xx_clk_probe(struct udevice *dev) gd->mem_clk = priv->speed[MPC83XX_CLK_MEM]; if (mpc83xx_has_pci(type)) - gd->pci_clk = priv->speed[MPC83XX_CLK_PCI]; + gd->arch.pci_clk = priv->speed[MPC83XX_CLK_PCI]; gd->cpu_clk = priv->speed[MPC83XX_CLK_CORE]; gd->bus_clk = priv->speed[MPC83XX_CLK_CSB]; diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 19c66e1fe5d..79d2aa4c6f5 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -60,11 +60,6 @@ struct global_data { * @bus_clk: platform clock rate in Hz */ unsigned long bus_clk; - /** - * @pci_clk: PCI clock rate in Hz - */ - /* We cannot bracket this with CONFIG_PCI due to mpc5xxx */ - unsigned long pci_clk; /** * @mem_clk: memory clock rate in Hz */ From patchwork Wed Aug 21 16:18:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975008 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=PirGz4kJ; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps4L2nMnz1yXf for ; Thu, 22 Aug 2024 02:20:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8B4E888E13; Wed, 21 Aug 2024 18:19:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PirGz4kJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 833A388BFE; Wed, 21 Aug 2024 18:19:40 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 7411088C0C for ; Wed, 21 Aug 2024 18:19:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-704466b19c4so3975514a34.0 for ; Wed, 21 Aug 2024 09:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257177; x=1724861977; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n2VvIZslOyTJEYHNUNDzPUkSdUgEmdjJxFMCtKA45Gg=; b=PirGz4kJDxs0fTbWRxsTAjuDGt/xMybWMhJLtsyQ/oKD4Q1IjBU8aPxyjGfqWfmU5r 5ZxV8PCaWL8a1d5zlF+5HIZf5YYi11CE/6Hwy4j7ubwooJib0b9aBDcN0izfGyEPz2Ns D9RNBs0IuUM8MHr2nMDdGAQ80lEHZ6RX9yhxU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257177; x=1724861977; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n2VvIZslOyTJEYHNUNDzPUkSdUgEmdjJxFMCtKA45Gg=; b=khyWA4ITYC/58V7hTvSCFibYnLlwGTRBdGEo/GnWNhYWkCJsR+nyBlYeDQg/b/YOun ERnbO/elQahhf/t2Hfx/wZ7P0/34tCbuzbNXRoqImNGy4+0XCDglVyJ9vU2DG5SZq6Rj QINTVbclaoCEJ+WS+SDKu2uhnxvP69RtTBvKSl8Lt94fUOTzQHd3Vfo15npiKpaRBDfo p3TI+5VWdNxXlrnpQqgYYaWz/vJyJg6TCdiCMy9FWZXTQ6OBZMbfOm2uHwOGfeaEPaKk ubKN9sIrvACIyFbjaPU/bYXJF8XRMDnPXG/JgVY0UzfsPOdvsWus2XXM2XNmOtHKwxHM MLzw== X-Gm-Message-State: AOJu0YzjKU4nJaUkD2eGRtKq2CzLwTShpE3IfcUyCAlXYkL1m8GmDogn /SCffBKO+6mjnmOZ5u+S8xgcYkVfIgD6Ay26+dLGSkioOeznPO5F6mypD27Ad2rxbwIyePuSDE4 = X-Google-Smtp-Source: AGHT+IExtZECofIyQJaV0rthIFR8YnhnwFrmTov9MLMccUX8DcxbIf+vEGB1Ct1ZvqHNvNw05WAMwA== X-Received: by 2002:a05:6830:25c3:b0:709:3839:b7d2 with SMTP id 46e09a7af769-70df88767ebmr2441286a34.31.1724257177127; Wed, 21 Aug 2024 09:19:37 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:36 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Bin Meng Subject: [PATCH v2 02/35] x86: Drop use of global_data fb_base Date: Wed, 21 Aug 2024 10:18:54 -0600 Message-Id: <20240821161927.695717-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This value is set by not used on x86 so there is no point in setting it. Drop the assignment. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/fsp/fsp_graphics.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c index 5f7701265a9..ad25020086c 100644 --- a/arch/x86/lib/fsp/fsp_graphics.c +++ b/arch/x86/lib/fsp/fsp_graphics.c @@ -103,7 +103,6 @@ static int fsp_video_probe(struct udevice *dev) * For IGD, it seems to be always on BAR2. */ vesa->phys_base_ptr = dm_pci_read_bar32(dev, 2); - gd->fb_base = vesa->phys_base_ptr; ret = vesa_setup_video_priv(vesa, vesa->phys_base_ptr, uc_priv, plat); if (ret) From patchwork Wed Aug 21 16:18:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975009 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=JLMVGOzV; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps4Y0CD3z1yf6 for ; Thu, 22 Aug 2024 02:20:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EDC6C88BFA; Wed, 21 Aug 2024 18:19:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="JLMVGOzV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C764488E15; Wed, 21 Aug 2024 18:19:41 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 8B39988D9B for ; Wed, 21 Aug 2024 18:19:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-70943b07c2cso3863125a34.1 for ; Wed, 21 Aug 2024 09:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257178; x=1724861978; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fYxZARxVNjL917E+Z5GGoPmtN0HaCSv/gBB6KMGbd3g=; b=JLMVGOzVgOJR75vepXem1EMDXr4qDWU944YQZZnlVv3IxhDKHsLJ2B/8A8V4CVXwxB 7xIjhbMueRnSxziKyWhfWj0QZtmlLmEvrhwz56u3sQ7X8sVMAqsoAVt02ykNOE5rr7ev C22sAomrTCA9iXO7I80hRB3dCYaM9zOb8cfEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257178; x=1724861978; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fYxZARxVNjL917E+Z5GGoPmtN0HaCSv/gBB6KMGbd3g=; b=CnshS9hc8sI8cuMh/CNisMume4aUB5Fv1VCUqg4k+agVBxIXvs8Co83+fB7OHn3Cp1 Pekk1aYHEjTBx5SLJpdKTVUF7gGu+H7ezdqzDsQEWMCHcfDKsMV0n4Hiqhhv0U3bWEcv RXQnBs8vRNEpFzlXmD6Z5mmqKsYK7hiDT1ZKXfvfyw0AOmIEpkoJOkzL1Xr1HByVcXcV d0qHS76NRvDNUQez0p3t5BOkn0qeYPCqca9uYYzqeQ4jcDBsIZ8sOQorbN4KGXQesLZ6 9Ud4flcz618eonqozM5xulmRaACfNO6od7vFvymN2ECSixGRAP7e/fVCpAk1KOlizrBd q8Tw== X-Gm-Message-State: AOJu0YxxDS9y6JKIblZZD5mj1oTsJQ/4hGxs73PxqvoFCk9T3rP594In +d+tal3oS6SEEhOosO9ArBLoGbLSLgcgKaV5rqlGDjOdNdQwsc44T3eQpb+g7g63eSLER0j4BAY = X-Google-Smtp-Source: AGHT+IEF27nohzPFuGTB7N/xHQXDSVITyhoohRGxxy84QCyn2Foeghgqalho6ajFU8ll6BH5qS3ZXg== X-Received: by 2002:a05:6830:2586:b0:709:41c2:5104 with SMTP id 46e09a7af769-70df85fd28dmr2883101a34.8.1724257178261; Wed, 21 Aug 2024 09:19:38 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:38 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 03/35] video: Add a function to obtain the framebuffer address Date: Wed, 21 Aug 2024 10:18:55 -0600 Message-Id: <20240821161927.695717-4-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Add a new function which returns the framebuffer address of the first video device. This will allow the global_data field top be dropped. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/video-uclass.c | 14 ++++++++++++++ include/video.h | 11 +++++++++++ 2 files changed, 25 insertions(+) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index a5aa8dd5295..e358a7949e0 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -152,6 +152,20 @@ int video_reserve(ulong *addrp) return 0; } +ulong video_get_fb(void) +{ + struct udevice *dev; + + uclass_find_first_device(UCLASS_VIDEO, &dev); + if (dev) { + const struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev); + + return uc_plat->base; + } + + return 0; +} + int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, int yend, u32 colour) { diff --git a/include/video.h b/include/video.h index 4013a949983..606c8a37fb8 100644 --- a/include/video.h +++ b/include/video.h @@ -420,4 +420,15 @@ int bmp_info(ulong addr); */ int video_reserve_from_bloblist(struct video_handoff *ho); +/** + * video_get_fb() - Get the first framebuffer address + * + * This function does not probe video devices, so can only be used after a video + * device has been activated. + * + * Return: address of the framebuffer of the first video device found, or 0 if + * there is no device + */ +ulong video_get_fb(void); + #endif From patchwork Wed Aug 21 16:18:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975010 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=VAlHLllo; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps4m34nkz1yf6 for ; Thu, 22 Aug 2024 02:20:24 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4DBAC88E18; Wed, 21 Aug 2024 18:19:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VAlHLllo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7B1CE8811A; Wed, 21 Aug 2024 18:19:42 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) (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 70F3088BFA for ; Wed, 21 Aug 2024 18:19:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7095bfd6346so4121508a34.0 for ; Wed, 21 Aug 2024 09:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257179; x=1724861979; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ont5n+HBPeqe602t4iRpZkS4y8Zw4yWb4IY57gAjKSA=; b=VAlHLllo8NWAlYDHJtA1+h9euEjFQAd6V+uOzseXlwXMVD3V97qKikf6ruSR6XIl4W rHj96bNAknZ+P3dhFpzBKAlTpiO62csTT2iD2l8I7TPMQAeb+8JdmXtJvWHj+OgPYznW pyqiHPV7yfU1BjwaVocgsPkseH4c7OOGggjUw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257179; x=1724861979; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ont5n+HBPeqe602t4iRpZkS4y8Zw4yWb4IY57gAjKSA=; b=QUKlgRYqgGF8eGyYY8oOOd1MUb3m1NiD4Z7X/YubZ8M4Ou5i5wGQ0K979KvTGvPqF8 O4UFtvZsZqQlnF0QPro3DF0Rry+zeRf3WALxU4omw9PuhQVMpXmwvpfEvhr4LX+1SYB9 ALrl80FOe2n4349VoEYJL2w3vrmxi+nTNUyvOI4kzBOuwoSQWKStVRqtfPX/pRSPbmRN C6cmdfEtoyZykgX02vzCFdAJSOJjqeO/JKveTGp3M+dxePBTRL8PHNccJXDSyXIGAwkL 4KSLr5Hkp3mHDf7A71iBwJk35Yj0LEKKXv6+ihTmUtkg8aS+RWvfxGbd/GGFODmUA9vF ny2Q== X-Gm-Message-State: AOJu0YwoNO/SATWPmlV9MSwuMwI45qRkxzymYiZK0r4CsfcO26XPmZrH W0TxVMfD1jdAkHrq/DBwPALwob6i04Ux5NkCGzB1R3PQEzmn6Wf0AJcHmhbza0kHIh6ekvIeRJk = X-Google-Smtp-Source: AGHT+IFphYzp+fzykoM5dHHGhKBy11mWZmbOKPgegKBPVN992XW7aZCasyHgU6Gfh+nSGMhgo81Nlw== X-Received: by 2002:a05:6830:3114:b0:70c:a547:1c43 with SMTP id 46e09a7af769-70df85f9d2cmr2979870a34.9.1724257179036; Wed, 21 Aug 2024 09:19:39 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:38 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 04/35] video: mxc: Avoid setting global_data fb_base Date: Wed, 21 Aug 2024 10:18:56 -0600 Message-Id: <20240821161927.695717-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/imx/mxc_ipuv3_fb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c index 039b22086a9..fdeb3cabea7 100644 --- a/drivers/video/imx/mxc_ipuv3_fb.c +++ b/drivers/video/imx/mxc_ipuv3_fb.c @@ -403,7 +403,6 @@ static int mxcfb_map_video_memory(struct fb_info *fbi) (uint32_t) fbi->fix.smem_start, fbi->fix.smem_len); fbi->screen_size = fbi->fix.smem_len; - gd->fb_base = fbi->fix.smem_start; /* Clear the screen */ memset((char *)fbi->screen_base, 0, fbi->fix.smem_len); @@ -633,7 +632,6 @@ static int ipuv3_video_probe(struct udevice *dev) mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start, DCACHE_WRITEBACK); video_set_flush_dcache(dev, true); - gd->fb_base = fb_start; return 0; } From patchwork Wed Aug 21 16:18:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975011 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Lm0CcTAc; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps4y6HRkz1yf6 for ; Thu, 22 Aug 2024 02:20:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ACC5C88DF2; Wed, 21 Aug 2024 18:19:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Lm0CcTAc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6FAE388C05; Wed, 21 Aug 2024 18:19:43 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 51BB088E0E for ; Wed, 21 Aug 2024 18:19:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-70943b07c2cso3863154a34.1 for ; Wed, 21 Aug 2024 09:19:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257180; x=1724861980; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8EGzBI0Le1IzVi64EH75vvK2DgzCZ7GFbLLbdDXId+I=; b=Lm0CcTAcE+woxFlzgZBRy2Pmu/IUVFV10qrUl+4fiqjt4Ot+E+OO9xLN9M/9df6OFD OkJcUn5EZoMncSmKJN/5KdoBsbtTbK1hrC0Irc1IUTn4Nr4nBc96RVYRs07auzGAN/kw 5qVK1E2HEDsoQeb6w4BULcGzVddErg69eGxV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257180; x=1724861980; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8EGzBI0Le1IzVi64EH75vvK2DgzCZ7GFbLLbdDXId+I=; b=cCpzz2Q4dwpLvKy3oHovqLpsGshUpxIdE/zfSB94JgbBA+xIFeDS3ixmLVnkyJnJjx TeQ4yTAj2Gqo0teoLoky5oWDTY8dYpLEbD0vQc+ByGdhb27jzsX5pse2r/oyrJKBYAoG pFMyhX9R/ogSyJCyFR2a0Y3M4p2DELFpYF8IaYEYquQu0Ymu2tjM0xBSTAaTS2YqziZ0 8bv8SpwyhCKE4e8ZW6F2ZxVaXykhEBme7UMk4s7nSp4m8hV7tUbFOo/+UXhVM89KPA6N YinO631KikaY6d4n6rA5VWmHgpHWHwWIwZpeDbyd0CEReuJb1pUxU7c6desWhYeGlSFp 5lBg== X-Gm-Message-State: AOJu0YyNcpij4DmgCxprNI3yPnqa1pNMSOrdmQ84+MxAEB/aIhN8bnqs rBBi+5xV/Z4aHP4KC+ZAxJ3JeQW9wefN87midtpnX6Qg8879n0CawAoIEL+F2xMn/AOL4UqHNDw = X-Google-Smtp-Source: AGHT+IGSuA83W9vUJKsqX7vGQe3u0+yc0Jn2cenS+KlGjQQ2mH4omWzWcius/wmRws2hc+CCo+scag== X-Received: by 2002:a05:6830:6589:b0:703:6ab8:1fe3 with SMTP id 46e09a7af769-70df87178d4mr3179257a34.15.1724257179952; Wed, 21 Aug 2024 09:19:39 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:39 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 05/35] video: mxs: Avoid setting global_data fb_base Date: Wed, 21 Aug 2024 10:18:57 -0600 Message-Id: <20240821161927.695717-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/mxsfb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 792d6314d15..e72839cead4 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -335,7 +335,6 @@ static int mxs_video_probe(struct udevice *dev) mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start, DCACHE_WRITEBACK); video_set_flush_dcache(dev, true); - gd->fb_base = plat->base; return ret; } From patchwork Wed Aug 21 16:18:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975012 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=eb8WdeeB; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps593DwPz1yf6 for ; Thu, 22 Aug 2024 02:20:45 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 17F6388E21; Wed, 21 Aug 2024 18:19:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eb8WdeeB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 616AA88E24; Wed, 21 Aug 2024 18:19:44 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (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 5404788DF2 for ; Wed, 21 Aug 2024 18:19:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-7091558067eso3031607a34.3 for ; Wed, 21 Aug 2024 09:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257181; x=1724861981; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H15pf+CnaZS8PjkQ+VQrE1LaigVIod877FLN8S4r0Wc=; b=eb8WdeeBrN7n/TbBvZWJfJBQlw2lNhKSbMJWHxzIM1ZIyKH8kkMA+W1QS1ntkuWhml C6jMU7DqSeKmWFH0Xa83SAjG3Z6ZGS1koOKf1NL3j1uUno5ZKu0wPL+H9jF/ijKkxzjJ 149m3hFS/Ecmp7QZY5//tfB1tTSdOiTV3Kalc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257181; x=1724861981; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H15pf+CnaZS8PjkQ+VQrE1LaigVIod877FLN8S4r0Wc=; b=twsYa8mgcDXpY+lO4HlAbvy7nsXa0s7Eq02RFmHF+qcVL+CUj17z45jnf8CO3hzW5w HN8H7MlWZfnP0QtWy2pYQnBEDkNvYP0r4yTOqf5D137ptI3iJnIcJ5eWABuaBXuFsKm6 2HB7hLlqv5Hh3XGwf37++Y//ont8i7gvq6m82f6gNfnzYdnNn7vAirlN0MlNm6mFb5YO ncdGs6TnaCKKZ8d0xk4BwcFv0e7ykdEKE+DudtcXpsq8HBIgM+JxSJIYaw6k56iCJa2H Rb90n0SZXxHG/25uaspy9T4PP18weogiigAF50rxmMFZFIEzle5VRK1VhRickUhCZU1S naEw== X-Gm-Message-State: AOJu0YzQpph5YuMkTw6x6w5nFtznbq0+aJ6qF5wfzvphFxIcIQRqlTiV OJpiXJMcUSsCMQ6UacYEa7ThGu2Zpt97+urrSeTYHcpYJ1khBxMfTkyA8zofBpV97t+hijwmGSs = X-Google-Smtp-Source: AGHT+IFxI8fd6BZOU0NHF4ZS+GQ8hDuxKUo3lVJPH7ZuWOySWCgFhOlyqyh3SIroF16oWBhnHyW9gg== X-Received: by 2002:a05:6830:4184:b0:709:419f:2ae7 with SMTP id 46e09a7af769-70df8a951f7mr3428733a34.29.1724257180672; Wed, 21 Aug 2024 09:19:40 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:40 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 06/35] arm: friendlyarm: Avoid accessing global_data fb_base Date: Wed, 21 Aug 2024 10:18:58 -0600 Message-Id: <20240821161927.695717-7-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Use the new video function to get the framebuffer base. Signed-off-by: Simon Glass --- (no changes since v1) board/friendlyarm/nanopi2/board.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c index c8cbc5a15fa..b32dfc6b570 100644 --- a/board/friendlyarm/nanopi2/board.c +++ b/board/friendlyarm/nanopi2/board.c @@ -11,6 +11,7 @@ #ifdef CONFIG_PWM_NX #include #endif +#include #include #include @@ -492,12 +493,8 @@ int splash_screen_prepare(void) ARRAY_SIZE(splash_locations)); } - if (!err) { - char addr[64]; - - sprintf(addr, "0x%lx", gd->fb_base); - env_set("fb_addr", addr); - } + if (!err) + env_set_hex("fb_addr", video_get_fb()); return err; } From patchwork Wed Aug 21 16:18:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975013 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Pxxfms1D; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps5N69TDz1yf6 for ; Thu, 22 Aug 2024 02:20:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7547088E29; Wed, 21 Aug 2024 18:19:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Pxxfms1D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C28588E26; Wed, 21 Aug 2024 18:19: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (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 28D8F88E15 for ; Wed, 21 Aug 2024 18:19:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-7093abb12edso4954973a34.3 for ; Wed, 21 Aug 2024 09:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257182; x=1724861982; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wkP7Rr3nA8ezPy4hzL1j0FjYB9NDtHaobG/Q533spNc=; b=Pxxfms1D/vLma9d9Jk5Hn89ALNKfKRYlvA+fc0O7f7vltMpMTxkl09j9/KnVgxIVu3 SSD9DszQ2GrdD+Kp100+E7dFp2CA1w2XaGkd1A7LZuODmm83u/qAYy9ypFWy0J4E4JWP mMVAIf6Z2jwxEDbfYTgZdjmq1JqxsbbvM7qME= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257182; x=1724861982; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wkP7Rr3nA8ezPy4hzL1j0FjYB9NDtHaobG/Q533spNc=; b=B353uBzjwjWRVHmx0F9TnwnmQGKrYtpRYJK+h8FWkjwmIwQQvxta6S9zMXnUKOvJQF FADqNbzoQL3dr8b8L6ko3rcBmpMVnhIuHoNv1/wHg1hf1KSFzTvKWRhh/PQtUBlvVbli OCpPuwSixFyokaatGXxOdAI77l/r8/OGBzDU5CA/JpCVAhRtxi/TVkyuSchjMowMKiMp 872ZrYrbndLTrlAlxV4dyzS6dD0Jlk+7XRA1M1FTbQEVvjMTAfh/65rytT66zcIDIcUg fX3++fHHNrKZwFZ74SqLxKy+loI9s2R3loilW3hf6MMC6sErrKA+FMq8z4W4BvDSp0KN 9UwQ== X-Gm-Message-State: AOJu0YyIi2yTMlMfh229w+B0L5P8yt3oFpIt8xL5x1hKM9Zy7huMX9vb 3HdIb4pLu0wYWFKCap0qMz6CajBEHyhbcXrPGEkM4KWDvqNML4yCF4s8pnW10+lyrMOs4ltOgYQ = X-Google-Smtp-Source: AGHT+IHoe2/NuLiv4abCHAsTBnxk4XpZLDXMOqHI/1EYqDFQEtovzPc+l5o/PT0Dr6NNpX8UZ56zog== X-Received: by 2002:a05:6830:368b:b0:703:5d5c:3439 with SMTP id 46e09a7af769-70df884bfaemr3437700a34.23.1724257181754; Wed, 21 Aug 2024 09:19:41 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:41 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 07/35] arm: ronetix: Avoid accessing global_data fb_base Date: Wed, 21 Aug 2024 10:18:59 -0600 Message-Id: <20240821161927.695717-8-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Use the new video function to get the framebuffer base. Signed-off-by: Simon Glass --- (no changes since v1) board/ronetix/pm9263/pm9263.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c index 1de1bd68701..8125f064cf1 100644 --- a/board/ronetix/pm9263/pm9263.c +++ b/board/ronetix/pm9263/pm9263.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -110,11 +111,12 @@ int dram_init_banksize(void) #ifdef CONFIG_DISPLAY_BOARDINFO int checkboard (void) { + ulong fb_base = video_get_fb(); char *ss; printf ("Board : Ronetix PM9263\n"); - switch (gd->fb_base) { + switch (fb_base) { case PHYS_PSRAM: ss = "(PSRAM)"; break; @@ -127,7 +129,7 @@ int checkboard (void) ss = ""; break; } - printf("Video memory : 0x%08lX %s\n", gd->fb_base, ss ); + printf("Video memory : 0x%08lX %s\n", fb_base, ss); printf ("\n"); return 0; From patchwork Wed Aug 21 16:19:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975014 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=IzFFi/f8; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps5b5Hqpz1yf6 for ; Thu, 22 Aug 2024 02:21:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D6F6288E1E; Wed, 21 Aug 2024 18:19:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IzFFi/f8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 17C5188E20; Wed, 21 Aug 2024 18:19:47 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) (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 097C688E1B for ; Wed, 21 Aug 2024 18:19:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-26ff21d82e4so3643652fac.2 for ; Wed, 21 Aug 2024 09:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257182; x=1724861982; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9YyY5JYjIB5ceFMr/xDwv4fIw4GEHyA6IKge5FER4Tc=; b=IzFFi/f8VtpJdR5ItIniPhgKrFwEIhYMTLe/w6fSr2IxlbKFEKDDpmPlyqpGHQixq5 UiWow1XY1aFUpUtnG0K/kn64RkTTW8ovbGcyLP1Akz+0RNKV1suX96CvLOl6hv/BPWdo M1wPSLTEvuUo0kwh0BK0zFMLzozTuUBk2o0Io= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257182; x=1724861982; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9YyY5JYjIB5ceFMr/xDwv4fIw4GEHyA6IKge5FER4Tc=; b=eA3g+wVn12FCZL8Ff3YXSZW1wPAVVAEubsAmFqubyJpTzUtnqRmVvZGoaIS+dLOnhI L/HAbUO98+Q2D0+PtoiuDsnr6lXXTwDGwt9gg0HmrIZkfEwH6gLD61a1pKo1VhKbITJM oAWoLU+uBcCBovFGvhPCdsMJE+WfSYTbGmJRNwzGHYuAiTXsE4tz4Us6CO0ENUtxWUmi WGISVrFyKM5YoEssl2UUftHRJafRP+tDG0HThlHNoavKkxpb+Kedk5yXK4NCBAR9Idr6 ZdNJczJ/cF8hu2u4zXkJvN2cCO8YSFM1w7k83Hyyh/ImnnjOD2ZUpZ6g6K54eh1OTNd0 BTRg== X-Gm-Message-State: AOJu0YzeyXMUT3Hs4Y8Q3BmuZXzbFGx0vwfYMiAxDm1HXcEkUEiJJA9r PkeNnxeLZwbzCb5eUJIvDfAuZpO08blbvQcMt4H99lv22hZCFUT/ZxLXNmInTw1FkexTG/5dOFE = X-Google-Smtp-Source: AGHT+IEUAupLSgKmimlNzYQIgCEUhvARzjMVNAL8kO1dH4akS0OSqNUl8l2Lh3RkMQDICyliOS6u1A== X-Received: by 2002:a05:6871:5223:b0:270:1498:6a36 with SMTP id 586e51a60fabf-2737ef54d6dmr3221457fac.29.1724257182578; Wed, 21 Aug 2024 09:19:42 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:42 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 08/35] zynqmp: Avoid setting the framebuffer address Date: Wed, 21 Aug 2024 10:19:00 -0600 Message-Id: <20240821161927.695717-9-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This is handled by driver model so this driver should not be setting the framebuffer address. Drop the assignment. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/zynqmp/zynqmp_dpsub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/zynqmp/zynqmp_dpsub.c b/drivers/video/zynqmp/zynqmp_dpsub.c index 1405b29cb8b..76abfeac443 100644 --- a/drivers/video/zynqmp/zynqmp_dpsub.c +++ b/drivers/video/zynqmp/zynqmp_dpsub.c @@ -49,7 +49,7 @@ static void dma_init_video_descriptor(struct udevice *dev) DPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT) | (upper_32_bits((u64)&cur_desc))); cur_desc.next_desr = lower_32_bits((u64)&cur_desc); - cur_desc.src_addr = lower_32_bits((u64)gd->fb_base); + cur_desc.src_addr = lower_32_bits((u64)video_get_fb()); } static void dma_set_descriptor_address(struct udevice *dev) @@ -2134,7 +2134,6 @@ static int zynqmp_dpsub_probe(struct udevice *dev) dev_dbg(dev, "BPP in bits %d, bpix %d\n", priv->non_live_graphics->bpp, uc_priv->bpix); - uc_priv->fb = (void *)gd->fb_base; uc_priv->xsize = vidc_video_timing_modes[priv->video_mode].video_timing.h_active; uc_priv->ysize = vidc_video_timing_modes[priv->video_mode].video_timing.v_active; /* Calculated by core but need it for my own setup */ From patchwork Wed Aug 21 16:19:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975015 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=AZgPbgbo; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps5n5zqCz1yf6 for ; Thu, 22 Aug 2024 02:21:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 463AA88E2B; Wed, 21 Aug 2024 18:19:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="AZgPbgbo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA48388E2A; Wed, 21 Aug 2024 18:19:47 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (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 211C088BF9 for ; Wed, 21 Aug 2024 18:19:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-70cb1b959a6so2683291a34.3 for ; Wed, 21 Aug 2024 09:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257184; x=1724861984; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VpzfZyiejuKVQDqSAJWSodsjwxF4NtJljc4OffauubI=; b=AZgPbgbofU1chvsd29WHG9VWo0ij12svKpK1j4ljdN55PI29HtAENO27jFWGpJ+YRi AMyv6cbDmKHrC25RIAjUngD6bAZQlS3Htni7TjcWkchzM507nc1XrmfKBj2K5PZXjdwR Zmyx06DUQ8ITfBSBjDFoW7QFGPNekvKK5RfNQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257184; x=1724861984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VpzfZyiejuKVQDqSAJWSodsjwxF4NtJljc4OffauubI=; b=jx3lNIwIGodvGbdJaN91WEgNzUtOcOaFcy/lHARLZw292OFvI0+ITt0e10yMll5kLr 0IeDKaJUXj1Oat8ilaIZiVwZW4Fd72gP5XWwhG1ZOsHhEw6Cap1dt2rsZe4a2InNphMC HTn+W+Bj9L4ZQgWtiiAQqk1yY9Vu7RIa79sMglseAe72Ji6wl8cNwF0uc1r/oqre1j1p E2l/swpexDkCFDkPYS5FxurV7MsS5YAmPxa8rZXJE+7jN8NQztKLAdj3RfKOWmpS1pcL znQUJNgGMGoDRKCpYnUfV3utibLla/OnCAUV4hbMLkCzwSMh3sdpe+6IIilShbzu+Ztr rXdw== X-Gm-Message-State: AOJu0YxEeHi26GDG5MF+JJ8LAxy6i2yDDWVD2joOBGFCMrhfnXQ+yYoy MOWkTc16tnEkj+ekWenAVQRwSSJwcuFCKjSx0NsB0KmBbQ4vrbfSvV5ndj4flrmJp7QK37ecn/I = X-Google-Smtp-Source: AGHT+IGm3t318OELXMlQ/VkWinZk7UDvvWN6onlDZq8PEBasFQLn1oyS74TjK289xJUUBHf5RbohNQ== X-Received: by 2002:a05:6830:2708:b0:709:420f:3c68 with SMTP id 46e09a7af769-70df8714f46mr3005791a34.13.1724257183734; Wed, 21 Aug 2024 09:19:43 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:43 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 09/35] video: Avoid setting global_data fb_base from SPL handoff Date: Wed, 21 Aug 2024 10:19:01 -0600 Message-Id: <20240821161927.695717-10-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This field is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/video-uclass.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index e358a7949e0..ef780a6730c 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -224,7 +224,6 @@ int video_reserve_from_bloblist(struct video_handoff *ho) return -ENOENT; gd->video_bottom = ho->fb; - gd->fb_base = ho->fb; gd->video_top = ho->fb + ho->size; debug("%s: Reserving %lx bytes at %08x as per bloblist received\n", __func__, (unsigned long)ho->size, (u32)ho->fb); From patchwork Wed Aug 21 16:19:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975016 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=JuFlyNm+; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps5z5t9Gz1yf6 for ; Thu, 22 Aug 2024 02:21:27 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A446F88E31; Wed, 21 Aug 2024 18:19:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="JuFlyNm+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1664488E0E; Wed, 21 Aug 2024 18:19: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 E5C9488E12 for ; Wed, 21 Aug 2024 18:19:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-70942ebcc29so4690962a34.0 for ; Wed, 21 Aug 2024 09:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257184; x=1724861984; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HU5C7LW9WPP7cRcw1w2kOE4Zybh8O+6F1PGi99Gy5co=; b=JuFlyNm+3qlx7XklJF5c/ef71JuHDQJiPDytG6IwuQBXlgrJY+tGYPdtIn5AlTjkUE EgSXOXpxNRm0s3OGm3GSuZ3ftFha2tbqV7jbT2xBGwM8U1mnFr/YcZ+SNOz+4xPx4ql+ r7stVz42FdcK1CIQuESZpjjmGm4HaRVjGUEWc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257184; x=1724861984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HU5C7LW9WPP7cRcw1w2kOE4Zybh8O+6F1PGi99Gy5co=; b=ndl7N1qrIAevKuayK2cn5pTTJLqsG7e0beyjHo+yxOoj/00mgepewcmgJJ0u812Qy1 EVlCBe3geCpQk9psMtvN7cGvGdXjE5t96pXvYPgr05QEoGBvCkukfCgkiwbypdwKBsvv nC44Qd+CU8l65tYghNngpTJSiFS2NzGQ5/MOCAleRgaF2cnTwN1BTSQPsgEZ9gmHUD0Y +MJLaV/plIAHimVfxD0ZvLDRKvQfua9fM6nA6vpolAQgzg6tBNsspir74iVT6XkdEwJq UPrejK57NIe26egZSA901GyCn7xOI70Ti1DuX8sMJE+nAYdZQiSEh8YcPywqYS4A/l14 zRnQ== X-Gm-Message-State: AOJu0Yygl/yELJLf/0/I6eQgNtMIKbOHtaiQnGHD82E5LBSS84EE4bdc P0R2xeIUyDEmMLe4g+csEhbNIcmCBBkZZDsAHu6rcvTPguH9n05kJhgnBGPSGaH3cP5Bga6pLwM = X-Google-Smtp-Source: AGHT+IGyJZtkX+U3s60qyEUyS/1K1XVT6gNsg0Q5FvQ+UOi2ly52l+6VphcahwH3hoDWsKzB38rwKA== X-Received: by 2002:a05:6830:448a:b0:709:2721:ad44 with SMTP id 46e09a7af769-70df87095bdmr2583641a34.12.1724257184666; Wed, 21 Aug 2024 09:19:44 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:44 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 10/35] video: Avoid setting global_data fb_base in video setup Date: Wed, 21 Aug 2024 10:19:02 -0600 Message-Id: <20240821161927.695717-11-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This field is not used, so don't set it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/video-uclass.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index ef780a6730c..41bb7647fda 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -145,7 +145,6 @@ int video_reserve(ulong *addrp) *addrp -= CONFIG_VAL(VIDEO_PCI_DEFAULT_FB_SIZE); gd->video_bottom = *addrp; - gd->fb_base = *addrp; debug("Video frame buffers from %lx to %lx\n", gd->video_bottom, gd->video_top); From patchwork Wed Aug 21 16:19:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975017 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=dxYjonDc; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps6B3PDmz1yf6 for ; Thu, 22 Aug 2024 02:21:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1315B88E35; Wed, 21 Aug 2024 18:19:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dxYjonDc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E1C3788E0F; Wed, 21 Aug 2024 18:19: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 C3D0488E1C for ; Wed, 21 Aug 2024 18:19:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-70cb1b959a6so2683308a34.3 for ; Wed, 21 Aug 2024 09:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257185; x=1724861985; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jr4V6ILtn7eg2t4690GoGHcZUvgGrgo9Y0h80vEcLbk=; b=dxYjonDcv2dPVH+nUjSUbBGfuIE5Kw+RxGgu3ML3hbdIz3uRRPcZ2JIEN1TLAXXYHa zRuBy0uw6ofEYXnF8lTb4SQtNiEFq8j3T0TVubnchI3TUhV7eIk9FLtVAGsCuV22AkBB mJv2Vmck/stanV6UGlgnv3Brg7qPg2l0Z4En4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257185; x=1724861985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jr4V6ILtn7eg2t4690GoGHcZUvgGrgo9Y0h80vEcLbk=; b=qmzlajRcComrhlCkCvf62uaHt/+UcYaCfwjVV7QLx4kZXz1mIRF1tScG+pkixhtdJ8 jTGIXISFgwkdbsEVKvky1Z7+Npr0N4CFc/056NWxch4qEbQIwy2Xjt9eoBbMYcADVVfd UdQ7Dwx44EW1bBO7Lg1u9YbL0qrkJzXDvOejVNjjP6M1kn9EiAp9ID1OkF4grLRlOY1k EDEHpEwAZEGELC4RHJrbNVNfmItBAvrlANqaW6XtHE2EIxbZEJIRt0A5kdkrtZp4HkvU WTVJGWrVCYZWwEGEZcsyUEEIArQpTC6OkwbgDCWF0U/lwN6ZaHYwF0Tek+9pHpCFdvpi Xx6w== X-Gm-Message-State: AOJu0YyuA2zG0HlqALax6dhoDi4A4HnpJmCNtulQuT60WmYcxBCRkY6w iPJFuiNmFs8he3XbviuZOHslg/GJvV/YWiOW5Rl8BEKyyqei4J5a+5ljhivht6JkY/wwaHCCKRY = X-Google-Smtp-Source: AGHT+IFrmRGAbpCxSokqb15QFoXEVOcd9TMEyDtkY1MB9zLP7o2q/fa0HUSBPZ0d9P+RQNTCHxVOeA== X-Received: by 2002:a05:6830:4129:b0:709:483e:7033 with SMTP id 46e09a7af769-70df85f01b5mr3348309a34.3.1724257185453; Wed, 21 Aug 2024 09:19:45 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:45 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 11/35] global_data: Drop fb_base Date: Wed, 21 Aug 2024 10:19:03 -0600 Message-Id: <20240821161927.695717-12-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This value mirrors information recorded by driver model video drivers, so can be removed to save space. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 79d2aa4c6f5..a06b508bebb 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -64,12 +64,6 @@ struct global_data { * @mem_clk: memory clock rate in Hz */ unsigned long mem_clk; -#if CONFIG_IS_ENABLED(VIDEO) - /** - * @fb_base: base address of frame buffer memory - */ - unsigned long fb_base; -#endif #if defined(CONFIG_POST) /** * @post_log_word: active POST tests From patchwork Wed Aug 21 16:19:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975018 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=IKcrGKtY; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps6N6mZBz1yf6 for ; Thu, 22 Aug 2024 02:21:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 72E2588E42; Wed, 21 Aug 2024 18:19:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IKcrGKtY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 087E888E2B; Wed, 21 Aug 2024 18:19:50 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 BB6E088E15 for ; Wed, 21 Aug 2024 18:19:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-70940c9657dso3247424a34.1 for ; Wed, 21 Aug 2024 09:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257186; x=1724861986; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JUWyJ+oXoyA79PSBiCooKTspE2Wlm7y904C6v8cB720=; b=IKcrGKtYzlowgoTrD9+zcaLj+lu8PYgJEyrUhA+4CC+UZvf5HEUfYBbIpp8LBmW2rQ qd9HfWnr1q5TjrhwHy4Q7UQp0BXhjCGjvXgcXJpOPZJ7GiKkj+qfrHKb35Qd+Z0pxMZf Gr0pdRMreGxbUBoRVnCAQKBxMWdVoR2Q0BS2Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257186; x=1724861986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JUWyJ+oXoyA79PSBiCooKTspE2Wlm7y904C6v8cB720=; b=Og4bTsvUv19tVIIdXqTaEjVr3yecnHcE2zYXHuihyRjrpHXYtBqo2Zm/FnIQOUNuvu tHACMfToc075yuz3o1CZXi3pKPhClVmQSeZ0l3xCajD5j3F0YUw/KkXWm3RdsVCFf3zf 0XJbHrXcaujyywU9qsfwQDmmPxRDmFFNpA9l9Gdm2K3dQF/7stVhWl9HA/NMM9Mp+Igb FkFaAxOIDKI/R2yvHoVgauquQNZdzE3mS9iraUTWlpz1ATkK9j4s34EWOCkpmc6s9ZaA /RqY8XMVY9gj4uUxwmD8CJGdBxPrr4rhpazBy8/C2Mza8s17QovaULKDh3ikPLTsGAg4 9coA== X-Gm-Message-State: AOJu0YzKvkPPrmpNiop7zFH2c0rISc6ncreHlllVUiw52oq70Iw739c2 WNxs4wUCk6dBRbVFD6b5NU/K9f/nDe+fNWvXcsN51HiD9/OCTphbY91+qYAslnIgEd4VD8U6Yb0 = X-Google-Smtp-Source: AGHT+IE7ZBoHI5UTsG88jQajmz/qPX2VTApoi0fEfrmlxhVKoyKA9B4sX8z2KJTkV5FPFmtaDvnrfQ== X-Received: by 2002:a05:6830:3490:b0:703:79c6:a9ba with SMTP id 46e09a7af769-70df85f4b75mr3008876a34.7.1724257186261; Wed, 21 Aug 2024 09:19:46 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:45 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 12/35] global_data: Convert have_console into a flag Date: Wed, 21 Aug 2024 10:19:04 -0600 Message-Id: <20240821161927.695717-13-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean We don't need a full word for this boolean value. Convert it into a flag to save space in global_data. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 2 +- arch/arm/mach-exynos/spl_boot.c | 2 +- arch/arm/mach-k3/common.c | 2 +- arch/arm/mach-k3/r5/sysfw-loader.c | 2 +- board/siemens/common/board_am335x.c | 2 +- common/board_f.c | 2 +- common/console.c | 14 +++++++------- common/spl/spl.c | 2 +- include/asm-generic/global_data.h | 17 +++++++---------- 9 files changed, 21 insertions(+), 24 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index 76a69d7f958..dd748328293 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -117,7 +117,7 @@ static void mxs_spl_console_init(void) gd->bd = &bdata; gd->baudrate = CONFIG_BAUDRATE; serial_init(); - gd->have_console = 1; + gd->flags |= GD_FLG_HAVE_CONSOLE; #endif } diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c index bd5a06447b9..219d7fbf957 100644 --- a/arch/arm/mach-exynos/spl_boot.c +++ b/arch/arm/mach-exynos/spl_boot.c @@ -312,7 +312,7 @@ static void setup_global_data(gd_t *gdp) memzero((void *)gd, sizeof(gd_t)); gd->flags |= GD_FLG_RELOC; gd->baudrate = CONFIG_BAUDRATE; - gd->have_console = 1; + gd->flags |= GD_FLG_HAVE_CONSOLE; } void board_init_f(unsigned long bootflag) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index eaa7d361767..df48ec8d479 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -104,7 +104,7 @@ int early_console_init(void) gd->cur_serial_dev = dev; gd->flags |= GD_FLG_SERIAL_READY; - gd->have_console = 1; + gd->flags |= GD_FLG_HAVE_CONSOLE; return 0; } diff --git a/arch/arm/mach-k3/r5/sysfw-loader.c b/arch/arm/mach-k3/r5/sysfw-loader.c index 94d051ba0fb..188731e673d 100644 --- a/arch/arm/mach-k3/r5/sysfw-loader.c +++ b/arch/arm/mach-k3/r5/sysfw-loader.c @@ -451,7 +451,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw, * the case when continuing to boot serially from the same * UART that the ROM loaded the initial bootloader from. */ - if (!gd->have_console) + if (!(gd->flags & GD_FLG_HAVE_CONSOLE)) early_console_init(); #endif ret = spl_ymodem_load_image(&spl_image, &bootdev); diff --git a/board/siemens/common/board_am335x.c b/board/siemens/common/board_am335x.c index 2a727606bc3..e6537b0675a 100644 --- a/board/siemens/common/board_am335x.c +++ b/board/siemens/common/board_am335x.c @@ -36,7 +36,7 @@ void set_mux_conf_regs(void) /* enable early the console */ gd->baudrate = CONFIG_BAUDRATE; serial_init(); - gd->have_console = 1; + gd->flags |= GD_FLG_HAVE_CONSOLE; siemens_ee_setup(); if (draco_read_eeprom() < 0) diff --git a/common/board_f.c b/common/board_f.c index 454426d921c..a1f8641ae26 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1022,7 +1022,7 @@ static const init_fnc_t init_sequence_f[] = { void board_init_f(ulong boot_flags) { gd->flags = boot_flags; - gd->have_console = 0; + gd->flags &= ~GD_FLG_HAVE_CONSOLE; if (initcall_run_list(init_sequence_f)) hang(); diff --git a/common/console.c b/common/console.c index 63f78004fdb..30ddefef6b1 100644 --- a/common/console.c +++ b/common/console.c @@ -586,7 +586,7 @@ int getchar(void) if (IS_ENABLED(CONFIG_DISABLE_CONSOLE) && (gd->flags & GD_FLG_DISABLE_CONSOLE)) return 0; - if (!gd->have_console) + if (!(gd->flags & GD_FLG_HAVE_CONSOLE)) return 0; ch = console_record_getc(); @@ -607,7 +607,7 @@ int tstc(void) if (IS_ENABLED(CONFIG_DISABLE_CONSOLE) && (gd->flags & GD_FLG_DISABLE_CONSOLE)) return 0; - if (!gd->have_console) + if (!(gd->flags & GD_FLG_HAVE_CONSOLE)) return 0; if (console_record_tstc()) @@ -715,7 +715,7 @@ void putc(const char c) if (IS_ENABLED(CONFIG_DISABLE_CONSOLE) && (gd->flags & GD_FLG_DISABLE_CONSOLE)) return; - if (!gd->have_console) + if (!(gd->flags & GD_FLG_HAVE_CONSOLE)) return pre_console_putc(c); if (gd->flags & GD_FLG_DEVINIT) { @@ -759,7 +759,7 @@ void puts(const char *s) if (IS_ENABLED(CONFIG_DISABLE_CONSOLE) && (gd->flags & GD_FLG_DISABLE_CONSOLE)) return; - if (!gd->have_console) + if (!(gd->flags & GD_FLG_HAVE_CONSOLE)) return pre_console_puts(s); if (gd->flags & GD_FLG_DEVINIT) { @@ -793,7 +793,7 @@ void flush(void) if (IS_ENABLED(CONFIG_DISABLE_CONSOLE) && (gd->flags & GD_FLG_DISABLE_CONSOLE)) return; - if (!gd->have_console) + if (!(gd->flags & GD_FLG_HAVE_CONSOLE)) return; if (gd->flags & GD_FLG_DEVINIT) { @@ -872,7 +872,7 @@ static int ctrlc_disabled = 0; /* see disable_ctrl() */ static int ctrlc_was_pressed = 0; int ctrlc(void) { - if (!ctrlc_disabled && gd->have_console) { + if (!ctrlc_disabled && (gd->flags & GD_FLG_HAVE_CONSOLE)) { if (tstc()) { switch (getchar()) { case 0x03: /* ^C - Control C */ @@ -1011,7 +1011,7 @@ int console_announce_r(void) /* Called before relocation - use serial functions */ int console_init_f(void) { - gd->have_console = 1; + gd->flags |= GD_FLG_HAVE_CONSOLE; console_update_silent(); diff --git a/common/spl/spl.c b/common/spl/spl.c index d6a364de6ee..651b434f615 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -840,7 +840,7 @@ void preloader_console_init(void) serial_init(); /* serial communications setup */ - gd->have_console = 1; + gd->flags |= GD_FLG_HAVE_CONSOLE; #if CONFIG_IS_ENABLED(BANNER_PRINT) puts("\nU-Boot " SPL_TPL_NAME " " PLAIN_VERSION " (" U_BOOT_DATE " - " diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index a06b508bebb..0e276c5dece 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -93,15 +93,6 @@ struct global_data { */ unsigned long board_type; #endif - /** - * @have_console: console is available - * - * A value of 1 indicates that serial_init() was called and a console - * is available. - * A value of 0 indicates that console input and output drivers shall - * not be called. - */ - unsigned long have_console; #if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) /** * @precon_buf_idx: pre-console buffer index @@ -220,7 +211,7 @@ struct global_data { #endif #ifdef CONFIG_TIMER /** - * @timer: timer instance for Driver Model +s * @timer: timer instance for Driver Model */ struct udevice *timer; #endif @@ -709,6 +700,12 @@ enum gd_flags { * @GD_FLG_UPL: Read/write a Universal Payload (UPL) handoff */ GD_FLG_UPL = 0x4000000, + /** + * @GD_FLG_HAVE_CONSOLE: serial_init() was called and a console + * is available. When not set, indicates that console input and output + * drivers shall not be called. + */ + GD_FLG_HAVE_CONSOLE = 0x8000000, }; #endif /* __ASSEMBLY__ */ From patchwork Wed Aug 21 16:19:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975019 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=dFprjd0+; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps6b5VYbz1yf6 for ; Thu, 22 Aug 2024 02:21:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CD64588E39; Wed, 21 Aug 2024 18:19:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dFprjd0+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B103C88E34; Wed, 21 Aug 2024 18:19:50 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (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 949F488E0E for ; Wed, 21 Aug 2024 18:19:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-70968db52d0so6964991a34.3 for ; Wed, 21 Aug 2024 09:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257187; x=1724861987; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mAFY6rrl0ebeYcHUMBB9c7si/T0IAblqWs8Qz5P3+ZQ=; b=dFprjd0+Ncc8UI24Jw3wcNpAXDuKX0osKKFGi3qA60EwlfQiUBqVuBXvgweUccwmzV YvyGoG0c38y4BJ48s1hKLF3LcR2XZHjh5j02Bp19bp30UYuZnEkfPEfZ8TJg7o3R7DVG wKd94im8jOSDMp2zOWOpZsWARk4qlfAaBqh+U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257187; x=1724861987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mAFY6rrl0ebeYcHUMBB9c7si/T0IAblqWs8Qz5P3+ZQ=; b=tggmWhKrzcGi/WSptq1r0v4hneOBI2iRH6fXt3jP19Mntt8rkBUJ3QJLgh3T8VDgoE tPGfgXKF9Pku1GYMwWGQNNajcx/qyIxT0A1UDMKuNOgG7KnxrcMitD2hv0vglvfs3XJx OcA18NpRBZDSeyZg2gXpVAIYNWRUYB9CgX6B8orazEHsfZ6xKtJPhUEo1CoxiquXfN7q gDzgBQ5WdvbDA5QmOALai0ZsiM/ATZH1+KDlmzfi1+U0ZnAq49HdcBZadLIsYcWxnkek 7rvwoQZCUogpMspo50DLS2cAFtkFlD8Dy1B14XsemuwyLB8CLa+jvJCsY7T+Z3u4jt6O ErEA== X-Gm-Message-State: AOJu0YxHOno8dFhmhAVZlv6JZd7Pcqs913BXQpS7LLh3mxqex5XoySd8 rCRXRPMqUXq51h3XOL14FpEWgrKi/it0X+etBq9/z74SfIytNeJVRa+pfhg2as9Yqp16rb+iidM = X-Google-Smtp-Source: AGHT+IH4I3aT+wM3JMxtOdj5MKgduZxgxGhDtGIUvauV4rFXdTROwEUpzlbRMACK/gfQbKRh5BIGhA== X-Received: by 2002:a05:6830:6517:b0:70a:948c:6b3f with SMTP id 46e09a7af769-70df870b7b6mr3803731a34.12.1724257187267; Wed, 21 Aug 2024 09:19:47 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:46 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 13/35] global_data: Remove pci_ram_top Date: Wed, 21 Aug 2024 10:19:05 -0600 Message-Id: <20240821161927.695717-14-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This field is set but not used. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-tegra/board2.c | 4 ---- arch/arm/mach-tegra/cboot.c | 4 ---- arch/x86/cpu/i386/cpu.c | 8 -------- include/asm-generic/global_data.h | 10 ---------- 4 files changed, 26 deletions(-) diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 479137e457c..7971e3b68d5 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -423,10 +423,6 @@ int dram_init_banksize(void) gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = usable_ram_size_below_4g(); -#ifdef CONFIG_PCI - gd->pci_ram_top = gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size; -#endif - #ifdef CONFIG_PHYS_64BIT if (gd->ram_size > SZ_2G) { gd->bd->bi_dram[1].start = 0x100000000; diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c index c12543d71ac..e2342b2aece 100644 --- a/arch/arm/mach-tegra/cboot.c +++ b/arch/arm/mach-tegra/cboot.c @@ -189,10 +189,6 @@ int cboot_dram_init_banksize(void) gd->bd->bi_dram[i].size = tegra_mem_map[1 + i].size; } -#ifdef CONFIG_PCI - gd->pci_ram_top = ram_top; -#endif - return 0; } diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index db2727d7485..934e98ac582 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -412,12 +412,6 @@ int cpu_phys_address_size(void) return 32; } -/* Don't allow PCI region 3 to use memory in the 2-4GB memory hole */ -static void setup_pci_ram_top(void) -{ - gd_set_pci_ram_top(0x80000000U); -} - static void setup_mtrr(void) { u64 mtrr_cap; @@ -469,7 +463,6 @@ int x86_cpu_init_f(void) setup_cpu_features(); setup_identity(); setup_mtrr(); - setup_pci_ram_top(); /* Set up the i8254 timer if required */ if (IS_ENABLED(CONFIG_I8254_TIMER)) @@ -483,7 +476,6 @@ int x86_cpu_reinit_f(void) long addr; setup_identity(); - setup_pci_ram_top(); addr = locate_coreboot_table(); if (addr >= 0) { gd->arch.coreboot_table = addr; diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 0e276c5dece..1db1fb651db 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -303,10 +303,6 @@ s * @timer: timer instance for Driver Model * @hose: PCI hose for early use */ struct pci_controller *hose; - /** - * @pci_ram_top: top of region accessible to PCI - */ - phys_addr_t pci_ram_top; #endif #ifdef CONFIG_PCI_BOOTDELAY /** @@ -565,12 +561,6 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_set_malloc_start(val) #endif -#if CONFIG_IS_ENABLED(PCI) -#define gd_set_pci_ram_top(val) gd->pci_ram_top = val -#else -#define gd_set_pci_ram_top(val) -#endif - #if CONFIG_VAL(SYS_MALLOC_F_LEN) #define gd_malloc_ptr() gd->malloc_ptr #else From patchwork Wed Aug 21 16:19:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975020 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=IKt9VocI; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps6p1sydz1yf6 for ; Thu, 22 Aug 2024 02:22:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 39C8E88E4F; Wed, 21 Aug 2024 18:19:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IKt9VocI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 93D0A88E3E; Wed, 21 Aug 2024 18:19: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 83F7888E12 for ; Wed, 21 Aug 2024 18:19:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-704466b19c4so3975678a34.0 for ; Wed, 21 Aug 2024 09:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257188; x=1724861988; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1C1QWOt7Nc53x9hAhObUKMQH5WvPcUpeST/povX4Lvo=; b=IKt9VocIVsfzps8KaE/EbJUPxaKqPnkJsgkBKyF8ymnb41V6KcpH75CllNY1Wfxdto bKcuQPRLiDVOnhH4WcCcAero0p7ljo3dVifRP2KtD5wYUdBPHyn/qg8jsGYE52EGjwrR YkGbQ8oGPi0a+Qbn3L+VXfu2Buu1GqOAJlZ5E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257188; x=1724861988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1C1QWOt7Nc53x9hAhObUKMQH5WvPcUpeST/povX4Lvo=; b=Odr4Br6nct1x1PvCJ0SCLOBgf2dwKK3rpxV4VS+FghwlI4x+a+gfMsKEteFajmOgnK 8uiX6UZJ1obVRgFdAVVb6448nQVTupmMeRrh0xiYBxY0HRk1k67CIP34mOF0NPOWge5O oaV33am2MCsCbqCcXiylr5BUVxzb2/xUGUFpG4+uw52zLwIHmOfrTG1eU1HGxbMMtZvH olIbmdTcaDKviJBZdxgbrnTeg4vNBuYEOFThf3JzM4pwQDUUiftEflpNVp4K430gYlnL snLb1SJooNMXlBcVAuV0Wfgf/ACEHrrNO7cMyv8athIXWE+tNb3quNTM1PnJ2IpggGxQ XrCg== X-Gm-Message-State: AOJu0Yw+JLvM9hajUh1fnsWj3qGbV1JC2UOPK0zzhdymwep9fQ+P1EB9 ykN0N0vDU3uzqL+/8IZU6pTrYXixf64zMokmfdPV4KWgajQei60MGQcP6YtERQErY5kWpIheMaE = X-Google-Smtp-Source: AGHT+IHIkPRk429EenW/0mNhqaUZldEzuVKmwYFo2sHbiW7BxpGsMycRIFpBwnZTGohy8vVrSjDsvA== X-Received: by 2002:a05:6830:2644:b0:709:4793:8757 with SMTP id 46e09a7af769-70df85d5277mr2953629a34.2.1724257188048; Wed, 21 Aug 2024 09:19:48 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:47 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 14/35] global_data: Drop global_data hose Date: Wed, 21 Aug 2024 10:19:06 -0600 Message-Id: <20240821161927.695717-15-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This is set on one x86 boards, but is not used anymore. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/ivybridge/cpu.c | 5 ----- include/asm-generic/global_data.h | 8 +------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c index d71ab0a6385..05691a38d2e 100644 --- a/arch/x86/cpu/ivybridge/cpu.c +++ b/arch/x86/cpu/ivybridge/cpu.c @@ -55,7 +55,6 @@ int arch_cpu_init(void) static int ivybridge_cpu_init(void) { - struct pci_controller *hose; struct udevice *bus, *dev; int ret; @@ -65,10 +64,6 @@ static int ivybridge_cpu_init(void) if (ret) return ret; post_code(0x72); - hose = dev_get_uclass_priv(bus); - - /* TODO(sjg@chromium.org): Get rid of gd->hose */ - gd->hose = hose; ret = uclass_first_device_err(UCLASS_LPC, &dev); if (ret) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 1db1fb651db..b860f3626b8 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -211,7 +211,7 @@ struct global_data { #endif #ifdef CONFIG_TIMER /** -s * @timer: timer instance for Driver Model + * @timer: timer instance for Driver Model */ struct udevice *timer; #endif @@ -298,12 +298,6 @@ s * @timer: timer instance for Driver Model */ unsigned long malloc_ptr; #endif -#ifdef CONFIG_PCI - /** - * @hose: PCI hose for early use - */ - struct pci_controller *hose; -#endif #ifdef CONFIG_PCI_BOOTDELAY /** * @pcidelay_done: delay time before scanning of PIC hose expired From patchwork Wed Aug 21 16:19:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975021 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=VDk6+pN3; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps6z4c18z1yf6 for ; Thu, 22 Aug 2024 02:22:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A58EE88E3A; Wed, 21 Aug 2024 18:19:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VDk6+pN3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87B3488E2A; Wed, 21 Aug 2024 18:19:52 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (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 7660488E2F for ; Wed, 21 Aug 2024 18:19:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-7093997dffdso2691424a34.2 for ; Wed, 21 Aug 2024 09:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257189; x=1724861989; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EcJBMZTHzLm0YSDAU92eJgdx7Ighi91Jqasuw5mnbWY=; b=VDk6+pN3O2qaBRip1/xBQFnQ6lQYSm/vsaPEomzWa1Awn1GuCUon0HQXQbdupa/KFD zUfAMvjnm5laNaAu2hjR0BNvkKrwJ3JFkcEggoua6qoBf63sflj4AHeN4VyPHDup0XOY 866WO+FMu2YqFFvQgeb9yenGYPTHRDV418Pno= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257189; x=1724861989; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EcJBMZTHzLm0YSDAU92eJgdx7Ighi91Jqasuw5mnbWY=; b=AEvQShXiWGOvkEiHuXJt67wHU0omdJbm8atZFYTQ/pT6RozVOkFcEslTKqseBmnWPF rATqdivIdqb+grzCUQp+bDQrPtRrzGISMluAI1wmu6wixjQ1XEUs4hOA9Suz1Z+9KLwq 2uepmeF7d7cp0e3iy+iajw7wCapC1jNr6ws1u1NVe2fje+sBm8BCBvMGF+UfnT0EAVrM LubCN2KA8xx+PsHMI4ZtSZLbvHi50wGB5Gr8ZQw25fmEKHc0AHLuzetFQMTGGdoSgMDk T4yi79JUkqWhpaQkBcwZhnVzed7srwcQvQOMLVaUDKLvatC81Nc70DBU2iOWUMu1NtEV e03w== X-Gm-Message-State: AOJu0YyOA9FB3qZRtMMPtl9NxTkFeyYNra4r9eecp4LzjMXF1v0TJlUm hMn3eikJ/SihPHsxmBicxS4nguOK/o7ZLCtYGDVz/nxhZck9+WjxqmqvUOaPGVrQG/t90zlFS2A = X-Google-Smtp-Source: AGHT+IExVRXmz14rEx9i2F/g6eeVjw3+wdnz3Ft7pf4FeDR94Nmb9JuLLGu+prky7L1yWIs6bML3ug== X-Received: by 2002:a05:6830:448a:b0:709:3462:a4b6 with SMTP id 46e09a7af769-70df870944fmr2585140a34.9.1724257189110; Wed, 21 Aug 2024 09:19:49 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:48 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 15/35] global_data: Drop pci_bootdelay Date: Wed, 21 Aug 2024 10:19:07 -0600 Message-Id: <20240821161927.695717-16-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This is not used. Drop the field and the environment code which uses it. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 11 ----------- include/env_default.h | 3 --- 2 files changed, 14 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index b860f3626b8..86e8d654a28 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -297,17 +297,6 @@ struct global_data { * @malloc_ptr: current address of early malloc() */ unsigned long malloc_ptr; -#endif -#ifdef CONFIG_PCI_BOOTDELAY - /** - * @pcidelay_done: delay time before scanning of PIC hose expired - * - * If CONFIG_PCI_BOOTDELAY=y, pci_hose_scan() waits for the number of - * milliseconds defined by environment variable pcidelay before - * scanning. Once this delay has expired the flag @pcidelay_done - * is set to 1. - */ - int pcidelay_done; #endif /** * @cur_serial_dev: current serial device diff --git a/include/env_default.h b/include/env_default.h index 076ffdd44e9..aa3dd40f3fa 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -82,9 +82,6 @@ const char default_environment[] = { #ifdef CONFIG_SYS_LOAD_ADDR "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR)"\0" #endif -#if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0) - "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0" -#endif #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG "arch=" CONFIG_SYS_ARCH "\0" #ifdef CONFIG_SYS_CPU From patchwork Wed Aug 21 16:19:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975022 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=OptKdl+X; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps792Z9Hz1yf6 for ; Thu, 22 Aug 2024 02:22:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1203B88E34; Wed, 21 Aug 2024 18:19:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OptKdl+X"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A67A88E42; Wed, 21 Aug 2024 18:19:54 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 4A45C88E1C for ; Wed, 21 Aug 2024 18:19:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-70944d76a04so586524a34.0 for ; Wed, 21 Aug 2024 09:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257191; x=1724861991; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=paxL6+/fLzeatYUKLWXsPwickojGLO/T76acZF/VKJA=; b=OptKdl+Xf/rjk9jzesPsSSqHODbJflriYC/KRT84k1J4t96kSS9lcceT51Q1nERmOM MqjcgqNAf0o9zMGSYNUnKuq/SwU+u6TiOfIQM+grWZCNtLOCinlAqevKRkl5uIxl/VXp XIxP9aBpWH1MzaoB7dJIcooJRhKPgqm7uxBKk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257191; x=1724861991; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=paxL6+/fLzeatYUKLWXsPwickojGLO/T76acZF/VKJA=; b=D8OXSuVi2oVo4gl2ygvzG49tWUtNAwhWhD/8KpeYqlJ7YDNfLvT/sPm/kEe5AJipHe EqrLNWcsqW/PQLYt+mdn6q7/4yuDCjdj2gjcxFf40WG8yHRBDKjdbJzV0oApqoZqZQoC gFoef9aFlStogQ+FPZTwiXlsdsmz5RpF1tnsnm/IpkPrc81vlfDhuHs1nFcrRdaxXjAK b9P3IqYKL2RQU8kP9lbACz19JrJFq0BeqlBZrPMfLAkY6jaGoWtSXVO0AvE1IJB8CpPS O6/U9DMDCw4oJ8K4rIrPjf0EjQFXAJjOgxJ62o7ui2pUPjMl2o+85orIe7Fk+BgcIFNY VGjg== X-Gm-Message-State: AOJu0Ywma3PeMa9jyJSkK/vlRNRnXEwuH2Ci4eHsjdAWdWeMs7c5xSs+ 9i0/hQBSNx2i/Qm/wDrHb3Xi4Ll/3hWJSYxCEMaz5BHEuwnILXzY7bOzpJllnxStzzv0oQLUZ4o = X-Google-Smtp-Source: AGHT+IGqS7t7bFKSYnaZH5Cjjf2cFSO1gcAZB3Oa+tMWVOGjwnj7fiarqxGNFYh1bpRGrobOt1u5qA== X-Received: by 2002:a05:6830:71aa:b0:703:66eb:ef8 with SMTP id 46e09a7af769-70e01b63a27mr74552a34.5.1724257190745; Wed, 21 Aug 2024 09:19:50 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:50 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 16/35] global_data: Use less space for environment fields Date: Wed, 21 Aug 2024 10:19:08 -0600 Message-Id: <20240821161927.695717-17-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Use shorter types for some of these fields to save space. Reorder to put fields with like alignment together. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 14 +++++++------- include/env_internal.h | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 86e8d654a28..1252b8acefa 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -114,21 +114,21 @@ struct global_data { */ unsigned long env_addr; /** - * @env_valid: environment is valid + * @env_has_init: bit mask indicating environment locations * - * See &enum env_valid + * &enum env_location defines which bit relates to which location */ - unsigned long env_valid; + unsigned short env_has_init; /** - * @env_has_init: bit mask indicating environment locations + * @env_valid: environment is valid * - * &enum env_location defines which bit relates to which location + * See &enum env_valid */ - unsigned long env_has_init; + unsigned char env_valid; /** * @env_load_prio: priority of the loaded environment */ - int env_load_prio; + char env_load_prio; /** * @ram_base: base address of RAM used by U-Boot */ diff --git a/include/env_internal.h b/include/env_internal.h index 0a267e35592..c1c0727e4d0 100644 --- a/include/env_internal.h +++ b/include/env_internal.h @@ -100,6 +100,7 @@ extern const char default_environment[]; #include #include +/* this is stored as bits in gd->env_has_init so is limited to 16 entries */ enum env_location { ENVL_UNKNOWN, ENVL_EEPROM, From patchwork Wed Aug 21 16:19:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975023 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=le6fE5Nz; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps7L4VtJz1yf6 for ; Thu, 22 Aug 2024 02:22:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7625388E4A; Wed, 21 Aug 2024 18:19:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="le6fE5Nz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98FF688E3B; Wed, 21 Aug 2024 18:19:55 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 5194B88E2A for ; Wed, 21 Aug 2024 18:19:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-70942ebcc29so4691062a34.0 for ; Wed, 21 Aug 2024 09:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257192; x=1724861992; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J069fjtCukUQl6BWW5majxQ7J8lZvOVTd1vTkeDsIZo=; b=le6fE5NzfIcDzRpuHM4flMOeGvxYUrbw2HiE5hbU/962qfPjrU0yeQdvisNbJqPH5Q cQVZxuknNGdEcMCRJ28q7o2UuGSLKaIt4FyneiA6v2u/6GZM0Cu/RwXnP15oSt+pZbD1 6OMjAVV8uZUkwRn9ySSr8k3Ul3QUQoZaerFms= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257192; x=1724861992; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J069fjtCukUQl6BWW5majxQ7J8lZvOVTd1vTkeDsIZo=; b=rp7vJ8hChOw0HTFh3wBQAW7QcAv4wIa3TLTMKINsQGQ7EoS4ZK7oiApWIUjZmR68TQ +v/0Ox5WiCLrcQqZVl6E7VGaY8uH/rQLkYbFiM+nmZWudRK63W7zEXE7kQgZDAZccRGQ 8iHBdc5cX09r3Gh5O62UuqqYksllAg6Niae9zluxbLCvheZVSr6XshXntxq8aKu4Z0bF sG6F+WASgHX/FN7dGY4tdbOYlAKXhQH8nyegB5n1g8Dr0jurjMb5cHSwJN/9JxDeCdNG nRKvC/WUS4SrmKnRGUzJeIVFiIDQ6j6JGMyrE9JltEjxh0D1lbEt7jHX2oq5chy3pA1D Zn8Q== X-Gm-Message-State: AOJu0YwJ/ENLV28r27h9H8dyJMncKVQ0DkwgNCbDIUzP2KG9/LJxROAP tlpYHaidbk9fprGbptxVkNx6SGyPz0d7k/VPZDpBo6ssTMyI4/wMTEZm4CLo6/dkpKYZSucMxdU = X-Google-Smtp-Source: AGHT+IGzvARlkESB1h7R2zi/Rsw2XOTn96EH22RDtGWfnMuin0dkYZFaJRm4QCCPpIp1TqAreChvsQ== X-Received: by 2002:a05:6830:358f:b0:704:4824:2b3e with SMTP id 46e09a7af769-70df873ae72mr3583091a34.19.1724257191976; Wed, 21 Aug 2024 09:19:51 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:51 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 17/35] board_f: Add a new struct to hold pre-relocation info Date: Wed, 21 Aug 2024 10:19:09 -0600 Message-Id: <20240821161927.695717-18-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Quite a few of the members of struct global_data are only used before reloction, or have little meaning afterwards, yet they hang around in struct global_data for the lifetime of U-Boot. This uses up precious pre-relocation SRAM on many boards. To help with this, start a new struct which exists only before relocation. Move new_fdt into this new struct. Drop the display of it in the 'bdinfo' command as it is probably not very useful. Note that the field does not exist in SPL builds. Signed-off-by: Simon Glass --- (no changes since v1) cmd/bdinfo.c | 1 - common/board_f.c | 11 +++++++---- include/asm-generic/global_data.h | 11 +++++++---- include/board_f.h | 23 +++++++++++++++++++++++ test/cmd/bdinfo.c | 2 -- 5 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 include/board_f.h diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 437ac4e8630..b53b51acca4 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -154,7 +154,6 @@ static int bdinfo_print_all(struct bd_info *bd) if (IS_ENABLED(CONFIG_CMD_NET)) print_eth(); bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob)); - bdinfo_print_num_l("new_fdt", (ulong)map_to_sysmem(gd->new_fdt)); bdinfo_print_num_l("fdt_size", (ulong)gd->fdt_size); if (IS_ENABLED(CONFIG_VIDEO)) show_video_info(); diff --git a/common/board_f.c b/common/board_f.c index a1f8641ae26..8f7c56e812f 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -578,7 +578,7 @@ static int reserve_fdt(void) gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob), 32); gd->start_addr_sp = reserve_stack_aligned(gd->fdt_size); - gd->new_fdt = map_sysmem(gd->start_addr_sp, gd->fdt_size); + gd->boardf->new_fdt = map_sysmem(gd->start_addr_sp, gd->fdt_size); debug("Reserving %lu Bytes for FDT at: %08lx\n", gd->fdt_size, gd->start_addr_sp); } @@ -668,10 +668,10 @@ static int init_post(void) static int reloc_fdt(void) { if (!IS_ENABLED(CONFIG_OF_EMBED)) { - if (gd->new_fdt) { - memcpy(gd->new_fdt, gd->fdt_blob, + if (gd->boardf->new_fdt) { + memcpy(gd->boardf->new_fdt, gd->fdt_blob, fdt_totalsize(gd->fdt_blob)); - gd->fdt_blob = gd->new_fdt; + gd->fdt_blob = gd->boardf->new_fdt; } } @@ -1021,8 +1021,11 @@ static const init_fnc_t init_sequence_f[] = { void board_init_f(ulong boot_flags) { + struct board_f boardf; + gd->flags = boot_flags; gd->flags &= ~GD_FLG_HAVE_CONSOLE; + gd->boardf = &boardf; if (initcall_run_list(init_sequence_f)) hang(); diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 1252b8acefa..8a1a4e298ac 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -20,6 +20,7 @@ */ #ifndef __ASSEMBLY__ +#include #include #include #include @@ -42,6 +43,12 @@ struct global_data { * @bd: board information */ struct bd_info *bd; +#ifndef CONFIG_SPL_BUILD + /** + * @boardf: information only used before relocation + */ + struct board_f *boardf; +#endif /** * @flags: global data flags * @@ -219,10 +226,6 @@ struct global_data { * @fdt_blob: U-Boot's own device tree, NULL if none */ const void *fdt_blob; - /** - * @new_fdt: relocated device tree - */ - void *new_fdt; /** * @fdt_size: space reserved for relocated device space */ diff --git a/include/board_f.h b/include/board_f.h new file mode 100644 index 00000000000..74fca6df75c --- /dev/null +++ b/include/board_f.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 Google LLC + * Written by: Simon Glass + */ + +#ifndef __BOARD_F +#define __BOARD_F + +/** + * struct board_f: Information used only before relocation + * + * This struct is set up in board_init_f() and used to deal with relocation. It + * is not available after relocation. + */ +struct board_f { + /** + * @new_fdt: relocated device tree + */ + void *new_fdt; +}; + +#endif diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 027848c3e24..60adc4aa960 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -185,8 +185,6 @@ static int bdinfo_test_all(struct unit_test_state *uts) ut_assert(map_to_sysmem(gd->fdt_blob) == env_get_hex("fdtcontroladdr", 0x1234)); ut_assertok(test_num_l(uts, "fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob))); - ut_assertok(test_num_l(uts, "new_fdt", - (ulong)map_to_sysmem(gd->new_fdt))); ut_assertok(test_num_l(uts, "fdt_size", (ulong)gd->fdt_size)); if (IS_ENABLED(CONFIG_VIDEO)) From patchwork Wed Aug 21 16:19:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975024 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=dz+Lcau0; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps7Y2jhvz1yf6 for ; Thu, 22 Aug 2024 02:22:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA33F88E3F; Wed, 21 Aug 2024 18:19:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dz+Lcau0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 405E488E43; Wed, 21 Aug 2024 18:19:57 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 18F3688E34 for ; Wed, 21 Aug 2024 18:19:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-709339c91f9so3585757a34.0 for ; Wed, 21 Aug 2024 09:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257193; x=1724861993; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K8Nm9U2/pXPrJV3wUpOAG9bpzUKx8cKaDn3r8DAeB/8=; b=dz+Lcau0NvdmLC2s61X3ttdG3ZWJD2ZKMesj3V6LPiJGW8jVBHED1URpEVSA7iR3hp y+ruTqYeigyzL3r/vCmgl5hQ/rzpZg0zfnDcSCric8QqCbTQ1NxlF1zF3azNN88+JDnZ uPTxSsK5RG/L/6mLS7kuzHzI7s2nRf7Vk4pcE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257193; x=1724861993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K8Nm9U2/pXPrJV3wUpOAG9bpzUKx8cKaDn3r8DAeB/8=; b=FSRTNjm1lYNZBvHQ2w8ZHoH3LdndJtX8PEenD+XZrya3xEUBKyfcOPDf5s9QUE5Gai kwgG/+QCt17/i7ovYEj8ynAJLISpSyRVDbcgUlLloayhBWaPCSW0h2ODhJx+m0qVxY/t RbH4vkKw4k58GP3XR3NDwv0wQJVmMHhxtuOVdQCACaylwyGnLy7R4+W9tL3gtSBmcrFP ROwgrEen6ImCGMBvRo/UrwLqrIOFXl8wL4wsKXUaz640IFS2wg5crU99wRWzHjDxFx3B el+SscVlrbkeE8PWIa0YVIJVwBlWde7Vj02ePm8BGoHn2UURHQwYUKTqpHT4XSDIUPex Ys9Q== X-Gm-Message-State: AOJu0YweznzMqu069crlDVzZyMOEmRhEEL6GqZd4rpoRSRV/Vb/vnWAP tqABmDasomR3157XjhSawY4xGdqd3jySdLK3jDhHFDjB3N5rQibzO9Db1DCO87s7/llr/PIMAK8 = X-Google-Smtp-Source: AGHT+IG0Ub61Dr8rVLh5vjgsilcq2Uf6tv68/kryPgR2ZR2tWSgS8kuCIQSPZl8eK6IeWuVp9DxZZg== X-Received: by 2002:a05:6830:658b:b0:709:3921:7920 with SMTP id 46e09a7af769-70df886b119mr3268343a34.26.1724257192753; Wed, 21 Aug 2024 09:19:52 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:52 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 18/35] board_f: Move fdt_size to board Date: Wed, 21 Aug 2024 10:19:10 -0600 Message-Id: <20240821161927.695717-19-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This value is only really used before relocation. There is not much use to showing its value in bdinfo, so drop it. Move it to the new boardf struct. Signed-off-by: Simon Glass --- (no changes since v1) cmd/bdinfo.c | 1 - common/board_f.c | 11 +++++++---- include/asm-generic/global_data.h | 4 ---- include/board_f.h | 4 ++++ test/cmd/bdinfo.c | 1 - 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index b53b51acca4..59fbaea498b 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -154,7 +154,6 @@ static int bdinfo_print_all(struct bd_info *bd) if (IS_ENABLED(CONFIG_CMD_NET)) print_eth(); bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob)); - bdinfo_print_num_l("fdt_size", (ulong)gd->fdt_size); if (IS_ENABLED(CONFIG_VIDEO)) show_video_info(); #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) diff --git a/common/board_f.c b/common/board_f.c index 8f7c56e812f..046d9f45f8b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -575,12 +575,15 @@ static int reserve_fdt(void) * section, then it will be relocated with other data. */ if (gd->fdt_blob) { - gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob), 32); + gd->boardf->fdt_size = + ALIGN(fdt_totalsize(gd->fdt_blob), 32); - gd->start_addr_sp = reserve_stack_aligned(gd->fdt_size); - gd->boardf->new_fdt = map_sysmem(gd->start_addr_sp, gd->fdt_size); + gd->start_addr_sp = reserve_stack_aligned( + gd->boardf->fdt_size); + gd->boardf->new_fdt = map_sysmem(gd->start_addr_sp, + gd->boardf->fdt_size); debug("Reserving %lu Bytes for FDT at: %08lx\n", - gd->fdt_size, gd->start_addr_sp); + gd->boardf->fdt_size, gd->start_addr_sp); } } diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 8a1a4e298ac..325777dc539 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -226,10 +226,6 @@ struct global_data { * @fdt_blob: U-Boot's own device tree, NULL if none */ const void *fdt_blob; - /** - * @fdt_size: space reserved for relocated device space - */ - unsigned long fdt_size; /** * @fdt_src: Source of FDT */ diff --git a/include/board_f.h b/include/board_f.h index 74fca6df75c..d9c793fbeb1 100644 --- a/include/board_f.h +++ b/include/board_f.h @@ -18,6 +18,10 @@ struct board_f { * @new_fdt: relocated device tree */ void *new_fdt; + /** + * @fdt_size: space reserved for relocated device space + */ + unsigned long fdt_size; }; #endif diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 60adc4aa960..591390560b7 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -185,7 +185,6 @@ static int bdinfo_test_all(struct unit_test_state *uts) ut_assert(map_to_sysmem(gd->fdt_blob) == env_get_hex("fdtcontroladdr", 0x1234)); ut_assertok(test_num_l(uts, "fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob))); - ut_assertok(test_num_l(uts, "fdt_size", (ulong)gd->fdt_size)); if (IS_ENABLED(CONFIG_VIDEO)) ut_assertok(test_video_info(uts)); From patchwork Wed Aug 21 16:19:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975025 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=GqBG186V; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps7m4xg9z1yf6 for ; Thu, 22 Aug 2024 02:23:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4493B88E5C; Wed, 21 Aug 2024 18:19:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="GqBG186V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 68D5B88E1C; Wed, 21 Aug 2024 18:19:57 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (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 C254988E47 for ; Wed, 21 Aug 2024 18:19:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-704466b19c4so3975735a34.0 for ; Wed, 21 Aug 2024 09:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257193; x=1724861993; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YPd+Ch017cy7orQCCOGHE5CKq25/pinKVOT47eMs6SI=; b=GqBG186VpP/vwjA4gqIoGistXY/rTYdd/c1eZMfGgYTgGheRagkW+Eh7sX9kvk9sNo glxO+6yWh9Njgj4Nzqe49mAL4/hhiM/67fZ2nAxa49orDFXxmuewd3SSagwHH9UxTrok BYjeI6kN9o6qacwow3WVpKmFgnd8W4tTfaX10= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257193; x=1724861993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YPd+Ch017cy7orQCCOGHE5CKq25/pinKVOT47eMs6SI=; b=T9q7JYCXNVk6bFtzP8ZmH/uNU5gs0SJLGOSy8wIL4abc4ypAcBDZGC/6uzFXRR/u4U U2xq4SRhry4Em6DmSfWToMFrQkzLYD1pWvE9CTB2M93qFYVz5nWt6uGClITni5w/1dW3 nAecurfJRpG+CjX+wbeirFmFvHn0I2XX3sqs2rVaPqhZcdbrOjOM/Isdun6q23kSFHJ+ RG6uRSQ4Fp1JVEIOH7k6fVtcYIfKSL8X/4OFCG2iKFbx85ecs914RWTDW0OM5sLobaaI YWjE+Jlnx5IzUK6NHxzEWGQQj+/EVIRC+AW3bUe4QdBxqJ+qnDnt7SPjAdfKs9QBetws qcLA== X-Gm-Message-State: AOJu0YxIiwXRqQ0kOsF1T0KgjzLRA2OEF1Sde4/xYFBlV0x5kBiSy51W 4n65x/VPiS1o5qerM4trjPuNsrCzZXuWfvvGBcs2U3Kege1V4Xf0tnF1N5MR9Fo1DbLlq5vPeMY = X-Google-Smtp-Source: AGHT+IFhht4zuDp89RcqJzeoWELjrRpQon+EZUIxw2Gh25thVZtJ8mN+/vU+Dr36tnZauDfpfy7agQ== X-Received: by 2002:a05:6830:2801:b0:70b:3a21:2ebc with SMTP id 46e09a7af769-70df8895826mr3848092a34.33.1724257193468; Wed, 21 Aug 2024 09:19:53 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:53 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 19/35] board_f: Move new_bootstage to boardf Date: Wed, 21 Aug 2024 10:19:11 -0600 Message-Id: <20240821161927.695717-20-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass --- (no changes since v1) common/board_f.c | 7 +++---- include/asm-generic/global_data.h | 4 ---- include/board_f.h | 4 ++++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 046d9f45f8b..0c24e3ae618 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -596,7 +596,7 @@ static int reserve_bootstage(void) int size = bootstage_get_size(); gd->start_addr_sp = reserve_stack_aligned(size); - gd->new_bootstage = map_sysmem(gd->start_addr_sp, size); + gd->boardf->new_bootstage = map_sysmem(gd->start_addr_sp, size); debug("Reserving %#x Bytes for bootstage at: %08lx\n", size, gd->start_addr_sp); #endif @@ -686,9 +686,8 @@ static int reloc_bootstage(void) #ifdef CONFIG_BOOTSTAGE if (gd->flags & GD_FLG_SKIP_RELOC) return 0; - if (gd->new_bootstage) { - bootstage_relocate(gd->new_bootstage); - } + if (gd->boardf->new_bootstage) + bootstage_relocate(gd->boardf->new_bootstage); #endif return 0; diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 325777dc539..915dad503a2 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -335,10 +335,6 @@ struct global_data { * @bootstage: boot stage information */ struct bootstage_data *bootstage; - /** - * @new_bootstage: relocated boot stage information - */ - struct bootstage_data *new_bootstage; #endif #ifdef CONFIG_LOG /** diff --git a/include/board_f.h b/include/board_f.h index d9c793fbeb1..1eba236a961 100644 --- a/include/board_f.h +++ b/include/board_f.h @@ -22,6 +22,10 @@ struct board_f { * @fdt_size: space reserved for relocated device space */ unsigned long fdt_size; + /** + * @new_bootstage: relocated boot stage information + */ + struct bootstage_data *new_bootstage; }; #endif From patchwork Wed Aug 21 16:19:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975026 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Viz9hCVE; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps805bJjz1yf6 for ; Thu, 22 Aug 2024 02:23:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE51888E66; Wed, 21 Aug 2024 18:20:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Viz9hCVE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C019F88E34; Wed, 21 Aug 2024 18:19:57 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) (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 A3F9588E2A for ; Wed, 21 Aug 2024 18:19:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7093d565310so5156995a34.2 for ; Wed, 21 Aug 2024 09:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257194; x=1724861994; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HTB7aksRC+20mBPioJzN0gIff7/jeakOo2t8CxY9ozU=; b=Viz9hCVEFHdqyFO9UxaErkeYWNJ9hzYhLHJ3i+JhUt2GKOt1C9yN1to5qeY1wDpbfU WX0HtuRz55s4tgqkmN7ciJoYkrT7i5mnMjBf3/WobJHDNd7uwRZ5RodLvt1LHNOyD25W 2pbRQ631ZaejtuBchEsTKLlO40QiVhfTs+hoY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257194; x=1724861994; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HTB7aksRC+20mBPioJzN0gIff7/jeakOo2t8CxY9ozU=; b=kmg9atj9ifquOF3/buWsk1CiV18rTMlfWcT2m6Grgkj1kf9CZL2nMbmxCXR1ldpA5T Mprs9rq/G9AwqjXlu+nYPW4mB2ZfKjbaBbgPmUwwfPAB3y7oFZm04POKLSw4SGEHkX+F cognbxjAZarxe6AfnFz46CV4LgUQ3Kr4ZZBpHoWvTPTJlKRAdFY/QkXUcrBMD3aX65GR 60eS6EC4UxUp3t4bK//LjuyjB/y0aSXi2tvBT8Q355tGyz2e951p/rJ6ms9DhD5XkDbn Tf+5BefCia0sNVy96GL6B5yhPeNa88HgRc2I3DnRI3JbyKZk+HBKmg2YEEBakQm1K0Z3 +o1w== X-Gm-Message-State: AOJu0Yxm/Kb+qpA/Hqyn/vBD1LtwyqtpBXL9igirjPHXm9gaWn7dS1FG YSDVgXtrLC3Hp6W/LulWyVMJsiR3xyXMR49VrMnORSN8ciUW9ZtcdNiiB/DqK33ThZxpI2Ro+8Q = X-Google-Smtp-Source: AGHT+IG+OI7U7ouDJvIaayX0R428DWkZlaE9OagWseia8fvLRz6JbrNbjlhLxVFqkxpKMnnjfJcWkA== X-Received: by 2002:a05:6830:d82:b0:708:b083:86c8 with SMTP id 46e09a7af769-70df8853d7amr3508879a34.21.1724257194336; Wed, 21 Aug 2024 09:19:54 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:53 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 20/35] board_f: Move new_bloblist to boardf Date: Wed, 21 Aug 2024 10:19:12 -0600 Message-Id: <20240821161927.695717-21-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass --- (no changes since v1) common/board_f.c | 11 ++++++----- include/asm-generic/global_data.h | 4 ---- include/board_f.h | 4 ++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 0c24e3ae618..eb74bfa428a 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -627,8 +627,8 @@ static int reserve_bloblist(void) /* Align to a 4KB boundary for easier reading of addresses */ gd->start_addr_sp = ALIGN_DOWN(gd->start_addr_sp - CONFIG_BLOBLIST_SIZE_RELOC, 0x1000); - gd->new_bloblist = map_sysmem(gd->start_addr_sp, - CONFIG_BLOBLIST_SIZE_RELOC); + gd->boardf->new_bloblist = map_sysmem(gd->start_addr_sp, + CONFIG_BLOBLIST_SIZE_RELOC); #endif return 0; @@ -704,10 +704,11 @@ static int reloc_bloblist(void) debug("Not relocating bloblist\n"); return 0; } - if (gd->new_bloblist) { + if (gd->boardf->new_bloblist) { debug("Copying bloblist from %p to %p, size %x\n", - gd->bloblist, gd->new_bloblist, gd->bloblist->total_size); - return bloblist_reloc(gd->new_bloblist, + gd->bloblist, gd->boardf->new_bloblist, + gd->bloblist->total_size); + return bloblist_reloc(gd->boardf->new_bloblist, CONFIG_BLOBLIST_SIZE_RELOC); } #endif diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 915dad503a2..544195391bd 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -395,10 +395,6 @@ struct global_data { * @bloblist: blob list information */ struct bloblist_hdr *bloblist; - /** - * @new_bloblist: relocated blob list information - */ - struct bloblist_hdr *new_bloblist; #endif #if CONFIG_IS_ENABLED(HANDOFF) /** diff --git a/include/board_f.h b/include/board_f.h index 1eba236a961..05aa51510c2 100644 --- a/include/board_f.h +++ b/include/board_f.h @@ -26,6 +26,10 @@ struct board_f { * @new_bootstage: relocated boot stage information */ struct bootstage_data *new_bootstage; + /** + * @new_bloblist: relocated blob list information + */ + struct bloblist_hdr *new_bloblist; }; #endif From patchwork Wed Aug 21 16:19:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975027 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=j8Lziwoj; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps8B57CHz1yf6 for ; Thu, 22 Aug 2024 02:23:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 667AA88E67; Wed, 21 Aug 2024 18:20:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="j8Lziwoj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A81ED88E14; Wed, 21 Aug 2024 18:19: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 78AE98811A for ; Wed, 21 Aug 2024 18:19:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-7093efbade6so4407815a34.2 for ; Wed, 21 Aug 2024 09:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257195; x=1724861995; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p4yv8xWkAlDiRRqQrlVUQ1sncuiPNGNY9r3D5FCNp6A=; b=j8LziwojJpv+2CzCLjf937F+dGD+PdUNR/e4b2X4vpaN7uVW0cXJrJUsNWvjqIHNFR VzV8DGnghVsj6Z9NcrCh4usa3zuHaTbTsqfDOC7WusxtDgxnUQmK3fSGwiSNuTnYN8qS 0cbEcxFp3Nep06HXrpmOaMsCQZsbIk86e38n4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257195; x=1724861995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p4yv8xWkAlDiRRqQrlVUQ1sncuiPNGNY9r3D5FCNp6A=; b=lnKftFDZDE/4ycC8IAzP3FJtMYHQLSnD/zOCodFyS5uQCDyyZ8udHMcgDYiFHhjDz9 1zoR4gg17UbtYi0sG8MuwlZMP1apVKXiKF393aEe0RrZWcx6Ahd5rtBysgxCFSI+G7DD TBG2zyp8krCI9Ygp7T179pQbyeWLy25TTfrwyLAPQuG4rAbV7Vkst6x7UGE3PGVhmQKk E6qvxeBxFi5x/vFP7QL0+XnPe1O0231k570Um1cX3TmA2MrUpSpLZYxJZIqR2obkq8Cl O7ycNRcwaKBs+ipEfLxy3Y0qrzCIaUu7ojE9Cgn31ZYDHq7vISY4UVw9j3uvgfiL4/r1 fCEQ== X-Gm-Message-State: AOJu0YyR08OgqnARRD8wVJVqViZFZ0PFktotlRe8bRIyJQ7fdwcuN4hx 7GNWpfMZi/PCgwgdfLjvvcILzuGhrRwRo1ylYVepMOU+Z//Jz4wEiVeGxAb/YjJh6L8bEM2riVk = X-Google-Smtp-Source: AGHT+IH3lvfpvtOuEQjb5auwMwaXV3kEsLg9BqMV1rSq5xmPN9n1maHdUsd+b0bcaUOcTZfVkiD8eg== X-Received: by 2002:a05:6830:3109:b0:707:8b7d:b924 with SMTP id 46e09a7af769-70df8745d7cmr3089397a34.10.1724257195128; Wed, 21 Aug 2024 09:19:55 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:54 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 21/35] global_data: Drop spl_handoff Date: Wed, 21 Aug 2024 10:19:13 -0600 Message-Id: <20240821161927.695717-22-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Provide a function to locate this information, rather than doing it automatically on startup, to save space in global_data. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/intel_common/cpu_from_spl.c | 4 +--- arch/x86/lib/fsp2/fsp_dram.c | 4 ++-- cmd/sb.c | 6 ++++-- common/board_f.c | 12 ------------ common/init/handoff.c | 12 ++++++++++++ drivers/clk/rockchip/clk_rk3399.c | 3 ++- include/asm-generic/global_data.h | 6 ------ include/handoff.h | 7 +++++++ 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c index 48b2ef253cb..5aad2ae7309 100644 --- a/arch/x86/cpu/intel_common/cpu_from_spl.c +++ b/arch/x86/cpu/intel_common/cpu_from_spl.c @@ -24,9 +24,7 @@ int arch_cpu_init(void) int ret; #if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB) - struct spl_handoff *ho = gd->spl_handoff; - - gd->arch.hob_list = ho->arch.hob_list; + gd->arch.hob_list = handoff_get(); #endif ret = x86_cpu_reinit_f(); diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c index 83c6d7bcc93..a50dc985a3c 100644 --- a/arch/x86/lib/fsp2/fsp_dram.c +++ b/arch/x86/lib/fsp2/fsp_dram.c @@ -59,7 +59,7 @@ int dram_init(void) #endif } else { #if CONFIG_IS_ENABLED(HANDOFF) - struct spl_handoff *ho = gd->spl_handoff; + struct spl_handoff *ho = handoff_get(); if (!ho) { log_debug("No SPL handoff found\n"); @@ -82,7 +82,7 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size) return gd->ram_size; #if CONFIG_IS_ENABLED(HANDOFF) - struct spl_handoff *ho = gd->spl_handoff; + struct spl_handoff *ho = handoff_get(); log_debug("usable_ram_top = %lx\n", ho->arch.usable_ram_top); diff --git a/cmd/sb.c b/cmd/sb.c index 1aa5921f03e..db485fddfca 100644 --- a/cmd/sb.c +++ b/cmd/sb.c @@ -14,8 +14,10 @@ static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { #if CONFIG_IS_ENABLED(HANDOFF) - if (gd->spl_handoff) - printf("SPL handoff magic %lx\n", gd->spl_handoff->arch.magic); + struct spl_handoff *handoff = handoff_get(); + + if (handoff) + printf("SPL handoff magic %lx\n", handoff->arch.magic); else printf("SPL handoff info not received\n"); diff --git a/common/board_f.c b/common/board_f.c index eb74bfa428a..eb1a5f0e1e9 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -305,17 +305,6 @@ static int setup_mon_len(void) return 0; } -static int setup_spl_handoff(void) -{ -#if CONFIG_IS_ENABLED(HANDOFF) - gd->spl_handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF, - sizeof(struct spl_handoff)); - debug("Found SPL hand-off info %p\n", gd->spl_handoff); -#endif - - return 0; -} - __weak int arch_cpu_init(void) { return 0; @@ -891,7 +880,6 @@ static const init_fnc_t init_sequence_f[] = { initf_bootstage, /* uses its own timer, so does not need DM */ event_init, bloblist_maybe_init, - setup_spl_handoff, #if defined(CONFIG_CONSOLE_RECORD_INIT_F) console_record_init, #endif diff --git a/common/init/handoff.c b/common/init/handoff.c index a7cd065fb38..86c020ee0b9 100644 --- a/common/init/handoff.c +++ b/common/init/handoff.c @@ -5,6 +5,7 @@ * Copyright 2018 Google, Inc */ +#include #include #include @@ -38,3 +39,14 @@ void handoff_load_dram_banks(struct spl_handoff *ho) bd->bi_dram[i].size = ho->ram_bank[i].size; } } + +struct spl_handoff *handoff_get(void) +{ + struct spl_handoff *handoff; + + handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF, + sizeof(struct spl_handoff)); + debug("Found SPL hand-off info %p\n", handoff); + + return handoff; +} diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 24cefebd1b2..89924041299 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -1467,7 +1468,7 @@ static int rk3399_clk_probe(struct udevice *dev) init_clocks = true; #elif CONFIG_IS_ENABLED(HANDOFF) if (!(gd->flags & GD_FLG_RELOC)) { - if (!(gd->spl_handoff)) + if (!handoff_get()) init_clocks = true; } #endif diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 544195391bd..16c4b4fe676 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -396,12 +396,6 @@ struct global_data { */ struct bloblist_hdr *bloblist; #endif -#if CONFIG_IS_ENABLED(HANDOFF) - /** - * @spl_handoff: SPL hand-off information - */ - struct spl_handoff *spl_handoff; -#endif #if defined(CONFIG_TRANSLATION_OFFSET) /** * @translation_offset: optional translation offset diff --git a/include/handoff.h b/include/handoff.h index c0ae7b19a75..0072ea832f8 100644 --- a/include/handoff.h +++ b/include/handoff.h @@ -31,6 +31,13 @@ void handoff_save_dram(struct spl_handoff *ho); void handoff_load_dram_size(struct spl_handoff *ho); void handoff_load_dram_banks(struct spl_handoff *ho); +/** + * handoff_get() - Get the SPL handoff information + * + * Return: Pointer to SPL handoff if received, else NULL + */ +struct spl_handoff *handoff_get(void); + /** * handoff_arch_save() - Save arch-specific info into the handoff area * From patchwork Wed Aug 21 16:19:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975028 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=oEhPNzke; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps8N0xFNz1yf6 for ; Thu, 22 Aug 2024 02:23:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C572D88E6E; Wed, 21 Aug 2024 18:20:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oEhPNzke"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E42488E5E; Wed, 21 Aug 2024 18:19:59 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 6E5C488E2F for ; Wed, 21 Aug 2024 18:19:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-70940c9657dso3247554a34.1 for ; Wed, 21 Aug 2024 09:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257196; x=1724861996; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jcR/5iKrFCBX//g8VkkTnn7McDIXjBFIYs+lfpROyyg=; b=oEhPNzke52a/SsTCAAfPzs5MxScvGtccheINt84wg5mnD65DkJo8EljhgS8Hbg+5K2 6XcbXOMn8qXXu1DzcD0qg0D00IGbse84CDBqiKsW0oDAJPaghw0RidbHW+yDA1jbJPms PUG1BF7eogvYYcg9rIcRFXLtt3cUuYDwZ+vm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257196; x=1724861996; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jcR/5iKrFCBX//g8VkkTnn7McDIXjBFIYs+lfpROyyg=; b=gN7jzD1AhEeYlDXynZ40UlwL1KsbZrBeREspStMpQ33iyaUd8rYc1N5BJxTSm5Grfp l1TmkOXQ5PnsK2d0adtIX7OTLB9Bg2W5YMy/z1E3g9Q4mEV5LvRs83LxeBu0ZV2MoDlo JNnImb0lDUoQS+q/VLZcCPJjJdHkUU5gcrWzQwsP+hZqEWpBkmbNvEIFgNqYje/a2KbP WnG1b2Ci8ekJJAOwPl9AGZqjp1fgf48xc1aHg5lok8DywtuL+fVaZPJBksyY+B77ah+S f6uFSHgbixfp+cUSBQaMlxUxt9XWYPj05+EkWG59Yrcwt78BnE7grlqjWKLrU5H2Kdhn Sj1Q== X-Gm-Message-State: AOJu0YzHnzUuy0ndn9LlAryI2uVc3tS54a88SwwpqM5YBCagp8gbBhm4 kFAiDphnrW+QSX0p0ZUtcBbF9rHwLGF2DMIZl0Bq1KnzXU0b2gIlyn0TaQ3OCJvJ31hRmVkbwb4 = X-Google-Smtp-Source: AGHT+IGUOfAq9hma+OQfzNCeaeQuGXd8qKf0ZLJjoxkY7UZRMaCWT8oYrJK2roJ337Yf7WbSNauqFg== X-Received: by 2002:a05:6830:6dc3:b0:709:35ae:e793 with SMTP id 46e09a7af769-70df88916a7mr3821372a34.33.1724257195953; Wed, 21 Aug 2024 09:19:55 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:55 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 22/35] global_data: Collect common fields at the top Date: Wed, 21 Aug 2024 10:19:14 -0600 Message-Id: <20240821161927.695717-23-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Move all the fields which are always present to the top of the struct, so we can potentially save some space by taking note of alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 166 +++++++++++++++--------------- 1 file changed, 82 insertions(+), 84 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 16c4b4fe676..094e97449f6 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -71,48 +71,6 @@ struct global_data { * @mem_clk: memory clock rate in Hz */ unsigned long mem_clk; -#if defined(CONFIG_POST) - /** - * @post_log_word: active POST tests - * - * @post_log_word is a bit mask defining which POST tests are recorded - * (see constants POST_*). - */ - unsigned long post_log_word; - /** - * @post_log_res: POST results - * - * @post_log_res is a bit mask with the POST results. A bit with value 1 - * indicates successful execution. - */ - unsigned long post_log_res; - /** - * @post_init_f_time: time in ms when post_init_f() started - */ - unsigned long post_init_f_time; -#endif -#ifdef CONFIG_BOARD_TYPES - /** - * @board_type: board type - * - * If a U-Boot configuration supports multiple board types, the actual - * board type may be stored in this field. - */ - unsigned long board_type; -#endif -#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) - /** - * @precon_buf_idx: pre-console buffer index - * - * @precon_buf_idx indicates the current position of the - * buffer used to collect output before the console becomes - * available. When negative, the pre-console buffer is - * temporarily disabled (used when the pre-console buffer is - * being written out, to prevent adding its contents to - * itself). - */ - long precon_buf_idx; -#endif /** * @env_addr: address of environment structure * @@ -177,7 +135,87 @@ struct global_data { * @new_gd: pointer to relocated global data */ struct global_data *new_gd; - + /** + * @fdt_blob: U-Boot's own device tree, NULL if none + */ + const void *fdt_blob; + /** + * @fdt_src: Source of FDT + */ + enum fdt_source_t fdt_src; + /** + * @jt: jump table + * + * The jump table contains pointers to exported functions. A pointer to + * the jump table is passed to standalone applications. + */ + struct jt_funcs *jt; + /** + * @env_buf: buffer for env_get() before reloc + */ + char env_buf[32]; + /** + * @cur_serial_dev: current serial device + */ + struct udevice *cur_serial_dev; + /** + * @arch: architecture-specific data + */ + struct arch_global_data arch; + /** + * @dmtag_list: List of DM tags + */ + struct list_head dmtag_list; + /** + * @timebase_h: high 32 bits of timer + */ + unsigned int timebase_h; + /** + * @timebase_l: low 32 bits of timer + */ + unsigned int timebase_l; +#if defined(CONFIG_POST) + /** + * @post_log_word: active POST tests + * + * @post_log_word is a bit mask defining which POST tests are recorded + * (see constants POST_*). + */ + unsigned long post_log_word; + /** + * @post_log_res: POST results + * + * @post_log_res is a bit mask with the POST results. A bit with value 1 + * indicates successful execution. + */ + unsigned long post_log_res; + /** + * @post_init_f_time: time in ms when post_init_f() started + */ + unsigned long post_init_f_time; +#endif +#ifdef CONFIG_BOARD_TYPES + /** + * @board_type: board type + * + * If a U-Boot configuration supports multiple board types, the actual + * board type may be stored in this field. + */ + unsigned long board_type; +#endif +#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) + /** + * @precon_buf_idx: pre-console buffer index + * + * @precon_buf_idx indicates the current position of the + * buffer used to collect output before the console becomes + * available. When negative, the pre-console buffer is + * temporarily disabled (used when the pre-console buffer is + * being written out, to prevent adding its contents to + * itself). + */ + long precon_buf_idx; +#endif #ifdef CONFIG_DM /** * @dm_root: root instance for Driver Model @@ -222,38 +260,18 @@ struct global_data { */ struct udevice *timer; #endif - /** - * @fdt_blob: U-Boot's own device tree, NULL if none - */ - const void *fdt_blob; - /** - * @fdt_src: Source of FDT - */ - enum fdt_source_t fdt_src; #if CONFIG_IS_ENABLED(OF_LIVE) /** * @of_root: root node of the live tree */ struct device_node *of_root; #endif - #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) /** * @multi_dtb_fit: pointer to uncompressed multi-dtb FIT image */ const void *multi_dtb_fit; #endif - /** - * @jt: jump table - * - * The jump table contains pointers to exported functions. A pointer to - * the jump table is passed to standalone applications. - */ - struct jt_funcs *jt; - /** - * @env_buf: buffer for env_get() before reloc - */ - char env_buf[32]; #ifdef CONFIG_TRACE /** * @trace_buff: trace buffer @@ -269,18 +287,10 @@ struct global_data { */ int cur_i2c_bus; #endif - /** - * @timebase_h: high 32 bits of timer - */ - unsigned int timebase_h; - /** - * @timebase_l: low 32 bits of timer - */ - unsigned int timebase_l; +#if CONFIG_IS_ENABLED(CMD_BDINFO_EXTRA) /** * @malloc_start: start of malloc() region */ -#if CONFIG_IS_ENABLED(CMD_BDINFO_EXTRA) unsigned long malloc_start; #endif #if CONFIG_IS_ENABLED(SYS_MALLOC_F) @@ -297,14 +307,6 @@ struct global_data { */ unsigned long malloc_ptr; #endif - /** - * @cur_serial_dev: current serial device - */ - struct udevice *cur_serial_dev; - /** - * @arch: architecture-specific data - */ - struct arch_global_data arch; #ifdef CONFIG_CONSOLE_RECORD /** * @console_out: output buffer for console recording @@ -432,10 +434,6 @@ struct global_data { */ struct hlist_head cyclic_list; #endif - /** - * @dmtag_list: List of DM tags - */ - struct list_head dmtag_list; #if CONFIG_IS_ENABLED(UPL) /** * @upl: Universal Payload-handoff information From patchwork Wed Aug 21 16:19:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975032 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=jw4Ol3iw; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps8z0Zy6z1yf6 for ; Thu, 22 Aug 2024 02:24:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 011E988E73; Wed, 21 Aug 2024 18:20:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jw4Ol3iw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9FCB688E74; Wed, 21 Aug 2024 18:20:04 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 4511388E43 for ; Wed, 21 Aug 2024 18:19:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-70942ebcc29so4691133a34.0 for ; Wed, 21 Aug 2024 09:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257197; x=1724861997; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sjMKWLtTtaAoQoWbNvnKe0CfSRejpUbKVo3Y0L0RI+I=; b=jw4Ol3iwWdl/t9CimFvXy5HVu7LpFELteyr1V2UOhXjJE2ApM292/FN753ePfAFsGB UMuij97oAGae8uvWKgBC8UsDCXNU4HuEMu0Vg+4btJJ1DBAnX3NSk6vd/Xgsm1e2k+Kt Uf5YHMn/5BjPjyQbRb5ILltvmSHkJYPexhgvM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257197; x=1724861997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sjMKWLtTtaAoQoWbNvnKe0CfSRejpUbKVo3Y0L0RI+I=; b=MoLLplG9c8CMPnW2bA25L2GXEJVTHzB8IdMRceZbq2Y9txV5PhAsUnAoUMNrnzRDmS dB9Kir16Tg2HwweyWbbkgUrtNOWErzAxr+L+MLKP1+Vr0r1Idhf1jx1OLtSdz9mm9Vxw Jb4jDfSq4l37GC0Z/xQdNu+YRBO5IW2w3hZqtztuBNG+NeV0n+I/pn5hTbePcJ+lCnxC hIRdQY00wkR1sKbmBGbzRVMOGEufdD4JSNBFUihZLfGb+ybfX53U6uUtVXkGJ5v3Xwso 4vmSdc3KsuoFs+ur3WsY9CuCF6WKJcygVyORk3yn0/7qi8wyyR8W+LXGSSefx/8NRaKf Hckg== X-Gm-Message-State: AOJu0YxG1YTGmVtYxw0lY+/xSZG+c031zopgPfmpjW8EdElu8ZMGQR6S Avc5OPpRM2YxegZCU+ae3sf3S7krCvjEQ3mvx7mElq4wnxlqQEkoOolM433LLXPQyFRSjyYzavw = X-Google-Smtp-Source: AGHT+IGYledQOs1X1npQZSU4RjLN/3MDVJ0exTNGVwOx3gWNVMnCDYfIo+ymJy4S+ucga/hEyHiIxw== X-Received: by 2002:a05:6830:671b:b0:709:5601:abea with SMTP id 46e09a7af769-70df8709b10mr3358262a34.10.1724257196937; Wed, 21 Aug 2024 09:19:56 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:56 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 23/35] global_data: Reduce the size of bus_clk and mem_clk Date: Wed, 21 Aug 2024 10:19:15 -0600 Message-Id: <20240821161927.695717-24-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean The bus clock and memory clock are unlikely to go above 4GHz for now, so reduce the field size to 32 bits. Signed-off-by: Simon Glass --- (no changes since v1) arch/mips/mach-ath79/ar934x/clk.c | 4 ++-- arch/mips/mach-octeon/cpu.c | 2 +- include/asm-generic/global_data.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c index bdaa6839a2b..231a21ca90f 100644 --- a/arch/mips/mach-ath79/ar934x/clk.c +++ b/arch/mips/mach-ath79/ar934x/clk.c @@ -327,8 +327,8 @@ int do_ar934x_showclk(struct cmd_tbl *cmdtp, int flag, int argc, { ar934x_update_clock(); printf("CPU: %8ld MHz\n", gd->cpu_clk / 1000000); - printf("Memory: %8ld MHz\n", gd->mem_clk / 1000000); - printf("AHB: %8ld MHz\n", gd->bus_clk / 1000000); + printf("Memory: %8d MHz\n", gd->mem_clk / 1000000); + printf("AHB: %8d MHz\n", gd->bus_clk / 1000000); return 0; } diff --git a/arch/mips/mach-octeon/cpu.c b/arch/mips/mach-octeon/cpu.c index c7744e84706..c771da61a68 100644 --- a/arch/mips/mach-octeon/cpu.c +++ b/arch/mips/mach-octeon/cpu.c @@ -67,7 +67,7 @@ static int get_clocks(void) gd->cpu_clk = ref_clock * FIELD_GET(RST_BOOT_C_MUL, val); gd->bus_clk = ref_clock * FIELD_GET(RST_BOOT_PNR_MUL, val); - debug("%s: cpu: %lu, bus: %lu\n", __func__, gd->cpu_clk, gd->bus_clk); + debug("%s: cpu: %lu, bus: %u\n", __func__, gd->cpu_clk, gd->bus_clk); return 0; } diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 094e97449f6..0c8801500f0 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -66,11 +66,11 @@ struct global_data { /** * @bus_clk: platform clock rate in Hz */ - unsigned long bus_clk; + unsigned int bus_clk; /** * @mem_clk: memory clock rate in Hz */ - unsigned long mem_clk; + unsigned int mem_clk; /** * @env_addr: address of environment structure * From patchwork Wed Aug 21 16:19:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975042 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=i6UE0/qi; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WpsC35w4cz1yYZ for ; Thu, 22 Aug 2024 02:25:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BD7B588E97; Wed, 21 Aug 2024 18:20:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="i6UE0/qi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA29488E40; Wed, 21 Aug 2024 18:20:14 +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.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 2076488E57 for ; Wed, 21 Aug 2024 18:19:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-7092dd03223so1954929a34.1 for ; Wed, 21 Aug 2024 09:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257198; x=1724861998; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=S9tKt6bJiAh4xCBSHTMWxcBVYKB/8btQcihDTR2+FWQ=; b=i6UE0/qi0C9SISNSjWfWqxyXsuRXdoJcNjQdtjqpKBw9utLUTO7iCIMLeWjM5KRiVP xyjom0vv9hn44/GvsCO4jNw4txrnfyz1mDzZx+QUtF56i9Bp9o43vcT2sIJDT3nAEVfe 1f/uFbdrI0Y73geSSN0W7KRfPePSL+G5A7qh0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257198; x=1724861998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S9tKt6bJiAh4xCBSHTMWxcBVYKB/8btQcihDTR2+FWQ=; b=GM/q/xpe4JddXptSKlXeLtiRH3R5pwiGY8tIITTBExSsrk0NF+BzMbliOnB73VTsfA +V2Xk/icN2qBbWaGUKXVqnQi3Hdhi5CGA9Jy0UE+lfRo23iF82KQ3o1iHLrImFQ6pRk2 JzMYY1JTJ6FxBi3OQnhvnNNhnRPH5miLF1IKsKvuVmBS4h0Up2B+mvgcOW1EmK4XrXJl eBDvXywxcZSXcCP+JKVI0Hjd1f03+CDpF66XxWIaCjLo9mP/B7VQDmN0fC7fxYaVGflr DU1DDWUuqUxXKU3BnXM5nP1LXNrQ1vdIvlGAvdpY+Io/wA4q/Lhi9cYXwwh6W1AhmLIc 9nvQ== X-Gm-Message-State: AOJu0Yz0v+vxvmX/DvXpLFSfDt92/utLcR2hlGaY8/2wCg6El1plmGzU guFxCveYiVZ1VteSCu/wqaff7PROSyTYRib47diw7I6QK4hdwSCsLqCyOrXwjXM1j5mPeEHs8dY = X-Google-Smtp-Source: AGHT+IGeoEn3wLOTvoDeKxUAOznldP0rx9cBX44dGoPG30RB62UyAtNcwbNpVVoeSYONmqu7z5wC5Q== X-Received: by 2002:a05:6830:6a8f:b0:709:4d7a:3438 with SMTP id 46e09a7af769-70df86fbb28mr2997692a34.11.1724257197731; Wed, 21 Aug 2024 09:19:57 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:57 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 24/35] global_data: Reduce the size of mon_len Date: Wed, 21 Aug 2024 10:19:16 -0600 Message-Id: <20240821161927.695717-25-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This is the length of the U-Boot binary, which is typically 200-800KB and certainly not larger than 4GB. Use a 32-bit value to save space in global_data and move it up to be with fields of the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) common/board_f.c | 4 ++-- include/asm-generic/global_data.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index eb1a5f0e1e9..d9fe6f997ab 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -340,7 +340,7 @@ __weak int arch_setup_dest_addr(void) static int setup_dest_addr(void) { - debug("Monitor len: %08lX\n", gd->mon_len); + debug("Monitor len: %08x\n", gd->mon_len); /* * Ram is setup, size stored in gd !! */ @@ -477,7 +477,7 @@ static int reserve_uboot(void) gd->relocaddr &= ~(65536 - 1); #endif - debug("Reserving %ldk for U-Boot at: %08lx\n", + debug("Reserving %dk for U-Boot at: %08lx\n", gd->mon_len >> 10, gd->relocaddr); } diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 0c8801500f0..06523cab522 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -71,6 +71,10 @@ struct global_data { * @mem_clk: memory clock rate in Hz */ unsigned int mem_clk; + /** + * @mon_len: monitor length in bytes + */ + unsigned int mon_len; /** * @env_addr: address of environment structure * @@ -115,10 +119,6 @@ struct global_data { * @ram_size: RAM size in bytes */ phys_size_t ram_size; - /** - * @mon_len: monitor length in bytes - */ - unsigned long mon_len; /** * @irq_sp: IRQ stack pointer */ From patchwork Wed Aug 21 16:19:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975029 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=A53Dib7S; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps8Z4Djnz1yf6 for ; Thu, 22 Aug 2024 02:23:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3098288E7A; Wed, 21 Aug 2024 18:20:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="A53Dib7S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D78788E5F; Wed, 21 Aug 2024 18:20:02 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 F25FA88E2F for ; Wed, 21 Aug 2024 18:19:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-70944d76a04so586609a34.0 for ; Wed, 21 Aug 2024 09:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257198; x=1724861998; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bPi/VIayIRLzCwpRCGHKMiXIYAafogmhaCd7qKqTz2I=; b=A53Dib7S4XChIuFKBHHV5GUE72IloshEgrfmbIOpH0xBAgSu92w5w1A/oF+EhWmkRe iUSVRW1dbsOu5xl9qbNWawpJx7GaLZ5HJ0nRIK1QUViJEsx0fPE6MV6LoQUwbtG37OX0 8bjXYHcOXsamYKZifdqBEznJS3vuZgIFZ8gxk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257198; x=1724861998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bPi/VIayIRLzCwpRCGHKMiXIYAafogmhaCd7qKqTz2I=; b=n50xpE0RwO8wBRhPuRlniXjAJ5Cwex1lJ/K35l8aiNdluqA2deUSXBbHDScu51m1sc uWQdEGBN39AZ0tMmh9jd8RtrSKq5xzdVTuLVkpxhR8YIcuWsp6vGOr3itwqQ1f2BA3yi W6A/62+aqwvloMZnZN1W6QNfMaofdLgozpR1Qw5F1Vai7Lsp+uunHIE7CYexwRL9wPlf xWrWBFFlts04Y6d/03piBpvwgBmZPRrItIPLB5cpvrLgyHXx8Wseop5ubXe3iuBXNIui 9inpW7qIe8ajWGIBelisWqeWsUCawn8YXvGo2/IBUK7uUvMVjFkbegG8sboJjztJLjEk libg== X-Gm-Message-State: AOJu0YwCpAFfXPyphxIieYCFDieK7xBlsc6C29vc55nsdwGyPH5uZsiD Ke+eFRRUzPdkmXDgYLgyZuYlTbeBgYkqODU4Zv4bX8JP4xYKDsg+gnhGz0gIJ3LsMtBRfyETBQw = X-Google-Smtp-Source: AGHT+IHShZ2SCOQ5B14ZzBRq/Cdj0Xtfr66rKkz+znqVodQZXGq8C6x2ELW1Xl7TqSebwzfgg/5Ohg== X-Received: by 2002:a05:6830:911:b0:703:7888:3e9f with SMTP id 46e09a7af769-70e01b96ca9mr67814a34.9.1724257198550; Wed, 21 Aug 2024 09:19:58 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:58 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 25/35] global_data: log: Reorder and shrink fields Date: Wed, 21 Aug 2024 10:19:17 -0600 Message-Id: <20240821161927.695717-26-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Some of the logging fields are larger than they need to be. Shrink them and adjust the ordering to improve alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 43 +++++++++++++++---------------- test/log/log_test.c | 6 ++--- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 06523cab522..253dd21d880 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -339,6 +339,16 @@ struct global_data { struct bootstage_data *bootstage; #endif #ifdef CONFIG_LOG + /** + * @log_head: list of logging devices + */ + struct list_head log_head; + /** + * @log_fmt: bit mask for logging format + * + * The @log_fmt bit mask selects the fields to be shown in log messages. + * &enum log_fmt defines the bits of the bit mask. + */ /** * @log_drop_count: number of dropped log messages * @@ -353,44 +363,33 @@ struct global_data { * For logging devices without filters @default_log_level defines the * logging level, cf. &enum log_level_t. */ - int default_log_level; - /** - * @log_head: list of logging devices - */ - struct list_head log_head; - /** - * @log_fmt: bit mask for logging format - * - * The @log_fmt bit mask selects the fields to be shown in log messages. - * &enum log_fmt defines the bits of the bit mask. - */ - int log_fmt; - - /** - * @processing_msg: a log message is being processed - * - * This flag is used to suppress the creation of additional messages - * while another message is being processed. - */ - bool processing_msg; + char default_log_level; + char log_fmt; /** * @logc_prev: logging category of previous message * * This value is used as logging category for continuation messages. */ - int logc_prev; + unsigned char logc_prev; /** * @logl_prev: logging level of the previous message * * This value is used as logging level for continuation messages. */ - int logl_prev; + unsigned char logl_prev; /** * @log_cont: Previous log line did not finished wtih \n * * This allows for chained log messages on the same line */ bool log_cont; + /** + * @processing_msg: a log message is being processed + * + * This flag is used to suppress the creation of additional messages + * while another message is being processed. + */ + bool processing_msg; #endif #if CONFIG_IS_ENABLED(BLOBLIST) /** diff --git a/test/log/log_test.c b/test/log/log_test.c index 855353a9c40..2ccc187916f 100644 --- a/test/log/log_test.c +++ b/test/log/log_test.c @@ -379,9 +379,9 @@ int log_test_level_deny(struct unit_test_state *uts) ut_assertok(console_record_reset_enable()); log_run(); - check_log_entries_flags_levels(EXPECT_LOG | EXPECT_DIRECT | EXPECT_FORCE, - LOGL_WARNING + 1, - min(gd->default_log_level, LOGL_INFO)); + check_log_entries_flags_levels( + EXPECT_LOG | EXPECT_DIRECT | EXPECT_FORCE, + LOGL_WARNING + 1, min((int)gd->default_log_level, LOGL_INFO)); ut_assertok(log_remove_filter("console", filt1)); ut_assertok(log_remove_filter("console", filt2)); From patchwork Wed Aug 21 16:19:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975030 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=hSv/W2jC; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps8m3NF4z1yf6 for ; Thu, 22 Aug 2024 02:23:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F73D88E80; Wed, 21 Aug 2024 18:20:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="hSv/W2jC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E85F088E41; Wed, 21 Aug 2024 18:20:03 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) (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 0974488E48 for ; Wed, 21 Aug 2024 18:20:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-7095bfd6346so4121819a34.0 for ; Wed, 21 Aug 2024 09:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257199; x=1724861999; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MG9H2vzu6Pv/pzojZG1JUbKZEjdJC7PHQyLvp3SiEs0=; b=hSv/W2jCNnAs3kn/Up22cD3CdzLLGYVU+AiMn/emc2BwxvES06ZwbDe4i2NHtKWgGJ 5d/uBMU6iGBrNqpM7M5JQxP5IWGIvxdF6hPOv0/2thNCiWT8k3e3kbWcpgMYpSsia8EV Hgtjcl+GN5SeZ+bSL+HlnbYi7ycbhLrofT/7c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257199; x=1724861999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MG9H2vzu6Pv/pzojZG1JUbKZEjdJC7PHQyLvp3SiEs0=; b=vcT8XpBK6XkAzWR8AFOqv2sMwiD9QdRgV7SyEhRCLSmuFBPI4ZvVMvCqCajaDT3YBb qCXBoP51XApl52+0/6yd7e0JoCgwvNsva0+efqXALAJNNarbFYojSfdmESN4wWv6PAjf zUhtS7Ue7fveQxcbMlRRwhYxH0cq7zB6WyM/1zxaY3EdF3JBOngSp8teOlokJHCC4FHA QrBD2RICIUuWBTJ1ZjKIE1lyEzvyoq3kAhxCJ6Yr44uMhKKnOzQKlV3919g+7rQ0p+5a f4jbYubl/VA1LmXmP6LqgmeE/QkX1nFgrmDlcP6TiNj/1P4oCtSON85On9AOl6LZtzdi hj8A== X-Gm-Message-State: AOJu0YxYKPIR3A4AFoa+XdPUKVwe5NH+3Rjnu2N44q4JMJTaLHp7arjA EAhwsIcaWf3UV6F6NJePUYsJ10Z/iCZvyWzqf7Wu1JXXn0QuhFzja1SRvC/53sEmE0VN7Ru94Gg = X-Google-Smtp-Source: AGHT+IHXQyC3vXe1F6FRlBDevAbWdErjIOYoGcVyxbcYGgLJwkJxw403YpLmTzms/jsCiOF46reL7g== X-Received: by 2002:a05:6830:211b:b0:709:4ef3:244 with SMTP id 46e09a7af769-70df8890822mr3173581a34.30.1724257199505; Wed, 21 Aug 2024 09:19:59 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:19:59 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 26/35] global_data: Reduce size of early-malloc vars Date: Wed, 21 Aug 2024 10:19:18 -0600 Message-Id: <20240821161927.695717-27-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean The early malloc region is normally quite small and is certainly less than 4GB, so use a 32-bit value for the limit and pointer. Update the comment for clarity while we are here. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/lib/bdinfo.c | 2 +- common/board_r.c | 2 +- common/malloc_simple.c | 7 ++++--- common/spl/spl.c | 4 ++-- include/asm-generic/global_data.h | 6 +++--- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c index 7c49462c8eb..c7fff01c435 100644 --- a/arch/arm/lib/bdinfo.c +++ b/arch/arm/lib/bdinfo.c @@ -58,7 +58,7 @@ void arch_print_bdinfo(void) printf("Board Type = %ld\n", gd->board_type); #endif #if CONFIG_IS_ENABLED(SYS_MALLOC_F) - printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr, + printf("Early malloc usage: %x / %x\n", gd->malloc_ptr, CONFIG_VAL(SYS_MALLOC_F_LEN)); #endif } diff --git a/common/board_r.c b/common/board_r.c index f445803d7a4..e88b7ea4d8a 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -192,7 +192,7 @@ static int initr_malloc(void) ulong start; #if CONFIG_IS_ENABLED(SYS_MALLOC_F) - debug("Pre-reloc malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr, + debug("Pre-reloc malloc() used %#x bytes (%d KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); #endif /* The malloc area is immediately below the monitor copy in DRAM */ diff --git a/common/malloc_simple.c b/common/malloc_simple.c index 4e6d7952b3c..c24e70c95c2 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -18,12 +18,13 @@ DECLARE_GLOBAL_DATA_PTR; static void *alloc_simple(size_t bytes, int align) { - ulong addr, new_ptr; + ulong addr; + uint new_ptr; void *ptr; addr = ALIGN(gd->malloc_base + gd->malloc_ptr, align); new_ptr = addr + bytes - gd->malloc_base; - log_debug("size=%lx, ptr=%lx, limit=%lx: ", (ulong)bytes, new_ptr, + log_debug("size=%lx, ptr=%x, limit=%x: ", (ulong)bytes, new_ptr, gd->malloc_limit); if (new_ptr > gd->malloc_limit) { log_err("alloc space exhausted\n"); @@ -87,6 +88,6 @@ void free_simple(void *ptr) void malloc_simple_info(void) { - log_info("malloc_simple: %lx bytes used, %lx remain\n", gd->malloc_ptr, + log_info("malloc_simple: %x bytes used, %x remain\n", gd->malloc_ptr, CONFIG_VAL(SYS_MALLOC_F_LEN) - gd->malloc_ptr); } diff --git a/common/spl/spl.c b/common/spl/spl.c index 651b434f615..459161910e6 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -784,7 +784,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) } if (CONFIG_IS_ENABLED(SYS_MALLOC_F) && !IS_ENABLED(CONFIG_SPL_SYS_MALLOC_SIZE)) - debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", + debug("SPL malloc() used 0x%x bytes (%d KB)\n", gd_malloc_ptr(), gd_malloc_ptr() / 1024); bootstage_mark_name(get_bootstage_id(false), "end phase"); @@ -903,7 +903,7 @@ ulong spl_relocate_stack_gd(void) #if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_IS_ENABLED(SYS_MALLOC_F) if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) { - debug("SPL malloc() before relocation used 0x%lx bytes (%ld KB)\n", + debug("SPL malloc() before relocation used 0x%x bytes (%d KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); ptr -= CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN; gd->malloc_base = ptr; diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 253dd21d880..c5f07709118 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -299,13 +299,13 @@ struct global_data { */ unsigned long malloc_base; /** - * @malloc_limit: limit address of early malloc() + * @malloc_limit: maximum size of early malloc() */ - unsigned long malloc_limit; + unsigned int malloc_limit; /** * @malloc_ptr: current address of early malloc() */ - unsigned long malloc_ptr; + unsigned int malloc_ptr; #endif #ifdef CONFIG_CONSOLE_RECORD /** From patchwork Wed Aug 21 16:19:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975033 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=d/ZGw+Le; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps9903T6z1yf6 for ; Thu, 22 Aug 2024 02:24:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5908088E88; Wed, 21 Aug 2024 18:20:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="d/ZGw+Le"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 802AC88E7E; Wed, 21 Aug 2024 18:20:05 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) (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 91AD188E51 for ; Wed, 21 Aug 2024 18:20:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-70943713472so3216270a34.2 for ; Wed, 21 Aug 2024 09:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257200; x=1724862000; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+XuniX7CvS5lAXdr7cIqEyl1WfOfadrMlaBVJ+KGEh4=; b=d/ZGw+Leb5gLDMk9xu0VN9pJdpCVe4wGLG3ZCu9m/9Pc4PEyaz9IlJ6ax1tbICCrXp 33vKADjrL40Ytpiv0mayEBtcwofERzd0wowU6zCUAJoSGWiQCzWV2bweylnzHJDLgli4 Pzy/tkLzkXqdCKE2hTkgJIUD287e/tnJ7CMmg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257200; x=1724862000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+XuniX7CvS5lAXdr7cIqEyl1WfOfadrMlaBVJ+KGEh4=; b=gKh2YonrjfA5mM5EvC7hRDYfIqIYEGlTgEuFrAWnuzzK5xsGdzyETkrpZWcLatH0Wg 20PQBO4Va7g3GYpsapY1bwRs2yVN89WnDN/WF3Zl/hRidWL20KqasQfWpRV3k3gw0ZL3 eR2qCaqgc61cx2iTjBhDS6rBK/rftdMMoqz5TOKKjK1rExRAbfq8RRCNkio3EIVdc9SL yZtko7ZTH/8TXvk/nWZdPkXIYbF5/JMLD3zJfjMigu8qH+oEADzjXR+fW0EBxNNHYT7y +UEDImQnk5ZejeCMpSfNPE7dw7iSiQIhUgF+C43wEH61yLvyM/DWikezXuoXe5mAZ2bC KsUA== X-Gm-Message-State: AOJu0YxZToH3/Rb04jCFLO5DhoQBxlHFEGibZlQARGdUrYmkDJW4cT3v qpLsfSQoS7O+BALOB/U5ztV65p8XBc8cNViBvkagtgk1U4UGmrIpEq2t55vvJWPMLTN247cHKlY = X-Google-Smtp-Source: AGHT+IEOoDEfUg1pZDdgV9dcCE4Yt4tKD2xgY1UtMUFLtoViLwW1QK+m0War/NiWoGxR/Nc1Eu9cuw== X-Received: by 2002:a05:6830:908:b0:703:fdda:c1c7 with SMTP id 46e09a7af769-70df85d5261mr3761808a34.7.1724257200300; Wed, 21 Aug 2024 09:20:00 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:00 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 27/35] global_data: Move baud_rate field lower Date: Wed, 21 Aug 2024 10:19:19 -0600 Message-Id: <20240821161927.695717-28-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Move this field to be with others of the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index c5f07709118..3588e1eee5b 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -55,10 +55,6 @@ struct global_data { * See &enum gd_flags */ unsigned long flags; - /** - * @baudrate: baud rate of the serial interface - */ - unsigned int baudrate; /** * @cpu_clk: CPU clock rate in Hz */ @@ -75,6 +71,10 @@ struct global_data { * @mon_len: monitor length in bytes */ unsigned int mon_len; + /** + * @baudrate: baud rate of the serial interface + */ + unsigned int baudrate; /** * @env_addr: address of environment structure * From patchwork Wed Aug 21 16:19:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975034 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=KaS+xmcC; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps9M33zSz1yf6 for ; Thu, 22 Aug 2024 02:24:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B446C88E5B; Wed, 21 Aug 2024 18:20:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KaS+xmcC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C07DC88E82; Wed, 21 Aug 2024 18:20:05 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (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 BFF2D88E6C for ; Wed, 21 Aug 2024 18:20:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-7095bfd6346so4121849a34.0 for ; Wed, 21 Aug 2024 09:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257201; x=1724862001; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GoT+ejXC+bHGjP7EcSc1JQZdsvxt2mf5sMyF0m/2Xtw=; b=KaS+xmcCt5r0pLBTPibKKwjpAzhIrDq66qmJO/CwFFVp+8/1CFoSwAxBQCfxqPfcBx tXBWfwMKWW7D+rfT00e3cu6m6nS1tHFLz56LyzcJqTcO2cb3932PZdO6wjIf+3WJWoA/ 5EWt1JvbI0qrevaDPjgdE1UipCsZVoxwj79FQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257201; x=1724862001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GoT+ejXC+bHGjP7EcSc1JQZdsvxt2mf5sMyF0m/2Xtw=; b=anbwWCmRL6H1U2nr0p8/YtklDdw6/h5i39Q3pCdem7RinOS2ULeFf0FnxJPUIaNIH7 CVOpB2BAPht5gUqY/OVce+EYRZUYCqvqEUMF9/1rprCkAptNdGXS2zcMIIT9709HopOD oHs77mrxIj7xJEOMrZZ6yvEKHLe4MFNsYipYcHZ1Hew24L/CJYncCGtVecdR7rEFjEUm 1lB6jEw6JMt1L8SmSbCQuKon216gTOEytAhWOT6aTXBAR9c5eG5Zm/eBUqfgXQWXCCxv XfsFUNlyy4TsmsWFHqnv4j3XfJnzTEvDHOOFWO1Z4Floq6l5GgmSOphyR4okRmKR4D6N D8/g== X-Gm-Message-State: AOJu0YzGLzfJfIAe++v1rjmreCu+i8FDxMaTRv4QHkOF2M7t+7L1KbdR lrDvlIVuFrW50/64Kr0dJ+jX5VxAYKr0EMmYmXTGiiDu+E8Xl22OL0sh89SgaC2w44uP2/DxS7M = X-Google-Smtp-Source: AGHT+IHC8+zOOSthLMlLVRuDBUgMxA6XHMz+7Mna80MGdYRd8JKMH9ZJdNdq5IChIU+8XlsbdEYxug== X-Received: by 2002:a05:6830:4890:b0:703:6477:460a with SMTP id 46e09a7af769-70df888f77emr2735387a34.29.1724257201457; Wed, 21 Aug 2024 09:20:01 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:00 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 28/35] global_data: Move env_addr field higher Date: Wed, 21 Aug 2024 10:19:20 -0600 Message-Id: <20240821161927.695717-29-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Move this field to be with others of the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 3588e1eee5b..3296813e86a 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -59,6 +59,13 @@ struct global_data { * @cpu_clk: CPU clock rate in Hz */ unsigned long cpu_clk; + /** + * @env_addr: address of environment structure + * + * @env_addr contains the address of the structure holding the + * environment variables. + */ + unsigned long env_addr; /** * @bus_clk: platform clock rate in Hz */ @@ -75,13 +82,6 @@ struct global_data { * @baudrate: baud rate of the serial interface */ unsigned int baudrate; - /** - * @env_addr: address of environment structure - * - * @env_addr contains the address of the structure holding the - * environment variables. - */ - unsigned long env_addr; /** * @env_has_init: bit mask indicating environment locations * From patchwork Wed Aug 21 16:19:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975035 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=L7TRe05q; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps9Y3TXYz1yf6 for ; Thu, 22 Aug 2024 02:24:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 21A3088E8F; Wed, 21 Aug 2024 18:20:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="L7TRe05q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 130AE88E82; Wed, 21 Aug 2024 18:20:06 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (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 AF22488E40 for ; Wed, 21 Aug 2024 18:20:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-70942ebcc29so4691202a34.0 for ; Wed, 21 Aug 2024 09:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257202; x=1724862002; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F4G0YWPb6Ypzaml5yjhEsz6oeskiXYPPZugMgD1i3eQ=; b=L7TRe05qYYGMjVXRWCYn6LFaOXSWQlkiL2PHeDeGDeh/qEWWu9PBzgZo5m6Bf7Nhbx 8JxHwMh8a/YA2h8GsOHZKE44KWfPK1Mba8mnZUqfH9lsJsAeSx+ZhMo6xcpOuPYKR8d6 nIJbVNXmvxhD1hMgoU1UzqcCOn1i0dZLiM/Io= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257202; x=1724862002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F4G0YWPb6Ypzaml5yjhEsz6oeskiXYPPZugMgD1i3eQ=; b=U5Q9gu0N1DBH2w8MlnCrjHrD31H+cFCsIDbevAyPfJJIBEplA5V21khdzF20p+l2kq n3xtL4AIg+o4Rj+MWY/qYgr6Wym6USCmAYegZF7XTlxvVazz99vTSt9N71oRQlZRjqp3 iR5itMph17UhMDUvCiyNu9brPYN0seuvRxL1KxrarTlUJR4LnwNZElJnD2ZpbBiw+8Dj u9m9LPMg4V7kNwRAgwbScXB9FjFzsWtjI8FzU5CAqwUlE3yuDOoOds1Yzs7s6hz7CBbr VqstO2/qQ0HtTmCveuRWpi6/mJhefdnxJ5Zd9V+IKSBJBBHRhNryFcPOT5lu7Lp0lhLc Sikg== X-Gm-Message-State: AOJu0YyfifLWmzxqhoRwNmusNQP2WW16lg0Ogka4N5Vgq5eMevb3c+At eiYyo9s23fx5yklz6hSO/1R2H4mcGRWvPGFaURR4lWhLLFJnHk048I6gg6OXkVQdvQZ3CT+JMRU = X-Google-Smtp-Source: AGHT+IFaGdLWy03J2OVKUkpsJScAn+a1HDfj0NACtoLiJh/S7AcOwC3v1dTyM6wPDxC35O0CGkvMRg== X-Received: by 2002:a05:6830:4186:b0:704:4d29:65f5 with SMTP id 46e09a7af769-70df888dcf1mr3245323a34.32.1724257202293; Wed, 21 Aug 2024 09:20:02 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:02 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 29/35] global_data: Put phys_addr fields near the top Date: Wed, 21 Aug 2024 10:19:21 -0600 Message-Id: <20240821161927.695717-30-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Put these fields near the top and together, since they have the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 3296813e86a..774e757b179 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -49,6 +49,14 @@ struct global_data { */ struct board_f *boardf; #endif + /** + * @ram_size: RAM size in bytes + */ + phys_size_t ram_size; + /** + * @ram_top: top address of RAM used by U-Boot + */ + phys_addr_t ram_top; /** * @flags: global data flags * @@ -102,10 +110,6 @@ struct global_data { * @ram_base: base address of RAM used by U-Boot */ unsigned long ram_base; - /** - * @ram_top: top address of RAM used by U-Boot - */ - phys_addr_t ram_top; /** * @relocaddr: start address of U-Boot in RAM * @@ -115,10 +119,6 @@ struct global_data { * GDB using the 'add-symbol-file u-boot ' command. */ unsigned long relocaddr; - /** - * @ram_size: RAM size in bytes - */ - phys_size_t ram_size; /** * @irq_sp: IRQ stack pointer */ From patchwork Wed Aug 21 16:19:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975036 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=HpoICDmA; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps9l6Pm7z1yf6 for ; Thu, 22 Aug 2024 02:24:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7912488E5F; Wed, 21 Aug 2024 18:20:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HpoICDmA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 65C5488E8A; Wed, 21 Aug 2024 18:20:07 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (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 5584C88E14 for ; Wed, 21 Aug 2024 18:20:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-7093d565310so5157103a34.2 for ; Wed, 21 Aug 2024 09:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257203; x=1724862003; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+H5RGeQCdLCxKZFwPaaT0GiHF2QEAQHMFOGpbwgSWSM=; b=HpoICDmA7keJS+UzYKuI3+5JC1FoEuGV9ttZQ+Ii88cttj74Y/0tEy7aQXixOKr67y nIvOeIwhsSAuax/qoHQ2Ni8LGQ2ItUbjuEuaZQ8FWAFweHGJmvfiONX4gvVa8KbYHNBg HdY17tBEJevw5LuunPQiuMeP4P38Su39MT08E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257203; x=1724862003; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+H5RGeQCdLCxKZFwPaaT0GiHF2QEAQHMFOGpbwgSWSM=; b=ekMghnTMIXe82Evatrcx2iFJq7MKLGmEyDRPMGiWdhbGwBXD7b1CQOIA/MDYplJCci 9zN/yjXZ1PlfDcnmp6RGG9/yAAY++uDe8+wfOd8YxQaoOgCYFpgJhnGGTRK78azchA5j 4m83bDfaLcz7uQ7sVKpDqvv2SJvZJu8yb2mS1BfBej3+NEtoxH3lRwRNxHvz0xVgSFo5 ZxcwrdDFcKbdRzt5n1oZZg3SLNXaAvcOvA/eY2U0cH/vkmSdX4NUa6ezXSd2Cb500Hhk xUwZyBVXHxsITFnGi6U8L6n3IDjFM6O4uYSv2T/o28oetlybKi7RaDFLLCoCRUps9aDZ v2vw== X-Gm-Message-State: AOJu0YwclaRr9H/MzTZ/dt0r9pVtrHUNSWCQGfSvoSV198fiK4c0mqkc uN61E6AQtPL97CtQfA2hO9rEJt6meAP8bmahl3WMWiZr0qQA2cb4+vjx7vRnIQ8ui/mGsqPE1pM = X-Google-Smtp-Source: AGHT+IGvflbycqw0U3PMrboise9zZlQ+VCiEKLl0sXfHvOz9cb7v2qGaWKbW3zjkjdXSxZqmY5+5NA== X-Received: by 2002:a05:6830:3151:b0:709:409e:528b with SMTP id 46e09a7af769-70df87099e5mr2582477a34.15.1724257202998; Wed, 21 Aug 2024 09:20:02 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:02 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 30/35] global_data: Move ulong fields together Date: Wed, 21 Aug 2024 10:19:22 -0600 Message-Id: <20240821161927.695717-31-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Move all the always-present ulong fields next to the others at the top of global_data Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 774e757b179..073cadb1096 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -74,6 +74,31 @@ struct global_data { * environment variables. */ unsigned long env_addr; + /** + * @ram_base: base address of RAM used by U-Boot + */ + unsigned long ram_base; + /** + * @relocaddr: start address of U-Boot in RAM + * + * After relocation this field indicates the address to which U-Boot + * has been relocated. It can be displayed using the bdinfo command. + * Its value is needed to display the source code when debugging with + * GDB using the 'add-symbol-file u-boot ' command. + */ + unsigned long relocaddr; + /** + * @irq_sp: IRQ stack pointer + */ + unsigned long irq_sp; + /** + * @start_addr_sp: initial stack pointer address + */ + unsigned long start_addr_sp; + /** + * @reloc_off: relocation offset + */ + unsigned long reloc_off; /** * @bus_clk: platform clock rate in Hz */ @@ -106,31 +131,6 @@ struct global_data { * @env_load_prio: priority of the loaded environment */ char env_load_prio; - /** - * @ram_base: base address of RAM used by U-Boot - */ - unsigned long ram_base; - /** - * @relocaddr: start address of U-Boot in RAM - * - * After relocation this field indicates the address to which U-Boot - * has been relocated. It can be displayed using the bdinfo command. - * Its value is needed to display the source code when debugging with - * GDB using the 'add-symbol-file u-boot ' command. - */ - unsigned long relocaddr; - /** - * @irq_sp: IRQ stack pointer - */ - unsigned long irq_sp; - /** - * @start_addr_sp: initial stack pointer address - */ - unsigned long start_addr_sp; - /** - * @reloc_off: relocation offset - */ - unsigned long reloc_off; /** * @new_gd: pointer to relocated global data */ From patchwork Wed Aug 21 16:19:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975037 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=HftfjwEt; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wps9y64Y9z1yf6 for ; Thu, 22 Aug 2024 02:24:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D81D188E78; Wed, 21 Aug 2024 18:20:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HftfjwEt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 778F888E65; Wed, 21 Aug 2024 18:20:09 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (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 3273D88E7B for ; Wed, 21 Aug 2024 18:20:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-70cb3eb4461so372897a34.1 for ; Wed, 21 Aug 2024 09:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257204; x=1724862004; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l1nDsHUYkYE84Z0B2mh1jdgW3YLV67Zg2xUBPNLIpfs=; b=HftfjwEt51FDq7qFqk54pIh/GKYLIpujCgIrUM/Ld88YkGtVfhQD8d8dQo4Tp340r4 ZvqZgWZDfp3fYWcmhKN9xerm4xU2aNH/DlvQCZGpGNgi02dt3gsOvamKSClOD8Humhya Lq8au25jdHuRPfQVogpxcoddHNNF6fp+PI8Ro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257204; x=1724862004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l1nDsHUYkYE84Z0B2mh1jdgW3YLV67Zg2xUBPNLIpfs=; b=Rre/vS+beHteQbPpvdEgWK/gmEJJoyoj+FQ8d8LiGecA2Lu5jMHemFE3EFDi6P7Bba VYFCTfI5swZYPX7NCI9oMh+9EErMZZJmdNwHfP43rxwlxDG4XRYlJj+uPe+jnYqG+XGN Lj+jbVzLfVhF1oTdDYoUPQumjMf/Hs/clxTPHkNEtoxyRKd5XMnp6Z8WWE0CzzYCAmsu +Y3JWWT7Bl9Dc6jVGnuE6j6Ffkl5zhlap+aI+3GS7bAltFSrIIqB9ONgrspFGYx/tV6X RQ7rmEjh9cmvZe++TGhFfFXB7pkni2u1Fm7bby0ZY/C4CcVRKKbja2Sg0PHxfHiedzDd YI6g== X-Gm-Message-State: AOJu0YzEYPHoQmor6YPpCC5fFzg8F+SqSBoS0Ej2EML3UbeqvZ/cllcF sc4NfdBTDGbncFM1/nYHVxjstIdqFcp47lGZCuDkRZANDoSNA9T41QxPWYl7S462B9To2ncE/Oo = X-Google-Smtp-Source: AGHT+IGv4k36ayaT9s1Zgv8JzgSzKqUXigtF8i9UWJq6xYFRz12f5GG657poRwa2w9D+LlFhwb4fYA== X-Received: by 2002:a05:6830:6d8a:b0:709:3e6c:a7d5 with SMTP id 46e09a7af769-70e01baa798mr65367a34.14.1724257203769; Wed, 21 Aug 2024 09:20:03 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:03 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 31/35] global_data: Move pointer members together Date: Wed, 21 Aug 2024 10:19:23 -0600 Message-Id: <20240821161927.695717-32-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Collect the pointer members near the top of global_data to help with alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 073cadb1096..46763ef36bb 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -43,6 +43,25 @@ struct global_data { * @bd: board information */ struct bd_info *bd; + /** + * @new_gd: pointer to relocated global data + */ + struct global_data *new_gd; + /** + * @fdt_blob: U-Boot's own device tree, NULL if none + */ + const void *fdt_blob; + /** + * @jt: jump table + * + * The jump table contains pointers to exported functions. A pointer to + * the jump table is passed to standalone applications. + */ + struct jt_funcs *jt; + /** + * @cur_serial_dev: current serial device + */ + struct udevice *cur_serial_dev; #ifndef CONFIG_SPL_BUILD /** * @boardf: information only used before relocation @@ -131,33 +150,14 @@ struct global_data { * @env_load_prio: priority of the loaded environment */ char env_load_prio; - /** - * @new_gd: pointer to relocated global data - */ - struct global_data *new_gd; - /** - * @fdt_blob: U-Boot's own device tree, NULL if none - */ - const void *fdt_blob; /** * @fdt_src: Source of FDT */ enum fdt_source_t fdt_src; - /** - * @jt: jump table - * - * The jump table contains pointers to exported functions. A pointer to - * the jump table is passed to standalone applications. - */ - struct jt_funcs *jt; /** * @env_buf: buffer for env_get() before reloc */ char env_buf[32]; - /** - * @cur_serial_dev: current serial device - */ - struct udevice *cur_serial_dev; /** * @arch: architecture-specific data */ From patchwork Wed Aug 21 16:19:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975038 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=muTPStuR; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WpsBB2cfQz1yXf for ; Thu, 22 Aug 2024 02:25:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C0E688E83; Wed, 21 Aug 2024 18:20:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="muTPStuR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C661F88E5F; Wed, 21 Aug 2024 18:20:09 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 D1BFB88E70 for ; Wed, 21 Aug 2024 18:20:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-7093abb12edso4955377a34.3 for ; Wed, 21 Aug 2024 09:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257204; x=1724862004; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JNwW+7/q7pc/YAhpcLz0YXcrNs98e/n8OGnO3AVFwOo=; b=muTPStuRf0+WlW8fuSiUBLIDXvGelHEaNvAlITKJ3zIaEP7nlQ1yNgPjeIlL2CzWE2 6IU3UIu90cWrrBDx4PAK1SjoPxMsPpDUGQhxwnrQfQHrr4+nFY019fdrrP6dLpy/iyuG FVUr0ThVhtGWIkQ0apAdYqmQ+l0Wjmu3TMoDs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257204; x=1724862004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JNwW+7/q7pc/YAhpcLz0YXcrNs98e/n8OGnO3AVFwOo=; b=NKLgOx3C3MYrvJYVWbmRF2M56bLiR5iA01P84jggy9lQ355BaEtC7CD3N89DgTwkCi m3UbURFdpk+89nnfeHPyU/Ogb3Y6tVn47U4/GthJ/tq1U2ZR+95koSgQYFQiF1wF/rXf W+psPeAFkRHN95erjbSrUAGZhfR5Wv0jNzddRyhecfR0CZx+ZyWCAeWqE7inXPGp/ylY PDYfxKu3+6iUkdAhbs1+7fZLH+ZsNZyhlUe8ubAtRAcNfkb3PtrWxs4McqlypPb+ZOMe dhkjDgg3ueOECpBrVCGkmJAHeYwO+YCHnyMCzwAd52CllMxBzwSjyaiZMkUcT2ioLF9Y aJVA== X-Gm-Message-State: AOJu0Yy9fe/bRZAhsYD9jxvvQES1CEK2VTjqMXngYG79U70EwvpkC1P7 g9vehkEJwzHoDunWhSEy0U9TUkW3Moj+Env7si6vFE9KqlxE1orAfqyJm58R1zSpL6vdTcI9rpA = X-Google-Smtp-Source: AGHT+IH4MslvoRKfZdKYyn3ZJaqxnn33Ax2RB/I9CuUpJfXrNI5nkuRPCgC6Oqq5JG8RI4I08bs3mQ== X-Received: by 2002:a05:6830:2b26:b0:709:425f:e6d3 with SMTP id 46e09a7af769-70df85d943bmr3505129a34.7.1724257204527; Wed, 21 Aug 2024 09:20:04 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:04 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 32/35] global_data: Remove jump table in SPL Date: Wed, 21 Aug 2024 10:19:24 -0600 Message-Id: <20240821161927.695717-33-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean SPL builds don't use the jump table since they cannot run apps. Drop it, moving it together with boardf. Signed-off-by: Simon Glass --- (no changes since v1) board/freescale/ls2080ardb/eth_ls2080rdb.c | 2 +- common/console.c | 3 ++- include/asm-generic/global_data.h | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/board/freescale/ls2080ardb/eth_ls2080rdb.c b/board/freescale/ls2080ardb/eth_ls2080rdb.c index 44d9782d729..7fc4fecf774 100644 --- a/board/freescale/ls2080ardb/eth_ls2080rdb.c +++ b/board/freescale/ls2080ardb/eth_ls2080rdb.c @@ -12,7 +12,7 @@ DECLARE_GLOBAL_DATA_PTR; int board_eth_init(struct bd_info *bis) { -#ifdef CONFIG_PHY_AQUANTIA +#if defined(CONFIG_PHY_AQUANTIA) && !defined(CONFIG_SPL_BUILD) /* * Export functions to be used by AQ firmware * upload application diff --git a/common/console.c b/common/console.c index 30ddefef6b1..f39821385bb 100644 --- a/common/console.c +++ b/common/console.c @@ -189,6 +189,7 @@ static int console_setfile(int file, struct stdio_dev * dev) /* Assign the new device (leaving the existing one started) */ stdio_devices[file] = dev; +#ifndef CONFIG_SPL_BUILD /* * Update monitor functions * (to use the console stuff by other applications) @@ -206,7 +207,7 @@ static int console_setfile(int file, struct stdio_dev * dev) break; } break; - +#endif default: /* Invalid file ID */ error = -1; } diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 46763ef36bb..bd1069f572c 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -51,6 +51,11 @@ struct global_data { * @fdt_blob: U-Boot's own device tree, NULL if none */ const void *fdt_blob; + /** + * @cur_serial_dev: current serial device + */ + struct udevice *cur_serial_dev; +#ifndef CONFIG_SPL_BUILD /** * @jt: jump table * @@ -58,11 +63,6 @@ struct global_data { * the jump table is passed to standalone applications. */ struct jt_funcs *jt; - /** - * @cur_serial_dev: current serial device - */ - struct udevice *cur_serial_dev; -#ifndef CONFIG_SPL_BUILD /** * @boardf: information only used before relocation */ From patchwork Wed Aug 21 16:19:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975039 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Qa/C1xlL; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WpsBP5WZJz1yYZ for ; Thu, 22 Aug 2024 02:25:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 94D2288E43; Wed, 21 Aug 2024 18:20:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Qa/C1xlL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7B83188E40; Wed, 21 Aug 2024 18:20:10 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 B22E688E43 for ; Wed, 21 Aug 2024 18:20:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-70944d76a04so586680a34.0 for ; Wed, 21 Aug 2024 09:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257205; x=1724862005; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G01vxVo6fNrjWbbnkQ5N8c2f0N5CsTr2Bb3TXI1JLtU=; b=Qa/C1xlLkJ/EHXPPS9PrhbLLI4nrFyBnMWDWyxGNuzRE6YutAxv8iUHId+gFOS3TCK QCZJa2AzIG4dZ7dpblmkD2lzc9Xjzzy8UmGu0vYlrxFEKq0dki/kw2mvHYN9Wl/GP0I/ 1IDzavCaD5g0AeXrpz6Uhd1bCiYVMK6E4Qs6M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257205; x=1724862005; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G01vxVo6fNrjWbbnkQ5N8c2f0N5CsTr2Bb3TXI1JLtU=; b=swdtvZtXkhXGjCahW2VsYva+t29smzv0spp8qg0caP64LzYbb0prnyNeNGE2V4erjn bQHgpjuPULGGtuSMgSPm+itjOz+rsqERFT9tGMHo5vcLKKhMsuEzqQMicjxOIf/TFygQ AMLN/NNWnJAc3hXtfeBmaKQiAY8mwpAphzGIqiDQ0TJ09n3vWNqnHv2lHCP32DITdBOM eUPTJNrJPQRSCwCiz8oolQ+z7f6PiVSv4lKNQa3yZ2WmL6uTsxRyBXBxCAMiMKbQe53s Df9m0cJwDzsMMcVLzIu3XZJ3eOY+4AzpUVrwSzgOHM8wSEoXW0iTOvT7mfF3wF6hb2gL Kb0A== X-Gm-Message-State: AOJu0YxuK3jSri+MoE9YlfeekpC06QRmaaQu69w/BZ+AGVJi94GzUUP8 yTxokBbNmCgt81qBHqpxkuh567wsw7mfELpoLcmindmnghvD0BU72DlXbF3i0wlOJQQIAKfrbNY = X-Google-Smtp-Source: AGHT+IEnm8Fmws6y9Jd0s3BNBeAo/QO2xNKt2Yw9pVMLWcOJNIGQL5SNf3MeuT7SeddCq2OrNSHxiA== X-Received: by 2002:a05:6830:3108:b0:703:6cde:1cb9 with SMTP id 46e09a7af769-70e01ba8949mr68501a34.13.1724257205399; Wed, 21 Aug 2024 09:20:05 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:05 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 33/35] global_data: Remove environment members if not used Date: Wed, 21 Aug 2024 10:19:25 -0600 Message-Id: <20240821161927.695717-34-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean If the environment is not enabled we don't need these fields in global_data. Make them conditional. Make these fields conditional. Move env_buf up one so it can share an #ifdef. Signed-off-by: Simon Glass --- (no changes since v1) common/hwconfig.c | 8 +++++++- include/asm-generic/global_data.h | 12 ++++++++---- lib/asm-offsets.c | 2 ++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/common/hwconfig.c b/common/hwconfig.c index afaa6cb37ab..25a8cd5bf5d 100644 --- a/common/hwconfig.c +++ b/common/hwconfig.c @@ -77,7 +77,13 @@ static const char *__hwconfig(const char *opt, size_t *arglen, /* if we are passed a buffer use it, otherwise try the environment */ if (!env_hwconfig) { - if (!(gd->flags & GD_FLG_ENV_READY) && gd->env_valid != ENV_VALID) { +#if CONFIG_IS_ENABLED(ENV_SUPPORT) + if (!(gd->flags & GD_FLG_ENV_READY) && + gd->env_valid != ENV_VALID) +#else + if (true) +#endif + { printf("WARNING: Calling __hwconfig without a buffer " "and before environment is ready\n"); return NULL; diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index bd1069f572c..a05b939c007 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -86,6 +86,7 @@ struct global_data { * @cpu_clk: CPU clock rate in Hz */ unsigned long cpu_clk; +#if CONFIG_IS_ENABLED(ENV_SUPPORT) /** * @env_addr: address of environment structure * @@ -93,6 +94,7 @@ struct global_data { * environment variables. */ unsigned long env_addr; +#endif /* ENV_SUPPORT */ /** * @ram_base: base address of RAM used by U-Boot */ @@ -134,6 +136,7 @@ struct global_data { * @baudrate: baud rate of the serial interface */ unsigned int baudrate; +#if CONFIG_IS_ENABLED(ENV_SUPPORT) /** * @env_has_init: bit mask indicating environment locations * @@ -150,14 +153,15 @@ struct global_data { * @env_load_prio: priority of the loaded environment */ char env_load_prio; - /** - * @fdt_src: Source of FDT - */ - enum fdt_source_t fdt_src; /** * @env_buf: buffer for env_get() before reloc */ char env_buf[32]; +#endif /* ENV_SUPPORT */ + /** + * @fdt_src: Source of FDT + */ + enum fdt_source_t fdt_src; /** * @arch: architecture-specific data */ diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c index 4e2dbda9a71..b6bbcbf76ca 100644 --- a/lib/asm-offsets.c +++ b/lib/asm-offsets.c @@ -44,7 +44,9 @@ int main(void) DEFINE(GD_NEW_GD, offsetof(struct global_data, new_gd)); +#if CONFIG_IS_ENABLED(ENV_SUPPORT) DEFINE(GD_ENV_ADDR, offsetof(struct global_data, env_addr)); +#endif return 0; } From patchwork Wed Aug 21 16:19:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975040 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=LhJQaojh; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WpsBd0sCfz1yYZ for ; Thu, 22 Aug 2024 02:25:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EBF7988E57; Wed, 21 Aug 2024 18:20:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="LhJQaojh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2200188E40; Wed, 21 Aug 2024 18:20:11 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 9E31188E75 for ; Wed, 21 Aug 2024 18:20:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-7092ea69218so483842a34.1 for ; Wed, 21 Aug 2024 09:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257206; x=1724862006; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=frhQA5ILUsz42KJd8pJHwJTbR6zxgQzsoRaaKvRIME8=; b=LhJQaojh8di8AhgZgzfDxIcFtidhCg6B+56QYPYWy/gq8xZyiSY7FthsVSuRUW2Mjw sqTcqiVIQp1mOrrG7AZ0jVzjVhSC8is5gTTBW6XI3pQKAtA9bYICJ/EGGAjBG0LdG9rV UnVN+nmvU1bANEc61icR1oWO3TzDq51lYZjNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257206; x=1724862006; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=frhQA5ILUsz42KJd8pJHwJTbR6zxgQzsoRaaKvRIME8=; b=gM+4rymX5Aib9E5INs6E2NqkpwscdZYhH8Z7ulnlytQogLGnVvf2aP05L7JyPligO1 lnKr4peQ/pwzs9QfrGKWsIvtHik5m6USMS2khknwJttRHbnCeyDzUHCCJqIHYxf+Rx5P p8bOo8te31ILkzOWrvgTBUYbeL64s5HcZWkZbtdqtN+JiVJNAtlFPgd6ADH6/qdyU6bW e+l2UElepYjQ+ZVQeDnp5pzeNfZuM3eaWAZFi+XTUH4cy1qbwMZlhKutwy+BC19ARCO2 j81zi/APVOoIk6PnexdCUD4cIpVPGbsGDRaYvswK4jo1StKwMMhncBX2zGE7tIU2Eh95 NRSA== X-Gm-Message-State: AOJu0YxTQmOUWCdaB7Ij7nr5bhcODmsTgxvRf7ahPyBVSm7MH8f4Fc4y xVpWtbLAAlig9CUsjxxBPkDlg+pcCll0F6xdLmKwPQtLe/84QmdUR4wFTsxsCtOEYYtHZwgWnM4 = X-Google-Smtp-Source: AGHT+IHAOyZrL6ltQ3JvuJVgptsps0uv+NMdZgEE/lfc+8yP4ebfVT02gmVNH/1kZdyJXouZFUEbIw== X-Received: by 2002:a05:6830:2a93:b0:6f9:afdc:8554 with SMTP id 46e09a7af769-70e01bc65dfmr69687a34.15.1724257206201; Wed, 21 Aug 2024 09:20:06 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:05 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 34/35] doc: Move generic-board documentation into rst Date: Wed, 21 Aug 2024 10:19:26 -0600 Message-Id: <20240821161927.695717-35-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean This information is useful for people looking at how U-Boot has changed over the years and the design decisions which led to it. Move it into doc/ in an 'historical' section. Signed-off-by: Simon Glass --- (no changes since v1) .../historical/generic_board.rst} | 17 +++++++++-------- doc/develop/historical/index.rst | 12 ++++++++++++ doc/develop/index.rst | 8 ++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) rename doc/{README.generic-board => develop/historical/generic_board.rst} (96%) create mode 100644 doc/develop/historical/index.rst diff --git a/doc/README.generic-board b/doc/develop/historical/generic_board.rst similarity index 96% rename from doc/README.generic-board rename to doc/develop/historical/generic_board.rst index bc35179fbfd..12550a140e0 100644 --- a/doc/README.generic-board +++ b/doc/develop/historical/generic_board.rst @@ -1,10 +1,9 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2014 Google, Inc -# Simon Glass +.. SPDX-License-Identifier: GPL-2.0+ +.. (C) Copyright 2014 Google, Inc +.. sectionauthor:: Simon Glass -Background ----------- +Generic board +------------- U-Boot traditionally had a board.c file for each architecture. This introduced quite a lot of duplication, with each architecture tending to do @@ -16,7 +15,7 @@ All boards and architectures have moved to this as of mid 2016. What has changed? ------------------ +~~~~~~~~~~~~~~~~~ The main change is that the arch//lib/board.c file is removed in favour of common/board_f.c (for pre-relocation init) and common/board_r.c @@ -28,7 +27,7 @@ have been moved to separate structures. Further Background ------------------- +~~~~~~~~~~~~~~~~~~ The full text of the original generic board series is reproduced below. @@ -132,4 +131,6 @@ convenience. Simon Glass, sjg@chromium.org March 2014 + Updated after final removal, May 2016 + diff --git a/doc/develop/historical/index.rst b/doc/develop/historical/index.rst new file mode 100644 index 00000000000..e4462f5d2a7 --- /dev/null +++ b/doc/develop/historical/index.rst @@ -0,0 +1,12 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Historical Documents +==================== + +This section provides documentation about major changes in U-Boot over the +years. + +.. toctree:: + :maxdepth: 1 + + generic_board diff --git a/doc/develop/index.rst b/doc/develop/index.rst index c0107a783fc..0d0e60ab56c 100644 --- a/doc/develop/index.rst +++ b/doc/develop/index.rst @@ -99,3 +99,11 @@ Code quality :maxdepth: 1 python_cq + +Historical documentation +------------------------ + +.. toctree:: + :maxdepth: 2 + + historical/index From patchwork Wed Aug 21 16:19:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1975041 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=cMWiLYsz; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WpsBr3XY8z1yYZ for ; Thu, 22 Aug 2024 02:25:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 61A0888E7B; Wed, 21 Aug 2024 18:20:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="cMWiLYsz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A3E0E88E78; Wed, 21 Aug 2024 18:20:11 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (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 70EF888E93 for ; Wed, 21 Aug 2024 18:20:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-70943b07c2cso3863540a34.1 for ; Wed, 21 Aug 2024 09:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724257207; x=1724862007; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZXAu/nWITCpVkwG4bskSb0j0F9uq6fCgjaniKudbjGk=; b=cMWiLYszmP8aiZslASyC4l1lTWcNsRfI9F62lX5b6o/IZp1WGwFQybvdrYJ4z8tJi7 CKBOkS+iIPeAyHtvhhQNuLSJujnqzA7yt6j1nAzLmgJfyD+d/MDFcyrF5Mu15BKtH8n9 yhjVaoGs7azDPyp+xoD5WS7jes1d9T2bo+W0A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724257207; x=1724862007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZXAu/nWITCpVkwG4bskSb0j0F9uq6fCgjaniKudbjGk=; b=tJgmuStZAP3AWiGb086Cc4PmNB/YQ7AhvtMdNNhEOGWO6nVDmKPbgzDR8CXybKVjhV 6YOTKcvoWA2hgzE8R1HhN6Kj128QLVCMMe3wVx1hjxvbwfss+45Fs7rKY3QlB5uuyFMw 4JVwru2kITq9pqUQpvATyAQS95ihD4z115rSF8DFOBSakGqRDh5ndLPb/0UOWXTYQpaA +5f6YF8VZgyomFcJIaES5zPWx/x7ycM9cZurn+l/pKvuBMdfInz85Q6tqgBgb5MRpV/f F9eSCB8/aOmKr0kVLv2JVJ5ovOjK3IgTjbPb3rrQKDltJFDbBdsLGVnLErXzx3QwbaYE xvjg== X-Gm-Message-State: AOJu0YzUKkSvNExbMCBToP9u05/Rt1uh5RkFD9CuknBcE0ceSCqKmqAN TN3iZWepxyoLi1s0wUdsj6iGzCByZqJsLgEXKhFFJffZVUzXfl6fPV2R/I2cQK2mXQKzlTi8dQA = X-Google-Smtp-Source: AGHT+IH0asVtokJGGF3v0H1mtcXyEuOy4p4psdDDsO6NhhdndNqJpN8ETqLzk93YW7LpVnuFQvyMpg== X-Received: by 2002:a05:6830:2641:b0:709:472d:f342 with SMTP id 46e09a7af769-70df85e7f6emr2562180a34.6.1724257207106; Wed, 21 Aug 2024 09:20:07 -0700 (PDT) Received: from chromium.org ([139.60.174.4]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70ca6629792sm3222376a34.72.2024.08.21.09.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 09:20:06 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass Subject: [PATCH v2 35/35] doc: Add some guidelines about global data Date: Wed, 21 Aug 2024 10:19:27 -0600 Message-Id: <20240821161927.695717-36-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821161927.695717-1-sjg@chromium.org> References: <20240821161927.695717-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Update the documentation to provide a bit more information about how to use global data. Signed-off-by: Simon Glass --- Changes in v2: - Rebase to -next doc/develop/global_data.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc/develop/global_data.rst b/doc/develop/global_data.rst index d143f27eedd..2863154ea42 100644 --- a/doc/develop/global_data.rst +++ b/doc/develop/global_data.rst @@ -51,6 +51,31 @@ U-Boot. The value of gd has to be saved every time U-Boot is left and restored whenever U-Boot is reentered. This is also relevant for the implementation of function tracing. For setting the value of gd function set_gd() can be used. +Guidelines +---------- + +The global_data structure is placed in some memory which is available very early +after boot to allow for a minimum set of global variables during system +initialisation (until the memory controller is set up and RAM can be used). It +is the primary data structure passed from pre-relocation U-Boot to +post-relocation, i.e. ``from board_init_f()`` ``to board_init_r()``. + +The global_data struct exists for the lifetime of U-Boot. Since the struct is +used by all architectures, fields added should be useful for most architectures. +Fields which are only needed on one or two architectures can be placed in the +architecture-specific ``struct arch_global_data``. + +In any case the struct should be kept small, since it uses precious SRAM on +many boards. + +SPL also uses global data, as well as U-Boot proper, so take care to avoid +adding fields to SPL which are not actually used by SPL. You can create +access functions or macros in the header file to avoid filling the C code with +#ifdefs. + +A flags word is available, which provides a convenient means to track the state +of various initialisation phases within U-Boot. + Global data structure ---------------------