title: Uart 16c950 linux speed above B4000000 (4Mbps)
body: <p>everybody,
  i'm working with a high speed RS422 pci board (OXPCIe958) under Ubuntu.
  The device can work up to 15Mbps. I need to work at 10Mbps, but i notice that under Linux,
  if we use termois, the maximum speed that can be specified is B4000000 (4 Mbps).</p>
  
  <p><strong>Is there any way to specify custom baund rate in linux??</strong> I tried to change the values 
  in termois.h:</p>
  
  <pre><code>#define  B1152000 0010011
  #define  B1500000 0010012
  #define  B2000000 0010013
  #define  B2500000 0010014
  #define  B3000000 0010015
  #define  B3500000 0010016
  #define  B4000000 0010017 --&gt; by default this is the last value
  
  #define  B4500000 0010018   --&gt; Added
  #define  B5000000 0010020   --&gt; Added
  //#define __MAX_BAUD B4000000 --&gt; Default value
  #define __MAX_BAUD B10000000
  </code></pre>
  
  <p>But changes doesn't work. I cannot understand the meaning of the value assigned to BXXXXXX!!</p>
  
  <p>The device works natively on linux and no driver must be specified. Looking into the device's datasheet, i saw that to specify the target baund rate, we must set some registers that change the prescaler, the latch divisor and the sample clock. </p>
  
  <p>According to the data sheet, tha baund rate is given by:</p>
  
  <p>Baundrate = inputclok/(sampleClock*divisor*prescaler)</p>
  
  <p><strong>Is there a way to set this registers under linux?</strong> the driver are in 8250.c and 8250_pci.c</p>
  
  <p>Thanks in advance</p>