aboutsummaryrefslogtreecommitdiff
path: root/cpu/mpc8xx/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/mpc8xx/serial.c')
-rw-r--r--cpu/mpc8xx/serial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu/mpc8xx/serial.c b/cpu/mpc8xx/serial.c
index faea3c36f3c..a875963df36 100644
--- a/cpu/mpc8xx/serial.c
+++ b/cpu/mpc8xx/serial.c
@@ -78,6 +78,10 @@ static void serial_setdivisor(volatile cpm8xx_t *cp)
divisor=(50*1000*1000)/16/9600;
}
+#ifdef CFG_BRGCLK_PRESCALE
+ divisor /= CFG_BRGCLK_PRESCALE;
+#endif
+
if(divisor<=0x1000) {
cp->cp_brgc1=((divisor-1)<<1) | CPM_BRG_EN;
} else {