Re: [PATCH] ARM: webasto-ccbv2: Add variant with 512MB RAM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux