[U-Boot] [PATCH v2] add dm9000 eeprom read/write command

Stefano Babic sbabic at denx.de
Thu Sep 1 10:05:11 CEST 2011


On 09/01/2011 12:27 AM, Eric Jarrige wrote:
> 
> On 31 août 2011, at 15:01, Stefano Babic wrote:
>> You could add a CONFIG_DM9000_* switch. This set a switch only for the
>> DM9000 driver and the name remembers that it is used only inside the
>> driver itself, such as CONFIG_DM9000_DEBUG and CONFIG_DM9000_BASE that
>> are currently used in the driver.
> 
> In such a case MAKEALL fails to compile the trizepsiv board with a double definition
> of  'do_dm9000_eeprom'.  

Of course, the command must be dropped from the trizeps board. It makes
no sense to have such a duplication of identical code, even without
compilation errors.
Feel free to drop completely the eeprom.c file from the trizeps board.

> That makes sense but there is still a compilation failure and some impact on
> 7 other boards.

Sure, there is an incremented footprint, but I guess it is limited. And
at the moment, there are some dead code (dm9000_read_srom_word and
dm9000_write_srom_word) that is compiled in any case if
CONFIG_DM9000_NO_SROM is not set.

Because your code is a slightly modification of the code in the trizeps
board, we can assume we get the same impact. For the trizeps, I can see:

000221d4 T do_write_dm9000_eeprom
00022248 T do_read_dm9000_eeprom
000222b4 T do_dm9000_eeprom
0002234c T __aeabi_unwind_cpp_pr0

It seems to me that the code in TEXT for these functions increases for
only 376 bytes.

> I understand your point of view but I am not sure at all that board maintainers will
> want to give a command interface to modify  the content of the DM9000 eeprom.

Why not ? If the eeprom is soldered on the board, it must be
preprogrammed, because there is no way to do this in the bootloader.

Anyway, we are currently discussing this topic on the ML, and everyone
can raise his objections if he disagree ;-).

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list