Change ar7_init_clocks to a core level function, removing a race condition.
Both ar7_init_clocks and ar7_register_devices were using arch_initcall. However ar7_register_devices depended on values changed by ar7_init_clocks. Also add a printk so that the resulting effect is obvious. Signed-off-by: Michael J. Evans <[email protected]> --- a/arch/mips/ar7/clock.c +++ b/arch/mips/ar7/clock.c @@ -424,4 +424,4 @@ int __init ar7_init_clocks(void) return 0; } -arch_initcall(ar7_init_clocks); +core_initcall(ar7_init_clocks); --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c @@ -665,6 +665,8 @@ static int __init ar7_register_devices(void) #ifdef CONFIG_SERIAL_8250 static struct uart_port uart_port[2]; + printk (KERN_INFO "ar7_register_devices: serial clock %d hz.\n", + ar7_bus_freq() / 2); memset(uart_port, 0, sizeof(struct uart_port) * 2); uart_port[0].type = PORT_16550A; _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
