Re: [PATCH v3 04/11] PCI: microchip: Rename data structure and functions

From: Conor Dooley
Date: Mon Aug 14 2023 - 09:43:51 EST


On Mon, Aug 14, 2023 at 04:20:09PM +0800, Minda Chen wrote:
> Rename mc_* to plda_* for common data structures,
> setup and IRQ functions.
>
> The modification includes:
> - Add related data structures of PCIe host instance.
> mc_pcie --> plda_pcie_rp (Get most of data members)
> mc_msi --> plda_msi
> - function rename list:
> mc_pcie_setup_window --> plda_pcie_setup_window
> mc_pcie_setup_windows --> plda_pcie_setup_iomems
> mc_allocate_msi_domains --> plda_allocate_msi_domains
> MSI interrupts related functions and IRQ domain
> (primary function is mc_handle_msi):
> mc_handle_msi --> plda_handle_msi
> INTx interrupts related functions and IRQ domain
> (primary function is mc_handle_intx):
> mc_handle_intx --> plda_handle_intx
>
> Signed-off-by: Minda Chen <minda.chen@xxxxxxxxxxxxxxxx>
> ---
> .../pci/controller/plda/pcie-microchip-host.c | 216 ++++++++----------
> drivers/pci/controller/plda/pcie-plda.h | 20 ++
> 2 files changed, 120 insertions(+), 116 deletions(-)
>
> diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c
> index 5ab11741f406..e25459f34891 100644
> --- a/drivers/pci/controller/plda/pcie-microchip-host.c
> +++ b/drivers/pci/controller/plda/pcie-microchip-host.c
> @@ -21,9 +21,6 @@
> #include "../../pci.h"
> #include "pcie-plda.h"
>
> -/* Number of MSI IRQs */
> -#define MC_MAX_NUM_MSI_IRQS 32
> -
> /* PCIe Bridge Phy and Controller Phy offsets */
> #define MC_PCIE1_BRIDGE_ADDR 0x00008000u
> #define MC_PCIE1_CTRL_ADDR 0x0000a000u
> @@ -175,22 +172,9 @@ struct event_map {
> u32 event_bit;
> };
>
> -struct mc_msi {
> - struct mutex lock; /* Protect used bitmap */
> - struct irq_domain *msi_domain;
> - struct irq_domain *dev_domain;
> - u32 num_vectors;
> - u64 vector_phy;
> - DECLARE_BITMAP(used, MC_MAX_NUM_MSI_IRQS);
> -};
> -
> struct mc_pcie {
> + struct plda_pcie_rp plda;

I'm not super keen on the "rp"s that've been introduced here and
elsewhere when "port" is what's used all over the shop.
Not a big gripe though, so
Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>

Thanks,
Conor.

Attachment: signature.asc
Description: PGP signature