Skip to content

Commit 20a875e

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
serial: 8250_dw: Add quirk for APM X-Gene SoC
The APM X-Gene SoC UART is the only board that still needs the hard-coded values, so handle it separately in dw8250_quirks(). The other ACPI platforms are able to provide the values with device properties. Signed-off-by: Heikki Krogerus <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a5565cf commit 20a875e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

drivers/tty/serial/8250/8250_dw.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,17 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
298298
p->serial_out = dw8250_serial_out32be;
299299
}
300300
} else if (has_acpi_companion(p->dev)) {
301-
p->iotype = UPIO_MEM32;
302-
p->regshift = 2;
303-
p->serial_in = dw8250_serial_in32;
301+
const struct acpi_device_id *id;
302+
303+
id = acpi_match_device(p->dev->driver->acpi_match_table,
304+
p->dev);
305+
if (id && !strcmp(id->id, "APMC0D08")) {
306+
p->iotype = UPIO_MEM32;
307+
p->regshift = 2;
308+
p->serial_in = dw8250_serial_in32;
309+
data->uart_16550_compatible = true;
310+
}
304311
p->set_termios = dw8250_set_termios;
305-
/* So far none of there implement the Busy Functionality */
306-
data->uart_16550_compatible = true;
307312
}
308313

309314
/* Platforms with iDMA */

0 commit comments

Comments
 (0)