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 */