From ce077d96cb0569a3c2587a10121d4fa1d0d1ac54 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 16 May 2012 04:50:29 -0500 Subject: [PATCH] rpi: Flush serial on cleanup * Wait for transmit fifo to empty on serial cleanup * Serial cleanup on platform exit --- src/system/boot/platform/raspberrypi_arm/serial.cpp | 4 +++- src/system/boot/platform/raspberrypi_arm/start.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system/boot/platform/raspberrypi_arm/serial.cpp b/src/system/boot/platform/raspberrypi_arm/serial.cpp index ec6f6c054b..926f0b4092 100644 --- a/src/system/boot/platform/raspberrypi_arm/serial.cpp +++ b/src/system/boot/platform/raspberrypi_arm/serial.cpp @@ -67,7 +67,9 @@ serial_enable(void) extern "C" void serial_cleanup(void) { -#warning IMPLEMENT serial_cleanup + // Transmit the last of our fifo + gLoaderUART.FlushTx(); + gLoaderUART.Disable(); } diff --git a/src/system/boot/platform/raspberrypi_arm/start.c b/src/system/boot/platform/raspberrypi_arm/start.c index bac1ceede7..366bb64354 100644 --- a/src/system/boot/platform/raspberrypi_arm/start.c +++ b/src/system/boot/platform/raspberrypi_arm/start.c @@ -92,7 +92,7 @@ platform_start_kernel(void) void platform_exit(void) { - #warning IMPLEMENT platform_exit + serial_cleanup(); }