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

Michael Zaidman michael.zaidman at gmail.com
Thu Apr 22 08:41:43 CEST 2010


On Thu, Apr 22, 2010 at 12:40 AM, Wolfgang Denk <wd at denx.de> wrote:

> Looking at the code I wonder why we need post_word_store() and
> post_word_load() functions at all. All implementations I have found
> translate into a single ioread32() resp. iowrite32() call.
>
Probably, due to big and little endians that the PPC code should
support. On other hand, AFAIK, no one is really using a little endian
notation on PPC platforms in u-boot. I am not sure however, is this a
good enough reason to omit such support? Or am I missing something?

>> 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?
>
> I think we should perform this cleanup in the following steps:
>
> 1) Move bootcount_store() and bootcount_load() to architecture
>   specific generic locations; this includes both the PowerPC and ARM
>   implementations
>
> 2) Move arch/blackfin/lib/post.c to post/

> 3) Eliminate post_word_store() and post_word_load() and use ioread32()
>   resp. iowrite32() (or equivalents) directly.
>

Thanks Wolfgang, it looks like I can cope with this task, of course if
no one has any objections.

Regards,
Michael


More information about the U-Boot mailing list