Subject: Re: GPIO on the Soekris net4801
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: current-users
Date: 10/16/2005 10:45:37
On Sat, Oct 15, 2005 at 06:12:33PM -0400, Steven M. Bellovin wrote:
> Somehow, the presence of that bridge is either masking the geodeide bus 
> or autoconfig thinks that it does.  I note that it said:
> 
> 	geodeide0 at pci0 dev 18 function 2
> 
> ..
> 
> 	gscpcib0 at pci0 dev 18 function 0
> 
> i.e., both have the same device number.  I know that that can work (my 
> laptop has such a configuration), but does it always?

They are attached to different PCI functions, that should work just
fine.

However, this is somewhat weird in gscpcib.c:

corepcib:
#endif  /* !SMALL_KERNEL */
        /* Provide core pcib(4) functionality */
        pcibattach(parent, self, aux);

#ifndef SMALL_KERNEL
        /* Attach GPIO framework */
        if (gpio_present)
                config_found_ia(&sc->sc_dev, "gpiobus", &gba, gpiobus_print);
#endif  /* !SMALL_KERNEL */


That looks as if the gpio attach uses same device structure as
the pcib, i.e. gpio attach overwrites the structure. Couldn't that be
the problem?
 
Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We can walk our road together if our goals are all the same;     -=-
-=- We can run alone and free if we pursue a different aim.          -=-