That is correct. We are unable to call uart_startup when the serial
console is initialised because it may need to allocate memory (as
request_irq does) and the memory allocators may not have been
initialised.
There are two ways around this problem:
1. initialise the port into a state where it can send characters in the
console write method.
2. don't do the actual hardware shutdown in your shutdown() method (but
do the normal software shutdown - ie, free irqs etc)
8250 ports in effect implement the first - they don't really care about
their setup to send characters. We just disable all interrupts from the
chip and then perform polled IO to the port.
In essence, you need your console write method to be able to send
charcters whether or not the port has been initialised or shutdown
by the conventional tty driver methods.
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/