From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Williams Subject: Re: Xilinx SYSACE driver and 8-bit attachment Date: Thu, 8 Oct 2009 09:44:43 +1000 Message-ID: <1d3f23370910071644y5877cf9v879967340a463f19@mail.gmail.com> References: <1d3f23370910070013u6307bc42hf7ab243b52d007df@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Grant Likely Cc: David DeBonis , Linux Kernel list , Michal Simek , devicetree-discuss List-Id: devicetree@vger.kernel.org On Wed, Oct 7, 2009 at 11:34 PM, Grant Likely w= rote: > [Added devicetree-discuss to cc: list] > > On Wed, Oct 7, 2009 at 1:13 AM, John Williams > wrote: >> Hi Grant (it's your driver :) and David D ( and your DTS generator :) > [...] >> if (of_find_property(op->node, "8-bit", NULL)) > [...] >> doesn't match the properties generated by Xilinx's device tree generator: > [...] >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 xl= nx,mem-width =3D <0x8>; >> >> So, the question is, which should change? > > Well, obviously its a device tree generator bug, the driver code is > perfect. =A0:-P How did I know you'd say that? :) > In all seriousness though, the '8-bit' property has been present for a > while now and needs to be retained to not break existing users. =A0It > would be okay for the driver to be modified to *also* check for the > xlnx,mem-width property, but the better solution is to modify the > device tree generator. =A0Plus, the '8-bit' property is the documented > binding in Documentation/powerpc/dts-bindings/xilinx.txt I tend to agree - but I also tend think that putting funky, arbitrary output strings in the DTS generator is also a bad idea. In this case, my vote is leaning towards adding a test for "xlnx,mem-width =3D <..>" to the driver, in addition to the existing "8-bit" tag to keep back compatability. How would you feel about that? In future, for new Xilinx drivers I think the default binding should be inspired by what comes from the DTS generator automatically, with out any special per-device hacks. This has a natural tendency towards minimum pain I think. John -- = John Williams, PhD, B.Eng, B.IT PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663 f: +61-7-30090663