From: Dilip Kota <eswara.kota@linux.intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: jingoohan1@gmail.com, gustavo.pimentel@synopsys.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
andriy.shevchenko@intel.com
Subject: Re: [PATCH] PCI: dwc: Add map irq callback
Date: Wed, 14 Aug 2019 16:31:14 +0800 [thread overview]
Message-ID: <fe722a89-37e7-9ef6-042b-a9584f234740@linux.intel.com> (raw)
In-Reply-To: <20190814073605.GA31526@infradead.org>
Hi Christoph Hellwig,
On 8/14/2019 3:36 PM, Christoph Hellwig wrote:
> On Wed, Aug 14, 2019 at 02:56:49PM +0800, Dilip Kota wrote:
>> Certain platforms like Intel need to configure
>> registers to enable the interrupts.
>> Map Irq callback helps to perform platform specific
>> configurations while assigning or enabling the interrupts.
> This seems to miss the hunk that actually assigns the map_irq
> callback.
pp->map_irq() must assign the callback along with the platform specific
configuration.
In Intel PCIe driver pp->map_irq() does the same. (Driver is not yet
present in mainline, i will submit for review once this change is approved).
>> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
>> index f93252d0da5b..5880d2b72ef8 100644
>> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
>> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
>> @@ -470,7 +470,7 @@ int dw_pcie_host_init(struct pcie_port *pp)
>> bridge->sysdata = pp;
>> bridge->busnr = pp->root_bus_nr;
>> bridge->ops = &dw_pcie_ops;
>> - bridge->map_irq = of_irq_parse_and_map_pci;
>> + bridge->map_irq = pp->map_irq ? pp->map_irq : of_irq_parse_and_map_pci;
> Pleae just use a classic if / else to make the code a little easier
> to read.
Noted, will update it.
--Dilip
next prev parent reply other threads:[~2019-08-14 8:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 6:56 [PATCH] PCI: dwc: Add map irq callback Dilip Kota
2019-08-14 7:36 ` Christoph Hellwig
2019-08-14 8:31 ` Dilip Kota [this message]
2019-08-14 10:59 ` Christoph Hellwig
2019-08-15 5:42 ` Dilip Kota
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=fe722a89-37e7-9ef6-042b-a9584f234740@linux.intel.com \
--to=eswara.kota@linux.intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=hch@infradead.org \
--cc=jingoohan1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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