Page MenuHomeFreeBSD

D59512.1794881466.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D59512.1794881466.diff

diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c
--- a/sys/dev/puc/pucdata.c
+++ b/sys/dev/puc/pucdata.c
@@ -67,6 +67,7 @@
static puc_config_f puc_config_systembase;
static puc_config_f puc_config_timedia;
static puc_config_f puc_config_titan;
+static puc_config_f puc_config_wch_ch38x;
const struct puc_cfg puc_pci_devices[] = {
{ 0x0009, 0x7168, 0xffff, 0,
@@ -1504,6 +1505,14 @@
.config_function = puc_config_syba
},
+ { 0x1c00, 0x3253, 0xffff, 0,
+ "WCH CH382 2S PCIe Dual Port Serial",
+ DEFAULT_RCLK,
+ PUC_PORT_2S, 0x10, 0, -1,
+ .flags = PUC_FLAGS_NO_MSI,
+ .config_function = puc_config_wch_ch38x
+ },
+
{ 0x1fd4, 0x1999, 0x1fd4, 0x0002,
"Sunix SER5xxxx 2-port serial",
DEFAULT_RCLK * 8,
@@ -2337,3 +2346,14 @@
}
return (ENXIO);
}
+
+static int
+puc_config_wch_ch38x(struct puc_softc *sc __unused, enum puc_cfg_cmd cmd,
+ int port, intptr_t *res)
+{
+ if (cmd == PUC_CFG_GET_OFS) {
+ *res = 0xc0 + (port * 8);
+ return (0);
+ }
+ return (ENXIO);
+}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 17, 2:11 AM (2 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38872290
Default Alt Text
D59512.1794881466.diff (1 KB)

Event Timeline