linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Move serial_dev_init to device_initcall()
@ 2007-08-23  0:26 Olof Johansson
  2007-08-23 23:21 ` Guennadi Liakhovetski
  2007-08-29 22:52 ` Olof Johansson
  0 siblings, 2 replies; 6+ messages in thread
From: Olof Johansson @ 2007-08-23  0:26 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

With the I/O space rewrite by BenH, the legacy_serial serial_dev_init()
initcall is now called before I/O space is setup, but it's dependent on
it being available.

Since there's no way to make dependencies between initcalls, we'll just
have to move it to device_initcall(). Yes, it's suboptimal but I'm not
aware of any better solution at this time.


Signed-off-by: Olof Johansson <olof@lixom.net>

---

I think I might have one of the few hardware platforms with UART on PIO,
at least if noone else has already hit this. It was introduced by BenH's
rewrite of the I/O space allocation earlier, and the problem is that by
the time serial_dev_init() runs, the hose io_base_virt isn't available.

I still see the platform devices register before the PCI ones, so it
looks like init order is undisturbed by this change. Still, it'd be good
to hear test feedback from other platforms as needed. It's uncertain what
platforms the comments above serial_dev_init() about needing overrides
applies for, so I don't know which ones might be sensitive to call order
changes.


Index: mainline/arch/powerpc/kernel/legacy_serial.c
===================================================================
--- mainline.orig/arch/powerpc/kernel/legacy_serial.c
+++ mainline/arch/powerpc/kernel/legacy_serial.c
@@ -493,7 +493,7 @@ static int __init serial_dev_init(void)
 
 	return platform_device_register(&serial_device);
 }
-arch_initcall(serial_dev_init);
+device_initcall(serial_dev_init);
 
 
 /*

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-08-29 22:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-23  0:26 [PATCH] Move serial_dev_init to device_initcall() Olof Johansson
2007-08-23 23:21 ` Guennadi Liakhovetski
2007-08-23 23:15   ` Olof Johansson
2007-08-24  4:59     ` Benjamin Herrenschmidt
2007-08-24  4:33       ` Olof Johansson
2007-08-29 22:52 ` Olof Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).