public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: arnd@arndb•de (Arnd Bergmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [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

  parent reply	other threads:[~2012-07-31 18:23 UTC|newest]

Thread overview: 12+ 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 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=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