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>
Wed, 31 Jul 2019 05:26:57 +0000 (07:26 +0200)
commit08b0bcc8076b63778a67b3ab32eeda48e02de1b9
treea002ad15156f2aa8947344112c25925cca0df4e0
parentc901780d92946da11b67d4898e6e323fab43c3b7
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