All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Peter Hurley <peter@hurleysoftware.com>,
	Jason Liu <jason.liu@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Timur Tabi <timur@codeaurora.org>,
	xie.baoyou@zte.com.cn, Russell King <linux@armlinux.org.uk>,
	linux-serial@vger.kernel.org,
	Andre Przywara <andre.przywara@arm.com>,
	Jun Nie <jun.nie@linaro.org>, Shawn Guo <shawn.guo@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/3] tty: amba-pl011: define flag register bits for ZTE device
Date: Sat, 17 Sep 2016 13:26:05 +0800	[thread overview]
Message-ID: <20160917052605.GF7398@tiger> (raw)
In-Reply-To: <b549cd51-a81f-b693-e3c2-9e3c598d3d9e@arm.com>

On Fri, Sep 16, 2016 at 03:23:57PM +0100, Sudeep Holla wrote:
> >@@ -2303,13 +2325,16 @@ static struct console amba_console = {
> >
> > static void pl011_putc(struct uart_port *port, int c)
> > {
> >+	struct uart_amba_port *uap =
> >+		container_of(port, struct uart_amba_port, port);
> >+
> > 	while (readl(port->membase + UART01x_FR) & UART01x_FR_TXFF)
> > 		cpu_relax();
> > 	if (port->iotype == UPIO_MEM32)
> > 		writel(c, port->membase + UART01x_DR);
> > 	else
> > 		writeb(c, port->membase + UART01x_DR);
> >-	while (readl(port->membase + UART01x_FR) & UART01x_FR_BUSY)
> >+	while (readl(port->membase + UART01x_FR) & uap->vendor->fr_busy)
> > 		cpu_relax();
> > }
> 
> The above hunk won't work for early console devices. The earlycon_device
> just has uart_port and is not uart_amba_port. I don't know how to fix
> this properly but I thought we could reuse private_data in uart_port for
> early_con devices. Something like below(incomplete for other vendors,
> works only for ARM)

Hi Sudeep,

Thanks much for the report.  I think the best way to fix this is that we
revert the change for pl011_putc() function, and figure out a correct
approach adding earlycon support for ZTE hardware later.

I will send a patch to revert pl011_putc() changes shortly.

Thanks,
Shawn

WARNING: multiple messages have this Message-ID (diff)
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] tty: amba-pl011: define flag register bits for ZTE device
Date: Sat, 17 Sep 2016 13:26:05 +0800	[thread overview]
Message-ID: <20160917052605.GF7398@tiger> (raw)
In-Reply-To: <b549cd51-a81f-b693-e3c2-9e3c598d3d9e@arm.com>

On Fri, Sep 16, 2016 at 03:23:57PM +0100, Sudeep Holla wrote:
> >@@ -2303,13 +2325,16 @@ static struct console amba_console = {
> >
> > static void pl011_putc(struct uart_port *port, int c)
> > {
> >+	struct uart_amba_port *uap =
> >+		container_of(port, struct uart_amba_port, port);
> >+
> > 	while (readl(port->membase + UART01x_FR) & UART01x_FR_TXFF)
> > 		cpu_relax();
> > 	if (port->iotype == UPIO_MEM32)
> > 		writel(c, port->membase + UART01x_DR);
> > 	else
> > 		writeb(c, port->membase + UART01x_DR);
> >-	while (readl(port->membase + UART01x_FR) & UART01x_FR_BUSY)
> >+	while (readl(port->membase + UART01x_FR) & uap->vendor->fr_busy)
> > 		cpu_relax();
> > }
> 
> The above hunk won't work for early console devices. The earlycon_device
> just has uart_port and is not uart_amba_port. I don't know how to fix
> this properly but I thought we could reuse private_data in uart_port for
> early_con devices. Something like below(incomplete for other vendors,
> works only for ARM)

Hi Sudeep,

Thanks much for the report.  I think the best way to fix this is that we
revert the change for pl011_putc() function, and figure out a correct
approach adding earlycon support for ZTE hardware later.

I will send a patch to revert pl011_putc() changes shortly.

Thanks,
Shawn

  parent reply	other threads:[~2016-09-17  5:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08  9:00 [PATCH v3 0/3] Complete ZTE PL011 device support Shawn Guo
2016-07-08  9:00 ` Shawn Guo
2016-07-08  9:00 ` [PATCH v3 1/3] tty: amba-pl011: define flag register bits for ZTE device Shawn Guo
2016-07-08  9:00   ` Shawn Guo
2016-09-16 14:23   ` Sudeep Holla
2016-09-16 14:23     ` Sudeep Holla
2016-09-16 16:39     ` Russell King - ARM Linux
2016-09-16 16:39       ` Russell King - ARM Linux
2016-09-16 17:11       ` Timur Tabi
2016-09-16 17:11         ` Timur Tabi
2016-09-17  5:37         ` Shawn Guo
2016-09-17  5:37           ` Shawn Guo
2016-09-17  9:17           ` Russell King - ARM Linux
2016-09-17  9:17             ` Russell King - ARM Linux
2016-09-17  5:26     ` Shawn Guo [this message]
2016-09-17  5:26       ` Shawn Guo
2016-07-08  9:00 ` [PATCH v3 2/3] tty: amba-pl011: add .get_fifosize " Shawn Guo
2016-07-08  9:00   ` Shawn Guo
2016-07-08  9:00 ` [PATCH v3 3/3] tty: amba-pl011: probe ZTE device from AMBA bus with a pseudo-ID Shawn Guo
2016-07-08  9:00   ` Shawn Guo
2016-07-14 13:26 ` [PATCH v3 0/3] Complete ZTE PL011 device support Shawn Guo
2016-07-14 13:26   ` Shawn Guo
2016-07-18 13:35   ` Russell King - ARM Linux
2016-07-18 13:35     ` Russell King - ARM Linux
2016-08-09  3:21     ` Shawn Guo
2016-08-09  3:21       ` Shawn Guo
2016-08-09  8:27       ` Greg Kroah-Hartman
2016-08-09  8:27         ` Greg Kroah-Hartman

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=20160917052605.GF7398@tiger \
    --to=shawnguo@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jason.liu@linaro.org \
    --cc=jun.nie@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=peter@hurleysoftware.com \
    --cc=shawn.guo@linaro.org \
    --cc=sudeep.holla@arm.com \
    --cc=timur@codeaurora.org \
    --cc=xie.baoyou@zte.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.