tty: serial: cpm_uart - fix init when SMC is relocated
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 22 May 2019 12:17:11 +0000 (12:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:33:37 +0000 (09:33 +0200)
commit3459f6217566d5cfe49056e3a154e8480ca66bd3
tree991b8ec7e0d05f91bc52f2e3e13a60704aa4e97f
parent8d57d3bcdf80ab702bc0408a2b28f9af3cc640d5
tty: serial: cpm_uart - fix init when SMC is relocated

[ Upstream commit 06aaa3d066db87e8478522d910285141d44b1e58 ]

SMC relocation can also be activated earlier by the bootloader,
so the driver's behaviour cannot rely on selected kernel config.

When the SMC is relocated, CPM_CR_INIT_TRX cannot be used.

But the only thing CPM_CR_INIT_TRX does is to clear the
rstate and tstate registers, so this can be done manually,
even when SMC is not relocated.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 9ab921201444 ("cpm_uart: fix non-console port startup bug")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/cpm_uart/cpm_uart_core.c