summaryrefslogtreecommitdiff
path: root/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c')
-rw-r--r--c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c b/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c
index 71a14d127a..3a1c070b45 100644
--- a/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c
+++ b/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c
@@ -499,7 +499,7 @@ int apbuart_get_baud(struct apbuart_priv *uart)
drvmgr_freq_get(uart->dev, DEV_APB_SLV, &core_clk_hz);
/* Calculate baud rate from generator "scaler" number */
- return core_clk_hz / (scaler * 8);
+ return core_clk_hz / ((scaler + 1) * 8);
}
struct apbuart_baud *apbuart_get_baud_closest(struct apbuart_priv *uart)