serial: mpc512x: setup the PSC FIFO clock as well
authorGerhard Sittig <gsi@denx.de>
Sat, 30 Nov 2013 22:51:30 +0000 (23:51 +0100)
committerAnatolij Gustschin <agust@denx.de>
Sun, 12 Jan 2014 17:53:05 +0000 (18:53 +0100)
commitcb1ea81230f0b5593b847d2cb3d9304e1d5e4234
tree0bfaaf1a11d3b29fe43d811f0520b797d12d8927
parente149b42b8605f4e0e86662fe880716ccdfdb4ef9
serial: mpc512x: setup the PSC FIFO clock as well

prepare and enable the FIFO clock upon PSC FIFO initialization,
check for and propagage errors when enabling the PSC FIFO clock,
disable and unprepare the FIFO clock upon PSC FIFO uninitialization

devm_{get,put}_clk() doesn't apply here, as the SoC provides a
single FIFO component which is shared among several PSC components,
thus the FIFO isn't associated with a device (while the PSCs are)

provide a fallback clock lookup approach in case the OF based clock
lookup for the PSC FIFO fails, this allows for successful operation in
the presence of an outdated device tree which lacks clock specs

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Gerhard Sittig <gsi@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
drivers/tty/serial/mpc52xx_uart.c