All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce pata node, make use pata_of_platform driver
Date: Sat, 24 Nov 2007 21:57:46 +0100	[thread overview]
Message-ID: <200711242157.47303.arnd@arndb.de> (raw)
In-Reply-To: <20071123175356.GC27338@localhost.localdomain>

On Friday 23 November 2007, Anton Vorontsov wrote:
> 
> +static struct of_device_id mpc834x_ids[] = {
> +       { .compatible = "pata-platform", },
> +       {},
> +};
> +
> +static int __init mpc834x_declare_of_platform_devices(void)
> +{
> +       if (!machine_is(mpc834x_itx))
> +               return 0;
> +
> +       of_platform_bus_probe(NULL, mpc834x_ids, NULL);
> +
> +       return 0;
> +}
> +device_initcall(mpc834x_declare_of_platform_devices);

This is not really how of_platform_bus_probe was meant to be used.
Instead of listing the device you want to probe, you should list
all buses that potentially contain a device that you are probing.

Normally, an ata controller is not a top-level device but instead
the child of an SOC bus device, and then you just probe all
SOC devices, which means their children get added to the device
tree.

In your case, that would probably mean that you have to another
entry in the "ranges" of the soc8349 node, or add a second socXXXX
node that has the 0xf0000000 ranges, depending on the actual layout
of the SOC.

	Arnd <><

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce pata node, make use pata_of_platform driver
Date: Sat, 24 Nov 2007 21:57:46 +0100	[thread overview]
Message-ID: <200711242157.47303.arnd@arndb.de> (raw)
In-Reply-To: <20071123175356.GC27338@localhost.localdomain>

On Friday 23 November 2007, Anton Vorontsov wrote:
>=20
> +static struct of_device_id mpc834x_ids[] =3D {
> +=A0=A0=A0=A0=A0=A0=A0{ .compatible =3D "pata-platform", },
> +=A0=A0=A0=A0=A0=A0=A0{},
> +};
> +
> +static int __init mpc834x_declare_of_platform_devices(void)
> +{
> +=A0=A0=A0=A0=A0=A0=A0if (!machine_is(mpc834x_itx))
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return 0;
> +
> +=A0=A0=A0=A0=A0=A0=A0of_platform_bus_probe(NULL, mpc834x_ids, NULL);
> +
> +=A0=A0=A0=A0=A0=A0=A0return 0;
> +}
> +device_initcall(mpc834x_declare_of_platform_devices);

This is not really how of_platform_bus_probe was meant to be used.
Instead of listing the device you want to probe, you should list
all buses that potentially contain a device that you are probing.

Normally, an ata controller is not a top-level device but instead
the child of an SOC bus device, and then you just probe all
SOC devices, which means their children get added to the device
tree.

In your case, that would probably mean that you have to another
entry in the "ranges" of the soc8349 node, or add a second socXXXX
node that has the 0xf0000000 ranges, depending on the actual layout
of the SOC.

	Arnd <><

  reply	other threads:[~2007-11-24 20:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-23 17:52 [RFC][PATCH 0/3] OF-platform PATA driver Anton Vorontsov
2007-11-23 17:53 ` [PATCH 1/3] [libata] pata_platform: make probe and remove functions device type neutral Anton Vorontsov
2007-11-23 17:53 ` [PATCH 2/3] [libata] pata_of_platform: OF-Platform PATA device driver Anton Vorontsov
2007-11-23 17:53 ` [PATCH 3/3] [POWERPC] MPC8349E-mITX: introduce pata node, make use pata_of_platform driver Anton Vorontsov
2007-11-24 20:57   ` Arnd Bergmann [this message]
2007-11-24 20:57     ` Arnd Bergmann
2007-11-26  0:34     ` Anton Vorontsov
2007-11-24  0:49 ` [RFC][PATCH 0/3] OF-platform PATA driver Jeff Garzik
2007-11-24  0:49   ` Jeff Garzik
2007-11-24  7:26   ` Paul Mundt
2007-11-24  7:26     ` Paul Mundt
2007-11-26  0:23     ` Anton Vorontsov
2007-11-26  1:40       ` Paul Mundt
2007-11-26  1:40         ` Paul Mundt
2007-11-24  1:23 ` Benjamin Herrenschmidt
2007-11-24  2:35 ` Vitaly Bordug
2007-11-24  2:35   ` Vitaly Bordug
2007-11-24 20:50 ` Arnd Bergmann
2007-11-24 20:50   ` Arnd Bergmann
2007-11-26  0:21   ` Anton Vorontsov

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=200711242157.47303.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=avorontsov@ru.mvista.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.