serial: smh: Initialize serial only if semihosting is enabled
authorSean Anderson <sean.anderson@seco.com>
Tue, 22 Mar 2022 20:59:32 +0000 (16:59 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 1 Apr 2022 20:56:53 +0000 (16:56 -0400)
commit2332590c48ac15926d7ec23b0fa17b9ea4e305ed
treec8c8e68668abfa49daddaec43f1ea2b20c501edd
parentbbe310cdaf459b0ee69534584128ed6e057568db
serial: smh: Initialize serial only if semihosting is enabled

If semihosting is disabled, then the user has no debugger attached, and
will not see any messages. Don't create a serial device in this
instance, to (hopefully) fall back on another working serial device.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
drivers/serial/serial_semihosting.c