diff options
author | Masahisa Kojima <masahisa.kojima@linaro.org> | 2020-11-12 19:56:18 +0900 |
---|---|---|
committer | jimqui01 <54316584+jimqui01@users.noreply.github.com> | 2020-11-16 10:33:28 +0000 |
commit | 89d2436008f49aa0bea3b688948bce97063af568 (patch) | |
tree | 0b43fa95616a2b0a50370406fafadacbe4b0e336 | |
parent | f6e767b4d8fa981b22a86990ebaa47f63fbd09d3 (diff) |
synquacer: remove scp_romfw logging feature
The F_UART3 device used for logging purpose on SynQuacer platform
is not the "always-on device". The synquacer_rom module has a
responsibility to power on the peripherals. This causes unexpected
device access during I/O component initialization and system will
not boot.
Since I/O component aims to enable logging before the module runtime
is available, and current scp_romfw does not rely on logging feature
for debugging, this patch removes the scp_romfw logging feature.
This patch also removes the possible invalid access by uninitialized
pointer in f_uart3 module.
Change-Id: I47ba9d57925a09a79f64a037d30da6b7e30e1f84
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
-rw-r--r-- | product/synquacer/include/fmw_io.h | 7 | ||||
-rw-r--r-- | product/synquacer/module/f_uart3/src/mod_f_uart3.c | 4 | ||||
-rw-r--r-- | product/synquacer/scp_romfw/firmware.mk | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/product/synquacer/include/fmw_io.h b/product/synquacer/include/fmw_io.h index 4e799fa3..3e0fbf16 100644 --- a/product/synquacer/include/fmw_io.h +++ b/product/synquacer/include/fmw_io.h @@ -11,7 +11,12 @@ #include <fwk_id.h> #include <fwk_module_idx.h> -#define FMW_IO_STDIN_ID FWK_ID_ELEMENT(FWK_MODULE_IDX_F_UART3, 0) +#ifndef BUILD_HAS_MOD_F_UART3 +#define FMW_IO_STDIN_ID FWK_ID_NONE +#define FMW_IO_STDOUT_ID FWK_ID_NONE +#else +#define FMW_IO_STDIN_ID FWK_ID_NONE #define FMW_IO_STDOUT_ID FWK_ID_ELEMENT(FWK_MODULE_IDX_F_UART3, 0) +#endif #endif /* FMW_IO_H */ diff --git a/product/synquacer/module/f_uart3/src/mod_f_uart3.c b/product/synquacer/module/f_uart3/src/mod_f_uart3.c index 755b5d17..59ac850b 100644 --- a/product/synquacer/module/f_uart3/src/mod_f_uart3.c +++ b/product/synquacer/module/f_uart3/src/mod_f_uart3.c @@ -95,8 +95,8 @@ static void mod_f_uart3_enable(fwk_id_t id) { const struct mod_f_uart3_element_cfg *cfg = fwk_module_get_data(id); - struct f_uart3_reg *reg = (void *)cfg->reg_base; - struct f_uart3_dla_reg *dla_reg = (void *)cfg->dla_reg_base; + struct f_uart3_reg *reg; + struct f_uart3_dla_reg *dla_reg; fwk_assert(cfg != NULL); diff --git a/product/synquacer/scp_romfw/firmware.mk b/product/synquacer/scp_romfw/firmware.mk index 9452c6af..54739394 100644 --- a/product/synquacer/scp_romfw/firmware.mk +++ b/product/synquacer/scp_romfw/firmware.mk @@ -19,7 +19,6 @@ INCLUDES += $(OS_DIR)/../Core/Include BS_FIRMWARE_MODULES := \ armv7m_mpu \ synquacer_rom \ - f_uart3 \ clock \ synquacer_pik_clock \ gtimer \ @@ -28,7 +27,6 @@ BS_FIRMWARE_MODULES := \ BS_FIRMWARE_SOURCES := \ config_armv7m_mpu.c \ config_clock.c \ - config_f_uart3.c \ config_synquacer_pik_clock.c \ config_synquacer_rom.c \ config_timer.c |