@@ -92,11 +92,7 @@ static int lpc18xx_serial_probe(struct platform_device *pdev)
92
92
struct lpc18xx_uart_data * data ;
93
93
struct uart_8250_port uart ;
94
94
struct resource * res ;
95
- int irq , ret ;
96
-
97
- irq = platform_get_irq (pdev , 0 );
98
- if (irq < 0 )
99
- return irq ;
95
+ int ret ;
100
96
101
97
res = platform_get_resource (pdev , IORESOURCE_MEM , 0 );
102
98
if (!res ) {
@@ -139,19 +135,12 @@ static int lpc18xx_serial_probe(struct platform_device *pdev)
139
135
goto dis_clk_reg ;
140
136
}
141
137
142
- ret = of_alias_get_id (pdev -> dev .of_node , "serial" );
143
- if (ret >= 0 )
144
- uart .port .line = ret ;
145
-
146
138
data -> dma .rx_param = data ;
147
139
data -> dma .tx_param = data ;
148
140
149
141
spin_lock_init (& uart .port .lock );
150
142
uart .port .dev = & pdev -> dev ;
151
- uart .port .irq = irq ;
152
- uart .port .iotype = UPIO_MEM32 ;
153
143
uart .port .mapbase = res -> start ;
154
- uart .port .regshift = 2 ;
155
144
uart .port .type = PORT_16550A ;
156
145
uart .port .flags = UPF_FIXED_PORT | UPF_FIXED_TYPE | UPF_SKIP_TEST ;
157
146
uart .port .uartclk = clk_get_rate (data -> clk_uart );
@@ -160,6 +149,13 @@ static int lpc18xx_serial_probe(struct platform_device *pdev)
160
149
uart .port .rs485_supported = lpc18xx_rs485_supported ;
161
150
uart .port .serial_out = lpc18xx_uart_serial_out ;
162
151
152
+ ret = uart_read_port_properties (& uart .port );
153
+ if (ret )
154
+ return ret ;
155
+
156
+ uart .port .iotype = UPIO_MEM32 ;
157
+ uart .port .regshift = 2 ;
158
+
163
159
uart .dma = & data -> dma ;
164
160
uart .dma -> rxconf .src_maxburst = 1 ;
165
161
uart .dma -> txconf .dst_maxburst = 1 ;
0 commit comments