lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1525775252-239214-4-git-send-email-john.garry@huawei.com>
Date:   Tue, 8 May 2018 18:27:32 +0800
From:   John Garry <john.garry@...wei.com>
To:     <xuwei5@...wei.com>, <mika.westerberg@...ux.intel.com>,
        <andriy.shevchenko@...ux.intel.com>, <lee.jones@...aro.org>
CC:     <rjw@...ysocki.net>, <linux-kernel@...r.kernel.org>,
        <arnd@...db.de>, <graeme.gregory@...aro.org>, <helgaas@...nel.org>,
        <z.liuxinliang@...ilicon.com>, <linuxarm@...wei.com>,
        John Garry <john.garry@...wei.com>
Subject: [PATCH v2 3/3] HISI LPC: Add ACPI UART support

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@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ