<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>How to set a custom baud rate using 2.6 linux distro on MPC5200 based board?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>I'm trying to set a custom baud rate (500KBaud, in case anyone cares) on one of the PSCs on a MPC5200 board.<BR>
The PSC is configured as a serial port and is visible and usable under the 2.6 kernel we're using.<BR>
<BR>
I used to use the following code under 2.4 on an x86 board:<BR>
<BR>
&nbsp;&nbsp; serial_info.flags = ASYNC_SPD_CUST | ASYNC_LOW_LATENCY;<BR>
&nbsp;&nbsp; serial_info.custom_divisor = 48;&nbsp; // clock on FTDI chip / 48 == 500KB<BR>
<BR>
&nbsp;&nbsp; if ( ioctl(tty_fd, TIOCSSERIAL, &amp;serial_info ) &lt; 0) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp; perror(&quot;config_serial_port: ioctl TIOCSSERIAL&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp; return(-1);<BR>
&nbsp;&nbsp; }<BR>
<BR>
This compiled fine under the ppc cross-dev tools we have but it fails with an &quot;invalid argument&quot; error when run on the ppc board.<BR>
<BR>
I'm busy reading the driver sources but thought someone on the list might be able to help me out.<BR>
<BR>
&nbsp; thanks!<BR>
&nbsp;&nbsp;&nbsp;&nbsp; --nick caruso<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; irobot corporation<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intelligent vehicles<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r-gator project</FONT>
</P>

</BODY>
</HTML>