From: Lukas Wunner <lukas@wunner.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
"maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..."
<bcm-kernel-feedback-list@broadcom.com>,
"open list:SPI SUBSYSTEM" <linux-spi@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
<linux-rpi-kernel@lists.infradead.org>,
"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
Martin Sperl <kernel@martin.sperl.org>
Subject: Re: [PATCH 3/3] spi: bcm2835: Enable shared interrupt support
Date: Fri, 5 Jun 2020 13:35:59 +0200 [thread overview]
Message-ID: <20200605113559.oia5xmc2r5n7e2fd@wunner.de> (raw)
In-Reply-To: <21772111-fa1f-7a50-aa92-e44b09cff4eb@gmail.com> <8c8d6007-e4c6-8484-9d40-3b679842be27@gmail.com>
On Thu, Jun 04, 2020 at 01:24:54PM -0700, Florian Fainelli wrote:
> So we do need to know for the first time we install the interrupt
> handler whether we will be in a shared situation or not, I cannot think
> of any solution other than counting the number of available DT nodes
> with the "brcm,bcm2835-spi" compatible string.
In principle it would be possible to iterate over the entire DT using
for_each_of_allnodes() and call of_irq_parse_one() on each device_node
if it's enabled and not the one we're probing. Then check if any of that
device_node's IRQs is identical to that of the device_node we're probing.
That would give you a generic method to test for sharedness of an
interrupt.
However the solution you've found is simpler and cheaper than such a
brute-force search, hence seems perfectly valid to me.
> I appreciate that
> Lukas has spent some tremendous amount of time working on this
> controller driver and he has a sensitivity for performance.
Thanks! Indeed I think spi-bcm2835.c is by now among the best performing
and most featureful SPI drivers in the kernel. I've recently had a
discussion on netdev with someone testing an SPI-attached Ethernet
chip on iMX6Q and on STM32MP1 and couldn't get it to work.
With a BCM2837 no problem at all:
https://lore.kernel.org/netdev/ac0f7227-a4ae-b6cd-36ec-3bcb02b1adbe@denx.de/
Lukas
next prev parent reply other threads:[~2020-06-05 11:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 3:46 [PATCH 0/3] " Florian Fainelli
2020-06-04 3:46 ` [PATCH 1/3] dt-bindings: spi: Document bcm2711 and bcm7211 SPI compatible Florian Fainelli
2020-06-04 4:23 ` Lukas Wunner
2020-06-04 3:46 ` [PATCH 2/3] ARM: dts: bcm2711: Update SPI nodes compatible strings Florian Fainelli
2020-06-04 4:20 ` Lukas Wunner
2020-06-04 11:13 ` Mark Brown
2020-06-04 11:21 ` Lukas Wunner
2020-06-04 14:05 ` Mark Brown
2020-06-04 16:40 ` Florian Fainelli
2020-06-04 16:54 ` Stefan Wahren
2020-06-04 16:56 ` Florian Fainelli
2020-06-04 16:46 ` Stefan Wahren
2020-06-04 3:46 ` [PATCH 3/3] spi: bcm2835: Enable shared interrupt support Florian Fainelli
2020-06-04 4:17 ` Lukas Wunner
2020-06-15 17:25 ` Rob Herring
2020-06-04 12:32 ` Mark Brown
2020-06-04 16:05 ` Florian Fainelli
2020-06-04 20:24 ` Florian Fainelli
2020-06-05 11:35 ` Lukas Wunner [this message]
2020-06-05 10:28 ` Mark Brown
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=20200605113559.oia5xmc2r5n7e2fd@wunner.de \
--to=lukas@wunner.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=kernel@martin.sperl.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=nsaenzjulienne@suse.de \
--cc=rjui@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sbranden@broadcom.com \
/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
all inboxes | Powered by JetHome®