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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux