Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1399622 > unrolled thread

[PATCH 0/3] msm_serial cleanups

Started byStephen Boyd <sboyd@codeaurora.org>
First post2016-05-12 03:10 +0200
Last post2016-05-12 03:10 +0200
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] msm_serial cleanups Stephen Boyd <sboyd@codeaurora.org> - 2016-05-12 03:10 +0200
    [PATCH 3/3] tty: serial: msm: Cleanup include usage Stephen Boyd <sboyd@codeaurora.org> - 2016-05-12 03:10 +0200
    [PATCH 2/3] tty: serial: msm: Only configure MND registers on hw that has it Stephen Boyd <sboyd@codeaurora.org> - 2016-05-12 03:10 +0200

#1399622 — [PATCH 0/3] msm_serial cleanups

FromStephen Boyd <sboyd@codeaurora.org>
Date2016-05-12 03:10 +0200
Subject[PATCH 0/3] msm_serial cleanups
Message-ID<rxNix-371-3@gated-at.bofh.it>
This is a small set of three patches that mostly gets rid
of the header file and protects us from a bad uartclk setting
if the stars align improperly (so far they haven't). I also
cleaned up the includes to protect us from any include
update fallout.

Stephen Boyd (3):
  tty: serial: msm: Move header file into driver
  tty: serial: msm: Only configure MND registers on hw that has it
  tty: serial: msm: Cleanup include usage

 drivers/tty/serial/msm_serial.c | 189 +++++++++++++++++++++++++++++++++++++---
 drivers/tty/serial/msm_serial.h | 184 --------------------------------------
 2 files changed, 179 insertions(+), 194 deletions(-)
 delete mode 100644 drivers/tty/serial/msm_serial.h

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [next] | [standalone]


#1399623 — [PATCH 3/3] tty: serial: msm: Cleanup include usage

FromStephen Boyd <sboyd@codeaurora.org>
Date2016-05-12 03:10 +0200
Subject[PATCH 3/3] tty: serial: msm: Cleanup include usage
Message-ID<rxNix-371-9@gated-at.bofh.it>
In reply to#1399622
The hrtimer include isn't used and neither is serial. Drop those
ones. The irq.h header really should be interrupt.h because this
is an interrupt user and not an interrupt chip. Finally add
wait.h for the wake_up*() usage in this driver and kernel.h for
container_of().

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/tty/serial/msm_serial.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index a051dc5def24..88af5a3d21dd 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -19,26 +19,26 @@
 # define SUPPORT_SYSRQ
 #endif
 
+#include <linux/kernel.h>
 #include <linux/atomic.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
-#include <linux/hrtimer.h>
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
-#include <linux/irq.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <linux/serial_core.h>
-#include <linux/serial.h>
 #include <linux/slab.h>
 #include <linux/clk.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/wait.h>
 
 #define UART_MR1			0x0000
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1399626 — [PATCH 2/3] tty: serial: msm: Only configure MND registers on hw that has it

FromStephen Boyd <sboyd@codeaurora.org>
Date2016-05-12 03:10 +0200
Subject[PATCH 2/3] tty: serial: msm: Only configure MND registers on hw that has it
Message-ID<rxNiy-371-11@gated-at.bofh.it>
In reply to#1399622
The registers that msm_serial_set_mnd_regs() writes only exist on
the non-uartdm hardware, so let's return early here if this
function is called on uartdm hardware. This also prevents us from
messing up the uartclk variable if the uartclk rate happens to be
19.2 or 4.8 MHz.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/tty/serial/msm_serial.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 28b8ac423de1..a051dc5def24 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -232,6 +232,15 @@ static void msm_serial_set_mnd_regs_tcxoby4(struct uart_port *port)
 
 static void msm_serial_set_mnd_regs(struct uart_port *port)
 {
+	struct msm_port *msm_port = UART_TO_MSM(port);
+
+	/*
+	 * These registers don't exist so we change the clk input rate
+	 * on uartdm hardware instead
+	 */
+	if (msm_port->is_uartdm)
+		return;
+
 	if (port->uartclk == 19200000)
 		msm_serial_set_mnd_regs_tcxo(port);
 	else if (port->uartclk == 4800000)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web