On Thu, Jul 28, 2022 at 04:31:17PM +0100, Ben Dooks wrote: > On 28/07/2022 16:24, Bjorn Helgaas wrote: > > On Fri, Jun 24, 2022 at 05:39:35PM +0300, Serge Semin wrote: > > > Since DWC PCIe v4.70a the controller version can be read from the > > > PORT_LOGIC.PCIE_VERSION_OFF register. Version is represented in the FourCC > > > format [1]. It's standard versioning approach for the Synopsys DWC > > > IP-cores. Moreover some of the DWC kernel drivers already make use of it > > > to fixup version-dependent functionality (See DWC USB3, Stmicro STMMAC or > > > recent DW SPI driver). > > > > These references to other drivers might be useful, but without a > > function name or file name, I can't easily find them. > > > > > In order to preserve the standard version > > > representation and prevent the data conversion back and forth, we suggest > > > to preserve the native version representation in the DWC PCIe driver too > > > in the same way as it has already been done in the rest of the DWC > > > drivers. IP-core version reading from the CSR will be introduced in the > > > next commit together with a simple macro-based API to use it. > > > > > > [1] https://en.wikipedia.org/wiki/FourCC > > I'm currently looking at a OF based dw-apb-timers-pwm driver, so also > would like to follow this. FWIW, the breadcrumbs I found are: dwc3_core_is_valid() stmmac_hwif_init() dw_spi_hw_init()