lkml.org 
[lkml]   [2006]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectproper way to assign fixed PCI resources to a "hotplug" device
Date
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-03 18:44    [W:0.073 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site