diff options
-rw-r--r-- | lib/stdlib/putchar.c | 2 | ||||
-rw-r--r-- | plat/imx/common/misc.c | 10 | ||||
-rw-r--r-- | plat/imx/imx8qm/include/platform_def.h | 3 | ||||
-rw-r--r-- | plat/imx/imx8qxp/include/platform_def.h | 3 |
4 files changed, 18 insertions, 0 deletions
diff --git a/lib/stdlib/putchar.c b/lib/stdlib/putchar.c index 8265667b..ecae0d67 100644 --- a/lib/stdlib/putchar.c +++ b/lib/stdlib/putchar.c @@ -12,6 +12,8 @@ * character. Write all other printing functions in terms of putchar(), if * possible, so they all benefit when this is improved. */ +#pragma weak putchar + int putchar(int c) { int res; diff --git a/plat/imx/common/misc.c b/plat/imx/common/misc.c index be18673e..025402aa 100644 --- a/plat/imx/common/misc.c +++ b/plat/imx/common/misc.c @@ -24,3 +24,13 @@ int imx_misc_set_temp_handler(uint32_t smc_fid, { return sc_misc_set_temp(ipc_handle, x1, x2, x3, x4); } + +#if SC_CONSOLE +int putchar(int c) +{ + if (ipc_handle) + sc_misc_debug_out(ipc_handle, (unsigned char)c); + + return c; +} +#endif diff --git a/plat/imx/imx8qm/include/platform_def.h b/plat/imx/imx8qm/include/platform_def.h index c68cbd16..a9a903af 100644 --- a/plat/imx/imx8qm/include/platform_def.h +++ b/plat/imx/imx8qm/include/platform_def.h @@ -67,6 +67,9 @@ #define COUNTER_FREQUENCY 8000000 /* 8MHz */ +/* enable it to make debug message to SC console */ +#define SC_CONSOLE 0 + #define DEBUG_CONSOLE 0 #ifdef SPD_trusty #define DEBUG_CONSOLE_A53 1 diff --git a/plat/imx/imx8qxp/include/platform_def.h b/plat/imx/imx8qxp/include/platform_def.h index ce31e0ab..55ce4a6e 100644 --- a/plat/imx/imx8qxp/include/platform_def.h +++ b/plat/imx/imx8qxp/include/platform_def.h @@ -59,6 +59,9 @@ #define COUNTER_FREQUENCY 8000000 /* 8MHz */ +/* enable it to make debug message to SC console */ +#define SC_CONSOLE 0 + #define DEBUG_CONSOLE 0 #ifdef SPD_trusty #define DEBUG_CONSOLE_A35 1 |