Loading drivers/tty/serial/msm_serial_hs.c +14 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include <linux/kernel.h> #include <linux/timer.h> #include <linux/clk.h> #include <linux/delay.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/dma-mapping.h> Loading Loading @@ -1237,16 +1238,27 @@ static void msm_hs_set_termios(struct uart_port *uport, unsigned int msm_hs_tx_empty(struct uart_port *uport) { unsigned int data; unsigned int isr; unsigned int ret = 0; struct msm_hs_port *msm_uport = UARTDM_TO_MSM(uport); msm_hs_resource_vote(msm_uport); data = msm_hs_read(uport, UART_DM_SR); isr = msm_hs_read(uport, UART_DM_ISR); msm_hs_resource_unvote(msm_uport); MSM_HS_DBG("%s(): SR Reg Read 0x%x", __func__, data); MSM_HS_INFO("%s(): SR:0x%x ISR:0x%x ", __func__, data, isr); if (data & UARTDM_SR_TXEMT_BMSK) if (data & UARTDM_SR_TXEMT_BMSK) { ret = TIOCSER_TEMT; } else /* * Add an extra sleep here because sometimes the framework's * delay (based on baud rate) isn't good enough. * Note that this won't happen during every port close, only * on select occassions when the userspace does back to back * write() and close(). */ usleep_range(5000, 7000); return ret; } Loading Loading
drivers/tty/serial/msm_serial_hs.c +14 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include <linux/kernel.h> #include <linux/timer.h> #include <linux/clk.h> #include <linux/delay.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/dma-mapping.h> Loading Loading @@ -1237,16 +1238,27 @@ static void msm_hs_set_termios(struct uart_port *uport, unsigned int msm_hs_tx_empty(struct uart_port *uport) { unsigned int data; unsigned int isr; unsigned int ret = 0; struct msm_hs_port *msm_uport = UARTDM_TO_MSM(uport); msm_hs_resource_vote(msm_uport); data = msm_hs_read(uport, UART_DM_SR); isr = msm_hs_read(uport, UART_DM_ISR); msm_hs_resource_unvote(msm_uport); MSM_HS_DBG("%s(): SR Reg Read 0x%x", __func__, data); MSM_HS_INFO("%s(): SR:0x%x ISR:0x%x ", __func__, data, isr); if (data & UARTDM_SR_TXEMT_BMSK) if (data & UARTDM_SR_TXEMT_BMSK) { ret = TIOCSER_TEMT; } else /* * Add an extra sleep here because sometimes the framework's * delay (based on baud rate) isn't good enough. * Note that this won't happen during every port close, only * on select occassions when the userspace does back to back * write() and close(). */ usleep_range(5000, 7000); return ret; } Loading