Skip to contentSkip to conversation

Restore proper operation of ioctl(SET_CONFIG)

PATCH Applied Stephen Freyder 2 participants 2 messages Feb 10, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Restore proper operation of ioctl(SET_CONFIG)

Disable software reset by setting SRST_B=1 when writing to UCR2 in rt_imx_uart_set_config.

---
 kernel/drivers/serial/rt_imx_uart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/drivers/serial/rt_imx_uart.c +2 -2
index 2b27b7d..6894c1c 100644
@@ -703,9 +703,9 @@ static int rt_imx_uart_set_config(struct rt_imx_uart_ctx *ctx,
 		uint64_t tdiv64;
 
 		if (ctx->config.data_bits == RTSER_8_BITS)
-			ucr2 = UCR2_WS | UCR2_IRTS;
+			ucr2 = UCR2_WS | UCR2_SRST | UCR2_IRTS;
 		else
-			ucr2 = UCR2_IRTS;
+			ucr2 = UCR2_SRST | UCR2_IRTS;
 
 		if (ctx->config.handshake == RTSER_RTSCTS_HAND) {
 			if (port->have_rtscts) {
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 15 lines · Stephen Freyder via Xenomai

Disable software reset by setting SRST_B=1 when writing to UCR2 in rt_imx_uart_set_config.

---
  kernel/drivers/serial/rt_imx_uart.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
kernel/drivers/serial/rt_imx_uart.c +0 -0
index 2b27b7d..6894c1c 100644
@@ -703,9 +703,9 @@ static int rt_imx_uart_set_config(struct rt_imx_uart_ctx *ctx,
  		uint64_t tdiv64;

kernel/drivers/serial/rt_imx_uart.c static int rt_imx_uart_set_config(struct rt_imx_uart_ctx *ctx, · line 711

Quoted 10 lines
kernel/drivers/serial/rt_imx_uart.c +2 -2
 
  		if (ctx->config.data_bits == RTSER_8_BITS)
-			ucr2 = UCR2_WS | UCR2_IRTS;
+			ucr2 = UCR2_WS | UCR2_SRST | UCR2_IRTS;
  		else
-			ucr2 = UCR2_IRTS;
+			ucr2 = UCR2_SRST | UCR2_IRTS;
 
  		if (ctx->config.handshake == RTSER_RTSCTS_HAND) {
  			if (port->have_rtscts) {

Thanks, applied.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux