All of lore.kernel.org
 help / color / mirror / Atom feed
* Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+
@ 2015-10-28 15:56 Soeren Grunewald
  2015-11-06 17:37 ` Greg KH
  2015-11-11 15:22 ` Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+ Luis Henriques
  0 siblings, 2 replies; 5+ messages in thread
From: Soeren Grunewald @ 2015-10-28 15:56 UTC (permalink / raw)
  To: stable

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

-- 
Thanks,
Soeren

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+
  2015-10-28 15:56 Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+ Soeren Grunewald
@ 2015-11-06 17:37 ` Greg KH
  2015-11-07 11:06   ` Soeren Grunewald
  2015-11-11 15:22 ` Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+ Luis Henriques
  1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2015-11-06 17:37 UTC (permalink / raw)
  To: Soeren Grunewald; +Cc: stable

On Wed, Oct 28, 2015 at 04:56:59PM +0100, Soeren Grunewald wrote:
> 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.

>   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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+
  2015-11-06 17:37 ` Greg KH
@ 2015-11-07 11:06   ` Soeren Grunewald
  2015-11-07 11:06     ` [PATCH] serial: 8250_pci: Correct uartclk for xr17v35x expansion chips Soeren Grunewald
  0 siblings, 1 reply; 5+ messages in thread
From: Soeren Grunewald @ 2015-11-07 11:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable

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.

-- 
Thanks,
Soeren


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] serial: 8250_pci: Correct uartclk for xr17v35x expansion chips
  2015-11-07 11:06   ` Soeren Grunewald
@ 2015-11-07 11:06     ` Soeren Grunewald
  0 siblings, 0 replies; 5+ messages in thread
From: Soeren Grunewald @ 2015-11-07 11:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable

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.

Signed-off-by: Soeren Grunewald <soeren.grunewald@desy.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/8250/8250_pci.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index eb8adc2..46ddce4 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -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
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+
  2015-10-28 15:56 Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+ Soeren Grunewald
  2015-11-06 17:37 ` Greg KH
@ 2015-11-11 15:22 ` Luis Henriques
  1 sibling, 0 replies; 5+ messages in thread
From: Luis Henriques @ 2015-11-11 15:22 UTC (permalink / raw)
  To: Soeren Grunewald; +Cc: stable

On Wed, Oct 28, 2015 at 04:56:59PM +0100, Soeren Grunewald wrote:
> 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
> 
> -- 
> Thanks,
> Soeren
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-11 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28 15:56 Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+ Soeren Grunewald
2015-11-06 17:37 ` Greg KH
2015-11-07 11:06   ` Soeren Grunewald
2015-11-07 11:06     ` [PATCH] serial: 8250_pci: Correct uartclk for xr17v35x expansion chips Soeren Grunewald
2015-11-11 15:22 ` Request for inclusion of mainline 96a5d18, be32c0c and 899f0c1 for 3.13+ Luis Henriques

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.