Re: [PATCH] pci: cdns : Function to read controller architecture
From: Bjorn Helgaas
Date: Mon Feb 03 2025 - 10:48:35 EST
On Mon, Feb 03, 2025 at 02:04:17PM +0000, Manikandan Karunakaran Pillai wrote:
> Would like to change the design to get the architecture value from
> dts, using a bool hpa And store this value in the is_hpa field in
> the struct as given.
>
> There would be support for legacy and High performance architecture
> in different files And the difference would be basically the
> registers they write and the offsets of these registers. The
> function names would almost be similar with the tag hpa, embedded in
> the function name.
>
> Would this be an acceptable design for support of these new PCIe
> cadence controllers ?
Look around at other drivers that handle similar issues and use a
similar solution. drivers/pci/controller/dwc/pcie-qcom.c is one
example, but most drivers support variants with minor differences.
Usual Linux email style is for responses to include only relevant
parts with replies interleaved:
https://people.kernel.org/tglx/notes-about-netiquette
Bjorn