Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2018 09:26:57 GMT
From:      miltonott <miltonott@fastmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Adding support for MosChip 9912 PCIe (serial/parallel) cards
Message-ID:  <201811240926.wAO9QvOC003283@euler.miltonslab.com>
In-Reply-To: 201811170804.wAH84AM1001846@euler.miltonslab.com
References:  201811170804.wAH84AM1001846@euler.miltonslab.com

next in thread | raw e-mail | index | archive | help
on Tue Mar 6 07:27:36 UTC 2018 -Andre wrote:

>> I am now using this diff to access the MCS9912. I  am  (mis)using
>> puc to initialise whatever is needed for the printer port to work
>> and let ppc attach to puc. As puc does not attach to single  port
>> devices, I have removed this check. uart works by  simply  adding
>> the device. This is all quite ugly but it works...

> miltonott wrote:
> My lord, may I please see the device.hints file you are now using.

  I am now able to establish a login session on a serial port using
the additions to /usr/src/sys/dev/uart/uart_bus_pci.c  provided  by
-Andre on March 2018.

The device appearance in the output of pciconf gives:
uart2@pci0:3:0:0:       class=0x070002 card=0x1000a000 chip=0x99129710 rev=0x00 hdr=0x00
    vendor     = 'MosChip Semiconductor Technology Ltd.'
    device     = 'PCIe 9912 Multi-I/O Controller'
    class      = simple comms
    subclass   = UART
uart3@pci0:3:0:1:       class=0x070002 card=0x1000a000 chip=0x99129710 rev=0x00 hdr=0x00
    vendor     = 'MosChip Semiconductor Technology Ltd.'
    device     = 'PCIe 9912 Multi-I/O Controller'
    class      = simple comms
    subclass   = UART

/var/run/dmesg.boot now gives:
uart2: <MosChip MCS9912 PCIe to Peripheral Controller> port 0xe030-0xe037 mem 0xf7c05000-0xf7c05fff,0xf7c04000-0xf7c04fff irq 17 at device 0.0 on pci2
uart2: fast interrupt
uart2: PPS capture mode: DCDinvalid
random: harvesting attach, 8 bytes (4 bits) from uart2
uart3: <MosChip MCS9912 PCIe to Peripheral Controller> port 0xe020-0xe027 mem 0xf7c03000-0xf7c03fff,0xf7c02000-0xf7c02fff irq 18 at device 0.1 on pci2
uart3: fast interrupt
uart3: PPS capture mode: DCDinvalid

$ /usr/bin/cu -l /dev/cuau3 gives:
FreeBSD/amd64 (fallacy) (ttyu0)

login:

Thanking you -Andre.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811240926.wAO9QvOC003283>