This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Re: Fwd: RealTek 8139 ethernet driver
- From: "Andy Dyer" <adyer at righthandtech dot com>
- To: "eCos Discussion" <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 11 Aug 2003 14:49:38 -0500
- Subject: RE: [ECOS] Re: Fwd: RealTek 8139 ethernet driver
> > I think what's missing in your driver is a call to
> > cyg_pci_configure_device()
> > to get BARs allocated in pci space. I haven't tried it yet :-)
>
> I disagree - that call is not the responsibility of the driver.
> It's up to the HAL initialization to call the PCI layer and cause
> it to configure devices, busses, etc.
>
> What platform are you using?
>
I was looking at the 82559 driver as an example.
The platform is custom (based on a mips tx49 derivative). There
seems to be some inconsistiency in how this gets done. A quick
grep-find in devs/eth shows:
find /ecos-z/ecos/packages/devs/eth -type f -print0 | xargs -0 -e grep
-n cyg_pci_configure_device
/ecos-z/ecos/packages/devs/eth/amd/pcnet/current/src/if_pcnet.c:349:
if (cyg_pci_configure_device(&dev_info)) {
/ecos-z/ecos/packages/devs/eth/intel/i21143/current/src/if_i21143.c:2056
: if (cyg_pci_configure_device(&dev_info)) {
/ecos-z/ecos/packages/devs/eth/intel/i82544/current/src/if_i82544.c:2641
: if (cyg_pci_configure_device(&dev_info)) {
/ecos-z/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c:2918
: if (cyg_pci_configure_device(&dev_info)) {
/ecos-z/ecos/packages/devs/eth/mips/atlas/current/src/if_atlas.c:475:
if (!cyg_pci_configure_device(&dev_info)) {
/ecos-z/ecos/packages/devs/eth/via/rhine/current/src/if_rhine.c:369:
if (cyg_pci_configure_device(&dev_info)) {
Grepping in packages/hal/mips shows no matches, and doing a
wider grep shows some arm derivatives seem to have calls to
it in the hal functions.
So it's done sometimes in the chip drivers, sometimes in the
platform "glue" function, and sometimes in the hal.
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss