serial/arc: remove earlyprintk support and switch to earlycon
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
27cfe4ec17
commit
2e6fb7cbd0
|
@ -17,7 +17,7 @@
|
||||||
interrupt-parent = <&intc>;
|
interrupt-parent = <&intc>;
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
bootargs = "console=ttyARC0,115200n8 earlyprintk=ttyARC0";
|
bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8";
|
||||||
};
|
};
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
|
|
|
@ -492,18 +492,9 @@ static int
|
||||||
arc_uart_init_one(struct platform_device *pdev, int dev_id)
|
arc_uart_init_one(struct platform_device *pdev, int dev_id)
|
||||||
{
|
{
|
||||||
struct resource *res, *res2;
|
struct resource *res, *res2;
|
||||||
unsigned long *plat_data;
|
|
||||||
struct arc_uart_port *uart = &arc_uart_ports[dev_id];
|
struct arc_uart_port *uart = &arc_uart_ports[dev_id];
|
||||||
struct uart_port *port = &uart->port;
|
struct uart_port *port = &uart->port;
|
||||||
|
|
||||||
plat_data = dev_get_platdata(&pdev->dev);
|
|
||||||
if (!plat_data)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
if (is_early_platform_device(pdev)) {
|
|
||||||
port->uartclk = plat_data[1];
|
|
||||||
uart->baud = plat_data[2];
|
|
||||||
} else {
|
|
||||||
struct device_node *np = pdev->dev.of_node;
|
struct device_node *np = pdev->dev.of_node;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
|
@ -518,7 +509,6 @@ arc_uart_init_one(struct platform_device *pdev, int dev_id)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
uart->baud = val;
|
uart->baud = val;
|
||||||
}
|
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res)
|
if (!res)
|
||||||
|
@ -607,38 +597,6 @@ static struct console arc_console = {
|
||||||
.data = &arc_uart_driver
|
.data = &arc_uart_driver
|
||||||
};
|
};
|
||||||
|
|
||||||
static __init void early_serial_write(struct console *con, const char *s,
|
|
||||||
unsigned int n)
|
|
||||||
{
|
|
||||||
struct uart_port *port = &arc_uart_ports[con->index].port;
|
|
||||||
|
|
||||||
uart_console_write(port, s, n, arc_serial_poll_putchar);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct console arc_early_serial_console __initdata = {
|
|
||||||
.name = "early_ARCuart",
|
|
||||||
.write = early_serial_write,
|
|
||||||
.flags = CON_PRINTBUFFER | CON_BOOT,
|
|
||||||
.index = -1
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init arc_serial_probe_earlyprintk(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
int dev_id = pdev->id < 0 ? 0 : pdev->id;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
arc_early_serial_console.index = dev_id;
|
|
||||||
|
|
||||||
rc = arc_uart_init_one(pdev, dev_id);
|
|
||||||
if (rc)
|
|
||||||
panic("early console init failed\n");
|
|
||||||
|
|
||||||
arc_serial_console_setup(&arc_early_serial_console, NULL);
|
|
||||||
|
|
||||||
register_console(&arc_early_serial_console);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __init void arc_early_serial_write(struct console *con, const char *s,
|
static __init void arc_early_serial_write(struct console *con, const char *s,
|
||||||
unsigned int n)
|
unsigned int n)
|
||||||
{
|
{
|
||||||
|
@ -713,27 +671,6 @@ static struct platform_driver arc_platform_driver = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_ARC_CONSOLE
|
|
||||||
|
|
||||||
static struct platform_driver early_arc_platform_driver __initdata = {
|
|
||||||
.probe = arc_serial_probe_earlyprintk,
|
|
||||||
.remove = arc_serial_remove,
|
|
||||||
.driver = {
|
|
||||||
.name = DRIVER_NAME,
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
* Register an early platform driver of "earlyprintk" class.
|
|
||||||
* ARCH platform code installs the driver and probes the early devices
|
|
||||||
* The installation could rely on user specifying earlyprintk=xyx in cmd line
|
|
||||||
* or it could be done independently, for all "earlyprintk" class drivers.
|
|
||||||
* [see arch/arc/plat-arcfpga/platform.c]
|
|
||||||
*/
|
|
||||||
early_platform_init("earlyprintk", &early_arc_platform_driver);
|
|
||||||
|
|
||||||
#endif /* CONFIG_SERIAL_ARC_CONSOLE */
|
|
||||||
|
|
||||||
static int __init arc_serial_init(void)
|
static int __init arc_serial_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
Loading…
Reference in New Issue