Messages in this thread | | | Date | Mon, 9 Aug 1999 10:21:41 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: New resources - pls, explain :-( |
| |
On Sat, 7 Aug 1999, Martin Mares wrote: > > I'm saying the _helper_ function should do the dirty work, and I'm saying > > that the bootup sequence should _not_ necessarily do it. > > I still don't see any advantages in such an approach -- in my opinion > it just adds extra complexity to both the drivers and the generic code, > bringing nothing useful.
I want to have a common driver interface, at least conceptually.
And while you don't seem to believe it, there are buses where you CANNOT initialize the device generically. It happens with PCI too, with devices with extended registers etc, but on other buses it is sometimes the _only_ way to do things.
So I want drivers to be conceptually
for_each_device() { io = enable_device(); /* or whatever is approapriate */
.. run with it .. }
because that is the kind of "common" ground for all different bus types.
I'm talking to the ISA PnP guy, and we'll try to get rid of "struct pci_dev" completely - because most of the issues with PCI have similar equivalents in ISA PnP. So there would be a "struct device" (except the name has already been stolen by the networking layer, so..), which can ge used in generic PC drivers, and then the only difference between PCI and ISA PnP is going to be which function you use to find the device, and which function you use to initialize it.
In short, this is not about just PCI. There are certainly many cases where the same driver has PCI, ISA PnP, and old ISA interfaces - and the _driver_ is often exactly the same with just small differences in how cards are found and initialized.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |