From: Arnd Bergmann <arnd@arndb•de>
To: Ian Molton <ian.molton@codethink•co.uk>
Cc: linux-arm-kernel@lists•infradead.org, andrew@lunn•ch,
thomas.petazzoni@free-electrons•com, ben.dooks@codethink•co.uk,
netdev@vger•kernel.org
Subject: Re: [PATCH v2 3/6] mv643xx.c: Add basic device tree support.
Date: Tue, 31 Jul 2012 18:23:54 +0000 [thread overview]
Message-ID: <201207311823.54857.arnd@arndb.de> (raw)
In-Reply-To: <1343749529-17571-4-git-send-email-ian.molton@codethink.co.uk>
On Tuesday 31 July 2012, Ian Molton wrote:
> @@ -33,6 +34,10 @@ struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
> OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
> OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
> OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL),
> + OF_DEV_AUXDATA("marvell,mv643xx", 0xf1072000, MV643XX_ETH_NAME ".0",
> + NULL),
> + OF_DEV_AUXDATA("marvell,mv643xx", 0xf1076000, MV643XX_ETH_NAME ".1",
> + NULL),
> {},
> };
Please don't do string concatenation like this, it just makes it harder to grep for the
strings.
> @@ -2654,15 +2677,22 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
> /*
> * Check whether the error interrupt is hooked up.
> */
> - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (res != NULL) {
> + if (pdev->dev.of_node) {
> + irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> + } else {
> + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> + if (res)
> + irq = res->start;
> + }
> +
Why is this necessary? In theory, the old code should be the same as the new one,
unless something goes wrong in the domain registration.
Arnd
next prev parent reply other threads:[~2012-07-31 18:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 15:45 [PATCH v2 0/6] mv643xx Ethernet DT support and CSB1724 board support Ian Molton
2012-07-31 15:45 ` [PATCH v2 1/6] Initial csb1724 board support (FDT) Ian Molton
2012-07-31 16:43 ` Andrew Lunn
2012-07-31 15:45 ` [PATCH v2 2/6] mv643xx.c: Remove magic numbers Ian Molton
2012-07-31 15:45 ` [PATCH v2 3/6] mv643xx.c: Add basic device tree support Ian Molton
2012-07-31 16:46 ` Andrew Lunn
2012-08-01 8:50 ` Ian Molton
2012-07-31 18:23 ` Arnd Bergmann [this message]
2012-07-31 19:24 ` Andrew Lunn
2012-07-31 20:18 ` Arnd Bergmann
2012-07-31 15:45 ` [PATCH v2 4/6] kirkwood: Add a clock setup helper for mv643xx ethernet Ian Molton
2012-07-31 15:45 ` [PATCH v2 5/6] csb1724: Enable device tree based mv643xx ethernet support Ian Molton
2012-07-31 15:45 ` [PATCH v2 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=201207311823.54857.arnd@arndb.de \
--to=arnd@arndb$(echo .)de \
--cc=andrew@lunn$(echo .)ch \
--cc=ben.dooks@codethink$(echo .)co.uk \
--cc=ian.molton@codethink$(echo .)co.uk \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=thomas.petazzoni@free-electrons$(echo .)com \
/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