On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > Hi, Stefano! > > [snip] > > > >> +}; > >> + > >> +/* Default ECAM ops */ > >> +extern const struct pci_ecam_ops pci_generic_ecam_ops; > > If we use container_of and get rid of sysdata, I wonder if we get avoid > > exporting pci_generic_ecam_ops. > > > > > >> +int pci_host_common_probe(struct dt_device_node *dev, const void *data); > > This should be static and not exported > > > > > >> +int pci_generic_config_read(struct pci_host_bridge *bridge, uint32_t sbdf, > >> + uint32_t reg, uint32_t len, uint32_t *value); > > also this > > > > > >> +int pci_generic_config_write(struct pci_host_bridge *bridge, uint32_t > >> sbdf, > >> + uint32_t reg, uint32_t len, uint32_t value); > > also this > > > > > >> +void __iomem *pci_ecam_map_bus(struct pci_host_bridge *bridge, > >> + uint32_t sbdf, uint32_t where); > > also this > > > >> static always_inline bool is_pci_passthrough_enabled(void) > >> { > >> return pci_passthrough_enabled; > >> -- > >> 2.17.1 > > All the above is still need to be exported as those are going to be used > > by other bridge's implementations, see ZynqMP for instance later in the > series. > > I'll post a snippet from the future: > > /* ECAM ops */ > const struct pci_ecam_ops nwl_pcie_ops = { > .bus_shift = 20, > .cfg_reg_index = nwl_cfg_reg_index, > .pci_ops = { > .map_bus = pci_ecam_map_bus, > .read = pci_generic_config_read, > .write = pci_generic_config_write, > .need_p2m_mapping = pci_ecam_need_p2m_mapping, > } > }; > > DT_DEVICE_START(pci_gen, "PCI HOST ZYNQMP", DEVICE_PCI) > .dt_match = nwl_pcie_dt_match, > .init = pci_host_common_probe, > DT_DEVICE_END
OK then