Support high baud rates with Fintek F81866

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

We're using industrial PCs with a Fintek F81866 UART controller. It
claims "high baud rate support" but reports 115200 after boot.

After googling it, i found some contributions to the linux kernel from
Fintek: https://patchwork.kernel.org/patch/9361345/
They did not implement their own driver, but add some functionality to
the standard 8250 serial driver in a separate file "8250_fintek.c".
Too bad the author also states "9Bit/High baud rate(not implements
with mainline)".


After some unsuccessful e-mail traffic with Fintek, I tried
implementing it on my own. I found this datasheet:
http://pdf1.alldatasheet.com/datasheet-pdf/view/459085/FINTEK/F81866AD-I.html

On page 113 it explains which UART clock rate is needed for which
actual baud rate. So - as explained on page 179 - I successfully
changed register F2h to use 14.769MHz (8 times faster than default
1.84MHz clock) and therefore support baud rates up to 921600.
Confirmed it is working...

At this point, I could contribute the change and try getting it
mainline?! It's basically two lines of code...

-----

But now it starts getting tricky. Maybe it's a second step regarding
mainline, but I also need to support uncommon baudrates like B500000.
According to the baud rate table (page 113) I need to set uart clock
even higher (24MHz) in order to get a proper divisor for those baud
rates but set it back if a common baud rate is requested. In my
opinion, the driver needs to decide which clock rate is perfect for
the requested baudrate.

I think I need to do this when someone is changing termios. So I found
"serial8250_do_set_termios()" function in 8250_port.c.
But at this point I'm stuck. I cannot figure out where to put that
functionality.

As I'm afraid never getting it mainline, if I mess around in
serial_core and 8250_core, I wanted to ask you guys for some
hints/ideas.

Thanks,
Lukas
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux