public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Chan Kim" <ckim@etri.re.kr>
To: "U-Boot Mailing List" <u-boot@lists.denx.de>
Subject: When is the console connected during spl run?
Date: Wed, 8 Dec 2021 18:38:46 +0900	[thread overview]
Message-ID: <01e601d7ec17$66119430$3234bc90$@etri.re.kr> (raw)

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

 


             reply	other threads:[~2021-12-08  9:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08  9:38 Chan Kim [this message]
2021-12-10 14:16 ` When is the console connected during spl run? Chan Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01e601d7ec17$66119430$3234bc90$@etri.re.kr' \
    --to=ckim@etri.re.kr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox