
On 01/21/2016 06:39 PM, Bin Meng wrote:
Hi Stephen,
On Fri, Jan 22, 2016 at 7:35 AM, Stephen Warren swarren@wwwdotorg.org wrote:
From: Stephen Warren swarren@nvidia.com
PCI controllers should be enumerated at startup so that PCI devices such as Ethernet controllers are available at startup. Fix board_init_r() not to skip calling pci_init() when CONFIG_DM_PCI is defined, and provide an implementation of pci_init() for the DM case.
What exact issue are you trying to fix? I posted the same question on Simon's patch [1] before. Does your patch and Simon's fix the same issue?
...
Oh, I hadn't seen that patch. That patch seems to only probe the first PCI controller/port, which still leaves all the other controllers/ports non-operational.
The issue is this: The PCI driver never gets probed. This used to happen because all Ethernet drivers were probed, and the Ethernet drivers would call into PCI APIs to determine if PCI devices exist, which would then trigger the PCI driver to be probed.
However with the current code-base, nothing probes the PCI controller driver, so the entire bus enumeration process never happens. Since there's no way (e.g. shell command) to force the PCI device/driver to probe, it's currently impossible to use any PCI device.
This patch restores the original behaviour of probing all PCI controllers automatically at boot.