From patchwork Thu Aug 13 05:47:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344017 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=uDWpA5/Z; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwc147DHz9sTF for ; Thu, 13 Aug 2020 15:48:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 02DE9821D3; Thu, 13 Aug 2020 07:48:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297703; bh=GbyGylfJwv03Ms3hfNX0yRR3R2aUhvLhgaUBYIXA93M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uDWpA5/Z0rZXad72o//7nNi3NxSmQ2FP5NH5U6VswegvTLIVeeGox0/aOoaPjfL/4 UZXPKNx08XOPn8IMo6uNdGGRL7ASo8vVRbVo05K8VwXn1VpQ0HFM9idnNmAU1Wv+Wm nQfZ50BHTGX20vWmhJBgiVEbXDcXvLHOy9i8SSebyX3JgRVkVQtKqHdzFy/VR4Uf5W MMKQ6FXESa6AaiJpqkABlQ0oVg0AKISEfQEcbnEnAjdficA1PjrCfRlbjkhoEV8JjG 0oHiK1EZ/+NcZBRhYGleCvGCKvUg5RD3KrnBq5tZpRdXQUKNfRbxh7Zg5KIpkoTyoy CKOat+EJmHMUA== Received: by phobos.denx.de (Postfix, from userid 109) id E5C7D821D0; Thu, 13 Aug 2020 07:48:18 +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=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2a.mailbox.org [IPv6:2001:67c:2050:104:0:2:25:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B02F881B5E for ; Thu, 13 Aug 2020 07:48:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 033ECA0A11; Thu, 13 Aug 2020 07:48:12 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id Y5GQbrzZ3NrF; Thu, 13 Aug 2020 07:48:08 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Alex Marginean , Andy Shevchenko , Atish Patra , Bin Meng , Breno Matheus Lima , Masahiro Yamada , Michael Walle , Michal Simek , Ovidiu Panait , Patrick Delaunay , Robert Marko , Stefano Babic , Stephen Warren , Tero Kristo , Vikas Manocha , Wolfgang Wallner Subject: [PATCH v4 1/9] CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always defined Date: Thu, 13 Aug 2020 07:47:52 +0200 Message-Id: <20200813054800.469284-2-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 5E10B181E X-Rspamd-UID: 28be16 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Since commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") & commit 999a772d9f24 ("Kconfig: Migrate CONFIG_NR_DRAM_BANKS"), CONFIG_NR_DRAM_BANKS is always defined with a value (4 is default). It makes no sense to still carry code that is guarded with "#ifndef CONFIG_NR_DRAM_BANKS" (and similar). This patch removes all these unreferenced code paths. Signed-off-by: Stefan Roese Reviewed-by: Pali Rohár Reviewed-by: Andy Shevchenko --- Changes in v4: - Only remove dead code with CONFIG_NR_DRAM_BANKS always defined arch/x86/cpu/broadwell/cpu_from_spl.c | 2 -- board/xilinx/zynqmp/zynqmp.c | 2 -- cmd/bdinfo.c | 2 -- common/board_f.c | 7 +----- common/image.c | 3 +-- common/init/handoff.c | 33 +++++++++++---------------- drivers/pci/pci-uclass.c | 17 +------------- include/asm-generic/u-boot.h | 2 -- include/handoff.h | 2 -- lib/fdtdec.c | 5 ---- lib/lmb.c | 9 ++------ 11 files changed, 18 insertions(+), 66 deletions(-) diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c index 6567d50653..4d4cdafa2b 100644 --- a/arch/x86/cpu/broadwell/cpu_from_spl.c +++ b/arch/x86/cpu/broadwell/cpu_from_spl.c @@ -53,14 +53,12 @@ void board_debug_uart_init(void) int dram_init_banksize(void) { -#ifdef CONFIG_NR_DRAM_BANKS struct spl_handoff *ho; ho = bloblist_find(BLOBLISTT_SPL_HANDOFF, sizeof(*ho)); if (!ho) return log_msg_ret("Missing SPL hand-off info", -ENOENT); handoff_load_dram_banks(ho); -#endif return 0; } diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index ebb7172908..4cc5cb6fd7 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -467,10 +467,8 @@ int dram_init(void) #else int dram_init_banksize(void) { -#if defined(CONFIG_NR_DRAM_BANKS) gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = get_effective_memsize(); -#endif mem_map_fill(); diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 9593b345a3..9e230f23cb 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -49,7 +49,6 @@ void bdinfo_print_mhz(const char *name, unsigned long hz) static void print_bi_dram(const struct bd_info *bd) { -#ifdef CONFIG_NR_DRAM_BANKS int i; for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { @@ -59,7 +58,6 @@ static void print_bi_dram(const struct bd_info *bd) bdinfo_print_num("-> size", bd->bi_dram[i].size); } } -#endif } __weak void arch_print_bdinfo(void) diff --git a/common/board_f.c b/common/board_f.c index 79532f4365..dd9a5220e1 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -215,8 +215,6 @@ static int announce_dram_init(void) static int show_dram_config(void) { unsigned long long size; - -#ifdef CONFIG_NR_DRAM_BANKS int i; debug("\nRAM Configuration:\n"); @@ -229,9 +227,6 @@ static int show_dram_config(void) #endif } debug("\nDRAM: "); -#else - size = gd->ram_size; -#endif print_size(size, ""); board_add_ram_info(0); @@ -242,7 +237,7 @@ static int show_dram_config(void) __weak int dram_init_banksize(void) { -#if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE) +#if defined(CONFIG_SYS_SDRAM_BASE) gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = get_effective_memsize(); #endif diff --git a/common/image.c b/common/image.c index 9d7d5c17d1..2ed46f7685 100644 --- a/common/image.c +++ b/common/image.c @@ -685,8 +685,7 @@ phys_size_t env_get_bootm_size(void) return tmp; } -#if (defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)) && \ - defined(CONFIG_NR_DRAM_BANKS) +#if defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE) start = gd->bd->bi_dram[0].start; size = gd->bd->bi_dram[0].size; #else diff --git a/common/init/handoff.c b/common/init/handoff.c index e00b43e6a7..62071bd017 100644 --- a/common/init/handoff.c +++ b/common/init/handoff.c @@ -12,18 +12,15 @@ DECLARE_GLOBAL_DATA_PTR; void handoff_save_dram(struct spl_handoff *ho) { + struct bd_info *bd = gd->bd; + int i; + ho->ram_size = gd->ram_size; -#ifdef CONFIG_NR_DRAM_BANKS - { - struct bd_info *bd = gd->bd; - int i; - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { - ho->ram_bank[i].start = bd->bi_dram[i].start; - ho->ram_bank[i].size = bd->bi_dram[i].size; - } + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + ho->ram_bank[i].start = bd->bi_dram[i].start; + ho->ram_bank[i].size = bd->bi_dram[i].size; } -#endif } void handoff_load_dram_size(struct spl_handoff *ho) @@ -33,15 +30,11 @@ void handoff_load_dram_size(struct spl_handoff *ho) void handoff_load_dram_banks(struct spl_handoff *ho) { -#ifdef CONFIG_NR_DRAM_BANKS - { - struct bd_info *bd = gd->bd; - int i; - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { - bd->bi_dram[i].start = ho->ram_bank[i].start; - bd->bi_dram[i].size = ho->ram_bank[i].size; - } + struct bd_info *bd = gd->bd; + int i; + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + bd->bi_dram[i].start = ho->ram_bank[i].start; + bd->bi_dram[i].size = ho->ram_bank[i].size; } -#endif } diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 834526c5a4..69fb46d3f4 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -871,6 +871,7 @@ static void decode_regions(struct pci_controller *hose, ofnode parent_node, ofnode node) { int pci_addr_cells, addr_cells, size_cells; + struct bd_info *bd = gd->bd; int cells_per_record; const u32 *prop; int len; @@ -938,9 +939,6 @@ static void decode_regions(struct pci_controller *hose, ofnode parent_node, } /* Add a region for our local memory */ -#ifdef CONFIG_NR_DRAM_BANKS - struct bd_info *bd = gd->bd; - if (!bd) return; @@ -958,19 +956,6 @@ static void decode_regions(struct pci_controller *hose, ofnode parent_node, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); } } -#else - phys_addr_t base = 0, size; - - size = gd->ram_size; -#ifdef CONFIG_SYS_SDRAM_BASE - base = CONFIG_SYS_SDRAM_BASE; -#endif - if (gd->pci_ram_top && gd->pci_ram_top < base + size) - size = gd->pci_ram_top - base; - if (size) - pci_set_region(hose->regions + hose->region_count++, base, - base, size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); -#endif return; } diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index 62e61d41cc..99d3fe33ad 100644 --- a/include/asm-generic/u-boot.h +++ b/include/asm-generic/u-boot.h @@ -70,12 +70,10 @@ struct bd_info { #endif ulong bi_arch_number; /* unique id for this board */ ulong bi_boot_params; /* where this board expects params */ -#ifdef CONFIG_NR_DRAM_BANKS struct { /* RAM configuration */ phys_addr_t start; phys_size_t size; } bi_dram[CONFIG_NR_DRAM_BANKS]; -#endif /* CONFIG_NR_DRAM_BANKS */ }; #endif /* __ASSEMBLY__ */ diff --git a/include/handoff.h b/include/handoff.h index 75d19b1f6e..070a79c1b9 100644 --- a/include/handoff.h +++ b/include/handoff.h @@ -20,12 +20,10 @@ struct spl_handoff { struct arch_spl_handoff arch; u64 ram_size; -#ifdef CONFIG_NR_DRAM_BANKS struct { u64 start; u64 size; } ram_bank[CONFIG_NR_DRAM_BANKS]; -#endif }; void handoff_save_dram(struct spl_handoff *ho); diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 78576b530f..ecbf10121d 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1055,8 +1055,6 @@ int fdtdec_setup_mem_size_base(void) return 0; } -#if defined(CONFIG_NR_DRAM_BANKS) - static int get_next_memory_node(const void *blob, int mem) { do { @@ -1106,7 +1104,6 @@ int fdtdec_setup_memory_banksize(void) return 0; } -#endif #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) # if CONFIG_IS_ENABLED(MULTI_DTB_FIT_GZIP) ||\ @@ -1569,7 +1566,6 @@ int fdtdec_resetup(int *rescan) } #endif -#ifdef CONFIG_NR_DRAM_BANKS int fdtdec_decode_ram_size(const void *blob, const char *area, int board_id, phys_addr_t *basep, phys_size_t *sizep, struct bd_info *bd) @@ -1675,6 +1671,5 @@ int fdtdec_decode_ram_size(const void *blob, const char *area, int board_id, return 0; } -#endif /* CONFIG_NR_DRAM_BANKS */ #endif /* !USE_HOSTCC */ diff --git a/lib/lmb.c b/lib/lmb.c index 75082f3559..d126f8dc04 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -117,22 +117,17 @@ static void lmb_reserve_common(struct lmb *lmb, void *fdt_blob) /* Initialize the struct, add memory and call arch/board reserve functions */ void lmb_init_and_reserve(struct lmb *lmb, struct bd_info *bd, void *fdt_blob) { -#ifdef CONFIG_NR_DRAM_BANKS int i; -#endif lmb_init(lmb); -#ifdef CONFIG_NR_DRAM_BANKS + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { if (bd->bi_dram[i].size) { lmb_add(lmb, bd->bi_dram[i].start, bd->bi_dram[i].size); } } -#else - if (bd->bi_memsize) - lmb_add(lmb, bd->bi_memstart, bd->bi_memsize); -#endif + lmb_reserve_common(lmb, fdt_blob); } From patchwork Thu Aug 13 05:47:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344014 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=XeuAo87v; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwbR2c8tz9sTF for ; Thu, 13 Aug 2020 15:48:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B5E6181B45; Thu, 13 Aug 2020 07:48:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297696; bh=1t1RwMF10vp7659B9TQqLzCediZhFysy9awOozuIXnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XeuAo87vlZI/9HlXUS2VVODuZ4xOm38ED8WYmvn3EwYlR1PT4c6W5gQgl6lVmMckr AwzCWUQNt2r0sgrOEblgimWow6DfEyWOBgghF62c4b5WX/UxJJo6eJM2JnxugyRk0m AYxT7FKpkYXHxRYe4lhpeSYTPp6tNONOXkCqBRhsRv/rn9xPr2dh/8sCTJD5NQGcev aO++di38+dhaQK8CabC/+wuKOLZYpLXonwHDRaxwMuTYBKjwXOmJYzrVmIyPu26PjP 7JDsyF1yT/5rZ+FHPmZOOf4c8fFHNlGDkFLz2ziV+z5X5uybg2B0bdSAAtJWciQIZX a1rCYfpPLJ1DQ== Received: by phobos.denx.de (Postfix, from userid 109) id 1EB2082194; Thu, 13 Aug 2020 07:48:16 +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=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2a.mailbox.org [IPv6:2001:67c:2050:104:0:2:25:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9ECE781B45 for ; Thu, 13 Aug 2020 07:48:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id DD9E7A0979; Thu, 13 Aug 2020 07:48:11 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id rHKEsIZa8D9u; Thu, 13 Aug 2020 07:48:08 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Atish Patra , Breno Matheus Lima , Masahiro Yamada , Robert Marko , Stefano Babic Subject: [PATCH v4 2/9] image: Use gd->ram_base/_size in env_get_bootm_size() Date: Thu, 13 Aug 2020 07:47:53 +0200 Message-Id: <20200813054800.469284-3-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 7A5F1182B X-Rspamd-UID: 5135dd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Use only gd->ram_base/_size in env_get_bootm_size() instead of bi_dram[] in some cases and bi_memstart in others. Signed-off-by: Stefan Roese --- Changes in v4: - New patch common/image.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/common/image.c b/common/image.c index 2ed46f7685..6f68b13fce 100644 --- a/common/image.c +++ b/common/image.c @@ -685,13 +685,8 @@ phys_size_t env_get_bootm_size(void) return tmp; } -#if defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE) - start = gd->bd->bi_dram[0].start; - size = gd->bd->bi_dram[0].size; -#else - start = gd->bd->bi_memstart; - size = gd->bd->bi_memsize; -#endif + start = gd->ram_base; + size = gd->ram_size; s = env_get("bootm_low"); if (s) From patchwork Thu Aug 13 05:47:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344019 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=EcmmLbS0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwcV3sV3z9sTF for ; Thu, 13 Aug 2020 15:49:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0386B8221A; Thu, 13 Aug 2020 07:48:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297706; bh=P1K9hg7Fm4D1AhfmOqtAA3x3AnBlUx/E09b7bBzpseU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EcmmLbS0yGNynJKoWzfJI2265PJtLNDPn+68yf9K8ZIx8rTG1NRN8yFNfec0v2GXi pyjFkT428jrWZ6zAurZGaypDdH4y/AxJ22iNwC2zXDlwPC3ptcYENfwJQiAOXclgVt vzheaKz/GJxZ3xagqrbNbQvpKIBLYXtvXyh9uReYuwZCYTzHM2RHysT0AoRCr6FYpD oqFgN2kjsB/xGBYUi9YkG30FlpwUPjY0fWDf4Wp22wvGUrXW+zV3ivGNJtJhD9EhIl fmfr6JvmGWrYN1Sun2Gdv43NaXzZJRHr5/AehAiJz9Z3jEsLs50GIXVmf6Ri+BCROt erCYXnQav8bOg== Received: by phobos.denx.de (Postfix, from userid 109) id 7133381C33; Thu, 13 Aug 2020 07:48:19 +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=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2a.mailbox.org [IPv6:2001:67c:2050:104:0:2:25:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EBEFC81C33 for ; Thu, 13 Aug 2020 07:48:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 4B5E6A1202; Thu, 13 Aug 2020 07:48:12 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id e7ybIXnI8S3F; Thu, 13 Aug 2020 07:48:09 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Ovidiu Panait , Patrick Delaunay , Stephen Warren , Vikas Manocha Subject: [PATCH v4 3/9] board_f: Add default values for bi_dram[] in dram_init_banksize() Date: Thu, 13 Aug 2020 07:47:54 +0200 Message-Id: <20200813054800.469284-4-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: D4CCE182D X-Rspamd-UID: 38f60f X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Remove the bi_memstart / bi_memsize assignment in setup_bdinfo() and make sure, that bd_dram[] is always configured in the weak default implementation of dram_init_banksize(), when CONFIG_SYS_SDRAM_BASE is not set. Signed-off-by: Stefan Roese --- Changes in v4: - New patch common/board_f.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index dd9a5220e1..bfbeda29b2 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -240,6 +240,9 @@ __weak int dram_init_banksize(void) #if defined(CONFIG_SYS_SDRAM_BASE) gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = get_effective_memsize(); +#else + gd->bd->bi_dram[0].start = gd->ram_base; + gd->bd->bi_dram[0].size = gd->ram_size; #endif return 0; @@ -602,9 +605,6 @@ int setup_bdinfo(void) { struct bd_info *bd = gd->bd; - bd->bi_memstart = gd->ram_base; /* start of memory */ - bd->bi_memsize = gd->ram_size; /* size in bytes */ - if (IS_ENABLED(CONFIG_SYS_HAS_SRAM)) { bd->bi_sramstart = CONFIG_SYS_SRAM_BASE; /* start of SRAM */ bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */ From patchwork Thu Aug 13 05:47:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344018 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=kjpt04Z4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwcF5KZ2z9sTF for ; Thu, 13 Aug 2020 15:49:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 733C5821F7; Thu, 13 Aug 2020 07:48:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297704; bh=UjptevWLXQ05DhpGq8883tT2twXdz7ZITyUhzCpyE+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kjpt04Z4fsistv0I1/cV2IlpRuJAlCkmjwXTMQggk4lpR2/1/5UkXLC2zjAAvzRes knsjCAQ1W/jHvwTJLr95ut43vcnnEoiXPHVPuFAmxi2FuqGQInqMHkz3EJhmJVnzrS tLKHTwndsdqEvV/TdYbcmmyZ12OIXtzGEnZlN7ssSe4kqrkDHRI/MZPjecaCdzJJSK +IjwqUR4AMKgVIl/qByGNKpQ4ooK69/zA9GCE8TPmfNgXNxG447NbcDXjSH/j3Z0ed fEiHkbWGU42+55MFidOSMbec1tNwVmOQPIUfFV1//36ZiLkvI40MPRYXyBbCbRGVe8 ykq+h1bohlR1A== Received: by phobos.denx.de (Postfix, from userid 109) id 10F6281E39; Thu, 13 Aug 2020 07:48:19 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 42EFA8219B for ; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id AFCDEA141E; Thu, 13 Aug 2020 07:48:13 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id vMToGbmNvAzL; Thu, 13 Aug 2020 07:48:09 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Christophe Leroy , Mario Six , Masahiro Yamada , Max Filippov , Ovidiu Panait , Priyanka Jain , Weijie Gao , Wolfgang Denk Subject: [PATCH v4 4/9] global: Move from bi_memstart/memsize -> gd->ram_base/ram_size Date: Thu, 13 Aug 2020 07:47:55 +0200 Message-Id: <20200813054800.469284-5-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 567ED1832 X-Rspamd-UID: ed2486 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean With the removal of bi_memstart & bi_memsize, this patch now moves the references to the better suiting gd->ram_base/ram_size variables. Signed-off-by: Stefan Roese --- Changes in v4: - New patch api/api_platform-mips.c | 3 +-- api/api_platform-powerpc.c | 2 +- arch/mips/lib/boot.c | 2 +- arch/mips/lib/bootm.c | 2 +- arch/powerpc/cpu/mpc83xx/fdt.c | 2 +- arch/powerpc/cpu/mpc83xx/traps.c | 2 +- arch/powerpc/cpu/mpc85xx/fdt.c | 4 ++-- arch/powerpc/cpu/mpc85xx/traps.c | 2 +- arch/powerpc/cpu/mpc86xx/fdt.c | 4 +++- arch/powerpc/cpu/mpc86xx/traps.c | 2 +- arch/powerpc/cpu/mpc8xx/fdt.c | 2 +- arch/powerpc/lib/bootm.c | 4 ++-- arch/xtensa/lib/bootm.c | 5 ++--- cmd/bedbug.c | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/api/api_platform-mips.c b/api/api_platform-mips.c index 51cd328b3d..e1509663af 100644 --- a/api/api_platform-mips.c +++ b/api/api_platform-mips.c @@ -24,8 +24,7 @@ DECLARE_GLOBAL_DATA_PTR; int platform_sys_info(struct sys_info *si) { - platform_set_mr(si, gd->bd->bi_memstart, - gd->bd->bi_memsize, MR_ATTR_DRAM); + platform_set_mr(si, gd->ram_base, gd->ram_size, MR_ATTR_DRAM); return 1; } diff --git a/api/api_platform-powerpc.c b/api/api_platform-powerpc.c index 15930cfdb6..847a4a3015 100644 --- a/api/api_platform-powerpc.c +++ b/api/api_platform-powerpc.c @@ -42,7 +42,7 @@ int platform_sys_info(struct sys_info *si) si->bar = 0; #endif - platform_set_mr(si, gd->bd->bi_memstart, gd->bd->bi_memsize, MR_ATTR_DRAM); + platform_set_mr(si, gd->ram_base, gd->ram_size, MR_ATTR_DRAM); platform_set_mr(si, gd->bd->bi_flashstart, gd->bd->bi_flashsize, MR_ATTR_FLASH); platform_set_mr(si, gd->bd->bi_sramstart, gd->bd->bi_sramsize, MR_ATTR_SRAM); diff --git a/arch/mips/lib/boot.c b/arch/mips/lib/boot.c index db862f6379..6ef9109022 100644 --- a/arch/mips/lib/boot.c +++ b/arch/mips/lib/boot.c @@ -17,7 +17,7 @@ unsigned long do_go_exec(ulong (*entry)(int, char * const []), * whole SDRAM area, since we don't know the size of the image * that was loaded. */ - flush_cache(gd->bd->bi_memstart, gd->ram_top - gd->bd->bi_memstart); + flush_cache(gd->ram_base, gd->ram_top - gd->ram_base); return entry(argc, argv); } diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 0a13f6edb7..d5c99d891c 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -242,7 +242,7 @@ static int boot_reloc_fdt(bootm_headers_t *images) #if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) int arch_fixup_fdt(void *blob) { - u64 mem_start = virt_to_phys((void *)gd->bd->bi_memstart); + u64 mem_start = virt_to_phys((void *)gd->ram_base); u64 mem_size = gd->ram_size; return fdt_fixup_memory_banks(blob, &mem_start, &mem_size, 1); diff --git a/arch/powerpc/cpu/mpc83xx/fdt.c b/arch/powerpc/cpu/mpc83xx/fdt.c index ebdedb2888..4ea7b27ef4 100644 --- a/arch/powerpc/cpu/mpc83xx/fdt.c +++ b/arch/powerpc/cpu/mpc83xx/fdt.c @@ -121,7 +121,7 @@ void ft_cpu_setup(void *blob, struct bd_info *bd) "clock-frequency", get_serial_clock(), 1); #endif - fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); + fdt_fixup_memory(blob, (u64)gd->ram_base, (u64)gd->ram_size); #if defined(CONFIG_BOOTCOUNT_LIMIT) && \ (defined(CONFIG_QE) && !defined(CONFIG_ARCH_MPC831X)) diff --git a/arch/powerpc/cpu/mpc83xx/traps.c b/arch/powerpc/cpu/mpc83xx/traps.c index c3cc119d65..ea8bc6c152 100644 --- a/arch/powerpc/cpu/mpc83xx/traps.c +++ b/arch/powerpc/cpu/mpc83xx/traps.c @@ -23,7 +23,7 @@ DECLARE_GLOBAL_DATA_PTR; /* Returns 0 if exception not found and fixup otherwise. */ extern unsigned long search_exception_table(unsigned long); -#define END_OF_MEM (gd->bd->bi_memstart + gd->bd->bi_memsize) +#define END_OF_MEM (gd->ram_base + gd->ram_size) /* * Trap & Exception support diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 9569c1a64b..0d8353ceb2 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -672,10 +672,10 @@ void ft_cpu_setup(void *blob, struct bd_info *bd) "clock-frequency", get_bus_freq(0), 1); #endif - fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); + fdt_fixup_memory(blob, (u64)gd->ram_base, (u64)gd->ram_size); #ifdef CONFIG_MP - ft_fixup_cpu(blob, (u64)bd->bi_memstart + (u64)bd->bi_memsize); + ft_fixup_cpu(blob, (u64)gd->ram_base + (u64)gd->ram_size); ft_fixup_num_cores(blob); #endif diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c index f37a45e269..db6ed1fc92 100644 --- a/arch/powerpc/cpu/mpc85xx/traps.c +++ b/arch/powerpc/cpu/mpc85xx/traps.c @@ -37,7 +37,7 @@ extern unsigned long search_exception_table(unsigned long); * amount of memory on the system if we're unable to keep all * the memory mapped in. */ -#define END_OF_MEM (gd->bd->bi_memstart + get_effective_memsize()) +#define END_OF_MEM (gd->ram_base + get_effective_memsize()) static __inline__ void set_tsr(unsigned long val) { diff --git a/arch/powerpc/cpu/mpc86xx/fdt.c b/arch/powerpc/cpu/mpc86xx/fdt.c index 24e53115ec..010b6d4fe6 100644 --- a/arch/powerpc/cpu/mpc86xx/fdt.c +++ b/arch/powerpc/cpu/mpc86xx/fdt.c @@ -8,6 +8,8 @@ #include #include +DECLARE_GLOBAL_DATA_PTR; + extern void ft_fixup_num_cores(void *blob); extern void ft_srio_setup(void *blob); @@ -27,7 +29,7 @@ void ft_cpu_setup(void *blob, struct bd_info *bd) do_fixup_by_prop_u32(blob, "device_type", "soc", 4, "bus-frequency", bd->bi_busfreq, 1); - fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); + fdt_fixup_memory(blob, (u64)gd->ram_base, (u64)gd->ram_size); #ifdef CONFIG_SYS_NS16550 do_fixup_by_compat_u32(blob, "ns16550", diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c index c0161e3379..3ee0ec859c 100644 --- a/arch/powerpc/cpu/mpc86xx/traps.c +++ b/arch/powerpc/cpu/mpc86xx/traps.c @@ -30,7 +30,7 @@ extern unsigned long search_exception_table(unsigned long); * amount of memory on the system if we're unable to keep all * the memory mapped in. */ -#define END_OF_MEM (gd->bd->bi_memstart + get_effective_memsize()) +#define END_OF_MEM (gd->ram_base + get_effective_memsize()) /* * Trap & Exception support diff --git a/arch/powerpc/cpu/mpc8xx/fdt.c b/arch/powerpc/cpu/mpc8xx/fdt.c index 4d952a3882..226e258f0e 100644 --- a/arch/powerpc/cpu/mpc8xx/fdt.c +++ b/arch/powerpc/cpu/mpc8xx/fdt.c @@ -25,5 +25,5 @@ void ft_cpu_setup(void *blob, struct bd_info *bd) do_fixup_by_compat_u32(blob, "fsl,cpm-brg", "clock-frequency", gd->arch.brg_clk, 1); - fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); + fdt_fixup_memory(blob, (u64)gd->ram_base, (u64)gd->ram_size); } diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 8c8ed99cd3..b903e6ec8d 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -298,8 +298,8 @@ void boot_prep_vxworks(bootm_headers_t *images) if (!images->ft_addr) return; - base = (u64)gd->bd->bi_memstart; - size = (u64)gd->bd->bi_memsize; + base = (u64)gd->ram_base; + size = (u64)gd->ram_size; off = fdt_path_offset(images->ft_addr, "/memory"); if (off < 0) diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c index 458eaf95c0..6fcbfc4292 100644 --- a/arch/xtensa/lib/bootm.c +++ b/arch/xtensa/lib/bootm.c @@ -41,15 +41,14 @@ static struct bp_tag *setup_last_tag(struct bp_tag *params) static struct bp_tag *setup_memory_tag(struct bp_tag *params) { - struct bd_info *bd = gd->bd; struct meminfo *mem; params->id = BP_TAG_MEMORY; params->size = sizeof(struct meminfo); mem = (struct meminfo *)params->data; mem->type = MEMORY_TYPE_CONVENTIONAL; - mem->start = bd->bi_memstart; - mem->end = bd->bi_memstart + bd->bi_memsize; + mem->start = gd->ram_base; + mem->end = gd->ram_base + gd->ram_size; printf(" MEMORY: tag:0x%04x, type:0X%lx, start:0X%lx, end:0X%lx\n", BP_TAG_MEMORY, mem->type, mem->start, mem->end); diff --git a/cmd/bedbug.c b/cmd/bedbug.c index 81ce256480..684e4a9ea5 100644 --- a/cmd/bedbug.c +++ b/cmd/bedbug.c @@ -348,7 +348,7 @@ int do_bedbug_stack(struct cmd_tbl *cmdtp, int flag, int argc, return 1; } - top = gd->bd->bi_memstart + gd->bd->bi_memsize; + top = gd->ram_start + gd->ram_size; depth = 0; printf ("Depth PC\n"); From patchwork Thu Aug 13 05:47:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344016 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=PViPvBH9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwbq261wz9sTF for ; Thu, 13 Aug 2020 15:48:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4D59821D0; Thu, 13 Aug 2020 07:48:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297701; bh=oPFBP8DVroDt1em/Tg+YENBNvoXQzs+XELYn+QkDg4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PViPvBH9C+/fzz384M8n/FaW45Y7nogPm0auGnkdFd45h7KoUOzI6jGIo7jE0DIrj IWq0dLIU8JIX6InCD9xY0deJP4c0Wu8hlli+GKp47c+9aOGK8q07eXWlT/U6A6OKuh ptKoaV3G4e696IESFiZNs5UxqeGB6wxPrMRAziQp4CA6AWJbaz2IIgkm5dngb0EiTQ kYXVm9mBEanjmBP2JCfzlbHHW27Ctw/HD0phGFOAF2BUVLf57jPLrXGtzA9IjJvhyH sDXp3zPhgPvBx9e4AOO5p686jsoI+AtOVki/MTvpJXncjJ8u8/7SX6cNXqZuo2bUs/ 4+NeAdVjLccGA== Received: by phobos.denx.de (Postfix, from userid 109) id 83115821D4; Thu, 13 Aug 2020 07:48:18 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4026081E6F for ; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 80BC7A1267; Thu, 13 Aug 2020 07:48:13 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id i-u713Aib1Tj; Thu, 13 Aug 2020 07:48:10 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Alexey Brodkin , Max Filippov , Ovidiu Panait Subject: [PATCH v4 5/9] xtensa: Remove arch_setup_bdinfo() Date: Thu, 13 Aug 2020 07:47:56 +0200 Message-Id: <20200813054800.469284-6-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 5BBFA1835 X-Rspamd-UID: 78ab46 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean arch_setup_bdinfo() only configures the deprecated bi_memstart & bi_memsize values, which should not be needed any more. Lets remove this file completely. Signed-off-by: Stefan Roese --- Changes in v4: - New patch arch/xtensa/lib/Makefile | 2 +- arch/xtensa/lib/bdinfo.c | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 arch/xtensa/lib/bdinfo.c diff --git a/arch/xtensa/lib/Makefile b/arch/xtensa/lib/Makefile index ceee59b9bd..c59df7d372 100644 --- a/arch/xtensa/lib/Makefile +++ b/arch/xtensa/lib/Makefile @@ -5,4 +5,4 @@ obj-$(CONFIG_CMD_BOOTM) += bootm.o -obj-y += cache.o misc.o relocate.o time.o bdinfo.o +obj-y += cache.o misc.o relocate.o time.o diff --git a/arch/xtensa/lib/bdinfo.c b/arch/xtensa/lib/bdinfo.c deleted file mode 100644 index 4ec8529521..0000000000 --- a/arch/xtensa/lib/bdinfo.c +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * XTENSA-specific information for the 'bd' command - * - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - */ - -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -int arch_setup_bdinfo(void) -{ - struct bd_info *bd = gd->bd; - - bd->bi_memstart = PHYSADDR(CONFIG_SYS_SDRAM_BASE); - bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; - - return 0; -} From patchwork Thu Aug 13 05:47:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344015 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=RqaeGgaV; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwbj0TmVz9sTF for ; Thu, 13 Aug 2020 15:48:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4179481E6F; Thu, 13 Aug 2020 07:48:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297700; bh=uLtqDqmApPcwSandxrhXg0i8Q+uUeXy2Z0IUrG9sdFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RqaeGgaVSNijqWzwO1uZbvHS8sC2LpIFS3pDqulwxFWv24E5++deTQdo5AtOmua1U ARQFAOgyM758R36S9agBDC4oiziKwG47ixMl/LZPIjtSDK2sI2JwkOE+7jok+kMVXu Ps6qPjWFb/1qd95MTgDlAHs8c9qvj96C59bGuCvVfhgZTl1hweMKkjWci4Xi4rApoq cfhnICgA5gDAyNUVusd5+ReHjTNcFDhhpGmD/gshn+ffoQDv5qVFYG7F5FTcYQ2Hga mGRzN8/89I5xVKbFN01Nd9dfAUBJeGZb5Xak3s+CJRe5MvusciMevv5qhtLgEByS2B bjoqH2JLd1Gbg== Received: by phobos.denx.de (Postfix, from userid 109) id 6C50A821E0; Thu, 13 Aug 2020 07:48:18 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0EA9581E39 for ; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 4E1D0A11C8; Thu, 13 Aug 2020 07:48:13 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id VB306mg5pXO7; Thu, 13 Aug 2020 07:48:10 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Anatolij Gustschin Subject: [PATCH v4 6/9] video: cfb_console.c: Use bi_dram[] values on all platforms Date: Thu, 13 Aug 2020 07:47:57 +0200 Message-Id: <20200813054800.469284-7-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 474C41831 X-Rspamd-UID: cdcc2f X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean All platforms support bi_dram[] since quite some time. Lets remove the and bi_memsize values completely. Signed-off-by: Stefan Roese --- Changes in v4: - New patch drivers/video/cfb_console.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index badade353e..3f07f4eb29 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1983,8 +1983,6 @@ static void *video_logo(void) static int cfb_fb_is_in_dram(void) { struct bd_info *bd = gd->bd; -#if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || \ -defined(CONFIG_SANDBOX) || defined(CONFIG_X86) ulong start, end; int i; @@ -1995,11 +1993,7 @@ defined(CONFIG_SANDBOX) || defined(CONFIG_X86) (ulong)video_fb_address < end) return 1; } -#else - if ((ulong)video_fb_address >= bd->bi_memstart && - (ulong)video_fb_address < bd->bi_memstart + bd->bi_memsize) - return 1; -#endif + return 0; } From patchwork Thu Aug 13 05:47:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344021 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=Lxgp3DoE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwct19xBz9sTF for ; Thu, 13 Aug 2020 15:49:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C3EF821FC; Thu, 13 Aug 2020 07:48:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297708; bh=1zjOJay3cJGMS5uoR1a20four2BGIZn6dGLiZlh466Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Lxgp3DoEICwja361v8GTKpFyPzaiRTNCzQ6kOS7603QwGz9TEHt8oCjYzfBhvgKwp n4MyfH7P6qu+r1FExyJWtJ3jiv2lpavqf+rDCQAuluZbXA465DIbaML/I2wpifT6Ul PHm9j1o3IrRG02kgx6T8+rVGp+dWPC6HBPXzlpmM5Fdssdp9VKh9v9uDrIAhBFa1Oz r41sQdOdKWWByOaWu6DkBAa6rb6kBvsxSBOjxgQ6++X+/E9aPH3F2oyUC7KX9PmyKy 3hMnS21/Zv5GreyRQiHiVeuCDNV+WD/5MM82giiYo7a+4AgJhmIuQGwUutPFhjv1EF 3xK46EL9tNSGA== Received: by phobos.denx.de (Postfix, from userid 109) id A3611821D3; Thu, 13 Aug 2020 07:48:21 +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=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2a.mailbox.org [IPv6:2001:67c:2050:104:0:2:25:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 43E8A82190 for ; Thu, 13 Aug 2020 07:48:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id C6F99A12F2; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id gTqzZJ9dX933; Thu, 13 Aug 2020 07:48:11 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Joe Hershberger , Masahiro Yamada , Oleksandr Zhadan and Michael Durrant , Priyanka Jain , Qiang Zhao , Shengzhou Liu , Simon Goldschmidt Subject: [PATCH v4 7/9] powerpc: Remove bi_memstart & bi_memsize assignments in spl.c Date: Thu, 13 Aug 2020 07:47:58 +0200 Message-Id: <20200813054800.469284-8-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8B612182B X-Rspamd-UID: 5a2c06 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Most likely these deprecated (removed) variables are not needed. Lets remove the assignments completely from all spl.c files. Signed-off-by: Stefan Roese Tested-by: Oleksandr Zhadan and Michael Durrant --- Changes in v4: - New patch board/Arcturus/ucp1020/spl.c | 2 -- board/freescale/p1010rdb/spl.c | 2 -- board/freescale/p1_p2_rdb_pc/spl.c | 2 -- board/freescale/t102xrdb/spl.c | 2 -- board/freescale/t104xrdb/spl.c | 2 -- board/freescale/t208xqds/spl.c | 2 -- board/freescale/t208xrdb/spl.c | 2 -- board/freescale/t4rdb/spl.c | 2 -- 8 files changed, 16 deletions(-) diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index 5416a5b663..0fd9532d74 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -83,8 +83,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(CONFIG_SPL_GD_ADDR + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L2_ADDR; - bd->bi_memsize = CONFIG_SYS_L2_SIZE; arch_cpu_init(); get_clocks(); diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index 4ee4573d2b..fbaa6a6514 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -69,8 +69,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(CONFIG_SPL_GD_ADDR + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L2_ADDR; - bd->bi_memsize = CONFIG_SYS_L2_SIZE; arch_cpu_init(); get_clocks(); diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index e76c3e82c3..8aceceb56a 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -75,8 +75,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(CONFIG_SPL_GD_ADDR + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L2_ADDR; - bd->bi_memsize = CONFIG_SYS_L2_SIZE; arch_cpu_init(); get_clocks(); diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index da442fcc18..09dd88ac4e 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -103,8 +103,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(gd + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; - bd->bi_memsize = CONFIG_SYS_L3_SIZE; arch_cpu_init(); get_clocks(); diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index f83d69ba15..e7922954de 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -94,8 +94,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(gd + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; - bd->bi_memsize = CONFIG_SYS_L3_SIZE; arch_cpu_init(); get_clocks(); diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c index c197884421..d8c2bbe28d 100644 --- a/board/freescale/t208xqds/spl.c +++ b/board/freescale/t208xqds/spl.c @@ -102,8 +102,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(gd + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; - bd->bi_memsize = CONFIG_SYS_L3_SIZE; arch_cpu_init(); get_clocks(); diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index 07aab6349c..c64bd87115 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -72,8 +72,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(gd + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; - bd->bi_memsize = CONFIG_SYS_L3_SIZE; arch_cpu_init(); get_clocks(); diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c index 64d2753da8..9aa0a9b052 100644 --- a/board/freescale/t4rdb/spl.c +++ b/board/freescale/t4rdb/spl.c @@ -75,8 +75,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) bd = (struct bd_info *)(gd + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; - bd->bi_memstart = CONFIG_SYS_INIT_L3_ADDR; - bd->bi_memsize = CONFIG_SYS_L3_SIZE; arch_cpu_init(); get_clocks(); From patchwork Thu Aug 13 05:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344020 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=CvRwL0KL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwch0Ypwz9sTF for ; Thu, 13 Aug 2020 15:49:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2B23B82225; Thu, 13 Aug 2020 07:48:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297707; bh=Oqilhv6VokkGfixF6MMuuD117UTzAdLeqte2imjgnaA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=CvRwL0KLyuT5q9Rlq+leU2r0kucW2De1agTHQw9KufEXvrmpX5jiSCELtm8zX5Jvb vAAqA0O5iMZb9wxzGzkLTkezCR7ler1m57HNMZxHE5ZlW8qIt3GYm/hCOzlSI34kcO lSbJWK4iKJLrMWjqwhT2olhU6d8kdlIhh4g80GKls8nglrymioEZSVcctX9Q0eV0c3 Yvu1nuWbTSVErTj6hA6ySA1mtyhBefUwCcHxXHOc1axqkj3EalEViFToyc5h9rmP/3 qHut2WcpH7SEP8+oJ6WlMuCAYIbPwyQE379Z1cxxw2vQBHQaNSchjMJiI24ODY8rCR LYS90shtWznbA== Received: by phobos.denx.de (Postfix, from userid 109) id DEBE6821D3; Thu, 13 Aug 2020 07:48:20 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C7A9D81F7C for ; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 73E90A1478; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id X_ujsTgz_g9r; Thu, 13 Aug 2020 07:48:11 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Bin Meng Subject: [PATCH v4 8/9] cmd: bdinfo: Remove print of superseeded bi_memstart / bi_memsize values Date: Thu, 13 Aug 2020 07:47:59 +0200 Message-Id: <20200813054800.469284-9-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 6FF28181E X-Rspamd-UID: e0f1fe X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Remove printing of the superseeded (by bi_dram[]) memory values from the bdinfo command. Signed-off-by: Stefan Roese --- Changes in v4: - New patch cmd/bdinfo.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 9e230f23cb..0229846d3e 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -34,12 +34,6 @@ static void print_eth(int idx) printf("%-12s= %s\n", name, val); } -static void print_phys_addr(const char *name, phys_addr_t value) -{ - printf("%-12s= 0x%.*llx\n", name, 2 * (int)sizeof(ulong), - (unsigned long long)value); -} - void bdinfo_print_mhz(const char *name, unsigned long hz) { char buf[32]; @@ -73,8 +67,6 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) #endif bdinfo_print_num("boot_params", (ulong)bd->bi_boot_params); print_bi_dram(bd); - bdinfo_print_num("memstart", (ulong)bd->bi_memstart); - print_phys_addr("memsize", bd->bi_memsize); if (IS_ENABLED(CONFIG_SYS_HAS_SRAM)) { bdinfo_print_num("sramstart", (ulong)bd->bi_sramstart); bdinfo_print_num("sramsize", (ulong)bd->bi_sramsize); From patchwork Thu Aug 13 05:48:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1344022 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=cXeIFrGM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BRwd44YjCz9sTF for ; Thu, 13 Aug 2020 15:49:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C096682235; Thu, 13 Aug 2020 07:48:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1597297709; bh=Raryh8VrnAOSUQamGvugUJr6PCNyt8AkvB/uEhGgMyo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cXeIFrGMCLokqOx/j3Feun8YqHTHdgLK+g2R0SPYIo/itOOt33/d45LR/p31nakaY YKKEXfU0ZOoiC6Ln4sstkdNjuJYoqlVY62mfnpWwKJEb0SAtC2l8MmU2KcebX2pp1P YQOJ5SV7DeTxITydrfd/+sPvXSebk09nOiAsmYIc3BLtTevGRTd/66+Eq1PnUAyDWC je7eTTjvBZqsbc2U/r2E5JgF2awHU0y1gDJd4MLwyn+hp1eADxIrB7B88KiFinafo0 tQjo9k9ZcFGRZG1uO3Qi807XdqgzI/LVLk7vYI0uQ4SfRlyjF8b16CiXLtsLEWaRTq P3nwkSiGx19Ew== Received: by phobos.denx.de (Postfix, from userid 109) id 35AF1821D3; Thu, 13 Aug 2020 07:48:22 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A97C281F22 for ; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 63745A13D2; Thu, 13 Aug 2020 07:48:14 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id abBVf1xWsFrk; Thu, 13 Aug 2020 07:48:11 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , trini@konsulko.com, sjg@chromium.org, daniel.schwierzeck@gmail.com, Bin Meng , Masahiro Yamada Subject: [PATCH v4 9/9] asm-generic/u-boot.h: Remove bi_memstart & bi_memsize from bd_info Date: Thu, 13 Aug 2020 07:48:00 +0200 Message-Id: <20200813054800.469284-10-sr@denx.de> In-Reply-To: <20200813054800.469284-1-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -1.78 / 15.00 / 15.00 X-Rspamd-Queue-Id: 5F57817F1 X-Rspamd-UID: 109683 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean bi_memstart & bi_memsize are now not referenced any more. This patch removes their definitions from the bd_info struct. Signed-off-by: Stefan Roese --- Changes in v4: - New patch include/asm-generic/u-boot.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index 99d3fe33ad..637de0c455 100644 --- a/include/asm-generic/u-boot.h +++ b/include/asm-generic/u-boot.h @@ -27,8 +27,6 @@ #include struct bd_info { - unsigned long bi_memstart; /* start of DRAM memory */ - phys_size_t bi_memsize; /* size of DRAM memory in bytes */ unsigned long bi_flashstart; /* start of FLASH memory */ unsigned long bi_flashsize; /* size of FLASH memory */ unsigned long bi_flashoffset; /* reserved area for startup monitor */