From: "Arend van Spriel" <arend@broadcom.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Florian Fainelli" <florian@openwrt.org>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
ralf@linux-mips.org, linux-mips@linux-mips.org,
linux-wireless@vger.kernel.org, john@phrozen.org
Subject: Re: [PATCH v2 3/3] MIPS: BCM47xx: rewrite GPIO handling and use gpiolib
Date: Thu, 16 Aug 2012 20:43:11 +0200 [thread overview]
Message-ID: <502D3F3F.7060207@broadcom.com> (raw)
In-Reply-To: <CACna6rxVOFO-n5J_6J7HFSt+WnoX0=2ULjiRv3p9va47K2Edsw@mail.gmail.com>
On 08/16/2012 07:39 PM, Rafał Miłecki wrote:
> 2012/8/16 Florian Fainelli<florian@openwrt.org>:
>>> >>+void __init bcm47xx_gpio_init(void)
>>> >>+{
>>> >>+ int err;
>>> >>+
>>> >>+ switch (bcm47xx_bus_type) {
>>> >>+#ifdef CONFIG_BCM47XX_SSB
>>> >>+ case BCM47XX_BUS_TYPE_SSB:
>>> >>+ bcm47xx_gpio_count = ssb_gpio_count(&bcm47xx_bus.ssb);
>>> >>+#endif
>>> >>+#ifdef CONFIG_BCM47XX_BCMA
>>> >>+ case BCM47XX_BUS_TYPE_BCMA:
>>> >>+ bcm47xx_gpio_count = bcma_gpio_count(&bcm47xx_bus.bcma.bus);
>>> >>+#endif
>>> >>+ }
>> >
>> >Is this exclusive? Cannot we have both SSB and BCMA on the same device?
> This applies to SoC only, so I believe it's fine. We don't have SoCs
> based on BCMA and SSB at the same time.
It is indeed more than unlikely for a chip to have two silicon
interconnects, which is what SSB and BCMA are. However, it does look
suspicious from a code reading perspective. So I general I stick to the
rule that each case must have a break and fall-thru are clearly commented.
> You can find devices with multiple buses, but additional ones are
> connected via PCIE or USB interface (or some other I don't know
> about).
>
> -- Rafał
Gr. AvS
next prev parent reply other threads:[~2012-08-16 18:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 15:59 [PATCH v2 0/3] MIPS: BCM47xx: use gpiolib Hauke Mehrtens
2012-08-16 15:59 ` [PATCH v2 1/3] ssb: add function to return number of gpio lines Hauke Mehrtens
2012-08-16 16:00 ` [PATCH v2 2/3] bcma: add GPIO driver for SoCs Hauke Mehrtens
2012-08-16 16:00 ` [PATCH v2 3/3] MIPS: BCM47xx: rewrite GPIO handling and use gpiolib Hauke Mehrtens
2012-08-16 16:26 ` Florian Fainelli
2012-08-16 17:39 ` Rafał Miłecki
2012-08-16 18:43 ` Arend van Spriel [this message]
2012-08-16 19:29 ` Rafał Miłecki
2012-08-16 22:38 ` Hauke Mehrtens
2012-08-16 22:28 ` Hauke Mehrtens
2012-08-16 19:35 ` John Crispin
2012-08-16 22:33 ` Hauke Mehrtens
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=502D3F3F.7060207@broadcom.com \
--to=arend@broadcom.com \
--cc=florian@openwrt.org \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-wireless@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=zajec5@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.