geode: Update OLPC power management

Greg KH greg at kroah.com
Sun Mar 4 11:14:33 EST 2007


On Tue, Apr 09, 2002 at 08:12:43PM +0000, Jordan Crouse wrote:
> Thanks for your comments, I really appreciate it.
> 
> I guess I should provide a bit of context for this code.  When the
> 5535 (the predecessor to the 5536) first came out, the BIOS folks decided
> to combine some of the "random" legacy devices as bars under what 
> we call the ISA_BRIDGE device, and it has been that way until this day.
> 
> This has been very frustrating, since it doesn't mesh very well with the
> Linux PCI model.  To get around that - most of the drivers have either
> read the resource base directly from the 5536 MSRs (such as the 
> cs5535_gpio driver), and others like the SMBUS driver have probed for 
> the PCI devices, but not actually used them.  The SMBUS driver is 
> particularly confusing because the same block was accessible through
> ISA ports in earlier generations of the Geode, so we have to do way 
> more probing then one would expect.
> 
> This driver was an effort to provide some place to manage the PCI device,
> particularly for power management purposes.  In the end, its like we are
> designing our own API for our own bus, but we're really hijacking existing
> infrastructure, which seemed easier to me then creating a new device type 
> from scratch just for the Geode.

No, please don't do that.  Either create a new bus type (which is pretty
trivial to do if you understand the blob that the driver core is), or do
what people have been asking for years for, the ability to have multiple
PCI drivers bind to the same device.

The latter is probably the "correct" thing to do here, and some people
are slowly working on it, but I have no idea when it will happen.

Creating a new bus is a way to chicken out, but it has the advantage of
working properly, especially with the suspend/resume framework, which
you are going to have to do anyway. So to try to this, by using the
hacks you have implemented here, is going to come back and bite you
eventually.  And it's going to prevent the changes from being accepted
into the upstream kernel, and I know you don't want to maintain this
forever on your own.

I'll be glad to create a simple new bus type for you if you want, or I
can look into the real solution of multiple pci drivers.  The former
will benifit only this project, while the later benifits all of the
kernel community...

thanks,

greg k-h



More information about the Devel mailing list