ENGR00163703 uart: console write routing is unsafe on SMP
The console feature's write routing is unsafe on SMP with
the startup/shutdown call. It happend to cause Android bootup
without shell runnable.
Actually on Android boot, there's 3 consumers of the console
* the kernel printk
* the init process using /dev/kmsg to call printk to show log
* shell, which open /dev/console and write with sys_write()
The shell goes into the normal uart open/write routing,
but the other two go into the console operations.
The open routing calls imx serial startup, which will write USR1/2
register without any lock and critical with imx_console_write call.
Here add spin_lock for startup/shutdown/console_write routing.
Remove the imx_setup_ufcr() call on startup when CONSOLE enabled,
as this will cause clock reinit, and output garbage.