[U-Boot] [RFC] PPC: post_word_{load/store} - eliminate redundant code

Michael Zaidman michael.zaidman at gmail.com
Wed Apr 21 16:29:39 CEST 2010


On Wed, Apr 21, 2010 at 4:59 PM, Wolfgang Denk <wd at denx.de> wrote:
>
> Actually there are two parts to it:
>
> bootcount_store() and bootcount_load() are needed for the boot
> counter, a generic feature; I tend to move these into
> arch/powerpc/lib/bootcount.c; the code also needs to be rewritten to
> use I/O accessors.
>
> post_word_store() and post_word_load() is architecture specific,
> common POST code that unfortunately also gets used by the logbuffer
> code. This should be split. Then we would have
> arch/powerpc/lib/logbuf.c and post/arch/powerpc/post_io.c or such.
>
> Please also note that there are more files implementing such code -
> see for example here:
>
>        board/cm5200/cm5200.c
>        board/bf537-stamp/post.c
>        board/barco/barco.c
>        board/bc3450/bc3450.c
>        board/ssv/common/post.c
>        board/tqc/tqm5200/tqm5200.c
>        board/xes/xpedite1000/xpedite1000.c
>
Yes, I have seen them also. I actually thought to clean up them but do
it in two phases - first make the post_word accessors to be common per
arch and  define them as weak so it will not break existing code.
Afterwords - eliminate an existing redundant code.

Thanks for the tips.  Please let me know how do you want me to proceed
with the patch?

Regards,
Michael


More information about the U-Boot mailing list