serial: uartps: Driver updates
Subsystems (2)
v2 cover serial: uartps: Driver updates
Hi,
I am sending 4 patches in series to fix some issues we found. Patches were sent separately but I have been asked to send them in serial that's why I am also adding cover letter to explain this v2 version.
Thanks,
Michal
Changes in v2:
- Change description based on request from Greg
- Fix Nava's email address to align with patch email address
Michal Simek (1):
serial: uartps: Fix error path when alloc failed
Nava kishore Manne (1):
serial: uartps: Fix interrupt mask issue to handle the RX interrupts
properly
Shubhrajyoti Datta (2):
serial: uartps: Add the device_init_wakeup
serial: uartps: Check if the device is a console
drivers/tty/serial/xilinx_uartps.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1
PATCH v2 1/4 serial: uartps: Add the device_init_wakeup
From: Shubhrajyoti Datta <[email protected]>
Initialise the device wakeup.
The device_init_wakeup is needed for the wakeup to work by default. Uart can be configured as the primary wakeup source so it is good to enable wakeup by default.
The same functionality is enabled also by 8250_omap, atmel_serial, omap-serial and stm32-usart.
---
Changes in v2:
- Change description based on request from Greg
drivers/tty/serial/xilinx_uartps.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/serial/xilinx_uartps.c +2 -0
@@ -1624,6 +1624,7 @@ static int cdns_uart_probe(struct platform_device *pdev)pm_runtime_set_autosuspend_delay (&pdev->dev,UART_AUTOSUSPEND_TIMEOUT );pm_runtime_set_active (&pdev->dev);pm_runtime_enable (&pdev->dev); +device_init_wakeup (port->dev, true);#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE /*
@@ -1702,6 +1703,7 @@ static int cdns_uart_remove(struct platform_device *pdev)pm_runtime_disable (&pdev->dev);pm_runtime_set_suspended (&pdev->dev);pm_runtime_dont_use_autosuspend (&pdev->dev); +device_init_wakeup (&pdev->dev, false);#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE if (console_port == port)
Signature · 1 line
1.9.1
PATCH v2 2/4 serial: uartps: Check if the device is a console
In reply to Michal SimekFrom: Shubhrajyoti Datta <[email protected]>
While checking for console_suspend_enabled also check if the device is a console.
---
Changes in v2: None
drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/xilinx_uartps.c +2 -2
@@ -1255,7 +1255,7 @@ static int cdns_uart_suspend(struct device *device) may_wake =device_may_wakeup (device); -if (console_suspend_enabled && may_wake) { +if (console_suspend_enabled &&uart_console (port) && may_wake) {unsigned long flags =0 ;spin_lock_irqsave (&port->lock, flags);
@@ -1293,7 +1293,7 @@ static int cdns_uart_resume(struct device *device) may_wake =device_may_wakeup (device); -if (console_suspend_enabled && !may_wake) { +if (console_suspend_enabled &&uart_console (port) && !may_wake) {clk_enable (cdns_uart->pclk);clk_enable (cdns_uart->uartclk);
Signature · 1 line
1.9.1
PATCH v2 3/4 serial: uartps: Fix error path when alloc failed
In reply to Michal SimekWhen cdns_uart_console allocation failed there is a need to also clear ID from ID list.
---
Changes in v2: None
drivers/tty/serial/xilinx_uartps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/tty/serial/xilinx_uartps.c +4 -2
@@ -1508,8 +1508,10 @@ static int cdns_uart_probe(struct platform_device *pdev)#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE cdns_uart_console =devm_kzalloc (&pdev->dev,sizeof (*cdns_uart_console),GFP_KERNEL ); -if (!cdns_uart_console) -return -ENOMEM ; +if (!cdns_uart_console) { + rc = -ENOMEM ; + goto err_out_id; + }strncpy (cdns_uart_console->name,CDNS_UART_TTY_NAME ,sizeof (cdns_uart_console->name));
Signature · 1 line
1.9.1
PATCH v2 4/4 serial: uartps: Fix interrupt mask issue to handle the RX interrupts properly
In reply to Michal SimekFrom: Nava kishore Manne <[email protected]>
This patch Correct the RX interrupt mask value to handle the RX interrupts properly.
---
Changes in v2:
- Fix Nava's email address to align with patch email address
drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/xilinx_uartps.c +2 -2
@@ -123,7 +123,7 @@#define CDNS_UART_IXR_RXTRIG 0x00000001/* RX FIFO trigger interrupt */ #define CDNS_UART_IXR_RXFULL 0x00000004/* RX FIFO full interrupt. */ #define CDNS_UART_IXR_RXEMPTY 0x00000002/* RX FIFO empty interrupt. */ -#define CDNS_UART_IXR_MASK 0x00001FFF/* Valid bit mask */ +#define CDNS_UART_IXR_RXMASK 0x000021e7/* Valid RX bit mask */ /* * Do not enable parity error interrupt for the following
@@ -364,7 +364,7 @@ static irqreturn_t cdns_uart_isr(int irq, void *dev_id)cdns_uart_handle_tx (dev_id); isrstatus &= ~CDNS_UART_IXR_TXEMPTY ; } -if (isrstatus &CDNS_UART_IXR_MASK ) +if (isrstatus &CDNS_UART_IXR_RXMASK )cdns_uart_handle_rx (dev_id, isrstatus);spin_unlock (&port->lock);
Signature · 1 line
1.9.1
Hello Michal,
Quoted 9 lines · Michal Simek
Hi,
I am sending 4 patches in series to fix some issues we found. Patches were sent separately but I have been asked to send them in serial that's why I am also adding cover letter to explain this v2 version.
Thanks,
Michal
I'm wondering why, when reading the linux-serial mailing list, I can only see this cover letter. Are you perhaps using a different To/Cc for the actual patches? And if so, is that on purpose?
Kind regards,
Maarten
Hi,
Quoted 10 lines · Maarten Brock
Hello Michal,
Quoted 7 lines · Michal Simek
Hi,
I am sending 4 patches in series to fix some issues we found. Patches were sent separately but I have been asked to send them in serial that's why I am also adding cover letter to explain this v2 version.
Quoted 8 lines
Quoted 2 lines
Thanks,
MichalI'm wondering why, when reading the linux-serial mailing list, I can only see this cover letter.
Are you perhaps using a different To/Cc for the actual patches? And if so, is that on purpose?
I have checked linux-serial mailing list and I see all of them there.
https://www.spinics.net/lists/linux-serial/
Individual here.
https://www.spinics.net/lists/linux-serial/msg32919.html
https://www.spinics.net/lists/linux-serial/msg32916.html
https://www.spinics.net/lists/linux-serial/msg32917.html
https://www.spinics.net/lists/linux-serial/msg32918.html
Also I see linux-serial@ in CC in all emails I have sent.
Thanks,
Michal
Quoted 31 lines · Michal Simek
Hi,
Quoted 10 lines · Maarten Brock
Hello Michal,
Quoted 7 lines · Michal Simek
Hi,
I am sending 4 patches in series to fix some issues we found. Patches were sent separately but I have been asked to send them in serial that's why I am also adding cover letter to explain this v2 version.
Quoted 8 lines
Quoted 2 lines
Thanks,
MichalI'm wondering why, when reading the linux-serial mailing list, I can only see this cover letter.
Are you perhaps using a different To/Cc for the actual patches? And if so, is that on purpose?I have checked linux-serial mailing list and I see all of them there.
https://www.spinics.net/lists/linux-serial/Individual here.
https://www.spinics.net/lists/linux-serial/msg32919.html
https://www.spinics.net/lists/linux-serial/msg32916.html
https://www.spinics.net/lists/linux-serial/msg32917.html
https://www.spinics.net/lists/linux-serial/msg32918.html
Quoted 4 lines
Also I see linux-serial@ in CC in all emails I have sent.
Thanks,
Michal
Thanks, I see them there too. But the odd thing is that I did not receive them in my mailbox. And I had noticed this before that I was missing your posts following a cover letter.
I normally do receive other peoples patches after a cover letter.
Maarten