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

Ben Warren biggerbadderben at gmail.com
Sat Feb 9 01:03:49 CET 2008


On Feb 8, 2008 11:44 AM, Timur Tabi <timur at freescale.com> wrote:
> 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.

OK, good to know.  What a lovely feature.
>
> > 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.
>
Don't worry about it.  drivers/net is OK
> >> +#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.
>
The problem is that you're artificially making this a PowerPC-only
part.  If you used 8-bit accessors endianness wouldn't matter and
other architectures could use this without changes (notwithstanding
the #includes...)

> > 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.
>
Cool, thanks.

> > 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.
>

Problem certainly not limited to Freescale code :)




More information about the U-Boot mailing list