Skip to content
Commit 2d61e1be authored by Axel Lin's avatar Axel Lin Committed by Thomas Chou
Browse files

serial: opencores_yanu: Avoid duplicate oc_serial_setbrg() implementation



The implementation of oc_serial_setbrg() for CONFIG_SYS_NIOS_FIXEDBAUD and
!CONFIG_SYS_NIOS_FIXEDBAUD are very similar.
Add a baudrate variable and set it to either CONFIG_BAUDRATE or gd->baudrate.
Then we can unify the code for both cases.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarThomas Chou <thomas@wytron.com.tw>
parent 18a6bcc1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment