parport-pci: NetMos MCS9900 PCI parallel port with IEEE 1284 reverse#232
Open
SolAstrius wants to merge 3 commits into
Open
parport-pci: NetMos MCS9900 PCI parallel port with IEEE 1284 reverse#232SolAstrius wants to merge 3 commits into
SolAstrius wants to merge 3 commits into
Conversation
Signed-off-by: Sol Astrius <sol@astrius.ink>
e33b7e8 to
9762f63
Compare
Signed-off-by: Sol Astrius <sol@astrius.ink>
9762f63 to
64a57c9
Compare
Signed-off-by: Sol Astrius Phoenix <me@danielsol.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a NetMos / MosChip MCS9900 PCI parallel port — a single SPP port plus the IEEE 1284 nibble-mode reverse channel — and wires up CLI flags to drive it. Builds on the I/O-port BAR + per-function subsystem-ID support merged in #225.
Device
PCI identity matches the MCS9900 datasheet (ASIX Rev 2.00, §6.2, the 2S+1P parallel function): vendor
0x9710, device0x9900, class0701h, subsystem0xA000:0x2000. BAR 0 is an I/O-port BAR (PCI Local Bus Spec 3.0 §6.2.5.1) holding the 8-byte SPP register window (Data / Status / Control + EPP/ECP stubs). The subsystem IDs (PCI §6.2.4) are what a host driver strict-matches on to bind.nFaultsignals end-of-data when it drains.CLI
A single
-parport <spec>flag (structured value, like-portfwd/-res):-parport null— attach with no backend.-parport <path>— bare path shorthand; guest output is sinked to that file.-parport out=<path>,in=<path>—out=sinks guest (forward/Centronics) output to a file/pipe;in=sources the IEEE 1284 reverse channel from a file/fifo (a reader thread feeds bytes into the ring). Either field may be omitted.Notes
prog_if 0x00(SPP); the silicon reports0x03(IEEE 1284 controller). SPP is sufficient for a host driver to bind and use the nibble reverse channel.parport_pci_removeclears the instance from the lookup map before freeing, so a reusedpci_dev_taddress can't resolve to a freed device.Test plan
Verified on an Alpine RISC-V guest (kernel with parallel-port + ppdev support):
echoto the printer node lands in the host sink file-parport_in→ guestcat) deliver bytes intact