From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C345EC432BE for ; Tue, 31 Aug 2021 05:51:42 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFCAA6101C for ; Tue, 31 Aug 2021 05:51:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DFCAA6101C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B285B83404; Tue, 31 Aug 2021 07:51:38 +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=1630389099; bh=Bhq/Jzv+wt7soNGceBAV0s+GpYjt5kF8vJJejLUiQa8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SAEdIblRmd3/F2Yl3e4XtfWBUv34rJEeLw4BOxzBTkTH0sd2psrYeYaDU3D5tTAPa R5Eu4m2B3LaGQlUQBwcsNogdDs9Zz7uidI7DMAUiZT5LyWQNMYSzG9dZChQyMzyIZ2 DPm3glHSGBnF3jOr8KVq1FhPU5io5Ksj5wi3VE9d5xRi9l4PMRtxTuFy2xl6JU9fTK 7aiDwrBGdOV7EqhYGhu36ylkeN2gxauI+gZx6SqLVvSJBw/hvb7leMY1jJzE4Cj/aN vnmlbC4PfKvK+umKbdqOJGNsfxwbk0SSXMlCHKBhuD3QS+HPxC3FZrGi8xtNF6Gukz 9768UXLf7KM1Q== Received: by phobos.denx.de (Postfix, from userid 109) id 1FCFB8340A; Tue, 31 Aug 2021 07:51:37 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:1::465:204]) (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 B9AD883403 for ; Tue, 31 Aug 2021 07:51:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4GzGXN361qzQjYl; Tue, 31 Aug 2021 07:51:32 +0200 (CEST) Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id t50zO5JGBo_1; Tue, 31 Aug 2021 07:51:29 +0200 (CEST) Subject: Re: [PATCH 4/9] mvebu: ddr: Rename CONFIG_DDR_FIXED_SIZE to CONFIG_SYS_SDRAM_SIZE To: Tom Rini , u-boot@lists.denx.de Cc: =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20210821175019.24180-1-trini@konsulko.com> <20210821175019.24180-4-trini@konsulko.com> From: Stefan Roese Message-ID: <30126d52-96c9-7d75-b1f6-69b79227402e@denx.de> Date: Tue, 31 Aug 2021 07:51:29 +0200 MIME-Version: 1.0 In-Reply-To: <20210821175019.24180-4-trini@konsulko.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9E431813 X-Rspamd-UID: 424103 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.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Tom, On 21.08.21 19:50, Tom Rini wrote: > We have a number of CONFIG symbols to express the fixed size of system > memory. For now, rename CONFIG_DDR_FIXED_SIZE to CONFIG_SYS_SDRAM_SIZE > and adjust usage to match that CONFIG_SYS_SDRAM_SIZE expects the entire > size rather than MiB. > > Cc: Marek Behún > Cc: Stefan Roese > Signed-off-by: Tom Rini > --- > drivers/ddr/marvell/axp/ddr3_axp.h | 4 ++-- > include/configs/maxbcm.h | 4 +++- > include/configs/theadorable.h | 4 +++- > 3 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/ddr/marvell/axp/ddr3_axp.h b/drivers/ddr/marvell/axp/ddr3_axp.h > index 270691e9bcd3..970651f87029 100644 > --- a/drivers/ddr/marvell/axp/ddr3_axp.h > +++ b/drivers/ddr/marvell/axp/ddr3_axp.h > @@ -19,10 +19,10 @@ > #define FAR_END_DIMM_ADDR 0x50 > #define MAX_DIMM_ADDR 0x60 > > -#ifndef CONFIG_DDR_FIXED_SIZE > +#ifndef CONFIG_SYS_SDRAM_SIZE > #define SDRAM_CS_SIZE 0xFFFFFFF > #else > -#define SDRAM_CS_SIZE (CONFIG_DDR_FIXED_SIZE - 1) > +#define SDRAM_CS_SIZE ((CONFIG_SYS_SDRAM_SIZE >> 10) - 1) Why are you using ">> 10" (dividing by 1024) here? Thanks, Stefan > #endif > #define SDRAM_CS_BASE 0x0 > #define SDRAM_DIMM_SIZE 0x80000000 > diff --git a/include/configs/maxbcm.h b/include/configs/maxbcm.h > index fc2393204bec..5098f12f5425 100644 > --- a/include/configs/maxbcm.h > +++ b/include/configs/maxbcm.h > @@ -6,6 +6,8 @@ > #ifndef _CONFIG_DB_MV7846MP_GP_H > #define _CONFIG_DB_MV7846MP_GP_H > > +#include > + > /* > * High Level Configuration Options (easy to change) > */ > @@ -65,7 +67,7 @@ > /* SPL related SPI defines */ > > /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */ > -#define CONFIG_DDR_FIXED_SIZE (1 << 20) /* 1GiB */ > +#define CONFIG_SYS_SDRAM_SIZE SZ_1G > #define CONFIG_BOARD_ECC_SUPPORT /* this board supports ECC */ > > #endif /* _CONFIG_DB_MV7846MP_GP_H */ > diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h > index 760713d3ef87..abc48ff44ca5 100644 > --- a/include/configs/theadorable.h > +++ b/include/configs/theadorable.h > @@ -6,6 +6,8 @@ > #ifndef _CONFIG_THEADORABLE_H > #define _CONFIG_THEADORABLE_H > > +#include > + > /* > * High Level Configuration Options (easy to change) > */ > @@ -93,6 +95,6 @@ > #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) > > /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */ > -#define CONFIG_DDR_FIXED_SIZE (2 << 20) /* 2GiB */ > +#define CONFIG_SYS_SDRAM_SIZE SZ_2G > > #endif /* _CONFIG_THEADORABLE_H */ > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de