[U-Boot] [PATCH 1/1] Add config option for disabling DM9000-SROM support.
Remy Bohmer
linux at bohmer.net
Sun May 3 11:55:21 CEST 2009
Hello,
2009/5/3 Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>:
> On 11:26 Sun 03 May , Remy Bohmer wrote:
>> Some boards do not have SROM support for the DM9000 network adapter.
>> Instead of listing these board names in the driver code, make this
>> option configurable from the board config file.
>>
>> It also removes a build warning for the at91sam9261ek board:
>> 'dm9000x.c:545: warning: 'read_srom_word' defined but not used'
>>
>> And it repaires the trizepsiv board build which was broken around the
>> same routines
> please put Stelian in Cc
Done!
>> Signed-off-by: Remy Bohmer <linux at bohmer.net>
>> ---
>> board/trizepsiv/eeprom.c | 14 +++++++-------
>> drivers/net/dm9000x.c | 16 ++++++++--------
>> include/configs/at91sam9261ek.h | 1 +
>> include/dm9000.h | 11 +++++++++++
>> 4 files changed, 27 insertions(+), 15 deletions(-)
>> create mode 100644 include/dm9000.h
>>
>> diff --git a/board/trizepsiv/eeprom.c b/board/trizepsiv/eeprom.c
>> index 63f1c6c..9fa7aef 100644
>> --- a/board/trizepsiv/eeprom.c
>> +++ b/board/trizepsiv/eeprom.c
>> @@ -23,17 +23,17 @@
>>
>> #include <common.h>
>> #include <command.h>
>> -
>
>
>> @@ -347,9 +347,9 @@ eth_init(bd_t * bd)
>>
>> /* Set Node address */
>> if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
>> -#if !defined(CONFIG_AT91SAM9261EK)
>> +#if !defined(CONFIG_DM9000_NO_SROM_AVAIL)
> CONFIG_DM9000_NO_SROM will be shorter and the same
OK
>> for (i = 0; i < 3; i++)
>> - read_srom_word(i, enetaddr + 2 * i);
>> + dm9000_read_srom_word(i, enetaddr + 2 * i);
>> eth_setenv_enetaddr("ethaddr", enetaddr);
>> #endif
>
>
>>
>> diff --git a/include/dm9000.h b/include/dm9000.h
>> new file mode 100644
>> index 0000000..d59919b
>> --- /dev/null
>> +++ b/include/dm9000.h
> Ben what do you think to do as usb have a dir to store all net header
> include/net/
I have chosen the same location as the dm9161.h, other similar headers
are there as well.
If it has to be changed, I suggest making it a separate patch.
>> @@ -0,0 +1,11 @@
> Copyrigth?
OK.
>> +
>> +#ifndef __DM9000_H__
>> +#define __DM9000_H__
>
> Best Regards,
> J.
>
More information about the U-Boot
mailing list