Re: Pegasos PCI-bus scan works
Tim Rightnour <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.ofppc |
|---|---|
| Message-ID | <[email protected]> |
On 01-Nov-2007 Matt Sealey wrote: > marvell_pci.c would be far more descriptive if another Discovery platform > comes along (we support 3 of their chipsets with our firmware.. and who > knows who else might bite) which needs the same trick. I don't actually know what requires this hack currently. I consider the code a necc. evil that I will only be using on machines that absolutely need it. Any machine that works with ofwpci.c should be using that instead. I named it pegasospci, in the hopes that only the pegasos II would ever need this particular chunk of code. The layout is similar to how we laid out macppc's PCI busses. We have a few sets of basic general pci routines, that multiple platforms use, like the indirect pci conf stuff, or the of_method conf stuff. Then if a particular machine/bridge has something funky about it, we write a quick little autoconf front-end that ties in the right routines, adds one of it's own, and is basically for that machine only. If the code ends up being necc. for a larger number of machines, we will break out the config routines into a file of it's own, and place it next to pciconf_indirect.c in arch/powerpc/pci. Eventually I hope to write an rtas conf backend as well, but thats farther down the road. --- Tim Rightnour <[email protected]> NetBSD: Free multi-architecture OS http://www.netbsd.org/ Genecys: Open Source 3D MMORPG: http://www.genecys.org/