|
@@ -1823,6 +1823,9 @@ static int pci_eg20t_init(struct pci_dev *dev)
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
+#define PCI_DEVICE_ID_EXAR_XR17V4358 0x4358
|
|
|
+#define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358
|
|
|
+
|
|
|
static int
|
|
|
pci_xr17c154_setup(struct serial_private *priv,
|
|
|
const struct pciserial_board *board,
|
|
@@ -1832,6 +1835,15 @@ pci_xr17c154_setup(struct serial_private *priv,
|
|
|
return pci_default_setup(priv, board, port, idx);
|
|
|
}
|
|
|
|
|
|
+static inline int
|
|
|
+xr17v35x_has_slave(struct serial_private *priv)
|
|
|
+{
|
|
|
+ const int dev_id = priv->dev->device;
|
|
|
+
|
|
|
+ return ((dev_id == PCI_DEVICE_ID_EXAR_XR17V4358) ||
|
|
|
+ (dev_id == PCI_DEVICE_ID_EXAR_XR17V8358));
|
|
|
+}
|
|
|
+
|
|
|
static int
|
|
|
pci_xr17v35x_setup(struct serial_private *priv,
|
|
|
const struct pciserial_board *board,
|
|
@@ -1845,6 +1857,13 @@ pci_xr17v35x_setup(struct serial_private *priv,
|
|
|
|
|
|
port->port.flags |= UPF_EXAR_EFR;
|
|
|
|
|
|
+ /*
|
|
|
+ * Setup the uart clock for the devices on expansion slot to
|
|
|
+ * half the clock speed of the main chip (which is 125MHz)
|
|
|
+ */
|
|
|
+ if (xr17v35x_has_slave(priv) && idx >= 8)
|
|
|
+ port->port.uartclk = (7812500 * 16 / 2);
|
|
|
+
|
|
|
/*
|
|
|
* Setup Multipurpose Input/Output pins.
|
|
|
*/
|
|
@@ -1998,9 +2017,6 @@ pci_wch_ch38x_setup(struct serial_private *priv,
|
|
|
#define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250
|
|
|
#define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470
|
|
|
|
|
|
-#define PCI_DEVICE_ID_EXAR_XR17V4358 0x4358
|
|
|
-#define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358
|
|
|
-
|
|
|
/* Unknown vendors/cards - this should not be in linux/pci_ids.h */
|
|
|
#define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
|
|
|
#define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
|