I'm going to do something much like what we do for other mainboard
functions in linux (see irq setup). 

I'll have an struct like so: 

struct resethardware {
        unsigned short vendor, device;
        unsigned char registernumber;
        unsigned char bit;
        unsigned char val;
};

This will be populated with an array of things, viz:
struct resethardware resets[] = {
        /* note: I know these are the wrong bits */
        {VENDOR_INTEL, PIIX4E, 0x3c, 0x5, 1},
        {VENDOR_SIS, SIS630, 0x47, 0x5, 0}
};

Then you call hardware reset. 

Hardware reset does this:

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

Reply via email to