Loading drivers/tty/serial/msm_geni_serial.c +19 −2 Original line number Diff line number Diff line Loading @@ -270,6 +270,8 @@ static void msm_geni_serial_set_manual_flow(bool enable, static bool handle_rx_dma_xfer(u32 s_irq_status, struct uart_port *uport); static int uart_line_id; static bool is_earlycon; #define GET_DEV_PORT(uport) \ container_of(uport, struct msm_geni_serial_port, uport) Loading Loading @@ -319,7 +321,14 @@ static int msm_geni_serial_spinlocked(struct uart_port *uport) static void msm_geni_serial_enable_interrupts(struct uart_port *uport) { unsigned int geni_m_irq_en, geni_s_irq_en; struct msm_geni_serial_port *port = GET_DEV_PORT(uport); struct msm_geni_serial_port *port = NULL; /* * Earlyconsole also uses this API and finds port is NULL, * hence add a protective check. */ if (!is_earlycon) port = GET_DEV_PORT(uport); geni_m_irq_en = geni_read_reg_nolog(uport->membase, SE_GENI_M_IRQ_EN); Loading @@ -331,7 +340,7 @@ static void msm_geni_serial_enable_interrupts(struct uart_port *uport) geni_write_reg_nolog(geni_m_irq_en, uport->membase, SE_GENI_M_IRQ_EN); geni_write_reg_nolog(geni_s_irq_en, uport->membase, SE_GENI_S_IRQ_EN); if (port->xfer_mode == SE_DMA) { if (port && port->xfer_mode == SE_DMA) { geni_write_reg_nolog(DMA_TX_IRQ_BITS, uport->membase, SE_DMA_TX_IRQ_EN_SET); geni_write_reg_nolog(DMA_RX_IRQ_BITS, uport->membase, Loading Loading @@ -2958,6 +2967,7 @@ msm_geni_serial_earlycon_setup(struct earlycon_device *dev, unsigned long clk_rate; unsigned long cfg0, cfg1; is_earlycon = true; if (!uport->membase) { ret = -ENOMEM; goto exit_geni_serial_earlyconsetup; Loading Loading @@ -3565,6 +3575,13 @@ static int msm_geni_serial_probe(struct platform_device *pdev) if (!uart_console(uport)) spin_lock_init(&dev_port->rx_lock); /* * Earlyconsole to kernel console will switch happen after * uart_add_one_port. Hence marking is_earlycon to false here. */ if (is_console) is_earlycon = false; IPC_LOG_MSG(dev_port->ipc_log_misc, "%s: port:%s irq:%d\n", __func__, uport->name, uport->irq); Loading Loading
drivers/tty/serial/msm_geni_serial.c +19 −2 Original line number Diff line number Diff line Loading @@ -270,6 +270,8 @@ static void msm_geni_serial_set_manual_flow(bool enable, static bool handle_rx_dma_xfer(u32 s_irq_status, struct uart_port *uport); static int uart_line_id; static bool is_earlycon; #define GET_DEV_PORT(uport) \ container_of(uport, struct msm_geni_serial_port, uport) Loading Loading @@ -319,7 +321,14 @@ static int msm_geni_serial_spinlocked(struct uart_port *uport) static void msm_geni_serial_enable_interrupts(struct uart_port *uport) { unsigned int geni_m_irq_en, geni_s_irq_en; struct msm_geni_serial_port *port = GET_DEV_PORT(uport); struct msm_geni_serial_port *port = NULL; /* * Earlyconsole also uses this API and finds port is NULL, * hence add a protective check. */ if (!is_earlycon) port = GET_DEV_PORT(uport); geni_m_irq_en = geni_read_reg_nolog(uport->membase, SE_GENI_M_IRQ_EN); Loading @@ -331,7 +340,7 @@ static void msm_geni_serial_enable_interrupts(struct uart_port *uport) geni_write_reg_nolog(geni_m_irq_en, uport->membase, SE_GENI_M_IRQ_EN); geni_write_reg_nolog(geni_s_irq_en, uport->membase, SE_GENI_S_IRQ_EN); if (port->xfer_mode == SE_DMA) { if (port && port->xfer_mode == SE_DMA) { geni_write_reg_nolog(DMA_TX_IRQ_BITS, uport->membase, SE_DMA_TX_IRQ_EN_SET); geni_write_reg_nolog(DMA_RX_IRQ_BITS, uport->membase, Loading Loading @@ -2958,6 +2967,7 @@ msm_geni_serial_earlycon_setup(struct earlycon_device *dev, unsigned long clk_rate; unsigned long cfg0, cfg1; is_earlycon = true; if (!uport->membase) { ret = -ENOMEM; goto exit_geni_serial_earlyconsetup; Loading Loading @@ -3565,6 +3575,13 @@ static int msm_geni_serial_probe(struct platform_device *pdev) if (!uart_console(uport)) spin_lock_init(&dev_port->rx_lock); /* * Earlyconsole to kernel console will switch happen after * uart_add_one_port. Hence marking is_earlycon to false here. */ if (is_console) is_earlycon = false; IPC_LOG_MSG(dev_port->ipc_log_misc, "%s: port:%s irq:%d\n", __func__, uport->name, uport->irq); Loading