From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 3 May 2009 11:31:47 +0200 Subject: [U-Boot] [PATCH 1/1] Add config option for disabling DM9000-SROM support. In-Reply-To: <1241342817-9448-1-git-send-email-linux@bohmer.net> References: <1241342817-9448-1-git-send-email-linux@bohmer.net> Message-ID: <20090503093147.GT25959@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > Signed-off-by: Remy Bohmer > --- > 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 > #include > - > @@ -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 > 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/ > @@ -0,0 +1,11 @@ Copyrigth? > + > +#ifndef __DM9000_H__ > +#define __DM9000_H__ Best Regards, J.