linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: troy.kisky@boundarydevices.com (Troy Kisky)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] tty: serial: imx: don't reinit clock with enabled console
Date: Mon, 27 Aug 2012 11:20:10 -0700	[thread overview]
Message-ID: <503BBA5A.8040609@boundarydevices.com> (raw)
In-Reply-To: <1346053012-25686-3-git-send-email-dirk.behme@de.bosch.com>

On 8/27/2012 12:36 AM, Dirk Behme wrote:
> From: Xinyu Chen <xinyu.chen@freescale.com>
>
> Remove the imx_setup_ufcr() call on startup when CONSOLE enabled,
> as this will cause clock reinit, and output garbage.
>
> This patch is a port from Freescale's Android kernel.
>
> Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
> Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
> CC: Shawn Guo <shawn.guo@linaro.org>
> CC: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>   drivers/tty/serial/imx.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 908178f..31ce414 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -695,7 +695,9 @@ static int imx_startup(struct uart_port *port)
>   	int retval;
>   	unsigned long flags, temp;
>   
> +#ifndef CONFIG_SERIAL_CORE_CONSOLE
>   	imx_setup_ufcr(sport, 0);
> +#endif
>   
>   	/* disable the DREN bit (Data Ready interrupt enable) before
>   	 * requesting IRQs


I'd rather do something like this

static int imx_setup_ufcr(struct imx_port *sport, unsigned int mode)
{
         unsigned int val;

         /* set receiver / transmitter trigger level. */
         val = readl(sport->port.membase + UFCR) & UFCR_RFDIV;
         val |= TXTL << 10 | RXTL;
         writel(val, sport->port.membase + UFCR);
         return 0;
}

There is no need for imx_setup_ufcr to change divisor.


Troy

  reply	other threads:[~2012-08-27 18:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27  7:36 [PATCH 0/2] tty: serial: imx: fix lockup and garbage on SMP Dirk Behme
2012-08-27  7:36 ` [PATCH 1/2] tty: serial: imx: console write routing is unsafe " Dirk Behme
2012-08-27 22:33   ` Shawn Guo
2012-08-27  7:36 ` [PATCH 2/2] tty: serial: imx: don't reinit clock with enabled console Dirk Behme
2012-08-27 18:20   ` Troy Kisky [this message]
2012-08-28 10:46     ` Dirk Behme
2012-08-28 18:27       ` Troy Kisky
2012-08-28 18:45         ` Troy Kisky
2012-08-27 22:31 ` [PATCH 0/2] tty: serial: imx: fix lockup and garbage on SMP Shawn Guo
2012-08-27 22:51   ` Greg Kroah-Hartman
2012-08-27 23:37     ` Shawn Guo
2012-08-28  6:03       ` Dirk Behme

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=503BBA5A.8040609@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).