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=-17.3 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,USER_AGENT_SANE_1 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 33306C432BE for ; Tue, 31 Aug 2021 12:43:19 +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 139836103D for ; Tue, 31 Aug 2021 12:43:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 139836103D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com 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 0505582F03; Tue, 31 Aug 2021 14:43:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="l3FNreSm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2C17282F03; Tue, 31 Aug 2021 14:43:13 +0200 (CEST) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 203098310F for ; Tue, 31 Aug 2021 14:43:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x831.google.com with SMTP id d2so14428260qto.6 for ; Tue, 31 Aug 2021 05:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JhfFUzNcUgGLMmhB5dVCeyhsDQQwf/nvh5+tcKZLth8=; b=l3FNreSm6t0IfUoAqls+TpuskMwfL/0Vh5ykLTk5MAcdOMaiG/1nwfW7erL6rp4avl XsQbgl0l4Jn9+1wZZIVVqxorhTU5lhwFIZXHIpy2E1T5Sv1x6m3yOuzTlcOgXQvqt2nV 3GXeqtUr70zGNpOAQPkCFjoFGx5DUzzcHF7Xo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JhfFUzNcUgGLMmhB5dVCeyhsDQQwf/nvh5+tcKZLth8=; b=fqTb9apDGjP9dSDTMdMmEpz70kGu76QxLXvGVqahdoceV4HQjHY7n7Erj4PJph73JN sp44SXfj/tUdhMrVLXikRMR0/fbu4tiEnTdLma2TUfT1yqHYCq3W/qLR+myROK2312vG dXl3QsYLKxdZa8g+lDF9NQObvur30ELSyx0T5vnqIBEWdanjpynzwAk//Par3YCaLFCI AU7DyERn6reHYnimXkxs38rc0jM18BdY5yEsrKm3nHvTXza0BGZrNiTh7Nf8nfcCa4Bg ceM+3+p4OlzI7dV8Udz+MUh8Q9AleJjOktr5N2/7qx4zPaQ7qdTPZ9zIvpmkh6bmgCaA hCBg== X-Gm-Message-State: AOAM532s2Q2ftuF4YvowGSA/OFgXm4RvH4G/Q5WXSNGzBk2RHVh87pNK nwc2bwYabr+wFBErY6RlemLNqsh+0bdoZn2W X-Google-Smtp-Source: ABdhPJxRT7lJ5fn5VYGV6NgHzs5mX05E8Gr9fkANtp5fOhVPXprqmvoC+WQVzntysgNxu8J5ujDk0w== X-Received: by 2002:a05:622a:1704:: with SMTP id h4mr2490953qtk.9.1630413786807; Tue, 31 Aug 2021 05:43:06 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-8d75-4e9a-efec-7167.res6.spectrum.com. [2603:6081:7b01:cbda:8d75:4e9a:efec:7167]) by smtp.gmail.com with ESMTPSA id q22sm6846341qtn.25.2021.08.31.05.43.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Aug 2021 05:43:05 -0700 (PDT) Date: Tue, 31 Aug 2021 08:43:03 -0400 From: Tom Rini To: Stefan Roese Cc: u-boot@lists.denx.de, Marek =?iso-8859-1?Q?Beh=FAn?= Subject: Re: [PATCH 4/9] mvebu: ddr: Rename CONFIG_DDR_FIXED_SIZE to CONFIG_SYS_SDRAM_SIZE Message-ID: <20210831124303.GB858@bill-the-cat> References: <20210821175019.24180-1-trini@konsulko.com> <20210821175019.24180-4-trini@konsulko.com> <30126d52-96c9-7d75-b1f6-69b79227402e@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VKc9k9ZGSlevy+Ep" Content-Disposition: inline In-Reply-To: <30126d52-96c9-7d75-b1f6-69b79227402e@denx.de> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --VKc9k9ZGSlevy+Ep Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 31, 2021 at 07:51:29AM +0200, Stefan Roese wrote: > Hi Tom, >=20 > 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. > >=20 > > Cc: Marek Beh=FAn > > 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(-) > >=20 > > diff --git a/drivers/ddr/marvell/axp/ddr3_axp.h b/drivers/ddr/marvell/a= xp/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) >=20 > Why are you using ">> 10" (dividing by 1024) here? >=20 > Thanks, > Stefan >=20 > > #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 OK, so before my change, SDRAM_CS_SIZE =3D 0xfffff. After my change, SDRAM_CS_SIZE =3D 0xfffff, still. > > #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/theadorabl= e.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 Here, before SDRAM_CS_SIZE =3D 0x1fffff and then after SDRAM_CS_SIZE =3D 0x1fffff. This is because CONFIG_DDR_FIXED_SIZE is kilobytes and CONFIG_SYS_SDRAM_SIZE is bytes, yes? Thanks. --=20 Tom --VKc9k9ZGSlevy+Ep Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEuI9AACgkQFHw5/5Y0 tyympAwArR3CB85q20epBWB3PeWoZNuwUx0VrX6rhnEMAV5iMDvMOly7Lre5SnVe w0Nz8x/OE5djuB0zb4HmEq+XKv+o0krmhQCL+BGZ6ZRCxiRv5w+mM+Y55vqfk2SL KdFbWXzTAImlvTkPgUBh82lVnur44mNh/i7CaydgqZmYSfdD+A/7Vmpr+QMVME9m vN7ZdLkrwfmS1cJahx1PBP2HXNdW19eenLa7hU2mm0GUJAZFPGIg6Jd79q2yghBn e5+X5za2vu5YKKaKUzxJ31XD8Fy0h16Zsd/kxmdIdR8I73mdUKV3YoiSda2yrHIO o46exMziVOmDTSDMFqytDsV4G+IDrHAF8KON5FUqL35730kvJEJ4PIwOKbNQUPDu Jhz0eernoFrmkRaLXKSNSkf04HANaedF1PO1FPEINQOPvnbDt2nqh7VVEeMBsLDT L8EI3QrYDiMYhdoKAqiEggtbyO8Sr8EDPi6Wz8U3SgMAhi2lCwKQtIhfBsEAAsbY F+Fu7H24 =EGjd -----END PGP SIGNATURE----- --VKc9k9ZGSlevy+Ep--