* initcall question
@ 2009-10-22 13:56 fthain
2009-10-22 19:24 ` Brad Boyer
0 siblings, 1 reply; 3+ messages in thread
From: fthain @ 2009-10-22 13:56 UTC (permalink / raw)
To: linux-m68k
Hi All,
I've been porting the powermac zilog driver to 68k macs. It works, but I
can't figure out how to get the device initialisation right.
I've used platform devices for the serial ports. The serial controller
base address is passed in by the bootloader.
If the platform devices are statically defined, they get no release method
which can result in the driver core carping, "Device 'scc.0' does not have
a release() function, it is broken and must be fixed", and then dumping a
backtrace.
The alternative to statically defined devices is platform_device_alloc(),
which does provide a release method, but I can't call it at arch_initcall
time because the console_initcall has already happened. And I can't use it
at setup_arch() time (when the boot info is parsed) because there's no
kmalloc() yet.
What to do? I don't want to export the bootinfo data to the pmac_zilog
driver for console initialisation. And I'd really like to avoid a bunch of
hard coded SCC base addresses.
Any suggestions?
Perhaps there is some other kind of initcall that runs after memory
management becomes available but before console initialisation?
Finn
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: initcall question
2009-10-22 13:56 initcall question fthain
@ 2009-10-22 19:24 ` Brad Boyer
2009-10-23 16:30 ` fthain
0 siblings, 1 reply; 3+ messages in thread
From: Brad Boyer @ 2009-10-22 19:24 UTC (permalink / raw)
To: fthain; +Cc: linux-m68k
On Fri, Oct 23, 2009 at 12:56:50AM +1100, fthain@telegraphics.com.au wrote:
> If the platform devices are statically defined, they get no release method
> which can result in the driver core carping, "Device 'scc.0' does not have
> a release() function, it is broken and must be fixed", and then dumping a
> backtrace.
>
> The alternative to statically defined devices is platform_device_alloc(),
> which does provide a release method, but I can't call it at arch_initcall
> time because the console_initcall has already happened. And I can't use it
> at setup_arch() time (when the boot info is parsed) because there's no
> kmalloc() yet.
>
> What to do? I don't want to export the bootinfo data to the pmac_zilog
> driver for console initialisation. And I'd really like to avoid a bunch of
> hard coded SCC base addresses.
>
> Any suggestions?
Could you just define and set a release function that does nothing? That's
kind of silly, but it seems like it should work. If it's static memory
anyway, there isn't anything to free.
Brad Boyer
flar@allandria.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: initcall question
2009-10-22 19:24 ` Brad Boyer
@ 2009-10-23 16:30 ` fthain
0 siblings, 0 replies; 3+ messages in thread
From: fthain @ 2009-10-23 16:30 UTC (permalink / raw)
To: Brad Boyer; +Cc: linux-m68k
On Thu, 22 Oct 2009, Brad Boyer wrote:
> On Fri, Oct 23, 2009 at 12:56:50AM +1100, fthain@telegraphics.com.au
> wrote:
> > If the platform devices are statically defined, they get no release
> > method which can result in the driver core carping, "Device 'scc.0'
> > does not have a release() function, it is broken and must be fixed",
> > and then dumping a backtrace.
> >
> > The alternative to statically defined devices is
> > platform_device_alloc(), which does provide a release method, but I
> > can't call it at arch_initcall time because the console_initcall has
> > already happened. And I can't use it at setup_arch() time (when the
> > boot info is parsed) because there's no kmalloc() yet.
> >
> > What to do? I don't want to export the bootinfo data to the pmac_zilog
> > driver for console initialisation. And I'd really like to avoid a
> > bunch of hard coded SCC base addresses.
> >
> > Any suggestions?
>
> Could you just define and set a release function that does nothing?
> That's kind of silly, but it seems like it should work. If it's static
> memory anyway, there isn't anything to free.
I guess it is a cheap enough. It does work.
Thanks,
Finn
> Brad Boyer
> flar@allandria.com
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-23 16:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 13:56 initcall question fthain
2009-10-22 19:24 ` Brad Boyer
2009-10-23 16:30 ` fthain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox