From: arnaud.patard@rtp-net•org (Arnaud Patard (Rtp))
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 3/6] mv643xx.c: Add basic device tree support.
Date: Tue, 31 Jul 2012 17:04:46 +0200 [thread overview]
Message-ID: <87boiw55v5.fsf@lebrac.rtp-net.org> (raw)
In-Reply-To: <5017EBE8.10208@codethink.co.uk> (Ben Dooks's message of "Tue, 31 Jul 2012 15:30:00 +0100")
Ben Dooks <ben.dooks@codethink•co.uk> writes:
> On 31/07/12 08:14, Arnaud Patard (Rtp) wrote:
>> Ian Molton<ian.molton@codethink•co.uk> writes:
>> Hi,
>>
>> [...]
>>
>>> @@ -2873,7 +2913,31 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
>>> struct resource *res;
>>> int err;
>>>
>>> - pd = pdev->dev.platform_data;
>>> + if (pdev->dev.of_node) {
>>> + struct device_node *np = NULL;
>>> +
>>> + /* when all users of this driver use FDT, we can remove this */
>>> + pd = kzalloc(sizeof(*pd), GFP_ATOMIC);
>>> + if (!pd) {
>>> + dev_dbg(&pdev->dev, "Could not allocate platform data\n");
>>> + return -ENOMEM;
>>> + }
>>> +
>>> + of_property_read_u32(pdev->dev.of_node,
>>> + "port_number",&pd->port_number);
>>> + of_property_read_u32(pdev->dev.of_node,
>>> + "phy_addr",&pd->phy_addr);
>>
>> I guess we need something for tx_csum_limit in the device tree too. It's
>> important for kirkwood and dove.
>
> Is this something for all kirkwood devices? I think the best way of
> doing this is to give the driver a new device-tree name and having
> it set this field in the init sequence.
>
> However we could also do with some of these as dt parameters just in
> case people want to try and alter them for their own systems.
It's for _all_ kirkwood and dove devices. The kirkwood and dove fifos
are smaller than the orion/mv78xxx ones (no idea about armada xp/370).
Arnaud
next prev parent reply other threads:[~2012-07-31 15:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 15:15 [PATCH 0/6] mv643xx Ethernet DT support and CSB1724 board support Ian Molton
2012-07-30 15:15 ` [PATCH 1/6] Initial csb1724 board support (FDT) Ian Molton
2012-07-30 15:28 ` Andrew Lunn
2012-07-30 16:28 ` Ian Molton
2012-07-31 11:27 ` Arnd Bergmann
2012-07-30 15:15 ` [PATCH 2/6] mv643xx.c: Remove magic numbers Ian Molton
2012-07-30 15:15 ` [PATCH 3/6] mv643xx.c: Add basic device tree support Ian Molton
2012-07-30 15:39 ` Andrew Lunn
2012-07-30 16:49 ` Ian Molton
2012-07-30 16:19 ` Amar Nath
2012-07-30 16:32 ` Ian Molton
2012-07-31 15:12 ` Florian Fainelli
2012-07-31 7:14 ` Arnaud Patard (Rtp)
2012-07-31 8:19 ` Ian Molton
2012-07-31 8:27 ` Andrew Lunn
2012-07-31 8:45 ` Ian Molton
2012-07-31 8:58 ` Arnaud Patard (Rtp)
2012-07-31 9:14 ` Ian Molton
2012-07-31 14:30 ` Ben Dooks
2012-07-31 15:04 ` Arnaud Patard (Rtp) [this message]
2012-07-30 15:15 ` [PATCH 4/6] kirkwood: setup clock only in eth helpers Ian Molton
2012-07-30 16:12 ` Andrew Lunn
2012-07-30 16:52 ` Ian Molton
2012-07-30 19:10 ` Andrew Lunn
2012-07-30 16:46 ` Josh Coombs
2012-07-31 8:23 ` Ian Molton
2012-07-31 11:04 ` Ian Molton
2012-07-31 11:08 ` Andrew Lunn
2012-07-31 11:39 ` Ian Molton
2012-07-30 15:15 ` [PATCH 5/6] csb1724: Enable device tree based mv643xx ethernet support Ian Molton
2012-07-30 15:55 ` Andrew Lunn
2012-07-30 16:58 ` Ian Molton
2012-07-30 16:17 ` Andrew Lunn
2012-07-30 16:57 ` Ian Molton
2012-07-30 15:15 ` [PATCH 6/6] DT: Convert all kirkwood boards with mv643xx that use DT Ian Molton
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=87boiw55v5.fsf@lebrac.rtp-net.org \
--to=arnaud.patard@rtp-net$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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