imx-atf: rework patches to disable Cortex-M debug console
Add a patch series to customize the ATF console for the ConnectCore 8M platforms, and to disable the Cortex-M debug UART. https://jira.digi.com/browse/DEL-7497 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
c74360a5c4
commit
f1aebd1c8a
|
|
@ -0,0 +1,46 @@
|
||||||
|
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
Date: Fri, 16 Apr 2021 15:03:31 +0200
|
||||||
|
Subject: [PATCH] imx8mm: Define UART1 as console for boot stage
|
||||||
|
|
||||||
|
UART1 is the default console for ConnectCore i.MX8M Mini
|
||||||
|
|
||||||
|
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
---
|
||||||
|
plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 2 +-
|
||||||
|
plat/imx/imx8m/imx8mm/include/platform_def.h | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
|
index 049192880..e16b72eb2 100644
|
||||||
|
--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
|
+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
|
@@ -57,11 +57,11 @@ static const struct imx_rdc_cfg rdc[] = {
|
||||||
|
/* Master domain assignment */
|
||||||
|
RDC_MDAn(RDC_MDA_M4, DID1),
|
||||||
|
|
||||||
|
/* peripherals domain permission */
|
||||||
|
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
||||||
|
- RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
|
||||||
|
+ RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W),
|
||||||
|
|
||||||
|
/* memory region */
|
||||||
|
|
||||||
|
/* Sentinel */
|
||||||
|
{0},
|
||||||
|
diff --git a/plat/imx/imx8m/imx8mm/include/platform_def.h b/plat/imx/imx8m/imx8mm/include/platform_def.h
|
||||||
|
index 42b03613e..b02dd5202 100644
|
||||||
|
--- a/plat/imx/imx8m/imx8mm/include/platform_def.h
|
||||||
|
+++ b/plat/imx/imx8m/imx8mm/include/platform_def.h
|
||||||
|
@@ -49,11 +49,11 @@
|
||||||
|
#define MAX_XLAT_TABLES 8
|
||||||
|
#define MAX_MMAP_REGIONS 16
|
||||||
|
|
||||||
|
#define HAB_RVT_BASE U(0x00000900) /* HAB_RVT for i.MX8MM */
|
||||||
|
|
||||||
|
-#define IMX_BOOT_UART_BASE U(0x30890000)
|
||||||
|
+#define IMX_BOOT_UART_BASE U(0x30860000) /* UART1 for ConnectCore i.MX8M Mini */
|
||||||
|
#define IMX_BOOT_UART_CLK_IN_HZ 24000000 /* Select 24MHz oscillator */
|
||||||
|
|
||||||
|
#define PLAT_CRASH_UART_BASE IMX_BOOT_UART_BASE
|
||||||
|
#define PLAT_CRASH_UART_CLK_IN_HZ 24000000
|
||||||
|
#define IMX_CONSOLE_BAUDRATE 115200
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
From 32f0fe2d607f165fbf4ab6b5c21b147b68ab46e2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
|
||||||
Date: Fri, 29 Jan 2021 11:21:07 +0100
|
|
||||||
Subject: [PATCH] imx8mm: Disable M4 debug console
|
|
||||||
|
|
||||||
The Cortex-M4 uses the UART4 as debug console, and it is
|
|
||||||
shared with the Cortex-A53.
|
|
||||||
|
|
||||||
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
|
||||||
---
|
|
||||||
plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 12 ++++++------
|
|
||||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
|
||||||
index 049192880..f7aada323 100644
|
|
||||||
--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
|
||||||
+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
|
||||||
@@ -58,7 +58,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
|
||||||
RDC_MDAn(RDC_MDA_M4, DID1),
|
|
||||||
|
|
||||||
/* peripherals domain permission */
|
|
||||||
- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
|
||||||
+ /*RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),*/
|
|
||||||
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
|
|
||||||
|
|
||||||
/* memory region */
|
|
||||||
@@ -129,7 +129,7 @@ static void bl31_tzc380_setup(void)
|
|
||||||
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|
||||||
u_register_t arg2, u_register_t arg3)
|
|
||||||
{
|
|
||||||
- static console_uart_t console;
|
|
||||||
+ /*static console_uart_t console;*/
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Enable CSU NS access permission */
|
|
||||||
@@ -144,11 +144,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|
||||||
imx_csu_init(csu_cfg);
|
|
||||||
|
|
||||||
imx8m_caam_init();
|
|
||||||
-
|
|
||||||
- console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
|
||||||
+ /* Uncomment to use the M4 debug console (shared with A53 UART4) */
|
|
||||||
+ /*console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
|
||||||
IMX_CONSOLE_BAUDRATE, &console);
|
|
||||||
- /* This console is only used for boot stage */
|
|
||||||
- console_set_scope(&console.console, CONSOLE_FLAG_BOOT);
|
|
||||||
+ This console is only used for boot stage
|
|
||||||
+ console_set_scope(&console.console, CONSOLE_FLAG_BOOT);*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* tell BL3-1 where the non-secure software image is located
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
Date: Fri, 16 Apr 2021 15:38:09 +0200
|
||||||
|
Subject: [PATCH] imx8mn: Define UART1 as console for boot stage
|
||||||
|
|
||||||
|
UART1 is the default console for ConnectCore i.MX8M Nano
|
||||||
|
|
||||||
|
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
---
|
||||||
|
plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 2 +-
|
||||||
|
plat/imx/imx8m/imx8mn/include/platform_def.h | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
|
index 841ec5a3a..1bfacb409 100644
|
||||||
|
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
|
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
|
@@ -56,11 +56,11 @@ static const struct imx_rdc_cfg rdc[] = {
|
||||||
|
/* Master domain assignment */
|
||||||
|
RDC_MDAn(RDC_MDA_M7, DID1),
|
||||||
|
|
||||||
|
/* peripherals domain permission */
|
||||||
|
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
||||||
|
- RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
|
||||||
|
+ RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W),
|
||||||
|
|
||||||
|
/* memory region */
|
||||||
|
RDC_MEM_REGIONn(16, 0x0, 0x0, 0xff),
|
||||||
|
RDC_MEM_REGIONn(17, 0x0, 0x0, 0xff),
|
||||||
|
RDC_MEM_REGIONn(18, 0x0, 0x0, 0xff),
|
||||||
|
diff --git a/plat/imx/imx8m/imx8mn/include/platform_def.h b/plat/imx/imx8m/imx8mn/include/platform_def.h
|
||||||
|
index 967afbbee..6a07be2a8 100644
|
||||||
|
--- a/plat/imx/imx8m/imx8mn/include/platform_def.h
|
||||||
|
+++ b/plat/imx/imx8m/imx8mn/include/platform_def.h
|
||||||
|
@@ -49,11 +49,11 @@
|
||||||
|
#define MAX_XLAT_TABLES 8
|
||||||
|
#define MAX_MMAP_REGIONS 16
|
||||||
|
|
||||||
|
#define HAB_RVT_BASE U(0x00000900) /* HAB_RVT for i.MX8MM */
|
||||||
|
|
||||||
|
-#define IMX_BOOT_UART_BASE U(0x30890000)
|
||||||
|
+#define IMX_BOOT_UART_BASE U(0x30860000) /* UART1 for ConnectCore i.MX8M Nano */
|
||||||
|
#define IMX_BOOT_UART_CLK_IN_HZ 24000000 /* Select 24MHz oscillator */
|
||||||
|
|
||||||
|
#define PLAT_CRASH_UART_BASE IMX_BOOT_UART_BASE
|
||||||
|
#define PLAT_CRASH_UART_CLK_IN_HZ 24000000
|
||||||
|
#define IMX_CONSOLE_BAUDRATE 115200
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
From: Mike Engel <Mike.Engel@digi.com>
|
|
||||||
Date: Thu, 16 Jul 2020 12:57:59 +0200
|
|
||||||
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: Mike Engel <Mike.Engel@digi.com>
|
|
||||||
---
|
|
||||||
plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 11 ++++++-----
|
|
||||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
|
||||||
index 841ec5a..ae9aeb9 100644
|
|
||||||
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
|
||||||
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
|
||||||
@@ -57,7 +57,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
|
||||||
RDC_MDAn(RDC_MDA_M7, DID1),
|
|
||||||
|
|
||||||
/* peripherals domain permission */
|
|
||||||
- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
|
||||||
+ /*RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),*/
|
|
||||||
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
|
|
||||||
|
|
||||||
/* memory region */
|
|
||||||
@@ -131,7 +131,7 @@ static void bl31_tzc380_setup(void)
|
|
||||||
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|
||||||
u_register_t arg2, u_register_t arg3)
|
|
||||||
{
|
|
||||||
- static console_uart_t console;
|
|
||||||
+ /*static console_uart_t console;*/
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Enable CSU NS access permission */
|
|
||||||
@@ -150,10 +150,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|
||||||
|
|
||||||
imx8m_caam_init();
|
|
||||||
|
|
||||||
- console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
|
||||||
+ /* Uncomment to use the M7 debug console (shared with A53 UART4) */
|
|
||||||
+ /*console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
|
||||||
IMX_CONSOLE_BAUDRATE, &console);
|
|
||||||
- /* This console is only used for boot stage */
|
|
||||||
- console_set_scope(&console.console, CONSOLE_FLAG_BOOT);
|
|
||||||
+ This console is only used for boot stage
|
|
||||||
+ console_set_scope(&console.console, CONSOLE_FLAG_BOOT);*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* tell BL3-1 where the non-secure software image is located
|
|
||||||
--
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
||||||
|
Date: Fri, 29 Jan 2021 11:21:07 +0100
|
||||||
|
Subject: [PATCH] imx8mm: Disable M4 debug console
|
||||||
|
|
||||||
|
The Cortex-M4 uses the UART4 as debug console, and it is
|
||||||
|
shared with the Cortex-A53.
|
||||||
|
|
||||||
|
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
||||||
|
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
---
|
||||||
|
plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
|
index e16b72eb2..040f1a75f 100644
|
||||||
|
--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
|
+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
|
@@ -56,11 +56,11 @@ static const struct aipstz_cfg aipstz[] = {
|
||||||
|
static const struct imx_rdc_cfg rdc[] = {
|
||||||
|
/* Master domain assignment */
|
||||||
|
RDC_MDAn(RDC_MDA_M4, DID1),
|
||||||
|
|
||||||
|
/* peripherals domain permission */
|
||||||
|
- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
||||||
|
+ /*RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),*/
|
||||||
|
RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W),
|
||||||
|
|
||||||
|
/* memory region */
|
||||||
|
|
||||||
|
/* Sentinel */
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
From: Mike Engel <Mike.Engel@digi.com>
|
||||||
|
Date: Thu, 16 Jul 2020 12:57:59 +0200
|
||||||
|
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: Mike Engel <Mike.Engel@digi.com>
|
||||||
|
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
---
|
||||||
|
plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
|
index 1bfacb409..768eed26a 100644
|
||||||
|
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
|
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
|
@@ -55,11 +55,11 @@ static const struct aipstz_cfg aipstz[] = {
|
||||||
|
static const struct imx_rdc_cfg rdc[] = {
|
||||||
|
/* Master domain assignment */
|
||||||
|
RDC_MDAn(RDC_MDA_M7, DID1),
|
||||||
|
|
||||||
|
/* peripherals domain permission */
|
||||||
|
- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
||||||
|
+ /*RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),*/
|
||||||
|
RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W),
|
||||||
|
|
||||||
|
/* memory region */
|
||||||
|
RDC_MEM_REGIONn(16, 0x0, 0x0, 0xff),
|
||||||
|
RDC_MEM_REGIONn(17, 0x0, 0x0, 0xff),
|
||||||
|
|
@ -13,8 +13,10 @@ SRC_URI = "${ATF_SRC};branch=${SRCBRANCH} \
|
||||||
"
|
"
|
||||||
SRCREV = "f1d7187f261ebf4b8a2a70d638d4bfc0a9b26c29"
|
SRCREV = "f1d7187f261ebf4b8a2a70d638d4bfc0a9b26c29"
|
||||||
|
|
||||||
SRC_URI_append_ccimx8mn = " file://0001-imx8mn-Disable-M7-debug-console.patch"
|
SRC_URI_append_ccimx8mn = " file://0001-imx8mn-Define-UART1-as-console-for-boot-stage.patch \
|
||||||
SRC_URI_append_ccimx8mm = " file://0001-imx8mm-Disable-M4-debug-console.patch"
|
file://0002-imx8mn-Disable-M7-debug-console.patch"
|
||||||
|
SRC_URI_append_ccimx8mm = " file://0001-imx8mm-Define-UART1-as-console-for-boot-stage.patch \
|
||||||
|
file://0002-imx8mm-Disable-M4-debug-console.patch"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue