Commit 408e532e authored by Vijaya Krishna Nivarthi's avatar Vijaya Krishna Nivarthi Committed by Greg Kroah-Hartman

tty: serial: qcom-geni-serial: Replace hardcoded icc flags with macros.

In suspend/resume routines, icc flags are hardcoded.

Replace the hardcodes with macros available from header.
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarVijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Link: https://lore.kernel.org/r/1662564702-7253-1-git-send-email-quic_vnivarth@quicinc.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 35f2e3c2
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
#include <dt-bindings/interconnect/qcom,icc.h>
/* UART specific GENI registers */ /* UART specific GENI registers */
#define SE_UART_LOOPBACK_CFG 0x22c #define SE_UART_LOOPBACK_CFG 0x22c
...@@ -1525,7 +1526,7 @@ static int __maybe_unused qcom_geni_serial_sys_suspend(struct device *dev) ...@@ -1525,7 +1526,7 @@ static int __maybe_unused qcom_geni_serial_sys_suspend(struct device *dev)
* even with no_console_suspend * even with no_console_suspend
*/ */
if (uart_console(uport)) { if (uart_console(uport)) {
geni_icc_set_tag(&port->se, 0x3); geni_icc_set_tag(&port->se, QCOM_ICC_TAG_ACTIVE_ONLY);
geni_icc_set_bw(&port->se); geni_icc_set_bw(&port->se);
} }
return uart_suspend_port(private_data->drv, uport); return uart_suspend_port(private_data->drv, uport);
...@@ -1540,7 +1541,7 @@ static int __maybe_unused qcom_geni_serial_sys_resume(struct device *dev) ...@@ -1540,7 +1541,7 @@ static int __maybe_unused qcom_geni_serial_sys_resume(struct device *dev)
ret = uart_resume_port(private_data->drv, uport); ret = uart_resume_port(private_data->drv, uport);
if (uart_console(uport)) { if (uart_console(uport)) {
geni_icc_set_tag(&port->se, 0x7); geni_icc_set_tag(&port->se, QCOM_ICC_TAG_ALWAYS);
geni_icc_set_bw(&port->se); geni_icc_set_bw(&port->se);
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment