From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4b73d43f0707082055y2b96fa53td55d6b381b6fb0ef@mail.gmail.com> Date: Sun, 8 Jul 2007 21:55:20 -0600 From: "John Rigby" To: "Grant Likely" Subject: Re: [PATCH] Add USB support to mpc8349-mitx board port In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_169949_27742325.1183953320935" References: <20070706222909.19943.39455.stgit@trillian.secretlab.ca> <200707070148.20526.arnd@arndb.de> <4b73d43f0707071734yeedd7e6g53101d45fbec899e@mail.gmail.com> Cc: Linuxppc-embedded List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------=_Part_169949_27742325.1183953320935 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I see your point, I agree the two layers of glue is bad. But this means the double code is spread across many drivers instead of being in one place (fsl_soc.c). On 7/7/07, Grant Likely wrote: > > On 7/7/07, John Rigby wrote: > > > This same comment probably goes for the other arch_initcall functions > > > in fsl_soc.c which do exactly the same thing for other devices. > > > > This depends, some devices in fsl_soc.c may exist on non-powerpc SoCs > > that do not have OF. The USB core in 8349 for example also is in the > > arm based mx27 and mx31. These devices should remain platform devices > > and the glue in fls_soc.c will continure to be needed. > > I disagree; the current method is "glue for the glue". There is no > reason why the driver cannot have two bindings; one for > platform_device and one for of_platform_device. It's about the same > amount of code, but uses less indirection for the device tree case. > > Cheers, > g. > > > -- > Grant Likely, B.Sc., P.Eng. > Secret Lab Technologies Ltd. > grant.likely@secretlab.ca > (403) 399-0195 > ------=_Part_169949_27742325.1183953320935 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I see your point, I agree the two layers of glue is bad.  But this means
the double code is spread across many drivers instead of being in one
place (fsl_soc.c).

On 7/7/07, Grant Likely <grant.likely@secretlab.ca> wrote:
On 7/7/07, John Rigby <jcrigby@gmail.com> wrote:
> > This same comment probably goes for the other arch_initcall functions
> > in fsl_soc.c which do exactly the same thing for other devices.
>
> This depends,  some devices in fsl_soc.c may exist on non-powerpc SoCs
> that do not have OF.  The USB core in 8349 for example also is in the
> arm based mx27 and mx31.  These devices should remain platform devices
> and the glue in fls_soc.c will continure to be needed.

I disagree; the current method is "glue for the glue".  There is no
reason why the driver cannot have two bindings; one for
platform_device and one for of_platform_device.  It's about the same
amount of code, but uses less indirection for the device tree case.

Cheers,
g.


--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

------=_Part_169949_27742325.1183953320935--