Skip to contentSkip to conversation

ARM: webasto-ccbv2: Add variant with 512MB RAM

PATCH Applied Holger Assmann 2 participants 2 messages May 21, 2021 – May 25, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 ARM: webasto-ccbv2: Add variant with 512MB RAM

Add variant for 512MB RAM board.

Two firmware files will be generated - one for 256MB and 512MB respectively; the choice for shipment has to be done and depends on the underlying hardware.

v4 ARM: webasto-ccbv2: Add variant with 512MB RAM
---
v3 -> v4:

by Ahmad Fatoum <[email protected]>:
- give both *.imxcfg their respective entry points

v2 -> v3:

by Rouven Czerwinski <[email protected]>:
- keep omitting RAM-size-dependent handling in lowlevel.c
- rectify flash header handling in Makefile.imx

v1 -> v2:

by Rouven Czerwinski <[email protected]>:
- just ship one single firmware version, depending on the underlying board variant

by Ahmad Fatoum <[email protected]>:
- account for the 512MB variant by hard-coding memsize == SZ_512

 ...sh-header-imx6ul-webasto-ccbv2-256.imxcfg} |  0
 ...ash-header-imx6ul-webasto-ccbv2-512.imxcfg | 88 +++++++++++++++++++
 arch/arm/boards/webasto-ccbv2/lowlevel.c      | 18 +++-
 images/Makefile.imx                           |  4 +-
 4 files changed, 107 insertions(+), 3 deletions(-)
 rename arch/arm/boards/webasto-ccbv2/{flash-header-imx6ul-webasto-ccbv2.imxcfg => flash-header-imx6ul-webasto-ccbv2-256.imxcfg} (100%)
 create mode 100644 arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-512.imxcfg
arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-256.imxcfg renamed from arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2.imxcfg +0 -0
similarity index 100%
rename from arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2.imxcfg
rename to arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-256.imxcfg
arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-512.imxcfg new file +88 -0

88 lines not on this page · raw message

arch/arm/boards/webasto-ccbv2/lowlevel.c +16 -2
index 8529ea3735..32117b0a77 100644
@@ -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 + SZ_512M)) {
 		get_builtin_firmware(ccbv2_optee_bin, &tee, &tee_size);
 
 		memset((void *)OPTEE_OVERLAY_LOCATION, 0, 0x1000);
@@ -59,7 +59,21 @@ static void noinline start_ccbv2(u32 r0)
 	imx6ul_barebox_entry(__dtb_z_imx6ul_webasto_ccbv2_start);
 }
 
-ENTRY_FUNCTION(start_imx6ul_ccbv2, r0, r1, r2)
+ENTRY_FUNCTION(start_imx6ul_ccbv2_256m, r0, r1, r2)
+{
+
+	imx6ul_cpu_lowlevel_init();
+
+	arm_setup_stack(0x00910000);
+
+	relocate_to_current_adr();
+	setup_c();
+	barrier();
+
+	start_ccbv2(r0);
+}
+
+ENTRY_FUNCTION(start_imx6ul_ccbv2_512m, r0, r1, r2)
 {
 
 	imx6ul_cpu_lowlevel_init();
images/Makefile.imx +3 -1
index b892ec0196..67a85fe24e 100644
@@ -364,7 +364,9 @@ $(call build_imx_habv4img, CONFIG_MACH_TECHNEXION_PICO_HOBBIT, start_imx6ul_pico
 
 $(call build_imx_habv4img, CONFIG_MACH_DIGI_CCIMX6ULSBCPRO, start_imx6ul_ccimx6ulsbcpro, digi-ccimx6ulsom/flash-header-imx6ul-ccimx6ulsbcpro, imx6ul-ccimx6ulsbcpro)
 
-$(call build_imx_habv4img, CONFIG_MACH_WEBASTO_CCBV2, start_imx6ul_ccbv2, webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2, imx6ul-webasto-ccbv2)
+$(call build_imx_habv4img, CONFIG_MACH_WEBASTO_CCBV2, start_imx6ul_ccbv2_256m, webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-256, imx6ul-webasto-ccbv2-256m)
+
+$(call build_imx_habv4img, CONFIG_MACH_WEBASTO_CCBV2, start_imx6ul_ccbv2_512m, webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-512, imx6ul-webasto-ccbv2-512m)
 
 # ----------------------- vf6xx based boards ---------------------------
 pblb-$(CONFIG_MACH_VF610_TWR) += start_vf610_twr
Signature · 7 lines
2.29.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 27 lines · Holger Assmann

Add variant for 512MB RAM board.

Two firmware files will be generated - one for 256MB and 512MB respectively; the choice for shipment has to be done and depends on the underlying hardware.

v4 ARM: webasto-ccbv2: Add variant with 512MB RAM
---
v3 -> v4:

by Ahmad Fatoum <[email protected]>:
- give both *.imxcfg their respective entry points

v2 -> v3:

by Rouven Czerwinski <[email protected]>:
- keep omitting RAM-size-dependent handling in lowlevel.c
- rectify flash header handling in Makefile.imx

v1 -> v2:

by Rouven Czerwinski <[email protected]>:
- just ship one single firmware version, depending on the underlying board variant

Quoted 8 lines

by Ahmad Fatoum <[email protected]>:
- account for the 512MB variant by hard-coding memsize == SZ_512

 ...sh-header-imx6ul-webasto-ccbv2-256.imxcfg} |  0
 ...ash-header-imx6ul-webasto-ccbv2-512.imxcfg | 88 +++++++++++++++++++
 arch/arm/boards/webasto-ccbv2/lowlevel.c      | 18 +++-
 images/Makefile.imx                           |  4 +-
 4 files changed, 107 insertions(+), 3 deletions(-)

Applied, thanks

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox