Difference between revisions of "Microzed issues"

From ElphelWiki
Jump to: navigation, search
Line 1: Line 1:
 
==List==
 
==List==
* UART
+
* <b style='color:green'>[SOLVED]</b> UART
 
<font size='2'>
 
<font size='2'>
 
  <b>Description:</b>
 
  <b>Description:</b>
Line 8: Line 8:
 
     sometimes the timeout register is set correctly
 
     sometimes the timeout register is set correctly
 
  <b>Possible reason:</b>
 
  <b>Possible reason:</b>
     In driver .startup and .termios conflict?
+
     In driver .startup and .termios conflict? Race Reset?
 +
<b>Solution:</b>
 +
    Added a delay after reset - some other functions in the driver also have it - some not. Luck?
 +
<b>Patch:</b>
 +
<i>diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
 +
index f214c7f..164e32d 100644
 +
--- a/drivers/tty/serial/xilinx_uartps.c
 +
+++ b/drivers/tty/serial/xilinx_uartps.c
 +
@@ -704,6 +704,9 @@ static void cdns_uart_set_termios(struct uart_port *port,
 +
        ctrl_reg |= CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST;
 +
        cdns_uart_writel(ctrl_reg, CDNS_UART_CR_OFFSET);
 +
 
 +
+      while (cdns_uart_readl(CDNS_UART_CR_OFFSET) &
 +
+                      (CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST))
 +
+              cpu_relax();
 +
        /*
 +
          * Clear the RX disable and TX disable bits and then set the TX enable
 +
          * bit and RX enable bit to enable the transmitter and receiver.</i>
 +
 
 
</font>
 
</font>
 
* SSH terminal
 
* SSH terminal

Revision as of 12:58, 19 February 2016

List

  • [SOLVED] UART

Description:
    UART register contents: timeout=0 rxfifo_level=56, should be timeout=10 rxfifo_level=56
    minicom prints 56 symbols at a time when rxfifo reaches its level.
    remembers all typed symbols
    sometimes the timeout register is set correctly
Possible reason:
    In driver .startup and .termios conflict? Race Reset?
Solution:
    Added a delay after reset - some other functions in the driver also have it - some not. Luck?
Patch:
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index f214c7f..164e32d 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -704,6 +704,9 @@ static void cdns_uart_set_termios(struct uart_port *port,
        ctrl_reg |= CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST;
        cdns_uart_writel(ctrl_reg, CDNS_UART_CR_OFFSET);
 
+       while (cdns_uart_readl(CDNS_UART_CR_OFFSET) &
+                       (CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST))
+               cpu_relax();
        /*
         * Clear the RX disable and TX disable bits and then set the TX enable
         * bit and RX enable bit to enable the transmitter and receiver.

  • SSH terminal

Description:
    Freezes, lags but remembers all typed symbols
Possible reason:
    UART problem?

  • RTC

    Too many messages when rtc is missing
Description:
    3x"hwclock: can't open '/dev/misc/rtc': No such file or directory" in boot log
Possible reason:
    driver

Useful pages