summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2022-07-23 13:52:57 -0300
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-07-29 21:20:34 +0000
commitb511d2ad3ba4b8175b68eca8410ff8cb1c7d2792 (patch)
treefcf9d6ff9237b85bc4109199366baede27d1e7a7
parente5d2cb13e1d1669c983eb71b9f92f8f92cd45c7d (diff)
downloadmeta-freescale-b511d2ad3ba4b8175b68eca8410ff8cb1c7d2792.tar.gz
imx-atf: allow setting the UART used during boot
A new `ATF_BOOT_UART_BASE` variable can be used in machine to set the UART aimed for use during the boot, without the need of changing the source code. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> (cherry picked from commit 453def7956c864818b6d6a1a44b2b267df3a44fc)
-rw-r--r--conf/machine/include/imx-base.inc9
-rw-r--r--recipes-bsp/imx-atf/imx-atf_2.6.bb9
2 files changed, 17 insertions, 1 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index 297637af..2962c9e9 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -113,6 +113,15 @@ UBOOT_PROVIDES_BOOT_CONTAINER:imx-boot-container = "1"
113# Default TF-A provider to NXP downstream fork 113# Default TF-A provider to NXP downstream fork
114IMX_DEFAULT_ATF_PROVIDER ??= "imx-atf" 114IMX_DEFAULT_ATF_PROVIDER ??= "imx-atf"
115 115
116# Allow setting the UART used during the boot by ATF.
117
118# FIXME: We should return INVALID here but currently only i.MX8M has support to override the UART
119# base address in source code.
120SOC_ATF_BOOT_UART_BASE = ""
121
122SOC_ATF_BOOT_UART_BASE:mx8m-generic-bsp = "0x30890000"
123ATF_BOOT_UART_BASE ?= "${SOC_ATF_BOOT_UART_BASE}"
124
116PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" 125PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
117XSERVER_DRIVER = "xf86-video-fbdev" 126XSERVER_DRIVER = "xf86-video-fbdev"
118XSERVER_DRIVER:vf-generic-bsp = "xf86-video-modesetting" 127XSERVER_DRIVER:vf-generic-bsp = "xf86-video-modesetting"
diff --git a/recipes-bsp/imx-atf/imx-atf_2.6.bb b/recipes-bsp/imx-atf/imx-atf_2.6.bb
index 95258247..194ef935 100644
--- a/recipes-bsp/imx-atf/imx-atf_2.6.bb
+++ b/recipes-bsp/imx-atf/imx-atf_2.6.bb
@@ -18,7 +18,11 @@ S = "${WORKDIR}/git"
18 18
19inherit deploy 19inherit deploy
20 20
21ATF_PLATFORM ??= "INVALID" 21ATF_PLATFORM ??= "INVALID"
22
23# FIXME: We should return INVALID here but currently only i.MX8M has support to override the UART
24# base address in source code.
25ATF_BOOT_UART_BASE ?= ""
22 26
23EXTRA_OEMAKE += " \ 27EXTRA_OEMAKE += " \
24 CROSS_COMPILE="${TARGET_PREFIX}" \ 28 CROSS_COMPILE="${TARGET_PREFIX}" \
@@ -48,6 +52,9 @@ EXTRA_OEMAKE += 'LD="${@remove_options_tail(d.getVar('LD'))}"'
48 52
49EXTRA_OEMAKE += 'CC="${@remove_options_tail(d.getVar('CC'))}"' 53EXTRA_OEMAKE += 'CC="${@remove_options_tail(d.getVar('CC'))}"'
50 54
55# Set the UART to use during the boot.
56EXTRA_OEMAKE += 'IMX_BOOT_UART_BASE=${ATF_BOOT_UART_BASE}'
57
51do_configure[noexec] = "1" 58do_configure[noexec] = "1"
52 59
53do_compile() { 60do_compile() {