Reputation: 51
I am working to develop PCIe drivers for a custom ARM based platform. As a starting point I have started to look into Linux kernel 4.15.9 code. I am unable to locate the relevant PCIe driver files. In particular I am interested in PCIe device enumeration and configuration. Any help in this regard would be appreciated.
Upvotes: 0
Views: 1839
Reputation: 925
PCIe driver code is divided in 4 section.
1 - PCIe subsystem code
This is the generic PCIe subsystem code which takes care of Bus scan, MSI allocation, BAR allocation, etc.
Path - driver/pci/*
2 - PCIe host controller IP generic code
This is specific to the host controller. That means for a certain host in a platform, PCIe subsystem will communicate via the APIs provided by this code.
Path - drivers/pci/dwc/*
Example - DWC host
NOTE - Not all controller manufacturer has a separate folder like DWC (Synopsys).
3 - PCIe host controller initialization platform specific code
This is specific to the PCIe IP and it will be specific for a SoC. Every SoC will have their own chip specific code to initialize the controller. So the APIs in this part will be used by the "PCIe host generic code"
Path - drivers/pci/host/*
4 - PCIe capabilities
This code segment contain capabilities processing like AER, DPC. ASPM, etc.
Path - drivers/pci/pcie/*
Upvotes: 1