linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: need to assign IRQs for PCI and cPCI
@ 2001-04-25 23:26 Greg KH
  2001-04-26  0:14 ` Kartoz, Michael F
  2001-04-27 18:58 ` Chris Brand
  0 siblings, 2 replies; 3+ messages in thread
From: Greg KH @ 2001-04-25 23:26 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Apr 25, 2001 at 05:14:14PM -0700, Kartoz, Michael F wrote:
> Does anyone know how I should go about doing this?  Am I going about this
> the wrong way?  Is anyone else doing this same kind of work?

Have you looked at how the Compaq Hotplug PCI driver handles this?
It's at http://opensource.compaq.com/ and I have a patch against 2.4.3
around here to make it build a bit cleaner.

Have you also looked at the 2 compactPCI drivers?  MonteVista wrote
them, and there is a sourceforge site that has the source for them
(can't remember it off the top of my head, sorry.)

What controller are you doing this work for?

thanks,

greg k-h

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* need to assign IRQs for PCI and cPCI
  2001-04-25 23:26 need to assign IRQs for PCI and cPCI Greg KH
@ 2001-04-26  0:14 ` Kartoz, Michael F
  2001-04-27 18:58 ` Chris Brand
  1 sibling, 0 replies; 3+ messages in thread
From: Kartoz, Michael F @ 2001-04-26  0:14 UTC (permalink / raw)
  To: linux-hotplug

How do I assign IRQs for inserted PCI boards?

I have been writing a very rough version of a hotplug system driver as a
module.  I am specifically looking at how to get Linux 2.4.3 with the
hotplug package to assign resources (I/O, memory, IRQs) to the appropriate
places in the new board's PCI config space and in the kernel prior to
calling pci_insert_device.  I seem to have gotten the I/O and memory regions
as well as some of the other registers such as cache line size initialized
(although I'm not sure whether bridges are being handled properly or not).
However, I could not find any way of assigning the IRQs.  It seems that the
routines that exist for assigning the IRQs are only available during initial
boot.  Specifically, one routine that seems to be necessary (if using
IOAPIC) is IO_APIC_get_PCI_irq_vector which provides the IRQ for use by the
driver instead of the one in config space when APICs are being used.

Does anyone know how I should go about doing this?  Am I going about this
the wrong way?  Is anyone else doing this same kind of work?

The basic flow of an insert in my hotplug system driver is:
1) Create and zero out new dev structure for device that was inserted.
2) Fill in the bus, sysdata, devfn, device, vendor, dma_mask and hdr_type
elements of dev.
3) Fill in cache line size in PCI config space.
4) Call pci_setup_device.
5) Call pci_assign_resource for each of the first six resource structures in
dev.
6) Set PCI command register in PCI config space.
7) Call IO_APIC_get_PCI_irq_vector to fill in IRQ element of dev (I hacked
the kernel to make this symbol visible to my module)
8) Call pci_insert_device.


- Mike Kartoz



_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: need to assign IRQs for PCI and cPCI
  2001-04-25 23:26 need to assign IRQs for PCI and cPCI Greg KH
  2001-04-26  0:14 ` Kartoz, Michael F
@ 2001-04-27 18:58 ` Chris Brand
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Brand @ 2001-04-27 18:58 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Apr 25, 2001 at 05:14:14PM -0700, Kartoz, Michael F wrote:
> Does anyone know how I should go about doing this?  Am I going about this
> the wrong way?  Is anyone else doing this same kind of work?

Motorola Computer Group have something along these lines for cPCI and 2.2
kernels, downloadable from
http://www.mcg.mot.com/cfm/templates/swDetails.cfm?PageIDp4&SoftwareID=6&P
roductID\x172 No idea whether it's any use, but it may give you some clues.

Chris

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-27 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-25 23:26 need to assign IRQs for PCI and cPCI Greg KH
2001-04-26  0:14 ` Kartoz, Michael F
2001-04-27 18:58 ` Chris Brand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).