[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f80c685e-4513-4962-9b47-d6c85d632dd2@starfivetech.com>
Date: Thu, 19 Oct 2023 15:39:40 +0800
From: Minda Chen <minda.chen@...rfivetech.com>
To: Conor Dooley <conor@...nel.org>
CC: Krzysztof WilczyĆski <kw@...ux.com>,
Rob Herring <robh+dt@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Daire McNamara <daire.mcnamara@...rochip.com>,
"Emil Renner Berthing" <emil.renner.berthing@...onical.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-riscv@...ts.infradead.org>, <linux-pci@...r.kernel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
"Palmer Dabbelt" <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
"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 v8 16/22] PCI: microchip: Add event IRQ domain ops to
struct plda_event
On 2023/10/18 19:30, Conor Dooley wrote:
> On Wed, Oct 11, 2023 at 07:05:08PM +0800, Minda Chen wrote:
>> PolarFire Implements none-PLDA event interrupts. So the whole event
>> domain ops can not be re-used.
>
> IIRC, the reason things are like this is to work around the lack of an
> msi controller and are not as a result of changes made to the PLDA IP
> by us.
>
Oh. For this reason that new added interrupts have to add to
global events field, not the MSI. I will add this to commit messages.
Thanks
>> PLDA event domain ops instances will be implemented
>> in later patch.
>
> Acked-by: Conor Dooley <conor.dooley@...rochip.com>
>
> Thanks,
> Conor.
>
>>
>> Signed-off-by: Minda Chen <minda.chen@...rfivetech.com>
>> ---
>> drivers/pci/controller/plda/pcie-microchip-host.c | 9 ++++++---
>> drivers/pci/controller/plda/pcie-plda.h | 1 +
>> 2 files changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c
>> index fca1520d56c9..2825c1f5563d 100644
>> --- a/drivers/pci/controller/plda/pcie-microchip-host.c
>> +++ b/drivers/pci/controller/plda/pcie-microchip-host.c
>> @@ -811,13 +811,15 @@ static const struct plda_event_ops mc_event_ops = {
>> };
>>
>> static const struct plda_event mc_event = {
>> + .domain_ops = &mc_event_domain_ops,
>> .event_ops = &mc_event_ops,
>> .request_event_irq = mc_request_event_irq,
>> .intx_event = EVENT_LOCAL_PM_MSI_INT_INTX,
>> .msi_event = EVENT_LOCAL_PM_MSI_INT_MSI,
>> };
>>
>> -static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)
>> +static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port,
>> + const struct irq_domain_ops *ops)
>> {
>> struct device *dev = port->dev;
>> struct device_node *node = dev->of_node;
>> @@ -831,7 +833,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)
>> }
>>
>> port->event_domain = irq_domain_add_linear(pcie_intc_node, port->num_events,
>> - &mc_event_domain_ops, port);
>> + ops, port);
>> +
>> if (!port->event_domain) {
>> dev_err(dev, "failed to get event domain\n");
>> of_node_put(pcie_intc_node);
>> @@ -930,7 +933,7 @@ static int plda_init_interrupts(struct platform_device *pdev,
>> return -EINVAL;
>> }
>>
>> - ret = plda_pcie_init_irq_domains(port);
>> + ret = plda_pcie_init_irq_domains(port, event->domain_ops);
>> if (ret) {
>> dev_err(dev, "failed creating IRQ domains\n");
>> return ret;
>> diff --git a/drivers/pci/controller/plda/pcie-plda.h b/drivers/pci/controller/plda/pcie-plda.h
>> index 6571a4befac9..080932cbe8c4 100644
>> --- a/drivers/pci/controller/plda/pcie-plda.h
>> +++ b/drivers/pci/controller/plda/pcie-plda.h
>> @@ -129,6 +129,7 @@ struct plda_pcie_rp {
>> };
>>
>> struct plda_event {
>> + const struct irq_domain_ops *domain_ops;
>> const struct plda_event_ops *event_ops;
>> int (*request_event_irq)(struct plda_pcie_rp *pcie,
>> int event_irq, int event);
>> --
>> 2.17.1
>>
Powered by blists - more mailing lists