[U-Boot-Users] Is serial_init() enough to make output to the serial console?

Wolfgang Denk wd at denx.de
Tue May 18 20:17:44 CEST 2004


In message <BAY2-F41Q6mBySsxVY60001e29e at hotmail.com> you wrote:
> 
> Does serial_init() in cpu/ppc405/serial.c provide essensial initialization 
> for UART? If I cut and copy this function and run it in SDRAM, can the 
> function like serial_putc put char to the serial output right after the 
> serial_init is doen? I tried this but when I tried to put '@' to console, I 
> got '.'
> What could be the problem or did I miss anything?

In my opinion it makes little sense to try to rip  certain  parts  of
out  of the U-Boot code, obviously without understanding what exactly
they are doing, and then expect certain behaviour.

If you want to implement your own test software, please feel free  to
go  on  and  do  it,  but  start  with  designing the code before you
implement it, and when you then copy from existing code make sure you
understand what you copy, and why.

The other approach is to use U-Boot as is, and let it go through  its
"natural"  init  sequence. Let it boot from flash as it was designed,
just follow the actions in a debugger - this is usually  easier,  and
it  also  allows  for a much better understanding of what's going on,
which parts of the hardware have been initialized or not, etc.

But don't rip out a single function and ask if it  will  work  in  an
undefined environment - the result will be just that: undefined.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Status quo. Latin for "the mess we're in."




More information about the U-Boot mailing list