From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
Feng Kan <fkan@apm.com>
Subject: [PATCH 3/3] serial: 8250_dw: Add quirk for APM X-Gene SoC
Date: Mon, 22 Aug 2016 17:24:15 +0300 [thread overview]
Message-ID: <1471875855-110782-4-git-send-email-heikki.krogerus@linux.intel.com> (raw)
In-Reply-To: <1471875855-110782-1-git-send-email-heikki.krogerus@linux.intel.com>
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 <heikki.krogerus@linux.intel.com>
Cc: Feng Kan <fkan@apm.com>
---
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
prev parent reply other threads:[~2016-08-22 14:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-22 14:24 [PATCH 0/3] serial: dw8250: ACPI tuning Heikki Krogerus
2016-08-22 14:24 ` [PATCH 1/3] ACPI / APD: Provide build-in properties of the UART Heikki Krogerus
2016-08-22 15:00 ` kbuild test robot
2016-08-23 6:37 ` Heikki Krogerus
2016-08-22 16:01 ` kbuild test robot
2016-08-22 14:24 ` [PATCH 2/3] ACPI / LPSS: " Heikki Krogerus
2016-08-23 7:03 ` Mika Westerberg
2016-08-22 14:24 ` Heikki Krogerus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471875855-110782-4-git-send-email-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=fkan@apm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=wangkefeng.wang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.