[PATCH/v2] powerpc/5200: make BestComm gen_bd microcode exchangeable

Grant Likely grant.likely at secretlab.ca
Sun Nov 1 17:47:21 EST 2009


On Mon, Oct 5, 2009 at 1:42 PM, Albrecht Dreß <albrecht.dress at arcor.de> wrote:
> Am 05.10.09 20:16 schrieb(en) Grant Likely:
>>
>> Hmmm.  I've not been comfortable with this change, but it took me a while
>> to put my finger on exactly why.  In principle, I think it is a good idea.
>>  However, I don't want to merge it without any in-tree users.
>
> I could provide my modified microcode (which differs in two words only), for
> the "standard" task, just with byte swapping for the LPB, but I wonder if it
> is of much use.  No progress with crc32 calculation in BestComm so far...
> :-(
>
>> The other concern is that I don't like that the patch is only applicable
>> to gen_bd tasks.
>
> IMHO the big difference between gen_bd on one hand and ATA and FEC on the
> other is that (afaik) we have *no* other choice than using the implemented
> tasks for the latter two, obviously using the Freescale's example microcode.
>  Gen_bd can apparently be used for a plenty of purposes, including LPB (as
> shown in your driver), maybe PCI (there are examples in Freescale's code),
> PSC, etc.  Thus, the FEC and ATA drivers should not have an option as to
> change the microcode, whereas it is just convenient for gen_bd.

agreed.

>> I've been thinking about this for a while, and I'm not exactly thrilled
>> with the bestcomm layout which keeps the bestcomm firmware separate from the
>> only driver that actually uses it (ie FEC firmware & support code is
>> separate from the FEC driver.  Same for ATA).  I don't like the fact that
>> code which is only ever used by the ATA driver is maintained completely
>> separate from it.
>
> That's a good point!  The separate microcode files for ATA and FEC are
> somewhat confusing.  I guess it's a result of simply copying the Freescale
> examples into separate files (and that might be a good reason for keeping
> the microcode separated).  Maybe create new sub-folders below
> arch/powerpc/sysdev/bestcomm for fec, ata, and gen_bd?  At least some
> documentation would be great.

No, that doesn't really help much.  The ATA and FEC microcode +
support functions really have no business living in the common
bestcomm directory at all.  I should look into moving that stuff right
into the FEC and ATA drivers.  The Bestcomm API is probably designed
to the wrong level, and the base API should expose the same task
loading interface to all uses, FEC, ATA, GenBD, and custom tasks.

>> But I may be splitting hairs here and maybe I shouldn't be too concerned
>> about it.  Regardless, I'd think I'd rather see something that isn't totally
>> gen_bd specific.  Perhaps *microcode should be part of the bcom_task
>> structure?
>
> See above - I believe FEC and ATA are somewhat special as they need
> *exactly* the provided microcode.  And if something cannot be changed
> without breaking the functionality, there should not be a chance to do so...
> ;-)

Hence the FEC and ATA microcode should live in (*gasp*) the FEC and
ATA drivers.  ;-)

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the Linuxppc-dev mailing list