From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Sun, 04 Apr 2010 22:32:01 -0700 Subject: [U-Boot] [RFC][PATCH 19/21] [eNET] Add support for onboard RTL8100B (RTL8139) chips In-Reply-To: <1269516183-9306-20-git-send-email-graeme.russ@gmail.com> References: <1269516183-9306-1-git-send-email-graeme.russ@gmail.com> <1269516183-9306-20-git-send-email-graeme.russ@gmail.com> Message-ID: <4BB975D1.7060804@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de HI Graeme, On 3/25/2010 4:23 AM, Graeme Russ wrote: > --- > I simply do not know why PCI_BASE_ADDRESS_1 has to be changed to > PCI_BASE_ADDRESS_0 - Please comment > > board/eNET/eNET.c | 12 ++++++++++++ > drivers/net/rtl8139.c | 2 +- > include/asm-i386/ic/sc520.h | 6 +++--- > include/configs/eNET.h | 9 ++++++++- > 4 files changed, 24 insertions(+), 5 deletions(-) > > diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c > index 52ea140..9d782f3 100644 > --- a/board/eNET/eNET.c > +++ b/board/eNET/eNET.c > @@ -24,6 +24,8 @@ > #include > #include > #include > +#include > +#include > > #ifdef CONFIG_HW_WATCHDOG > #include > @@ -173,3 +175,13 @@ ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t * info) > } else > return 0; > } > + > +int board_eth_init(bd_t *bis) > +{ > + int adapters; > + adapters = pci_eth_init(bis); > + > + if (adapters> 0) > + eth_init(bis); > I'm not sure why you're calling eth_init() here. Are you sure that's what you want to do? Keep in mind that board_eth_init() gets called by eth_initialize() in the common net code. > + > + return adapters; > diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c > index db8a727..a3df564 100644 > --- a/drivers/net/rtl8139.c > +++ b/drivers/net/rtl8139.c > @@ -214,7 +214,7 @@ int rtl8139_initialize(bd_t *bis) > if ((devno = pci_find_devices(supported, idx++))< 0) > break; > > - pci_read_config_dword(devno, PCI_BASE_ADDRESS_1,&iobase); > + pci_read_config_dword(devno, PCI_BASE_ADDRESS_0,&iobase); > Are you fixing a bug here? This seems like a change that would have fairly wide-ranging implications beyond your board. regards, Ben