Adding support for MosChip 9912 PCIe (serial/parallel) cards
Andre Albsmeier
Andre.Albsmeier at siemens.com
Fri Mar 2 06:23:31 UTC 2018
I have a MosChip 9912 card (PCIe card with 1 parallel and 2 serial
ports) sitting here which does not get detected on 11.1. I tried
to simply add it to the uart and ppc drivers with
--- sys/dev/uart/uart_bus_pci.c.ORI 2018-02-12 06:17:57.000000000 +0100
+++ sys/dev/uart/uart_bus_pci.c 2018-03-01 18:27:05.212040000 +0100
@@ -158,6 +158,8 @@
"MosChip MCS9904 PCIe to Peripheral Controller", 0x10 },
{ 0x9710, 0x9922, 0xa000, 0x1000,
"MosChip MCS9922 PCIe to Peripheral Controller", 0x10 },
+{ 0x9710, 0x9912, 0xa000, 0x1000,
+ "MosChip MCS9912 PCIe to Peripheral Controller", 0x10 },
{ 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 },
{ 0xffff, 0, 0xffff, 0, NULL, 0, 0}
};
and
--- sys/dev/ppc/ppc_pci.c.ORI 2017-09-03 17:55:53.000000000 +0200
+++ sys/dev/ppc/ppc_pci.c 2018-03-01 18:27:23.000000000 +0100
@@ -93,6 +93,7 @@
{ 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 },
{ 0x99009710, "MosChip MCS9900 PCIe to Peripheral Controller", 0x10 },
{ 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 },
+ { 0x99129710, "MosChip MCS9912 PCIe to Peripheral Controller", 0x10 },
{ 0xffff }
};
Now, when loading ppc.ko and uart.ko it gives me in dmesg:
ppc1: <MosChip MCS9912 PCIe to Peripheral Controller> port 0xd010-0xd017,0xd000-0xd007 mem 0x89201000-0x89201fff,0x89200000-0x89200fff irq 20 at device 0.2 on pci9
ppc1: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc1
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
driver bug: Unable to set devclass (class: ppc devname: (unknown))
ppc0: parallel port not found.
ppc0: parallel port not found.
uart2: <MosChip MCS9912 PCIe to Peripheral Controller> port 0xd030-0xd037 mem 0x89205000-0x89205fff,0x89204000-0x89204fff irq 22 at device 0.0 on pci9
uart3: <MosChip MCS9912 PCIe to Peripheral Controller> port 0xd020-0xd027 mem 0x89203000-0x89203fff,0x89202000-0x89202fff irq 23 at device 0.1 on pci9
driver bug: Unable to set devclass (class: uart devname: (unknown))
driver bug: Unable to set devclass (class: uart devname: (unknown))
driver bug: Unable to set devclass (class: ppc devname: (unknown))
uart4: <16550 or compatible> port 0x3e8-0x3ef irq 7 on acpi0
What am I missing here?
More information about the freebsd-hackers
mailing list