diff options
author | Pali Rohár <pali@kernel.org> | 2021-07-16 12:45:45 +0200 |
---|---|---|
committer | Pali Rohár <pali@kernel.org> | 2021-07-16 19:07:44 +0100 |
commit | 9f6d15408340af07ed3c2500202b147189eaa7ef (patch) | |
tree | 441cd7087010e44cf82ffcf515acdc6c2ef0ed28 /plat/marvell | |
parent | 6f466062fe8ef105c606ff5972af2ce6f7b8b7ff (diff) | |
download | arm-trusted-firmware-9f6d15408340af07ed3c2500202b147189eaa7ef.tar.gz |
fix(plat/marvell/a3k): fix printing info messages on output
INFO() macro for every call prepends "INFO: " string. Therefore
current code prints unreadable debug messages:
"INFO: set_io_addr_dec 0 result: ctrl(0x3fff3d01) base(0x0)INFO: "
"INFO: Set IO decode window successfully, base(0xc000)INFO: win_attr(3d) max_dram_win(2) max_remap(0)INFO: win_offset(8)"
Fix it by calling exactly one INFO() call for one line. After this
change output is:
"INFO: set_io_addr_dec 0 result: ctrl(0x3fff3d01) base(0x0) remap(0x0)"
"INFO: Set IO decode window successfully, base(0xc000) win_attr(3d) max_dram_win(2) max_remap(0) win_offset(8)"
Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I6084e64c6f4da6c1929e5300588e4ba2608ca745
Diffstat (limited to 'plat/marvell')
-rw-r--r-- | plat/marvell/armada/a3k/common/io_addr_dec.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/plat/marvell/armada/a3k/common/io_addr_dec.c b/plat/marvell/armada/a3k/common/io_addr_dec.c index b27633cf2..fea7f81d4 100644 --- a/plat/marvell/armada/a3k/common/io_addr_dec.c +++ b/plat/marvell/armada/a3k/common/io_addr_dec.c @@ -67,17 +67,14 @@ static void set_io_addr_dec_win(int win_id, uintptr_t base_addr, mmio_write_32(MVEBU_DEC_WIN_CTRL_REG(dec_win->dec_reg_base, win_id, dec_win->win_offset), ctrl); - INFO("set_io_addr_dec %d result: ctrl(0x%x) base(0x%x)", + INFO("set_io_addr_dec %d result: ctrl(0x%x) base(0x%x) remap(0x%x)\n", win_id, mmio_read_32(MVEBU_DEC_WIN_CTRL_REG(dec_win->dec_reg_base, win_id, dec_win->win_offset)), mmio_read_32(MVEBU_DEC_WIN_BASE_REG(dec_win->dec_reg_base, - win_id, dec_win->win_offset))); - if (win_id < dec_win->max_remap) - INFO(" remap(%x)\n", - mmio_read_32(MVEBU_DEC_WIN_REMAP_REG(dec_win->dec_reg_base, - win_id, dec_win->win_offset))); - else - INFO("\n"); + win_id, dec_win->win_offset)), + (win_id < dec_win->max_remap) ? + mmio_read_32(MVEBU_DEC_WIN_REMAP_REG(dec_win->dec_reg_base, + win_id, dec_win->win_offset)) : 0); } /* Set io decode window */ @@ -167,12 +164,11 @@ int init_io_addr_dec(struct dram_win_map *dram_wins_map, ERROR("Failed to set IO address decode\n"); return -1; } - INFO("Set IO decode window successfully, base(0x%x)", - io_dec_win->dec_reg_base); - INFO(" win_attr(%x) max_dram_win(%d) max_remap(%d)", + INFO("Set IO decode window successfully, base(0x%x)" + " win_attr(%x) max_dram_win(%d) max_remap(%d)" + " win_offset(%d)\n", io_dec_win->dec_reg_base, io_dec_win->win_attr, io_dec_win->max_dram_win, - io_dec_win->max_remap); - INFO(" win_offset(%d)\n", io_dec_win->win_offset); + io_dec_win->max_remap, io_dec_win->win_offset); } return 0; |