From: Jamie Iles <jamie@jamieiles.com>
To: Daniel Morsing <daniel.morsing@gmail.com>
Cc: devicetree-discuss@lists.ozlabs.org, netdev@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Ben Dooks <ben-linux@fluff.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC PATCH v2] net: dm9000: add support for device tree probing
Date: Mon, 15 Aug 2011 15:21:16 +0100 [thread overview]
Message-ID: <20110815142116.GG2636@pulham.picochip.com> (raw)
In-Reply-To: <1313343252-19634-1-git-send-email-daniel.morsing@gmail.com>
Hi Daniel,
On Sun, Aug 14, 2011 at 07:34:12PM +0200, Daniel Morsing wrote:
> This patch adds support for probing the dm9000 driver through device
> trees.
>
> The patch works by supplying its own platform_data struct when probed
> via device tree. This allows us to rely on the existing options parsing
> in the driver and avoid ifdeffery in the probe function.
>
> Signed-off-by: Daniel Morsing <daniel.morsing@gmail.com>
> ---
> Currently there are no users of this functionality, but once support for
> DT on OMAP3 matures, I plan to migrate the devkit8000 board to DT.
>
> Changes since v1:
> - Changed the binding with input from Grant Likely.
> - Make explicit what the bindings do instead of refering
> to linux specific flags.
> - Length check the mac address read so we don't copy random data.
> - simplify parsing of the device tree.
> - Add relevant driver maintainers to CC (sorry about that)
>
> Documentation/devicetree/bindings/net/dm9000.txt | 42 +++++++++++
> drivers/net/dm9000.c | 83 +++++++++++++++++++++-
> 2 files changed, 122 insertions(+), 3 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/dm9000.txt
>
> diff --git a/Documentation/devicetree/bindings/net/dm9000.txt b/Documentation/devicetree/bindings/net/dm9000.txt
> new file mode 100644
> index 0000000..cbbdb3d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dm9000.txt
> @@ -0,0 +1,42 @@
> +Davicom DM9000 ethernet controller
> +
> +Required properties:
> +
> + - compatible : Should be "davicom,dm9000"
> +
> + - interrupts : Interrupt controller specific encoding, which specifies 1
> + or 2 interrupts. The first interrupt is for rx/tx and is required by the
> + driver to function. The second interrupt is for wake on lan support
> + and is optional.
> +
> + - reg : 2 Physical address specifiers, where the first specifies the address
> + register of device, and the second specifies the data register of the device
> +
> +Optional properties:
> +
> + - local-mac-address : Binary data specifying a mac address override
> +
> + - reg-io-width : one cell specifying the width of IO operations in bits.
> + valid values are 8, 16, and 32. If this property is not specified, or has
> + an invalid value, the driver will default to 32 bits.
Minor nit, but rightly or wrongly, the of-serial binding that uses
reg-io-width specifies this in bytes and it would be nice to be
consistent here.
Jamie
prev parent reply other threads:[~2011-08-15 14:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-14 17:34 [RFC PATCH v2] net: dm9000: add support for device tree probing Daniel Morsing
2011-08-15 14:21 ` Jamie Iles [this message]
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=20110815142116.GG2636@pulham.picochip.com \
--to=jamie@jamieiles.com \
--cc=ben-linux@fluff.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=daniel.morsing@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).