[U-Boot] [RFC][PATCH 19/21] [eNET] Add support for onboard RTL8100B (RTL8139) chips
Ben Warren
biggerbadderben at gmail.com
Mon Apr 5 07:32:01 CEST 2010
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<common.h>
> #include<asm/io.h>
> #include<asm/ic/sc520.h>
> +#include<net.h>
> +#include<netdev.h>
>
> #ifdef CONFIG_HW_WATCHDOG
> #include<watchdog.h>
> @@ -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.
<snip>
regards,
Ben
More information about the U-Boot
mailing list