mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: Holger Assmann <h.assmann@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: webasto-ccbv2: Add variant with 512MB RAM
Date: Tue, 04 May 2021 11:36:42 +0200	[thread overview]
Message-ID: <00c790b9dd842a8b6ce6f0bd71869b45baba7e05.camel@pengutronix.de> (raw)
In-Reply-To: <20210504092654.5219-1-h.assmann@pengutronix.de>

Hi Holger,

On Tue, 2021-05-04 at 11:26 +0200, Holger Assmann wrote:
> 
> diff --git a/arch/arm/boards/webasto-ccbv2/lowlevel.c b/arch/arm/boards/webasto-ccbv2/lowlevel.c
> index 8529ea3735..d3c9fa73f9 100644
> --- a/arch/arm/boards/webasto-ccbv2/lowlevel.c
> +++ b/arch/arm/boards/webasto-ccbv2/lowlevel.c
> 
> -static void noinline start_ccbv2(u32 r0)
> +static void noinline start_ccbv2(u32 r0, unsigned long memsize)
>  {
>  	int tee_size;
>  	void *tee;
> @@ -48,7 +48,7 @@ static void noinline start_ccbv2(u32 r0)
>  	 */
>  	if(IS_ENABLED(CONFIG_FIRMWARE_CCBV2_OPTEE)
>  	   && !(r0 > MX6_MMDC_P0_BASE_ADDR
> -	        &&  r0 < MX6_MMDC_P0_BASE_ADDR + SZ_256M)) {
> +	        &&  r0 < MX6_MMDC_P0_BASE_ADDR + memsize)) {
>  		get_builtin_firmware(ccbv2_optee_bin, &tee, &tee_size);

Unfortunately, OP-TEE build for the old 256MB variant won't work for
the new 512MB variant. Depending on the OP-TEE Memory size we should
add a new FIRMWARE KCONFIG variable and retrieve the correct firmware
per board, i.e.

if (memsize == SZ_256M) {
	get_builtin_firmware(ccbv2_optee_bin, &tee, &tee_size)
} else {
	get_builtin_firmware(ccbv2_optee_512m_bin, &tee, &tee_size)

with a new FIRMWARE_CCBV2_OPTEE_512M symbol.

TBH, I don't like this, since our firmware KConfig will expand
needlessly for the variants. However currently OP-TEE is not setup to
be able to boot based on different memory sizes…

Regards,
Rouven Czerwinski



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2021-05-04  9:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04  9:26 Holger Assmann
2021-05-04  9:36 ` Rouven Czerwinski [this message]
2021-05-04  9:51   ` Ahmad Fatoum

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=00c790b9dd842a8b6ce6f0bd71869b45baba7e05.camel@pengutronix.de \
    --to=r.czerwinski@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=h.assmann@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox