Commit 9f6d1540 authored by Pali Rohár's avatar Pali Rohár
Browse files

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: default avatarPali Rohár <pali@kernel.org>
Change-Id: I6084e64c6f4da6c1929e5300588e4ba2608ca745
parent 6f466062
...@@ -67,17 +67,14 @@ static void set_io_addr_dec_win(int win_id, uintptr_t base_addr, ...@@ -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, mmio_write_32(MVEBU_DEC_WIN_CTRL_REG(dec_win->dec_reg_base,
win_id, dec_win->win_offset), ctrl); 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, mmio_read_32(MVEBU_DEC_WIN_CTRL_REG(dec_win->dec_reg_base,
win_id, dec_win->win_offset)), win_id, dec_win->win_offset)),
mmio_read_32(MVEBU_DEC_WIN_BASE_REG(dec_win->dec_reg_base, mmio_read_32(MVEBU_DEC_WIN_BASE_REG(dec_win->dec_reg_base,
win_id, dec_win->win_offset))); win_id, dec_win->win_offset)),
if (win_id < dec_win->max_remap) (win_id < dec_win->max_remap) ?
INFO(" remap(%x)\n",
mmio_read_32(MVEBU_DEC_WIN_REMAP_REG(dec_win->dec_reg_base, mmio_read_32(MVEBU_DEC_WIN_REMAP_REG(dec_win->dec_reg_base,
win_id, dec_win->win_offset))); win_id, dec_win->win_offset)) : 0);
else
INFO("\n");
} }
/* Set io decode window */ /* Set io decode window */
...@@ -167,12 +164,11 @@ int init_io_addr_dec(struct dram_win_map *dram_wins_map, ...@@ -167,12 +164,11 @@ int init_io_addr_dec(struct dram_win_map *dram_wins_map,
ERROR("Failed to set IO address decode\n"); ERROR("Failed to set IO address decode\n");
return -1; return -1;
} }
INFO("Set IO decode window successfully, base(0x%x)", INFO("Set IO decode window successfully, base(0x%x)"
io_dec_win->dec_reg_base); " win_attr(%x) max_dram_win(%d) max_remap(%d)"
INFO(" 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->win_attr, io_dec_win->max_dram_win,
io_dec_win->max_remap); io_dec_win->max_remap, io_dec_win->win_offset);
INFO(" win_offset(%d)\n", io_dec_win->win_offset);
} }
return 0; return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment