add uart_init code and test code

Signed-off-by: Wang Long <neu.wanglong@gmail.com>