[U-Boot-Users] [GIT PULL] [ARM] Please pull fromgit://denx.de/git/u-boot-arm.git

Wolfgang Denk wd at denx.de
Thu Aug 16 11:40:43 CEST 2007


Dear Ulf,

in message <002c01c7dfdb$280ab250$dcc4af0a at atmel.com> you wrote:
>
> >> include/led.h => seems specific to the at91rm9200dk board only,
> >>                  please move to board directory. Also, the calls to
> >>                  these functions should be handled without #ifdef's
> >>                  in common code. Either use existing functions hooks,
> >>                  or weak references.
> 
> Please explain further.
> What is a weak reference?

See gcc.info,  Node: Function Attributes:

...
`weak'
     The `weak' attribute causes the declaration to be emitted as a
     weak symbol rather than a global. This is primarily useful in
     defining library functions which can be overridden in user code,
     though it can also be used with non-function declarations.
     ...

See for example the implementation of the declaration of
show_boot_progress() in common/main.c and the use of this function all
over the place.

> Which hooks?

You  could  probably  avoid  all  your  own  code  if  you  had  used
show_boot_progress()  instead.  Alternatively  or in combination, you
could and should have used drivers/status_led.c

> >> cpu/arm920t/start.S => I'm surprised to see a lot of intialization
> >>                 code has now been added to the "reset" entry point.
> >>                 Is this by accident, or am I missing something?
> 
> The changes are there to allow you to boot from a dataflash.
> A bootstrap will initialize the SDRAM and copy from the dataflash (or > NAND flash) 
> IIRC: The code avoids reinitialization of stuff which will crash U-Boot.
> (And sets the LED)

I'm afraid I don't understand. We are not talking about  any  startup
code,  but  about the code of the "reset" function, i. e. what casues
the board to reset.

Maybe the code was added to the wrong place in the file?



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It is easier to port a shell than a shell script."      - Larry Wall




More information about the U-Boot mailing list