diff options
author | fjoe <fjoe@FreeBSD.org> | 2012-06-21 03:10:48 +0000 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2012-06-21 03:10:48 +0000 |
commit | 490b3d9fc0e140ab62f2a29cfa2993762442a1b5 (patch) | |
tree | 494f8b01325f6eec67bf15c4024fa132304ca8d8 | |
parent | 1cd76f76b0b8475afdce355e621acaf9dec5b099 (diff) | |
download | FreeBSD-src-490b3d9fc0e140ab62f2a29cfa2993762442a1b5.zip FreeBSD-src-490b3d9fc0e140ab62f2a29cfa2993762442a1b5.tar.gz |
Add support for the following Moxa PCIe multiport serial boards:
- CP102E
- CP102EL
- CP132EL
- CP114EL
- CP118EL-A
- CP168EL-A
MFC after: 1 week
-rw-r--r-- | sys/dev/puc/puc_cfg.h | 2 | ||||
-rw-r--r-- | sys/dev/puc/pucdata.c | 41 |
2 files changed, 39 insertions, 4 deletions
diff --git a/sys/dev/puc/puc_cfg.h b/sys/dev/puc/puc_cfg.h index 4c2c65e..f4969f64 100644 --- a/sys/dev/puc/puc_cfg.h +++ b/sys/dev/puc/puc_cfg.h @@ -79,7 +79,7 @@ struct puc_cfg { int8_t ports; int8_t rid; /* Rid of first port */ int8_t d_rid; /* Delta rid of next ports */ - int8_t d_ofs; /* Delta offset of next ports */ + int16_t d_ofs; /* Delta offset of next ports */ puc_config_f *config_function; }; diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index b682bba..c2084f7 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -507,6 +507,18 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_quatech }, + { 0x1393, 0x1024, 0xffff, 0, + "Moxa Technologies, Smartio CP-102E/PCIe", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x14, 0, 0x200 + }, + + { 0x1393, 0x1025, 0xffff, 0, + "Moxa Technologies, Smartio CP-102EL/PCIe", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x14, 0, 0x200, + }, + { 0x1393, 0x1040, 0xffff, 0, "Moxa Technologies, Smartio C104H/PCI", DEFAULT_RCLK * 8, @@ -550,6 +562,25 @@ const struct puc_cfg puc_pci_devices[] = { PUC_PORT_4S, 0x18, 0, 8, }, + { 0x1393, 0x1144, 0xffff, 0, + "Moxa Technologies, Smartio CP-114EL/PCIe", + DEFAULT_RCLK * 8, + PUC_PORT_4S, 0x14, 0, -1, + .config_function = puc_config_moxa + }, + + { 0x1393, 0x1182, 0xffff, 0, + "Moxa Technologies, Smartio CP-118EL-A/PCIe", + DEFAULT_RCLK * 8, + PUC_PORT_8S, 0x14, 0, 0x200, + }, + + { 0x1393, 0x1322, 0xffff, 0, + "Moxa Technologies, Smartio CP-132EL/PCIe", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x14, 0, 0x200, + }, + { 0x1393, 0x1680, 0xffff, 0, "Moxa Technologies, C168H/PCI", DEFAULT_RCLK * 8, @@ -568,6 +599,12 @@ const struct puc_cfg puc_pci_devices[] = { PUC_PORT_8S, 0x18, 0, 8, }, + { 0x1393, 0x1683, 0xffff, 0, + "Moxa Technologies, Smartio CP-168EL-A/PCIe", + DEFAULT_RCLK * 8, + PUC_PORT_8S, 0x14, 0, 0x200, + }, + { 0x13a8, 0x0152, 0xffff, 0, "Exar XR17C/D152", DEFAULT_RCLK * 8, @@ -1127,9 +1164,7 @@ static int puc_config_moxa(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { - const struct puc_cfg *cfg = sc->sc_cfg; - - if (cmd == PUC_CFG_GET_OFS && cfg->device == 0x1045) { + if (cmd == PUC_CFG_GET_OFS) { *res = ((port == 3) ? 7 : port) * 0x200; return 0; } |