From: John Garry <john.garry@huawei.com>
To: <xuwei5@huawei.com>, <mika.westerberg@linux.intel.com>,
<andriy.shevchenko@linux.intel.com>, <lee.jones@linaro.org>
Cc: <rjw@rjwysocki.net>, <linux-kernel@vger.kernel.org>,
<arnd@arndb.de>, <graeme.gregory@linaro.org>,
<helgaas@kernel.org>, <z.liuxinliang@hisilicon.com>,
<linuxarm@huawei.com>, John Garry <john.garry@huawei.com>
Subject: [PATCH v2 3/3] HISI LPC: Add ACPI UART support
Date: Tue, 8 May 2018 18:27:32 +0800 [thread overview]
Message-ID: <1525775252-239214-4-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1525775252-239214-1-git-send-email-john.garry@huawei.com>
On the Huawei D03 development board the system UART is
the UART connected on the LPC bus.
The profile for the device driver required for this HW
is as follows:
- platform driver
- 16550
- ACPI support
- polling mode support
- IO space support
In principle we should use the PNP driver (8250_dw.c) for
8250-devices with ACPI FW. However since this driver does
not support PNP devices, and modifying the PNP core code
to support it is not worth the effort, use the generic
8250 isa driver.
For this, we setup the pdev platform data for the serial
8250 port.
Signed-off-by: John Garry <john.garry@huawei.com>
---
drivers/bus/hisi_lpc.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c
index eb5b3fc..d5f8545 100644
--- a/drivers/bus/hisi_lpc.c
+++ b/drivers/bus/hisi_lpc.c
@@ -16,6 +16,7 @@
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/pci.h>
+#include <linux/serial_8250.h>
#include <linux/slab.h>
#define DRV_NAME "hisi-lpc"
@@ -493,6 +494,22 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
.hid = "IPI0001",
.name = "hisi-lpc-ipmi",
},
+ /* 8250-compatible uart */
+ {
+ .hid = "HISI1031",
+ .name = "serial8250",
+ .pdata = (struct plat_serial8250_port []) {
+ {
+ .iobase = res->start,
+ .uartclk = 1843200,
+ .iotype = UPIO_PORT,
+ .flags = UPF_BOOT_AUTOCONF,
+ },
+ {}
+ },
+ .pdata_size = 2 *
+ sizeof(struct plat_serial8250_port),
+ },
{}
};
--
1.9.1
next prev parent reply other threads:[~2018-05-08 10:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 10:27 [PATCH v2 0/3] HISI LPC " John Garry
2018-05-08 10:27 ` [PATCH v2 1/3] HISI LPC: Stop using MFD APIs John Garry
2018-05-08 10:27 ` [PATCH v2 2/3] HISI LPC: Re-Add ACPI child enumeration support John Garry
2018-05-08 10:27 ` John Garry [this message]
2018-05-08 11:17 ` [PATCH v2 0/3] HISI LPC ACPI UART support Andy Shevchenko
2018-05-09 14:48 ` John Garry
2018-05-11 14:02 ` Wei Xu
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=1525775252-239214-4-git-send-email-john.garry@huawei.com \
--to=john.garry@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=graeme.gregory@linaro.org \
--cc=helgaas@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
--cc=xuwei5@huawei.com \
--cc=z.liuxinliang@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®