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

François-Xavier,
You're perfectly right. What's exactly your problem?
Give us your cpu_freq value and desired baudrate so that we can help.
Laurent
Seingier François-Xavier Francois-Xavier.Seingier@thomson.net Sent by: u-boot-users-admin@lists.sourceforge.net 12/07/04 18:23
To: "U-Boot-Users (E-mail)" u-boot-users@lists.sourceforge.net cc: Subject: [U-Boot-Users] ppc4xx/serial.c
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
------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
participants (1)
-
Laurent Mohin