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

Michael Zaidman michael.zaidman at gmail.com
Wed Apr 21 16:07:38 CEST 2010


On Wed, Apr 21, 2010 at 4:51 PM, Stefan Roese <sr at denx.de> wrote:
> Hi Michael,
>
> On Wednesday 21 April 2010 15:24:15 Michael Zaidman wrote:
>> >> In order to eliminate redundant code for powerPC architecture when
>> >> defining post_word_{load/store} routines I suggest  moving them into
>> >> the arch/ppc/lib/commproc.c file rather than adding them to every
>> >> arch/ppc/cpu/XXXX.
>> >
>> > NAK. The commproc.* files are supposed to contain code dealing with
>> > the PowerQUICC Communication Processor Modules. This is in no way the
>> > right place for common code.
>>
>> Meanwhile the  post_word_{load/store} are located in the commproc.c
>> files for the following architectures:
>> mpc8260,
>> mpc85xx,
>> mpc8xx,
>> ppc4xx.
>
> I just started looking into this as well.
>
>> Looking for the way to add POST functionality for the mpc83xx family I
>> realized that the post_word_{load/store} can be generalized for all
>> ppc architectures.
>
> Or a weak default version even for all architectures.

Ok, but it solve the problem partially - it will pass the compilation
but will not work for some architectures. There are a number of
differences between CPU architectures such as big and little endians,
size of the data bus and so on...

Regards,
Michael


More information about the U-Boot mailing list