summaryrefslogtreecommitdiff
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-05-25 19:42:38 +0200
committerStefan Roese <sr@denx.de>2021-07-08 16:40:52 +0200
commit139d081384c2f613ac74b372cb7afe2386d556e4 (patch)
tree1697676be5ad01f701dd3b7921bf073c3103a367 /scripts/basic/fixdep.c
parentfd075f77ca56ffb07e0b1979f0cb47fc8831600f (diff)
serial: a37xx: Fix parent clock rate value and divider calculation
UART parent clock is by default the platform's xtal clock, which is 25 MHz. The value defined in the driver, though, is 25.8048 MHz. This is a hack for the suboptimal divisor calculation Divisor = UART clock / (16 * baudrate) which does not use rounding division, resulting in a suboptimal value for divisor if the correct parent clock rate was used. Change the code for divisor calculation to round to closest value, i.e. Divisor = Round(UART clock / (16 * baudrate)) and change the parent clock rate value to that returned by get_ref_clk(). This makes A3720 UART stable at standard UART baudrates between 1800 and 230400. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'scripts/basic/fixdep.c')
0 files changed, 0 insertions, 0 deletions