Thread (7 messages) 7 messages, 4 authors, 2015-12-13
STALE3850d

[PATCH 2/2] serial: amba-pl011: abstract register accessors

From: Timur Tabi <hidden>
Date: 2015-11-03 16:43:24
Also in: linux-serial

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...
quoted
quoted
 	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help