Subject: Re: ppc/sata-fsl: orphan config value: CONFIG_MPC8315_DS

From: Scott Wood <[email-masked]>
Date: Wed, 1 May 2013 13:05:25 -0500

On 04/30/2013 09:06:56 PM, Anthony Foiani wrote:
> Scott --
>=20
> On 04/30/2013 06:42 PM, Scott Wood wrote:
>> I just meant that, for whatever boards you would have put this in =20
>> the device tree, put it in platform code instead (if the platform =20
>> file supports more than one board type, then check the compatible at =20
>> the top of the device tree).
>=20
> I think I understand what you're suggesting.
>=20
> Instead of a new property name, I would instead check for my specific =20
> board type (let's call it a foo-8315) in the top-level compatible =20
> list?  So I'd change my devtree to have this top-level compatible:
>=20
> / {
>     compatible =3D "example,foo-8315", "fsl,mpc8315erdb";

It should really only have compatible =3D "example,foo-8315", since it's =20
not 100% compatible with fsl,mpc8315erdb (at least due to this bug, but =20
probably there are other differences as well).

> If I saw that, I would then twiddle the bits as needed?

Yes.

> MIght work, although having it in the sata block of the device tree =20
> has the advantage of providing me exactly the OF node that I need (in =20
> ofdev->dev.of_node).  I'd have to figure out how to traverse to the =20
> dev tree root and then back down one to the root compat entry.  =20
> Probably not impossible, but I was aiming for a fairly minimal patch.

Well, if this is only seen on your board so far (or rather, your =20
vendor's board which isn't upstream), and you're OK with updating the =20
device tree, then I have no objection.

> It would also be nice if we could unravel exactly why that =20
> CONFIG_8315_DS ever showed up in the first place.

It would be nice, but I doubt that particular information is ever going =20
to surface...  IIRC I asked internally back when this first came up, =20
and didn't get an answer.

>> Or do you mean that you would not set this on any board's device =20
>> tree by default, and instead have users set it if they encounter =20
>> problems?
>=20
> No, I would expect to set it on all the boards, so using the =20
> compatibility hack above would work.

You mean all the boards that have the bug, which doesn't include any =20
upstream device tree, right?

-Scott=