All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Hawkins, Nick" <nick.hawkins@hpe.com>
Cc: "Verdun, Jean-Marie" <verdun@hpe.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Subject: Re: [PATCH v1 7/9] configs: gxp: add core support
Date: Thu, 2 Jun 2022 10:50:05 -0400	[thread overview]
Message-ID: <20220602145005.GK25375@bill-the-cat> (raw)
In-Reply-To: <DM4PR84MB19274C2A820463CAA45D05DA88DE9@DM4PR84MB1927.NAMPRD84.PROD.OUTLOOK.COM>

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

On Thu, Jun 02, 2022 at 02:46:09PM +0000, Hawkins, Nick wrote:
> 
> 
> > Can we figure any of that out dynamically instead?  Since CONFIG_SYS_SDRAM_SIZE is only used (for ARM) in board code, I'd rather see this handled in there, with SZ_xxx and not use CONFIG_SYS_SDRAM_SIZE at all.
> 
> Hi Tom,
> 
> Would something like this be acceptable?
> 
> int dram_init(void)
> {
> #ifdef CONFIG_TARGET_GXP
>         #ifdef CONFIG_GXP_ECC
>         gd->ram_size = SZ_128M + SZ_64M + SZ_32M + SZ_16M + SZ_8M;
>         #else
>         gd->ram_size = SZ_256M + SZ_128M + SZ_64M + SZ_32M + SZ_16M;
>         #endif
> #endif
> 
> #ifdef CONFIG_GXP_VROM_64MB
>         #ifdef CONFIG_GXP_ECC
>         gd->ram_size = SZ_128M + SZ_64M;
>         #else
>         gd->ram_size = SZ_256M + SZ_128M;
>         #endif
> #endif
>         return 0;
> }
> 
> Thanks for the feedback,

Without indenting the #ifdef's, yes, that's better.  Ideally you should
just call get_ram_size(base_addr, max-possible-valid-size) and that
will return the correct value.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-06-02 14:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 18:55 [PATCH v1 1/9] ARM: hpe: gxp: add core support nick.hawkins
2022-05-26 18:55 ` [PATCH v1 2/9] timer: gxp: Add HPE GXP timer support nick.hawkins
2022-05-26 18:55 ` [PATCH v1 3/9] board: hpe: gxp: add HPE GXP soc support nick.hawkins
2022-06-01 14:24   ` Tom Rini
2022-05-26 18:55 ` [PATCH v1 4/9] dt-bindings: arm: hpe: add GXP Support nick.hawkins
2022-05-26 18:55 ` [PATCH v1 5/9] dt-bindings: timer: Add hpe gxp timer nick.hawkins
2022-05-26 18:55 ` [PATCH v1 6/9] ARM: dts: Add device tree files for hpe gxp soc nick.hawkins
2022-06-01 14:24   ` Tom Rini
2022-06-01 14:50     ` Hawkins, Nick
2022-06-01 15:28       ` Tom Rini
2022-06-02 20:56         ` Hawkins, Nick
2022-06-02 20:56           ` Hawkins, Nick
2022-06-03 13:23             ` Tom Rini
2022-06-03 15:35               ` Hawkins, Nick
2022-06-03 16:24                 ` Tom Rini
2022-05-26 18:55 ` [PATCH v1 7/9] configs: gxp: add core support nick.hawkins
2022-06-01 14:24   ` Tom Rini
2022-06-02 14:46     ` Hawkins, Nick
2022-06-02 14:50       ` Tom Rini [this message]
2022-05-26 18:55 ` [PATCH v1 8/9] configs: gxp: add gxp_defconfig nick.hawkins
2022-05-26 18:55 ` [PATCH v1 9/9] MAINTAINERS: Introduce HPE GXP Architecture nick.hawkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220602145005.GK25375@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=nick.hawkins@hpe.com \
    --cc=u-boot@lists.denx.de \
    --cc=verdun@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.