[U-Boot-Users] [PATCH] 83xx: Add Vitesse VSC7385 firmware uploading

Timur Tabi timur at freescale.com
Fri Feb 8 17:44:15 CET 2008


Ben Warren wrote:

> Is this switch able to pass traffic in a default configuration without 
> this firmware or is it dead?

Without the firmware, the switch is completely dead.

> I'm not 100% convinced that this is network code, but my opinion isn't 
> very strong and I can't really think of a better place (maybe 
> device/misc or device/non_free?)

I'll move it to device/misc if you want.  device/non_free doesn't exist so I
don't want to create it.

>> +#include <config.h>
>> +#include <common.h>
>> +#include <asm/io.h>
>> +#include <asm/errno.h>
>> +
>>   
> I think Kim mentioned this will break some architectures. Just repeating it.

Yeah, I'm still waiting for someone to tell me why.  In the meantime, I've done 
this:

#include <config.h>

#ifdef CONFIG_VSC7385_ENET

#include <common.h>
#include <asm/io.h>
#include <asm/errno.h>

> It looks to me that the data bus is 8 bits. Why are you defining 
> registers as 32 bits and using 32-bit accessors?

Beats me.  The programming for this chip is really weird, the documentation is
under NDA, and I didn't write the original code.  Mine is a little prettier than
the original
(http://www.bitshrine.org/gpp/u-boot-1.2.0-mpc837xerdb-vsc7385-load.patch), but
I'm not going to change the actual I/O operations.

> When you write to the device, can you express the value in hex? It's 
> quicker for the reader (who has Vitesse datasheets, of course) to figure 
> out what you're doing.

Sure, I'll change it.

> Here you use mnemonics for describing the base register settings. I know 
> it's not new code, but it would be nice to be consistent

All of the Freescale header files could be scrubbed.  I figured I was already
making enough changes.  They *should* be using mnemonics for everything.

-- 
Timur Tabi
Linux kernel developer at Freescale





More information about the U-Boot mailing list