From 41156ef05fa6a2cbed7022c870f4d25641788907 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Fri, 27 Dec 2019 10:39:00 +0100 Subject: [PATCH] imx-atf: Disable Cortex-M7 debug console The Cortex-M7 uses the UART4 as debug console, and it is shared with the Cortex-A53. This commit disables it for the ConnectCore 8M Nano DVK board to avoid conflicts. Signed-off-by: Arturo Buzarra --- ...0001-imx8mn-Disable-M7-debug-console.patch | 32 +++++++++++++++++++ .../recipes-bsp/imx-atf/imx-atf_2.0.bb | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 meta-digi-arm/recipes-bsp/imx-atf/imx-atf/0001-imx8mn-Disable-M7-debug-console.patch diff --git a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf/0001-imx8mn-Disable-M7-debug-console.patch b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf/0001-imx8mn-Disable-M7-debug-console.patch new file mode 100644 index 000000000..c492f8758 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf/0001-imx8mn-Disable-M7-debug-console.patch @@ -0,0 +1,32 @@ +From: Arturo Buzarra +Date: Fri, 27 Dec 2019 09:42:48 +0100 +Subject: [PATCH] imx8mn: Disable M7 debug console + +The Cortex-M7 uses the UART4 as debug console, and it is +shared with the Cortex-A53. + +Signed-off-by: Arturo Buzarra +--- + plat/imx/imx8mn/imx8mn_bl31_setup.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/plat/imx/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8mn/imx8mn_bl31_setup.c +index 57db28a..a36c2d5 100644 +--- a/plat/imx/imx8mn/imx8mn_bl31_setup.c ++++ b/plat/imx/imx8mn/imx8mn_bl31_setup.c +@@ -242,11 +242,12 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, + #endif + bl31_tzc380_setup(); + + /* Assign M7 to domain 1 */ + mmio_write_32(IMX_RDC_BASE + 0x204, 0x1); +- mmio_write_32(IMX_RDC_BASE + 0x518, 0xfc); ++ /* Uncomment to use the M7 debug console (shared with A53 UART4) */ ++ /*mmio_write_32(IMX_RDC_BASE + 0x518, 0xfc);*/ + mmio_write_32(IMX_RDC_BASE + 0x5A4, 0xf3); + } + + void bl31_plat_arch_setup(void) + { +-- + diff --git a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.0.bb b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.0.bb index 0e1b49156..2d66351bf 100644 --- a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.0.bb +++ b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.0.bb @@ -15,6 +15,8 @@ SRCBRANCH = "imx_4.14.98_2.2.0" SRC_URI = "${ATF_SRC};branch=${SRCBRANCH}" SRCREV = "1355c5d12d75c9c7bdd08826796096bab519b3d5" +SRC_URI_append_ccimx8mn = " file://0001-imx8mn-Disable-M7-debug-console.patch" + S = "${WORKDIR}/git" BOOT_TOOLS = "imx-boot-tools"