From: Wang YanQing <udknight@gmail.com>
To: gregkh@linuxfoundation.org
Cc: swarren@wwwdotorg.org, jslaby@suse.cz, alan@linux.intel.com,
arnd@arndb.de, paul.gortmaker@windriver.com, damm@opensource.se,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH]8250_pci: Add additional WCH CH352 device
Date: Sat, 2 Mar 2013 17:45:55 +0800 [thread overview]
Message-ID: <20130302094555.GA9572@udknight> (raw)
This patch fix a problem XScale port
detect code in autoconfig_16550a treat
16550A port as XScale port, caused by
CH352 device use the 6th bit(UART_IER_UUE)
in IER as a enhance function make this bit
w/r.
for the below device:
"
01:08.0 Serial controller: Device 4348:3253 (rev 10) (prog-if 02 [16550])
Subsystem: Device 4348:3253
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 20
Region 0: I/O ports at e010 [size=8]
Region 1: I/O ports at e000 [size=8]
Kernel driver in use: serial
"
[Note: I haven't test this patch, because I can't
access the hardware now, but it should be right]
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
drivers/tty/serial/8250/8250_pci.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index ebcc362..be45d39 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1557,6 +1557,7 @@ pci_wch_ch353_setup(struct serial_private *priv,
#define PCI_DEVICE_ID_WCH_CH353_4S 0x3453
#define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046
#define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053
+#define PCI_DEVICE_ID_WCH_CH352_2S 0x3253
#define PCI_VENDOR_ID_AGESTAR 0x5372
#define PCI_DEVICE_ID_AGESTAR_9375 0x6872
#define PCI_VENDOR_ID_ASIX 0x9710
@@ -2180,6 +2181,14 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
.subdevice = PCI_ANY_ID,
.setup = pci_wch_ch353_setup,
},
+ /* WCH CH352 2S card (16550 clone) */
+ {
+ .vendor = PCI_VENDOR_ID_WCH,
+ .device = PCI_DEVICE_ID_WCH_CH352_2S,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ .setup = pci_wch_ch353_setup,
+ },
/*
* ASIX devices with FIFO bug
*/
@@ -4873,6 +4882,10 @@ static struct pci_device_id serial_pci_tbl[] = {
PCI_ANY_ID, PCI_ANY_ID,
0, 0, pbn_b0_bt_2_115200 },
+ { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH352_2S,
+ PCI_ANY_ID, PCI_ANY_ID,
+ 0, 0, pbn_b0_bt_2_115200 },
+
/*
* Commtech, Inc. Fastcom adapters
*/
--
1.7.11.1.116.g8228a23
next reply other threads:[~2013-03-02 9:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-02 9:45 Wang YanQing [this message]
2013-03-04 1:11 ` [PATCH]8250_pci: Add additional WCH CH352 device Wang YanQing
2013-03-05 14:19 ` Paul Gortmaker
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=20130302094555.GA9572@udknight \
--to=udknight@gmail.com \
--cc=alan@linux.intel.com \
--cc=arnd@arndb.de \
--cc=damm@opensource.se \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=swarren@wwwdotorg.org \
/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;
as well as URLs for NNTP newsgroup(s).