summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/xilinx_uartps.c
diff options
context:
space:
mode:
authorStuart Menefy <stuart.menefy@mathembedded.com>2019-02-13 00:40:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-19 15:42:08 +0300
commit5086e0a409a0c1b25af444b70766089a6359cc85 (patch)
treeb9edfd00a77d7e5cb07e37a11962546103ef76ec /drivers/tty/serial/xilinx_uartps.c
parent7abab1605139bc41442864c18f9573440f7ca105 (diff)
downloadlinux-5086e0a409a0c1b25af444b70766089a6359cc85.tar.xz
tty: serial: samsung: Enable baud clock during initialisation
The Exynos 5260, like the 5433, appears to require baud clock as well as pclk to be running before accessing any of the registers, otherwise an external abort is raised. The serial driver already enables baud clock when required, but only if it knows which clock is baud clock. On older SoCs baud clock may be selected from a number of possible clocks so to support this the driver only selects which clock to use for baud clock when a port is opened, at which point the desired baud rate is known and the best clock can be selected. The result is that there are a number of circumstances in which registers are accessed without first explicitly enabling baud clock: - while the driver is being initialised - the initial parts of opening a port for the first time - when resuming if the port hasn't been already opened The 5433 overcomes this currently by marking the baud clock as CLK_IGNORE_UNUSED, so the clock is always enabled, however for the 5260 I've been trying to avoid this. This change adds code to pick the first available clock to use as baud clock and enables it while initialising the driver. This code wouldn't be sufficient on a SoC which supports multiple possible baud clock sources _and_ requires the correct baud clock to be enabled before accessing any of the serial port registers (in particular the register which selects which clock to use as the baud clock). As far as I know such hardware doesn't exist. Signed-off-by: Stuart Menefy <stuart.menefy@mathembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/xilinx_uartps.c')
0 files changed, 0 insertions, 0 deletions