devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Minda Chen <minda.chen@starfivetech.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
	"Daire McNamara" <daire.mcnamara@microchip.com>,
	"Conor Dooley" <conor@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Emil Renner Berthing" <emil.renner.berthing@canonical.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Mason Huo" <mason.huo@starfivetech.com>,
	"Leyfoon Tan" <leyfoon.tan@starfivetech.com>,
	"Kevin Xie" <kevin.xie@starfivetech.com>
Subject: Re: [PATCH v2 2/4] PCI: plda: Get common codes from Microchip PolarFire host
Date: Fri, 28 Jul 2023 16:46:44 +0800	[thread overview]
Message-ID: <dbb39cd2-4437-92ab-b6c6-8dae18748c98@starfivetech.com> (raw)
In-Reply-To: <20230727120207.GA769710@bhelgaas>



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

  reply	other threads:[~2023-07-28  8:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 10:39 [PATCH v2 0/4] Refactoring Microchip PCIe driver and add StarFive PCIe Minda Chen
2023-07-27 10:39 ` [PATCH v2 1/4] dt-bindings: PCI: Add PLDA XpressRICH PCIe host common properties Minda Chen
2023-08-04  7:12   ` Conor Dooley
2023-07-27 10:39 ` [PATCH v2 2/4] PCI: plda: Get common codes from Microchip PolarFire host Minda Chen
2023-07-27 12:02   ` Bjorn Helgaas
2023-07-28  8:46     ` Minda Chen [this message]
2023-07-27 15:21   ` Randy Dunlap
2023-08-03  6:44     ` Minda Chen
2023-07-27 10:39 ` [PATCH v2 3/4] dt-bindings: PCI: Add StarFive JH7110 PCIe controller Minda Chen
2023-08-04  7:10   ` Conor Dooley
2023-08-07  6:54     ` Minda Chen
2023-08-07  7:45       ` Conor Dooley
2023-08-10 22:47   ` Rob Herring
2023-08-14  8:11     ` Minda Chen
2023-07-27 10:39 ` [PATCH v2 4/4] PCI: starfive: Add " Minda Chen
2023-08-04  1:46 ` [PATCH v2 0/4] Refactoring Microchip PCIe driver and add StarFive PCIe Minda Chen
2023-08-04  6:23   ` Conor Dooley
2023-08-05 13:05 ` Emil Renner Berthing
2023-08-07  6:59   ` Minda Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dbb39cd2-4437-92ab-b6c6-8dae18748c98@starfivetech.com \
    --to=minda.chen@starfivetech.com \
    --cc=bhelgaas@google.com \
    --cc=conor@kernel.org \
    --cc=daire.mcnamara@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=emil.renner.berthing@canonical.com \
    --cc=helgaas@kernel.org \
    --cc=kevin.xie@starfivetech.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kw@linux.com \
    --cc=leyfoon.tan@starfivetech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mason.huo@starfivetech.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).