[U-Boot] [PATCH v2 15/17] Move eNET low-level initialisation into asm

Graeme Russ graeme.russ at gmail.com
Mon Aug 24 13:49:15 CEST 2009


Wolfgang Denk wrote:
> Dear Graeme Russ,
> 
> In message <1251111477-15561-1-git-send-email-graeme.russ at gmail.com> you wrote:
>> Allows earlier indication of boot progress by initialising the LEDs and
>> Serial Port while the CPU is still in 16-bit (Real) mode
> 
> I have to admit that I am not a friend of moving C code to assembler.
> This contradicts pretty basic principles of U-Boot design.
> 

Normally I would agree

> I can understand that you want diagnosis as early as possible, but 162
> insertions versus 26 deletions is a clear indocation that something is
> awfully wrong.

When it came to relocating the code into RAM, I had an awful time trying
to figure out where it was failing. The LEDs turned out to be not so
useful because the board was resetting, so the LEDs just kept going
through a crazy sequence so I needed serial output.

The other nice thing is it gives serial output to low level init
functions in the C code before init_serial()

> Are you absolutely sure this is a good idea?

Hmm, maybe now that it's working I may not need it. I just stg pop'd
it and the following patches applied cleanly (although it did need to
auto modify patch 16) and the board still works so I guess I can ditch
it - Shortens patch series by one - How would you like the resend (maybe
same length series with Patch 15 being blank?)

>>  - Fixed space before tab highlighted by Wolfgang Denk
> 
> You did not catch all of these, see below.
 
Arghh, only looked at sc520.h - I just did a global search for space
followed by tab - 1000+ hits, but i386 and eNET are clean :)

> Best regards,
> 
> Wolfgang Denk

Regards,

G



More information about the U-Boot mailing list