tty/serial: at91: enable peripheral clock before accessing I/O registers
authorCyrille Pitchen <cyrille.pitchen@atmel.com>
Tue, 9 Dec 2014 13:31:33 +0000 (14:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2015 22:20:49 +0000 (14:20 -0800)
commitd4f641876a68d1961e30c202709cc2d484f69f6f
tree79f2c3a4763afa7ea5ff8d60c2826e4c1578bf73
parent485819b5b9ed82372dacae775998f3c33717f7fe
tty/serial: at91: enable peripheral clock before accessing I/O registers

atmel_serial_probe() calls atmel_init_port(). In turn, atmel_init_port() calls
clk_disable_unprepare() to disable the peripheral clock before returning.

Later atmel_serial_probe() accesses some I/O registers such as the Mode and
Control registers for RS485 support then the Name and Version registers, through a call to
atmel_get_ip_name(), but at that moment the peripheral clock was still
disabled.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: <stable@vger.kernel.org> # 3.12+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c