Bug 205359 - Add support for Advantech PCI-1602 rev B board and PCI-1603
Summary: Add support for Advantech PCI-1602 rev B board and PCI-1603
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-12-16 20:51 UTC by Jan Martin Mikkelsen
Modified: 2017-05-10 20:26 UTC (History)
2 users (show)

See Also:


Attachments
Support Advantech PCI-1602A, PCI-1602B and PCI-1603 with RS-422 and RS-485 auto-turnaround (3.58 KB, text/plain)
2015-12-16 20:51 UTC, Jan Martin Mikkelsen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Martin Mikkelsen 2015-12-16 20:51:34 UTC
Created attachment 164293 [details]
Support Advantech PCI-1602A, PCI-1602B and PCI-1603 with RS-422 and RS-485 auto-turnaround

Advantech have a PCI-1602 rev B board, updating the Advantech PCI-1602 which is currently supported by puc(4). The PCI-1602B also has the same PCI ID as the PCI-1603 but has different configuration requirements.

The attached patch supports all three boards, and configures the PCI-1602B board to correctly do RS-422/RS-485 auto-turnaround.
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-01-10 18:11:30 UTC
A commit references this bug:

Author: marius
Date: Sun Jan 10 18:11:24 UTC 2016
New revision: 293642
URL: https://svnweb.freebsd.org/changeset/base/293642

Log:
  - Add support for Advantech PCI-1602 Rev. B1 and PCI-1603 cards. [1]
  - Add a description of Advantech PCI-1602 Rev. A boards. [1]
  - Properly set up REG_ACR also for PCI-1602 Rev. A based on what the
    Advantech-supplied Linux driver does.
  - Additionally use the macros of <dev/ic/ns16550.h> to replace existing
    magic values and get rid of trivial comments.
  - Fix the style of some comments.

  PR:		205359 [1]
  Submitted by:	Jan Mikkelsen (original patch) [1]

Changes:
  head/sys/dev/ic/ns16550.h
  head/sys/dev/puc/pucdata.c
Comment 2 Marius Strobl freebsd_committer freebsd_triage 2016-01-10 18:13:42 UTC
Please give r293642 a try, which uses a generalized version of puc_config_advantech() suitable to be extended for additional Advantech cards.
Comment 3 Jan Martin Mikkelsen 2016-02-01 22:06:54 UTC
(In reply to Marius Strobl from comment #2)

Thanks for the update Marius. I will import into our tree and test.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-05-10 20:12:54 UTC
A commit references this bug:

Author: marius
Date: Wed May 10 20:12:23 UTC 2017
New revision: 318151
URL: https://svnweb.freebsd.org/changeset/base/318151

Log:
  MFC: r293642

  - Add support for Advantech PCI-1602 Rev. B1 and PCI-1603 cards. [1]
  - Add a description of Advantech PCI-1602 Rev. A boards. [1]
  - Properly set up REG_ACR also for PCI-1602 Rev. A based on what the
    Advantech-supplied Linux driver does.
  - Additionally use the macros of <dev/ic/ns16550.h> to replace existing
    magic values and get rid of trivial comments.
  - Fix the style of some comments.

  PR:		205359 [1]
  Submitted by:	Jan Mikkelsen (original patch) [1]

Changes:
  stable/10/sys/dev/ic/ns16550.h
  stable/10/sys/dev/puc/pucdata.c