[PATCH] clkdev: add support to lookup for early platform device
Paul Mundt
lethal at linux-sh.org
Wed Apr 27 23:08:17 EDT 2011
On Thu, Apr 28, 2011 at 04:45:59AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 11:09 Thu 28 Apr , Paul Mundt wrote:
> > On Wed, Apr 27, 2011 at 05:00:57PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 12:47 Wed 27 Apr , Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > On 12:31 Wed 27 Apr , Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > On 09:42 Wed 27 Apr , Russell King - ARM Linux wrote:
> > > > > > On Wed, Apr 20, 2011 at 04:05:14PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > > > early platform device may do not have a device name as the slab is not yet
> > > > > > > available. So to search a clock base on the dev_id we need to search first the
> > > > > > > device base name and then the id
> > > > > >
> > > > > > I really don't like this. IDs are platform device specific, and this is
> > > > > > a platform devince independent layer.
> > > > > >
> > > > > > If you want to do this, then add a platform_device_clk_get() call, which
> > > > > > takes the platform device and connection id. Uses the platform device
> > > > > > infrastructure to format the device name, and use clk_get_sys() to look
> > > > > > up the device/connection id from that.
> > > > > I do not want to alloc a string in the clkdev
> > > > > but if you prefer
> > > > I check we can not do so
> > > > if slab is not available we can not use kmalloc
> > > >
> > > > so we can not generate the dev.init_name
> > > I check also we can not use the bootmem as it's too early in the init
> > > so allocate the dev_id is not possible
> > >
> > > use a satic buffer I'm not so happy about it
> > > the only other solution is this one
> > >
> > Are you willfully ignoring the init_name handling in
> > early_platform_driver_probe_id() or something?
> >
> > See a636ee7fb35b731ba2b331f6294e809bb6be09c8 for example.
> excatly but the issue is that the slab is not availlable yet
> see 06fe53beb636294587d8e94ef83c06cef07c21fd
> so init_name is still NULL :(
>
This is a non-argument until you demonstrate a use case where we have a
reasonable expectation for the clock framework to be available and the
slab allocator not.
If you're thinking about the SH earlyprintk case then I suggest you look
at the sh-sci driver to see how we presently deal with the situation
there.
Please do not make up imaginary problems, we have enough real ones to
focus energies on.
More information about the linux-arm-kernel
mailing list