How to set a custom baud rate using 2.6 linux distro on MPC5200 based board?

Caruso, Nick ncaruso at irobot.com
Wed Feb 16 08:33:22 EST 2005


I'm trying to set a custom baud rate (500KBaud, in case anyone cares) on one of the PSCs on a MPC5200 board.
The PSC is configured as a serial port and is visible and usable under the 2.6 kernel we're using.

I used to use the following code under 2.4 on an x86 board:

   serial_info.flags = ASYNC_SPD_CUST | ASYNC_LOW_LATENCY;
   serial_info.custom_divisor = 48;  // clock on FTDI chip / 48 == 500KB

   if ( ioctl(tty_fd, TIOCSSERIAL, &serial_info ) < 0) {
     perror("config_serial_port: ioctl TIOCSSERIAL");
     return(-1);
   }

This compiled fine under the ppc cross-dev tools we have but it fails with an "invalid argument" error when run on the ppc board.

I'm busy reading the driver sources but thought someone on the list might be able to help me out.

  thanks!
     --nick caruso
       irobot corporation
       intelligent vehicles
       r-gator project
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050215/f3f99bc5/attachment.htm 


More information about the Linuxppc-embedded mailing list