[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dbb39cd2-4437-92ab-b6c6-8dae18748c98@starfivetech.com>
Date: Fri, 28 Jul 2023 16:46:44 +0800
From: Minda Chen <minda.chen@...rfivetech.com>
To: Bjorn Helgaas <helgaas@...nel.org>
CC: Krzysztof Wilczyński <kw@...ux.com>,
Daire McNamara <daire.mcnamara@...rochip.com>,
Conor Dooley <conor@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Emil Renner Berthing <emil.renner.berthing@...onical.com>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-pci@...r.kernel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Mason Huo <mason.huo@...rfivetech.com>,
Leyfoon Tan <leyfoon.tan@...rfivetech.com>,
Kevin Xie <kevin.xie@...rfivetech.com>
Subject: Re: [PATCH v2 2/4] PCI: plda: Get common codes from Microchip
PolarFire host
On 2023/7/27 20:02, Bjorn Helgaas wrote:
> 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
>
Yeah, This is a lot modification. I will try to split more patches to get it easier
to review. maybe split IP register macros first, second rename structs/function only.
third add the new event mapping codes, at last add PolarFire-specific codes.
> 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
>
ok
> Bjorn
Powered by blists - more mailing lists