From: Timur Tabi <timur@codeaurora.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: peter@hurleysoftware.com, andre.przywara@arm.com,
Linus Walleij <linus.walleij@linaro.org>,
Andrew.Jackson@arm.com, linux-serial@vger.kernel.org,
Greg Kroah-Hartman <greg@kroah.com>,
jslaby@suse.com, jun.nie@linaro.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] serial: amba-pl011: abstract register accessors
Date: Tue, 3 Nov 2015 10:43:24 -0600 [thread overview]
Message-ID: <5638E42C.3050108@codeaurora.org> (raw)
In-Reply-To: <20151103161206.GA8644@n2100.arm.linux.org.uk>
Russell King - ARM Linux wrote:
> Thanks for pointing that out... that's a mistake in my patches. It's
> very difficult to see how we could ever support earlyconsole on ZTE
> without massively overhauling the earlycon stuff. I'll undo the
> changes there in my series.
How about a command-line option for earlycon? We do this on our kernel
for now:
earlycon=pl011,0x3blabla,sbsa32
And then in pl011_early_console_setup(), device->con->write is set to
either pl011_early_write or to pl011_early_write_sbsa32, which looks
like this:
static void pl011_putc_sbsa32(struct uart_port *port, int c)
{
while (readl(port->membase + UART01x_FR) & UART01x_FR_TXFF)
cpu_relax();
writel(c, port->membase + UART01x_DR);
while (!(readl(port->membase + UART01x_FR) & UART011_FR_TXFE))
cpu_relax();
}
static void pl011_early_write_sbsa32(struct console *con, const char *s,
unsigned n)
{
struct earlycon_device *dev = con->data;
uart_console_write(&dev->port, s, n, pl011_putc_sbsa32);
}
I would have added this to my patch, but I specifically didn't want to
add any new functionality.
> Now, as for this patch...
>
>> > unsigned int (*get_fifosize)(struct amba_device *dev);
>> >+ u16 (*regreadw)(const void __iomem *addr);
>> >+ void (*regwritew)(u16 val, void __iomem *addr);
>> >+ void (*regwriteb)(u8 val, void __iomem *addr);
> regwriteb() is used nowhere in this patch.
Sorry, I could have sworn I deleted that. Should I bother posting a
version 2, since your patch is better?
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
WARNING: multiple messages have this Message-ID (diff)
From: timur@codeaurora.org (Timur Tabi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] serial: amba-pl011: abstract register accessors
Date: Tue, 3 Nov 2015 10:43:24 -0600 [thread overview]
Message-ID: <5638E42C.3050108@codeaurora.org> (raw)
In-Reply-To: <20151103161206.GA8644@n2100.arm.linux.org.uk>
Russell King - ARM Linux wrote:
> Thanks for pointing that out... that's a mistake in my patches. It's
> very difficult to see how we could ever support earlyconsole on ZTE
> without massively overhauling the earlycon stuff. I'll undo the
> changes there in my series.
How about a command-line option for earlycon? We do this on our kernel
for now:
earlycon=pl011,0x3blabla,sbsa32
And then in pl011_early_console_setup(), device->con->write is set to
either pl011_early_write or to pl011_early_write_sbsa32, which looks
like this:
static void pl011_putc_sbsa32(struct uart_port *port, int c)
{
while (readl(port->membase + UART01x_FR) & UART01x_FR_TXFF)
cpu_relax();
writel(c, port->membase + UART01x_DR);
while (!(readl(port->membase + UART01x_FR) & UART011_FR_TXFE))
cpu_relax();
}
static void pl011_early_write_sbsa32(struct console *con, const char *s,
unsigned n)
{
struct earlycon_device *dev = con->data;
uart_console_write(&dev->port, s, n, pl011_putc_sbsa32);
}
I would have added this to my patch, but I specifically didn't want to
add any new functionality.
> Now, as for this patch...
>
>> > unsigned int (*get_fifosize)(struct amba_device *dev);
>> >+ u16 (*regreadw)(const void __iomem *addr);
>> >+ void (*regwritew)(u16 val, void __iomem *addr);
>> >+ void (*regwriteb)(u8 val, void __iomem *addr);
> regwriteb() is used nowhere in this patch.
Sorry, I could have sworn I deleted that. Should I bother posting a
version 2, since your patch is better?
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
next prev parent reply other threads:[~2015-11-03 16:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 15:01 [PATCH 1/2] serial: amba-pl011: use cpu_relax when polling registers Timur Tabi
2015-11-03 15:01 ` Timur Tabi
2015-11-03 15:01 ` [PATCH 2/2] serial: amba-pl011: abstract register accessors Timur Tabi
2015-11-03 15:01 ` Timur Tabi
2015-11-03 16:12 ` Russell King - ARM Linux
2015-11-03 16:12 ` Russell King - ARM Linux
2015-11-03 16:43 ` Timur Tabi [this message]
2015-11-03 16:43 ` Timur Tabi
2015-11-06 1:19 ` Peter Hurley
2015-11-06 1:19 ` Peter Hurley
2015-11-06 1:14 ` [PATCH 1/2] serial: amba-pl011: use cpu_relax when polling registers Peter Hurley
2015-11-06 1:14 ` Peter Hurley
2015-12-13 6:04 ` Greg Kroah-Hartman
2015-12-13 6:04 ` 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=5638E42C.3050108@codeaurora.org \
--to=timur@codeaurora.org \
--cc=Andrew.Jackson@arm.com \
--cc=andre.przywara@arm.com \
--cc=greg@kroah.com \
--cc=jslaby@suse.com \
--cc=jun.nie@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=peter@hurleysoftware.com \
/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.