On Mon, 11 Dec 2000, Ronald G Minnich wrote:
> 1) find the first pcidev in the resets array that matches the actual
> hardware
> 2) using the pcidv, set bit 'bit' to val 'val' in register
> 'registernumber'
>
> Comments?
>
> ron
I like it. It's quite simple and will work until we come accross a chipset with
more complex reset procedure, which is quite unlikely.
On the other hand since we want to plug in more chipset features into the kernel
there is another way of doing it. Link the kernel with the right chipset.o for
the chipset and thus import a set of chipset_xxx (like chipset_setclock)
functions into the kernel namespace. This way we can have chipset_reset
function and call it from restart_machine. The good thing is that chipset_xxx
functions are available to all kernel code and may be even exported to modules,
also they can be made available in user space by separate modules (/proc
approach) or just by creating new sys_calls. The biggest limitation of this is
that we won't be able to use the same precomplied kernel for more than one
chipset. If this is a probem the only way around it is using service
interrupts (which I don't think is so bad idea) and write standard code for
chipset_xxx function that will use the interrup.
I'm not yet sure myself which approach is better, so please send your comments
- Levi
--
Levi Khatskevitch
CTO
Cachier, Corp.
575 Grand St., Suite E306
New York, NY 10002