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>
Fri, 24 May 2019 08:00:08 +0000 (10:00 +0200)
commit06aaa3d066db87e8478522d910285141d44b1e58
tree6e98ae7e4a99556fda3c7e388bd9003d34bcd10b
parent2c58e56096dd011ea43f29a032d19b0e76fe2570
tty: serial: cpm_uart - fix init when SMC is relocated

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>
drivers/tty/serial/cpm_uart/cpm_uart_core.c