s5j/serial: fix initialization order
authorHeesub Shin <heesub.shin@samsung.com>
Tue, 12 Sep 2017 05:07:36 +0000 (14:07 +0900)
committersunghan <sh924.chang@samsung.com>
Wed, 20 Sep 2017 08:45:57 +0000 (17:45 +0900)
commit7b59dc6635d032aaaf4654fd9fc57b72ba0f79bc
treec73a9e8c99b3a237a487f98db9d3319660378596
parentee0f4e909cd2767afda250ff83b56d9f8e9ec7fb
s5j/serial: fix initialization order

GPIO pinmux configuration should be done before starting to supply PCLK
and EXTCLK to UART when opening it. Otherwise, a noise signal may be
introduced into the receiving FIFO, causing an odd RX interrupt. For the
same reason, this also applies when closing it.

This commit fixes the issue that select() and poll() fails on serial
devices.

Change-Id: I05309a1637574936f53a529d018dd28600b14295
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
os/arch/arm/src/s5j/s5j_serial.c