.. | .. |
---|
18 | 18 | #include <linux/serial_core.h> |
---|
19 | 19 | #include <linux/serial_reg.h> |
---|
20 | 20 | #include <linux/of.h> |
---|
21 | | -#include <linux/of_irq.h> |
---|
22 | 21 | #include <linux/of_platform.h> |
---|
23 | 22 | #include <linux/platform_device.h> |
---|
24 | 23 | #include <linux/slab.h> |
---|
.. | .. |
---|
93 | 92 | { |
---|
94 | 93 | struct uart_8250_port uart = {}; |
---|
95 | 94 | struct pxa8250_data *data; |
---|
96 | | - struct resource *mmres, *irqres; |
---|
97 | | - int ret; |
---|
| 95 | + struct resource *mmres; |
---|
| 96 | + int irq, ret; |
---|
| 97 | + |
---|
| 98 | + irq = platform_get_irq(pdev, 0); |
---|
| 99 | + if (irq < 0) |
---|
| 100 | + return irq; |
---|
98 | 101 | |
---|
99 | 102 | mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
100 | | - irqres = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
---|
101 | | - if (!mmres || !irqres) |
---|
| 103 | + if (!mmres) |
---|
102 | 104 | return -ENODEV; |
---|
103 | 105 | |
---|
104 | 106 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); |
---|
.. | .. |
---|
121 | 123 | uart.port.iotype = UPIO_MEM32; |
---|
122 | 124 | uart.port.mapbase = mmres->start; |
---|
123 | 125 | uart.port.regshift = 2; |
---|
124 | | - uart.port.irq = irqres->start; |
---|
| 126 | + uart.port.irq = irq; |
---|
125 | 127 | uart.port.fifosize = 64; |
---|
126 | | - uart.port.flags = UPF_IOREMAP | UPF_SKIP_TEST; |
---|
| 128 | + uart.port.flags = UPF_IOREMAP | UPF_SKIP_TEST | UPF_FIXED_TYPE; |
---|
127 | 129 | uart.port.dev = &pdev->dev; |
---|
128 | 130 | uart.port.uartclk = clk_get_rate(data->clk); |
---|
129 | 131 | uart.port.pm = serial_pxa_pm; |
---|