Patchwork [1/1] serial/mpc52xx_uart: fix psc clock name for mpc512x

login
register
mail settings
Submitter Matteo Facchinetti
Date March 12, 2013, 9:17 p.m.
Message ID <1363123037-4926-1-git-send-email-matteo.facchinetti@sirius-es.it>
Download mbox | patch
Permalink /patch/227118/
State Rejected
Delegated to: Anatolij Gustschin
Headers show

Comments

Matteo Facchinetti - March 12, 2013, 9:17 p.m.
From: Matteo Facchinetti <engineering@sirius-es.it>

On platform mpc512x, PSC clock name registered by clk_register()
(clock.c:703) has _mclk suffix.
In mpc512x uart device driver, PSC clock name has _clk suffix.

So change PSC clock name in UART device driver using registered clock.

Signed-off-by: Matteo Facchinetti <engineering@sirius-es.it>
---
 drivers/tty/serial/mpc52xx_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Anatolij Gustschin - March 12, 2013, 9:29 p.m.
Hi,

On Tue, 12 Mar 2013 22:17:17 +0100
Matteo Facchinetti <matteo.facchinetti@sirius-es.it> wrote:

> From: Matteo Facchinetti <engineering@sirius-es.it>
> 
> On platform mpc512x, PSC clock name registered by clk_register()
> (clock.c:703) has _mclk suffix.
> In mpc512x uart device driver, PSC clock name has _clk suffix.
> 
> So change PSC clock name in UART device driver using registered clock.

This bug is already fixed in the tty tree [1].

Thanks,

Anatolij

[1] https://git.kernel.org/cgit/linux/kernel/git/gregkh/tty.git/commit/?h=tty-linus&id=09081e5b47f6842669bb645e015deedf191244f4

Patch

diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index c0e1fad..018bad9 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -550,7 +550,7 @@  static int mpc512x_psc_clock(struct uart_port *port, int enable)
 		return 0;
 
 	psc_num = (port->mapbase & 0xf00) >> 8;
-	snprintf(clk_name, sizeof(clk_name), "psc%d_clk", psc_num);
+	snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num);
 	psc_clk = clk_get(port->dev, clk_name);
 	if (IS_ERR(psc_clk)) {
 		dev_err(port->dev, "Failed to get PSC clock entry!\n");