Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH V2 10/14] MIPS: lantiq: convert falcon debug uart to clkdev api
Date: Fri, 24 Feb 2012 14:53:18 +0400	[thread overview]
Message-ID: <4F476C1E.9020608@mvista.com> (raw)
In-Reply-To: <1330012993-13510-10-git-send-email-blogic@openwrt.org>

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@openwrt.org>
[...]

> 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

  reply	other threads:[~2012-02-24 10:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 16:03 [PATCH V2 01/14] MIPS: add clkdev.h John Crispin
2012-02-23 16:03 ` [PATCH V2 02/14] MIPS: lantiq: helper functions for SoC detection John Crispin
2012-02-23 16:03 ` [PATCH V2 03/14] MIPS: lantiq: convert to clkdev api John Crispin
2012-02-23 16:03 ` [PATCH V2 04/14] MIPS: lantiq: convert xway " John Crispin
2012-02-23 16:03 ` [PATCH V2 05/14] MIPS: lantiq: convert falcon " John Crispin
2012-02-23 16:03 ` [PATCH V2 06/14] MIPS: lantiq: convert dma driver " John Crispin
2012-02-23 16:03 ` [PATCH V2 07/14] MIPS: lantiq: convert gpio_stp " John Crispin
2012-02-24 10:46   ` Sergei Shtylyov
2012-02-23 16:03 ` [PATCH V2 08/14] MIPS: lantiq: convert falcon gpio " John Crispin
2012-02-24 10:45   ` Sergei Shtylyov
2012-02-23 16:03 ` [PATCH V2 09/14] SERIAL: MIPS: lantiq: convert serial driver " John Crispin
2012-02-23 16:03 ` [PATCH V2 10/14] MIPS: lantiq: convert falcon debug uart " John Crispin
2012-02-24 10:53   ` Sergei Shtylyov [this message]
2012-02-23 16:03 ` [PATCH V2 11/14] NET: MIPS: lantiq: convert etop driver " John Crispin
2012-02-24  8:28   ` David Miller
2012-02-24  8:40     ` John Crispin
2012-02-24  8:53       ` David Miller
2012-02-24 10:55   ` Sergei Shtylyov
2012-02-23 16:03 ` [PATCH V2 12/14] WDT: MIPS: lantiq: convert watchdog " John Crispin
2012-02-23 16:03 ` [PATCH V2 13/14] MIPS: lantiq: unify xway prom code John Crispin
2012-02-23 16:03 ` [PATCH V2 14/14] MIPS: lantiq: add vr9 support John Crispin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F476C1E.9020608@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox