openrisc: Cleanup emergency print handling
authorStafford Horne <shorne@gmail.com>
Sun, 15 May 2022 04:21:31 +0000 (13:21 +0900)
committerStafford Horne <shorne@gmail.com>
Mon, 23 May 2022 08:15:49 +0000 (17:15 +0900)
commite449759c246e1594307760f7203debf6038a42ea
treee091c1dc4faa53f7237cba7a5cf7148f0e66c392
parent87e387acd8eba5021a8e5d6b54e0c5ef5c28ada2
openrisc: Cleanup emergency print handling

The emergency print support only works for 8250 compatible serial ports.
Now that OpenRISC platforms may be configured with different serial port
hardware we don't want emergency print to try to print to non-existent
hardware which will cause lockups.

This patch contains several fixes to get emergency print working again:

 - Update symbol loading to not assume the location of symbols
 - Split the putc print operation out to its own function to allow
   for different future implementations.
 - Update _emergency_print_nr and _emergency_print to use the putc
   function.
 - Guard serial 8250 specific sequences by CONFIG_SERIAL_8250
 - Update string line feed from lf,cr to cr,lf.

Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/head.S