Skip to contentSkip to conversation

Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+

PATCH New Soeren Grunewald 3 participants 5 messages Oct 28, 2015 – Nov 11, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi All,

I would like to ask you to queue the following mainline serial driver commits for 3.13+ stable. From 4.1 release:

96a5d18 serial: 8250_pci: Add support for 16 port Exar boards

And from 4.2 release:

be32c0c serial: 8250_pci: Add support for 12 port Exar boards 899f0c1 serial: 8250_pci: Correct uartclk for xr17v35x expansion chips

Signature · 2 lines
Thanks,
Soeren
maintainer
#1 lore raw
Quoted 10 lines · Soeren Grunewald

Hi All,

I would like to ask you to queue the following mainline serial driver commits for 3.13+ stable. From 4.1 release:

96a5d18 serial: 8250_pci: Add support for 16 port Exar boards

And from 4.2 release:

be32c0c serial: 8250_pci: Add support for 12 port Exar boards

These two worked, thanks.

Quoted 1 line

899f0c1 serial: 8250_pci: Correct uartclk for xr17v35x expansion chips

This one does not apply to 4.1, can you provide a backport?

thanks,

greg k-h

#2 lore raw

Hi Greg,

Here the backported patch linux-4.1.y. The conflict was caused by the backport 5fe45c8dbe3f1927db62fbbbc37b64cbe41967b4 - serial: 8250_pci: Add support for Pericom PI7C9X795[1248]

I only made a test build for the change, but I see not problems since the conflict was in the part where the defines of the device-ids are moved.

Signature · 2 lines
Thanks,
Soeren
#3 lore raw

PATCH 1/1 serial: 8250_pci: Correct uartclk for xr17v35x expansion chips

The internal clock of the master chip, which is usually 125MHz, is only half (62.5MHz) for the slave chips. So we have to adjust the uartclk for all the slave ports. Therefor we add a new function to determine if a slave chip is present and update pci_xr17v35x_setup accordingly.

---
 drivers/tty/serial/8250/8250_pci.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
drivers/tty/serial/8250/8250_pci.c +19 -3
index eb8adc2..46ddce4 100644
@@ -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,
@@ -1846,6 +1858,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.
 	 */
 	if (idx == 0) {
@@ -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
-
 #define PCI_VENDOR_ID_PERICOM			0x12D8
 #define PCI_DEVICE_ID_PERICOM_PI7C9X7951	0x7951
 #define PCI_DEVICE_ID_PERICOM_PI7C9X7952	0x7952
Signature · 1 line
2.4.3
#4 lore raw
In reply to Soeren Grunewald
Quoted 5 lines · Soeren Grunewald

Hi All,

I would like to ask you to queue the following mainline serial driver commits for 3.13+ stable. From 4.1 release:

Quoted 14 lines

96a5d18 serial: 8250_pci: Add support for 16 port Exar boards

And from 4.2 release:

be32c0c serial: 8250_pci: Add support for 12 port Exar boards 899f0c1 serial: 8250_pci: Correct uartclk for xr17v35x expansion chips

Signature · 6 lines
Thanks,
Soeren
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks, I'll queue these patches for the 3.16 kernel.

Cheers,
--
Lu�s