Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Mar 2013 20:16:07 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r247571 - head/sys/dev/puc
Message-ID:  <201303012016.r21KG7ne076007@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Fri Mar  1 20:16:06 2013
New Revision: 247571
URL: http://svnweb.freebsd.org/changeset/base/247571

Log:
  - Apparently, r186520 was just wrong and the clock of Oxford OX16PCI958 is
    neither DEFAULT_RCLK * 2 nor DEFAULT_RCLK * 10 but plain DEFAULT_RCLK
    and there's no (open) source indicating otherwise. This was tested with
    an EXSYS EX-41098-2, whose clock is not configurable and identifies as:
    puc0@pci0:5:1:0:        class=0x070200 card=0x06711415 chip=0x95381415 rev=0x01 hdr=0x00
        vendor     = 'Oxford Semiconductor Ltd'
        class      = simple comms
        subclass   = multiport serial
  
    Note that this exactly matches the card mentioned in PR 129665 so no
    sub-device/sub-vendor based quirking of the latter is possible. So maybe
    we should grow some sort of tunable, in case non-default cards such as
    the latter aren't configurable either (this also wouldn't be the first
    time an allegedly tested commit turns out to be wrong though).
  - Make the TiMedia tables const.
  
  MFC after:	1 week

Modified:
  head/sys/dev/puc/pucdata.c

Modified: head/sys/dev/puc/pucdata.c
==============================================================================
--- head/sys/dev/puc/pucdata.c	Fri Mar  1 19:55:10 2013	(r247570)
+++ head/sys/dev/puc/pucdata.c	Fri Mar  1 20:16:06 2013	(r247571)
@@ -769,7 +769,7 @@ const struct puc_cfg puc_pci_devices[] =
 
 	{   0x1415, 0x9538, 0xffff, 0,
 	    "Oxford Semiconductor OX16PCI958 UARTs",
-	    DEFAULT_RCLK * 10,
+	    DEFAULT_RCLK,
 	    PUC_PORT_8S, 0x18, 0, 8,
 	},
 
@@ -918,6 +918,7 @@ const struct puc_cfg puc_pci_devices[] =
 	    DEFAULT_RCLK * 8,
 	    PUC_PORT_4S, 0x10, 0, 8,
 	},
+
 	{   0x14d2, 0xa004, 0xffff, 0,
 	    "Titan PCI-800H",
 	    DEFAULT_RCLK * 8,
@@ -1060,7 +1061,7 @@ const struct puc_cfg puc_pci_devices[] =
 	{   0x9710, 0x9865, 0xa000, 0x3004,
 	    "NetMos NM9865 Quad UART",
 	    DEFAULT_RCLK,
-	    PUC_PORT_4S, 0x10, 4, 0,0
+	    PUC_PORT_4S, 0x10, 4, 0,
 	},
 
 	{   0x9710, 0x9865, 0xa000, 0x3011,
@@ -1420,26 +1421,26 @@ static int
 puc_config_timedia(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
     intptr_t *res)
 {
-	static uint16_t dual[] = {
+	static const uint16_t dual[] = {
 	    0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
 	    0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, 
 	    0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, 
 	    0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079,
 	    0xD079, 0
 	};
-	static uint16_t quad[] = {
+	static const uint16_t quad[] = {
 	    0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, 
 	    0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, 
 	    0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
 	    0xB157, 0
 	};
-	static uint16_t octa[] = {
+	static const uint16_t octa[] = {
 	    0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, 
 	    0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
 	};
-	static struct {
+	static const struct {
 		int ports;
-		uint16_t *ids;
+		const uint16_t *ids;
 	} subdevs[] = {
 	    { 2, dual },
 	    { 4, quad },



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