Commit 724be849 authored by Jérémy LOCHE - MAKEEN Energy's avatar Jérémy LOCHE - MAKEEN Energy Committed by Carles Cufi
Browse files

nxp: imx7d-6sx: add rom_start relocation



Add the Kconfig options and use the aliased
addresses for the bootcode regions of the IMX7D
and IMX6SX SOCs to allow the Linux rproc
framework to load the irq-vectors into
the correct memory areas.

Activating this option might enlarge the bin
file if the zephyr,flash and rom_start chosen
region addresses are not matching.

It is up to the user to enable this feature
based on code location choices (OCRAM, DDR, TCM...).

Signed-off-by: default avatarJérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
parent 8ef8e8b4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -29,9 +29,10 @@
		};
	};

	tcml:memory@1fff8000 {
	/* TCML 0x1fff8000 is aliased at 0 */
	tcml:memory@0 {
		compatible = "nxp,imx-itcm";
		reg = <0x1fff8000 DT_SIZE_K(32)>;
		reg = <0x00000000 DT_SIZE_K(32)>;
	};

	tcmu:memory@20000000 {
+3 −2
Original line number Diff line number Diff line
@@ -56,9 +56,10 @@
			reg = <0x20200000 DT_SIZE_K(128)>;
		};

		ocram_s_code: code@20180000 {
		/* OCRAM_S 0x20180000 is aliased at 0 */
		ocram_s_code: code@0 {
			compatible = "nxp,imx-code-bus";
			reg = <0x20180000 DT_SIZE_K(32)>;
			reg = <0x00000000 DT_SIZE_K(32)>;
		};

		ocram_s_sys: memory@180000 {
+14 −0
Original line number Diff line number Diff line
@@ -8,4 +8,18 @@ if SOC_MCIMX6X_M4
config FPU
	default y


#-By default ROM_START is relocated to address 0 in a 1K region, allowing imx_rproc
#  to translate it to TCM_L address
#-Select the relocation if the chosen flash is not the TCML
#-Disable this option if you use the bin format as this choice will enlarge it.
#  This is due to relocation of the irq-vectors in a different memory region than
#  the chosen zephyr,flash and all the address span in between
#  will be filled in the bin file.
config ROMSTART_RELOCATION_ROM
	default n

config ROMSTART_REGION_ADDRESS
	default $(dt_nodelabel_reg_addr_hex,tcml)

endif # SOC_MCIMX6X_M4
+13 −0
Original line number Diff line number Diff line
@@ -11,4 +11,17 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
config GPIO
	default y

#-By default ROM_START is relocated to address 0 in a 1K region, allowing imx_rproc
#  to translate it to OCRAM_S address
#-Select the relocation if the chosen flash is not the OCRAM_S
#-Disable this option if you use the bin format as this choice will enlarge it.
#  This is due to relocation of the irq-vectors in a different memory region than
#  the chosen zephyr,flash and all the address span in between
#  will be filled in the bin file.
config ROMSTART_RELOCATION_ROM
	default n

config ROMSTART_REGION_ADDRESS
	default $(dt_nodelabel_reg_addr_hex,ocram_s_code)

endif # SOC_MCIMX7D_M4