[U-Boot-Users] ppc4xx/serial.c

12 Jul
2004
12 Jul
'04
6:23 p.m.
hello, I've been going through the code of the function serial_init because I couldn't get the proper baudrate divisor. I must admit I don't understand the operations made to calculate udiv and bdiv... According to the 405gp user manual, these are the meanings of a few parameters.
CFG_BASE_BAUD = SerClk / 16
bdiv = SerClk / (16 * baudrate)
SerClk = cpu_freq / udiv
As a result, udiv and bdiv should be generated as follows in serail_init:
if external_clock:
SerClk = CFG_EXT_SERIAL_CLK udiv = 1
else:
SerClk = CFG_BASE_BAUD * 16 udiv = cpu_freq / serClk
endif
bdiv = SerClk / (16 * baudrate)
Am I missing something?
regards,
François-Xavier SEINGIER
7605
Age (days ago)
7605
Last active (days ago)
0 comments
1 participants
participants (1)
-
Seingier François-Xavier