public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* When is the console connected during spl run?
@ 2021-12-08  9:38 Chan Kim
  2021-12-10 14:16 ` Chan Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Chan Kim @ 2021-12-08  9:38 UTC (permalink / raw)
  To: U-Boot Mailing List

Hello experts,

I was following u-boot-spl program on our board hoping somewhere serial port
will be initialized and also the console using the serial port.

In our FPGA board, there is a small 8 BM on-chip memory in place of DDR and
I can use two 51kB sram on-chip.

The spl program is loaded on the first sram and bss and gd was allocated on
sdram (actually it's on-chip sram as I said).

I followed u-boot-spl program using some debug prints on memory until it
goes into board_init_r function (in common/spl/spl.c). 

Just inside the function I see this line

 

void board_init_r(gd_t *dummy1, ulong dummy2)

{

u32 spl_boot_list[] = {

        BOOT_DEVICE_NONE,

        BOOT_DEVICE_NONE,

        BOOT_DEVICE_NONE,

        BOOT_DEVICE_NONE,

        BOOT_DEVICE_NONE,

    };

    struct spl_image_info spl_image;

    int ret;

 

    debug(">>" SPL_TPL_PROMPT "board_init_r()\n");

 

    spl_set_bd();

 

The "debug" macro is the one defined in include/log.h and because I added
"#define DEBUG" to the make argument, it uses this definition.

#else /* _DEBUG */

 

/*

* Output a debug text when condition "cond" is met. The "cond" should be

* computed by a preprocessor in the best case, allowing for the best

* optimization.

*/

#define debug_cond(cond, fmt, args...)      \

({                      \

    if (cond)               \

        printf(pr_fmt(fmt), ##args);    \

})

 

#endif /* _DEBUG */

So, am I supposed to see the message in my console? From the reset to this
point, I couldn't see any serial port initialization (this is arm64 and
board_init_f just returned doing nothing. No need to initialize sdram.).

How should I connect uart to console? Should I add my own board_init_f
function and do serial_init and console_init_f there?

Any comment or help will be really appreciated.

 

Thank you!

Chan Kim

 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-10 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-08  9:38 When is the console connected during spl run? Chan Kim
2021-12-10 14:16 ` Chan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox