]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
msm_serial: Make baud_code detection more dynamic
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 24 Jul 2013 18:37:30 +0000 (11:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 23:13:29 +0000 (16:13 -0700)
commit6909dadd914259f459828b11c378ddea08d40ab6
tree396af77914babdd211843fc976f2011918d7e955
parentf8fb952fd409a4c854a66473c11d35b4e5e9c2eb
msm_serial: Make baud_code detection more dynamic

Currently msm_set_baud_rate() assumes the uart clock rate is
1.8432 MHz. This is not always true, and limits our options to
program the baud rate. Instead of assuming the rate and
hard-coding the baud_code based on it, calculate the divider that
we want and try to find the closest baud_code that matches. This
allows us to support uarts with faster clock speeds.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/msm_serial.c
drivers/tty/serial/msm_serial.h