Re: [PATCH V2 10/14] MIPS: lantiq: convert falcon debug uart to clkdev api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hello.

On 23-02-2012 20:03, John Crispin wrote:

On Falcon SoCs we have a secondary serial port that can be used to help
debug the voice core. For the port to work several clocking bits need to
be activated. We convert the code to clkdev api.

You also convert to new ltq_gpio_request() here. I don't think you should mix these two things up in one patch.

Signed-off-by: John Crispin<blogic@xxxxxxxxxxx>
[...]

diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index 99fb70f..cf88afd 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
[...]
@@ -529,6 +533,19 @@ lqasc_request_port(struct uart_port *port)
  		if (port->membase == NULL)
  			return -ENOMEM;
  	}
+
+	if (ltq_is_falcon()&&  (port->line == 1)) {
+		struct ltq_uart_port *ltq_port = lqasc_port[pdev->id];
+		if (ltq_gpio_request(&pdev->dev, MUXC_SIF_RX_PIN,
+				3, 0, "asc1-rx") ||
+			ltq_gpio_request(&pdev->dev, MUXC_SIF_TX_PIN,
+				3, 1, "asc1-tx"))
+			return -EBUSY;
+		ltq_port->clk = clk_get(&pdev->dev, NULL);
+		if (!ltq_port->clk)

   clk_get() returns error code, not NULL. Use IS_ERR() and PTR_ERR().

WBR, Sergei



[Linux MIPS Home]     [LKML Archive]     [Linux ARM]     [Linux]     [Git]     [Photo]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

Add to Google Powered by Linux