aboutsummaryrefslogtreecommitdiff
path: root/core/platform.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-06-25 08:47:33 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-06 19:30:48 +1000
commit5740d2eb91303715fd077cf2deb7347fb1173e69 (patch)
tree4d94871c8569aa11023972eb7d1368775729f58a /core/platform.c
parent53a9d925e2832cebb8814df47f949b01ce9b24ff (diff)
downloadskiboot-5740d2eb91303715fd077cf2deb7347fb1173e69.zip
skiboot-5740d2eb91303715fd077cf2deb7347fb1173e69.tar.gz
skiboot-5740d2eb91303715fd077cf2deb7347fb1173e69.tar.bz2
uart: Cleanup initialization and remove simulator hack
Add more generic support for MMIO based UARTs, simplify code, use common initialization, and clean up the device-tree representation as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/platform.c')
-rw-r--r--core/platform.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/platform.c b/core/platform.c
index 371cf42..de6e406 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -98,7 +98,13 @@ opal_call(OPAL_CEC_REBOOT2, opal_cec_reboot2, 2);
static void generic_platform_init(void)
{
- force_dummy_console();
+ /* Enable a UART if we find one in the device-tree */
+ uart_init();
+
+ if (uart_enabled())
+ uart_setup_opal_console();
+ else
+ force_dummy_console();
fake_rtc_init();
}