Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-06-19 15:19:26 +0200
committerTakashi Iwai <tiwai@suse.de>2019-06-19 15:19:26 +0200
commitf04fcd0bdf31acd6f562d741796cda1bd6f3cc57 (patch)
tree40f1e822cd5b67475eef483c01b80a9b0ad2d1ca
parent8e9ff58b64c2afc67be0ad6d174aa776c90beec4 (diff)
tty: max310x: Fix external crystal register setup (bsc#1051510).
-rw-r--r--patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch47
-rw-r--r--series.conf1
2 files changed, 48 insertions, 0 deletions
diff --git a/patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch b/patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch
new file mode 100644
index 0000000000..367a6290e5
--- /dev/null
+++ b/patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch
@@ -0,0 +1,47 @@
+From 5d24f455c182d5116dd5db8e1dc501115ecc9c2c Mon Sep 17 00:00:00 2001
+From: Joe Burmeister <joe.burmeister@devtank.co.uk>
+Date: Mon, 13 May 2019 11:23:57 +0100
+Subject: [PATCH] tty: max310x: Fix external crystal register setup
+Git-commit: 5d24f455c182d5116dd5db8e1dc501115ecc9c2c
+Patch-mainline: v5.2-rc3
+References: bsc#1051510
+
+The datasheet states:
+
+ Bit 4: ClockEnSet the ClockEn bit high to enable an external clocking
+(crystal or clock generator at XIN). Set the ClockEn bit to 0 to disable
+clocking
+ Bit 1: CrystalEnSet the CrystalEn bit high to enable the crystal
+oscillator. When using an external clock source at XIN, CrystalEn must
+be set low.
+
+The bit 4, MAX310X_CLKSRC_EXTCLK_BIT, should be set and was not.
+
+This was required to make the MAX3107 with an external crystal on our
+board able to send or receive data.
+
+Signed-off-by: Joe Burmeister <joe.burmeister@devtank.co.uk>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/tty/serial/max310x.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
+index 450ba6d7996c..e5aebbf5f302 100644
+--- a/drivers/tty/serial/max310x.c
++++ b/drivers/tty/serial/max310x.c
+@@ -581,7 +581,7 @@ static int max310x_set_ref_clk(struct device *dev, struct max310x_port *s,
+ }
+
+ /* Configure clock source */
+- clksrc = xtal ? MAX310X_CLKSRC_CRYST_BIT : MAX310X_CLKSRC_EXTCLK_BIT;
++ clksrc = MAX310X_CLKSRC_EXTCLK_BIT | (xtal ? MAX310X_CLKSRC_CRYST_BIT : 0);
+
+ /* Configure PLL */
+ if (pllcfg) {
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 248d98e71d..2ed92a9b76 100644
--- a/series.conf
+++ b/series.conf
@@ -22542,6 +22542,7 @@
patches.drivers/usbip-usbip_host-fix-stub_dev-lock-context-imbalance.patch
patches.drivers/tty-serial-msm_serial-Fix-XON-XOFF.patch
patches.drivers/serial-sh-sci-disable-DMA-for-uart_console.patch
+ patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch
patches.drivers/staging-wlan-ng-fix-adapter-initialization-failure.patch
patches.drivers/Staging-vc04_services-Fix-a-couple-error-codes.patch
patches.drivers/staging-vc04_services-prevent-integer-overflow-in-cr.patch