Hi I forgot to include some comments on the code, sorry about the noise.
2008/12/22 Mike Frysinger <[email protected]>: > A forward port of the last version to work with the newer smc911x driver. > I only have a board with a LAN9218 part on it, so that is the only one > I've tested. But there isn't anything in this that would make it terribly > chip specific afaik. > > Signed-off-by: Mike Frysinger <[email protected]> > CC: Sascha Hauer <[email protected]> > CC: Guennadi Liakhovetski <[email protected]> > CC: Magnus Lilja <[email protected]> > CC: Ben Warren <[email protected]> > --- > examples/.gitignore | 1 + > examples/Makefile | 7 +- > examples/smc911x_eeprom.c | 381 > +++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 386 insertions(+), 3 deletions(-) > diff --git a/examples/smc911x_eeprom.c b/examples/smc911x_eeprom.c > new file mode 100644 > index 0000000..3dac4d3 > --- /dev/null > +++ b/examples/smc911x_eeprom.c <...> > +static void print_macaddr(void) > +{ > + puts("Current MAC Address in MAC: "); > + ulong addrl = smc911x_get_mac_csr(ADDRL); > + ulong addrh = smc911x_get_mac_csr(ADDRH); > + printf("%02x:%02x:%02x:%02x:%02x:%02x\n", > + (u8)(addrl), (u8)(addrl >> 8), (u8)(addrl >> 16), > + (u8)(addrl >> 24), (u8)(addrh), (u8)(addrh >> 8)); > + > + puts("Current MAC Address in EEPROM: "); > + int i; > + for (i = 1; i < 6; ++i) > + printf("%02x:", read_eeprom_reg(i)); > + printf("%02x\n", read_eeprom_reg(i)); > +} The above function declares new variables in the middle of the code. Is this OK w.r.t. the coding standard? I haven't seen such code in U-boot (or Linux) before. /Magnus _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

