diff options
author | Vineet Gupta <Vineet.Gupta1@synopsys.com> | 2014-06-24 08:25:11 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-10 22:45:29 (GMT) |
commit | 91f1b62a9b2b8d334b64d3029f4b0dcccf56bc1e (patch) | |
tree | 647a216e387a0011f23868c481024bc3c357b7a8 /drivers/tty/serial/arc_uart.c | |
parent | 2e6fb7cbd0632d4230d4219ee9eb610f975d6669 (diff) | |
download | linux-91f1b62a9b2b8d334b64d3029f4b0dcccf56bc1e.tar.xz |
serial/arc: remove last remanants of platform data
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/arc_uart.c')
-rw-r--r-- | drivers/tty/serial/arc_uart.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c index 94d345b..68433ad 100644 --- a/drivers/tty/serial/arc_uart.c +++ b/drivers/tty/serial/arc_uart.c @@ -37,8 +37,8 @@ #include <linux/tty_flip.h> #include <linux/serial_core.h> #include <linux/io.h> -#include <linux/of.h> -#include <linux/of_platform.h> +#include <linux/of_irq.h> +#include <linux/of_address.h> /************************************* * ARC UART Hardware Specs @@ -491,11 +491,9 @@ static struct uart_ops arc_serial_pops = { static int arc_uart_init_one(struct platform_device *pdev, int dev_id) { - struct resource *res, *res2; + struct device_node *np = pdev->dev.of_node; struct arc_uart_port *uart = &arc_uart_ports[dev_id]; struct uart_port *port = &uart->port; - - struct device_node *np = pdev->dev.of_node; u32 val; if (of_property_read_u32(np, "clock-frequency", &val)) { @@ -510,21 +508,13 @@ arc_uart_init_one(struct platform_device *pdev, int dev_id) } uart->baud = val; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - - res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res2) - return -ENODEV; - - port->mapbase = res->start; - port->membase = ioremap_nocache(res->start, resource_size(res)); + port->membase = of_iomap(np, 0); if (!port->membase) /* No point of dev_err since UART itself is hosed here */ return -ENXIO; - port->irq = res2->start; + port->irq = irq_of_parse_and_map(np, 0); + port->dev = &pdev->dev; port->iotype = UPIO_MEM; port->flags = UPF_BOOT_AUTOCONF; |