Re: [PATCH v2 2/4] PCI: plda: Get common codes from Microchip PolarFire host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 27, 2023 at 06:39:47PM +0800, Minda Chen wrote:
> Add PLDA PCIe controller driver codes, Move them from Microchip
> PolarFire PCIe host driver codes. And move pcie-microchip-host.c
> to plda directory.
> 
> The change includes:
> - copy the IP register marcos.
> - Add related data structures of PCIe host instance.
>   mc_pcie --> plda_pcie (Get most of data members)
>   mc_msi  --> plda_msi
>   add plda_pcie_ops and plda_evt data structures.
> - function rename list:
>   mc_pcie_enable_msi       --> plda_pcie_enable_msi
>   mc_pcie_setup_window     --> plda_pcie_setup_window
>   mc_pcie_setup_windows    --> plda_pcie_setup_iomems
>   mc_pcie_init_irq_domains --> plda_pcie_init_irq_domains
>   mc_allocate_msi_domains  --> plda_allocate_msi_domains
>   mc_init_interrupts       --> plda_pcie_init_irq
>   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
>   event interrupts:
>   mc_handle_event	   --> plda_handle_event
> - For PolarFire implements non-plda local interrupt events, most of
>   event interrupt process codes can not be re-used. PLDA implements
>   new codes and irq domain ops like PolarFire.
>   New event functions:
>     plda_event_handler
>     plda_pcie_event_map
>     plda_ack_event_irq
>     plda_mask_event_irq
>     plda_unmask_event_irq
>     plda_hwirq_to_mask
> - plda_handle_event adds a new irqnum to event num mapping codes for
>   PLDA local event except DMA engine interrupt events. The DMA engine
>   interrupt events are implemented by vendors. So do not add these
>   events. PolarFire PCIe uses get_events function pointer to get
>   their events num.

There's a lot going on here, which makes this hard to review.  If
possible, I suggest splitting this into multiple patches:

  - Move code to plda/ directory with no other changes
  - Rename structs/functions from mc_* to plda_* with no other changes
  - Add PolarFire-specific code

Other general things:

  - Capitalize PLDA, IRQ, INTx, MSI, PCIe in commit logs, comments,
    dmesg text
  - Sort MAINTAINERS entries alphabetically; see
    https://git.kernel.org/linus/c192ac735768

Bjorn



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux