Incomplete (potentially broken) Raven Chipset support for PREP machines.

VALETTE Eric valette at crf.canon.fr
Wed Dec 9 00:13:40 EST 1998


>>>>> "Cort" == Cort Dougan <cort at persephone.cs.nmt.edu> writes:

Cort> You didn't answer how you'd solve the interrupt mapping problem.  I'd love
Cort> to hear any solutions to the current mess.

Why dont you have a table with two entries : one being the device func (device + function
byte) and the other the desired interrupt or directly (dev, func, intr)

There is at least one problem with actual code is in pci.c

---------------------------------------------------
for(dev=pci_devices; dev; dev=dev->next)
		{
			/*
			 * Use our old hard-coded kludge to figure out what
			 * irq this device uses.  This is necessary on things
			 * without residual data. -- Cort
			 */
			unsigned char d = PCI_SLOT(dev->devfn);
			dev->irq = Motherboard_routes[Motherboard_map[d]];
---------------------------------------------------

PCI_Slot return only the device index of a multi-function PCI device. It will
return the same value for a multi-function device for each function.
For a PCI/ISA bridge, there is no interrupt line on function 0 (at least those
I know of) => if I set 0 in the Motherboard_table, if will be also set for
any other functions. Even if you patch the value for one function, the same value
will be applied everywhere on any function. Another problem for the MCP750 is that
thre is a second PCI bus behind a DEC bridge and that you need to have
code for boards after the bridge (since it is where you plug the COMPAQ 
PCI boards...)

Second, on prep machine when you read the code, it only deals with the 8259 pics
to enable the interrupt which is completely irrelevant for Raven PCI interrupts
(at least if you do not bypass it and want to use its nice feature ...).

the code for request_irq should be 

---------------------------------------------------------
request_irq(vector, func, isIsaIntr)
{
    put_function_in_vector_indexed_table(vector, func);
    
    if (isIsaIntr) {
       enable_isa_irq_at_8259_level(vector);
       if ( ++nb_is_irq == 1) {
	     enable_irq_in_raven(0);
       }
    }
    else      {
	      enable_irq_in_raven (vector);
    }
}
------------------------------------------------------------------
NOTE that the isIsaIntr boolean could be deduced by the vector number
if specific convention are used like :

#ifdef __powerpc__
#define isa_vector_to_real_vector (vector) (vector + ISA_VECTOR_BASE)
#endif

and when calling request irq the vector is modified by using the macro to
change the vector value.


-- 
   __                 
  /  `                   	Eric Valette
 /--   __  o _.          	Canon CRF
(___, / (_(_(__         	Rue de la touche lambert
				35517 Cesson-Sevigne  Cedex
				FRANCE
Tel: +33 (0)2 99 87 68 91	Fax: +33 (0)2 99 84 11 30
E-mail: valette at crf.canon.fr

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request at lists.linuxppc.org ]]




More information about the Linuxppc-dev mailing list