Serial Port cannot be uesd to input

Hi Experts:
after the system bootup, the Xshell window will print out the serial port log as following, it says “Dependency failed for Serial Getty on ttyS2”, do you know how to slove this. because now i cannot use keyboard to input command through serial port. Thanks a lot for your help.

[ OK ] Started Session c1 of user linaro.
[ OK ] Started User Manager for UID 1000.
[ 10.259821] wl_run_escan: LEGACY_SCAN sync ID: 1, bssidx: 0
Starting Bluetooth service…
[ OK ] Started Bluetooth service.
[*** ] A start job is running for dev-ttyS2.device (30s / 1min 30s)[ 33.111324] wl_run_escan: LEGACY_SCAN sync ID: 2, bssidx: 0
[*** ] A start job is running for dev-ttyS2.device (1min 3s / 1min 30s)[ 66.129502] wl_run_escan: LEGACY_SCAN sync ID: 3, bssidx: 0
[ TIME ] Timed out waiting for device dev-ttyS2.device.
[DEPEND] Dependency failed for Serial Getty on ttyS2.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes…
[ OK ] Started Update UTMP about System Runlevel Changes.

it cannot be used even if it is there, it is shared pin