mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: linux-kernel@vger.kernel.org, Matt Turner <mattst88@gmail.com>,
	Sergej Pupykin <ml@sergej.pp.ru>
Subject: [PATCH] parport: Add support for the WCH384 4S multi-IO card
Date: Sat, 26 May 2018 12:35:23 -0700	[thread overview]
Message-ID: <20180526193523.3896-1-mattst88@gmail.com> (raw)

This Multi-IO card has one serial 16550-like serial connectors. Here's
the lspci output, after this commit is applied:

01:00.0 Serial controller [0700]: Device [1c00:3470] (rev 10) (prog-if 05 [16850])
        Subsystem: Device [1c00:3470]
        Flags: fast devsel, IRQ 16
        I/O ports at e000 [size=256]
        Memory at f0100000 (32-bit, prefetchable) [size=32K]
        I/O ports at e100 [size=4]
        Expansion ROM at f7d00000 [disabled] [size=32K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/32 Maskable+ 64bit+
        Capabilities: [80] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Kernel driver in use: parport_serial

This card was already added to the blacklist of 8250_pci.c in commit
72a3c0e4e662 ("tty: Add support for the WCH384 4S multi-IO card").

Cc: Sergej Pupykin <ml@sergej.pp.ru>
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
It looks like CH355_4S is similarly missing, but I don't have hardware
to test.

This commit makes me wonder if I'm missing something -- how could
anything have worked after commit 72a3c0e4e662 without support in
parport_serial?

 drivers/parport/parport_serial.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index e15b4845f7c6..2c166d5a0d91 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -65,6 +65,7 @@ enum parport_pc_pci_cards {
 	wch_ch353_1s1p,
 	wch_ch353_2s1p,
 	wch_ch382_2s1p,
+	wch_ch384_4,
 	sunix_2s1p,
 };
 
@@ -153,6 +154,7 @@ static struct parport_pc_pci cards[] = {
 	/* wch_ch353_1s1p*/             { 1, { { 1, -1}, } },
 	/* wch_ch353_2s1p*/             { 1, { { 2, -1}, } },
 	/* wch_ch382_2s1p*/             { 1, { { 2, -1}, } },
+	/* wch_ch384_4 */               { 1, { { 4, -1}, } },
 	/* sunix_2s1p */                { 1, { { 3, -1 }, } },
 };
 
@@ -260,6 +262,7 @@ static struct pci_device_id parport_serial_pci_tbl[] = {
 	{ 0x4348, 0x5053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p},
 	{ 0x4348, 0x7053, 0x4348, 0x3253, 0, 0, wch_ch353_2s1p},
 	{ 0x1c00, 0x3250, 0x1c00, 0x3250, 0, 0, wch_ch382_2s1p},
+	{ 0x1c00, 0x3470, PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch384_4},
 
 	/*
 	 * More SUNIX variations. At least one of these has part number
@@ -504,6 +507,13 @@ static struct pciserial_board pci_parport_serial_boards[] = {
 		.uart_offset    = 8,
 		.first_offset   = 0xC0,
 	},
+	[wch_ch384_4] = {
+		.flags          = FL_BASE0,
+		.num_ports      = 4,
+		.base_baud      = 115200,
+		.uart_offset    = 8,
+		.first_offset   = 0xC0,
+	},
 	[sunix_2s1p] = {
 		.flags		= FL_BASE0|FL_BASE_BARS,
 		.num_ports	= 2,
-- 
2.16.1

             reply	other threads:[~2018-05-26 19:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26 19:35 Matt Turner [this message]
2018-06-06  6:07 ` Matt Turner
2018-06-06 17:04   ` Andy Shevchenko
2018-06-06 17:07     ` Andy Shevchenko
2018-06-06 17:57 ` Andy Shevchenko
2018-07-05 22:17 ` Sudip Mukherjee
2018-07-06 15:32   ` Matt Turner

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=20180526193523.3896-1-mattst88@gmail.com \
    --to=mattst88@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ml@sergej.pp.ru \
    --cc=sudipm.mukherjee@gmail.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®