public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* proper way to assign fixed PCI resources to a "hotplug" device
@ 2006-03-03 17:42 Kumar Gala
  2006-03-03 22:07 ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Kumar Gala @ 2006-03-03 17:42 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux Kernel, linux-pci

I was wondering what the proper way to assign and setup a single PCI  
device that comes into existence after the system has booted.  I have  
an FPGA that we load from user space at which time it shows up on the  
PCI bus.

It has a single BAR and I need to assign it at a fixed address in PCI  
MMIO space.

All of the exported interfaces I see have to do with having the  
kernel assign the BAR automatically for me.

the following looks like what I want to do:

bus = pci_find_bus(0, 3);
dev = pci_scan_single_device(bus, devfn);
pci_bus_alloc_resource(...);
pci_update_resource(dev, dev->resource[0], 0);
pci_bus_add_devices(bus);

However, pci_update_resource() is not an exported symbol, so I could  
replace that code with the need updates to the actual BAR.

Is this the "right" way to go about this or is there a better  
mechanism to do this.

thanks

- kumar


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

end of thread, other threads:[~2006-03-09 16:49 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-03 17:42 proper way to assign fixed PCI resources to a "hotplug" device Kumar Gala
2006-03-03 22:07 ` Greg KH
2006-03-03 22:39   ` Kumar Gala
2006-03-03 23:18     ` Greg KH
2006-03-03 23:28       ` Kumar Gala
2006-03-03 23:50         ` Scott Murray
2006-03-09 16:49       ` Kumar Gala
2006-03-03 23:18     ` Jeff Garzik
2006-03-08  2:00       ` Greg KH
2006-03-08  2:31         ` Tejun Heo
2006-03-08  5:27           ` Greg KH
2006-03-08 11:39             ` Ivan Kokshaysky
2006-03-08 16:40               ` thockin
2006-03-08 21:21                 ` Ivan Kokshaysky
2006-03-08 21:57                   ` thockin
2006-03-08 22:11                     ` Ivan Kokshaysky
2006-03-08 23:54                       ` thockin
2006-03-03 23:13   ` Kumar Gala
2006-03-03 23:27     ` Greg KH
2006-03-03 23:40       ` Scott Murray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox