From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heikki Krogerus Subject: [PATCHv2 3/3] serial: 8250_dw: Add quirk for APM X-Gene SoC Date: Tue, 23 Aug 2016 11:33:28 +0300 Message-ID: <1471941208-27963-4-git-send-email-heikki.krogerus@linux.intel.com> References: <1471941208-27963-1-git-send-email-heikki.krogerus@linux.intel.com> Return-path: Received: from mga06.intel.com ([134.134.136.31]:47802 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753181AbcHWIe6 (ORCPT ); Tue, 23 Aug 2016 04:34:58 -0400 In-Reply-To: <1471941208-27963-1-git-send-email-heikki.krogerus@linux.intel.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: Andy Shevchenko , Kefeng Wang , linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org, Feng Kan 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 Cc: Feng Kan --- drivers/tty/serial/8250/8250_dw.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index e199696..5c0c123 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -298,12 +298,17 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) p->serial_out = dw8250_serial_out32be; } } else if (has_acpi_companion(p->dev)) { - p->iotype = UPIO_MEM32; - p->regshift = 2; - p->serial_in = dw8250_serial_in32; + const struct acpi_device_id *id; + + id = acpi_match_device(p->dev->driver->acpi_match_table, + p->dev); + if (id && !strcmp(id->id, "APMC0D08")) { + p->iotype = UPIO_MEM32; + p->regshift = 2; + p->serial_in = dw8250_serial_in32; + data->uart_16550_compatible = true; + } p->set_termios = dw8250_set_termios; - /* So far none of there implement the Busy Functionality */ - data->uart_16550_compatible = true; } /* Platforms with iDMA */ -- 2.8.1