From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@lists.ozlabs.org
Cc: Mark Rutland <mark.rutland@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Alistair Popple <alistair@popple.id.au>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Tony Prisk <linux@prisktech.co.nz>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 4/7] ECHI Platform: Merge ppc-of EHCI driver into the ehci-platform driver
Date: Fri, 21 Feb 2014 15:21:32 +0100 [thread overview]
Message-ID: <9352625.f2QvCl1mNy@wuerfel> (raw)
In-Reply-To: <20140221114803.GB8783@e106331-lin.cambridge.arm.com>
On Friday 21 February 2014 11:48:03 Mark Rutland wrote:
> > +
> > + np = of_find_compatible_node(NULL, NULL, "ibm,usb-ohci-440epx");
> > + if (np != NULL) {
> > + /* claim we really affected by usb23 erratum */
> > + if (!of_address_to_resource(np, 0, &res))
> > + ehci->ohci_hcctrl_reg =
> > + devm_ioremap(&pdev->dev,
> > + res.start + OHCI_HCCTRL_OFFSET,
> > + OHCI_HCCTRL_LEN);
> > + else
> > + ehci_dbg(ehci, "%s: no ohci offset in fdt\n", __FILE__);
> > + if (!ehci->ohci_hcctrl_reg) {
> > + ehci_dbg(ehci, "%s: ioremap for ohci hcctrl failed\n",
> > + __FILE__);
> > + } else {
> > + ehci->has_amcc_usb23 = 1;
> > + }
> > + }
>
> As this is being dropped into a generic driver, it would be nice to have
> a comment explaining why we need to do this -- not everyone using this
> will know the powerpc history. It certainly seems odd to look for
> another node in the tree that this driver isn't necessarily handling,
> and that should probably be explained.
>
> As this bit of fixup is only needed for powerpc, it would be nice to not
> have to do it elsewhere. Perhaps these could be factored out into a
> ppc_platform_reset function that could be empty stub for other
> architectures.
How about using the .data field of the of_device_id array to point to
a structure of functions? That way you don't even have to call
of_device_is_compatible() here. Note that using of_find_compatible_node()
is the wrong approach anyway, you want to check the current device
for compatibility, not just any device I assume.
Arnd
next prev parent reply other threads:[~2014-02-21 14:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 6:31 [PATCH 0/7] IBM Akebono/PPC476GTR Support Alistair Popple
2014-02-21 6:31 ` [PATCH 1/7] IBM Akebono: Add a SDHCI platform driver Alistair Popple
2014-02-21 14:14 ` Arnd Bergmann
2014-02-24 0:38 ` Alistair Popple
2014-02-21 6:31 ` [PATCH 2/7] IBM Akebono: Add support for a new PHY interface to the IBM emac driver Alistair Popple
2014-02-21 11:18 ` Mark Rutland
2014-02-24 2:09 ` Alistair Popple
2014-02-21 6:31 ` [PATCH 3/7] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR Alistair Popple
2014-02-21 14:16 ` Arnd Bergmann
2014-02-24 0:20 ` Alistair Popple
2014-02-21 15:34 ` Alan Stern
2014-02-21 6:31 ` [PATCH 4/7] ECHI Platform: Merge ppc-of EHCI driver into the ehci-platform driver Alistair Popple
2014-02-21 11:48 ` Mark Rutland
2014-02-21 14:21 ` Arnd Bergmann [this message]
2014-02-22 2:32 ` Tony Prisk
2014-02-21 15:41 ` Alan Stern
2014-02-24 0:28 ` Alistair Popple
2014-02-21 6:31 ` [PATCH 5/7] IBM Currituck: Clean up board specific code before adding Akebono code Alistair Popple
2014-02-21 6:31 ` [PATCH 6/7] IBM Akebono: Add the Akebono platform Alistair Popple
2014-02-21 6:31 ` [PATCH 7/7] powerpc: Added PCI MSI support using the HSTA module Alistair Popple
2014-02-21 14:33 ` Arnd Bergmann
2014-02-21 20:41 ` Benjamin Herrenschmidt
2014-02-21 21:53 ` Arnd Bergmann
2014-02-25 5:54 ` Alistair Popple
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=9352625.f2QvCl1mNy@wuerfel \
--to=arnd@arndb.de \
--cc=alistair@popple.id.au \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@prisktech.co.nz \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.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