zephyr: fix uart output flush
zephyr: fix uart output flush

Make sure the whole UART buffer/fifo is flushed in the uart_flush_output
function by checking the interrupt state.
The shell_process function only passes data from shell layer to the
shell_trasport layer(UART) which has its own buffers.

The bug was impacting e.g. hibernating.

BUG=b:191724484, b:193482737
BRANCH=none
TEST=Verify the console output and hibernate works

Signed-off-by: Dawid Niedzwiecki <73bc8c219b84b29e82d4338ec2e55b540c845bc6@semihalf.com>
Change-Id: Iaf245809be57fdba69c6a5a69d394f024ccf60ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3024264
Reviewed-by: CH Lin <49997681dc186e71092740314bf6c6feeca6e227@nuvoton.com>
Reviewed-by: Keith Short <f6d578f97033c25f1206cb57d52f358974c82954@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec