You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PCI: host-generic: Extract an ECAM bridge creation helper from pci_host_common_probe()
pci_host_common_probe() is an extremely useful helper, as it
abstracts away most of the gunk that a "mostly-ECAM-compliant"
device driver needs.
However, it is structured as a probe function, meaning that a lot
of the driver-specific setup has to happen in a .init() callback,
after the bridge and config space have been instantiated.
This is a bit awkward, and results in a number of convolutions
that could be avoided if the host-common code was more like
a library.
Introduce a pci_host_common_init() helper that does exactly that,
taking the platform device and a struct pci_ecam_op as parameters.
This can then be called from the probe routine, and a lot of the
code that isn't relevant to PCI setup moved away from the .init()
callback. This also removes the dependency on the device match
data, which is an oddity.
Signed-off-by: Marc Zyngier <[email protected]>
[mani: fixed spelling mistakes]
Signed-off-by: Manivannan Sadhasivam <[email protected]>
Tested-by: Janne Grunau <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Acked-by: Alyssa Rosenzweig <[email protected]>
Link: https://patch.msgid.link/[email protected]
0 commit comments