[U-Boot] [PATCH 2/2] Added serial loopback tests accessible via CLI and POST

Michael Zaidman michael.zaidman at gmail.com
Tue Mar 23 14:41:29 CET 2010


Dear Wolfgang,

On Tue, Mar 23, 2010 at 1:31 PM, Wolfgang Denk <wd at denx.de> wrote:

[snip]

> Then what is the "uart[t]est" command needed for?

For two reasons:
1) It gets parameters such internal/external loopback and COM number
while "diag run uart" performs only local loopback through all COMs.
Thus, it can be used at production to perform external loopback tests.

2) This test will be available even when compiled without POST for
reasons of POST tests unavailability for particular cpu/board or
specific board memory layout constrains.

>
[snip]
>
>> So I placed it under post\drivers and defined the uart_post_test
>> routine as weak in order do not interfere with board specific uart
>> POST tests.
>
> I don't get this. Where is the weak part needed? Either I have only
> one type of UART (then the weak is not needed as only onedriver is
> enabled), or I have both "CPU specific" and "generic" (16550 based)
> UARTs, in which case I eventually might ant to test _both_ of them
> (then the weak will not work).
>
Currently, we have only CONFIG_SYS_POST_UART which will cause both
files to be compiled in the case of mpc8xx or ppc4xx CPUs.  Which will
lead to the linker failure if no weak definition will be used.
Do you mean we should do it at the makefile level by adding CONFIG_
specifing which file should be compiled and linked?

Thanks,
Michael


More information about the U-Boot mailing list