On Tuesday, October 20, 2015 at 10:59:37 AM UTC+2, Petar Dimitrijevic wrote: > > Hi all, > > I'm in need of help and advice. > > I'm working on a project for reading MBus data (hardware attached on > /dev/ttyS7) and sending it over modem attached to /dev/ttyS1. > Data is read from python script while the modem is controlled with wvdial > running in the background. > Board used for is olimex A20-SOM with EVB. > Due to concerns with quality of SD cards the entire system runs from NAND. > Due to this the kernel used is legacy 3.4. > The kernel is sunxi-3.4 (linux 3.4.103) and the OS is Ubuntu 14.04.2. > The system is read only and has been running for few weeks now. > > While the system is in working condition everything is fine. > However sometimes when it loses power and reboots the message that starts > repeating continuously is: > > [ 127.382023] serial8250: too much work for irq34 > > After some time: > > [ 137.387765] sunxi:nand: Dma operation finish timeout > > is displayed. > > And then after some time: > > [LOGICCTL_ERR] Get page data failed when read logical page! Err:0xfffffff2 > PHY_PageRead : read timeout > > After these messages regarding NAND none further are displayed. Only > continuous output of too much work for irq 34 continues. > This also happens for irq 52 as well. These are irqs for /dev/ttyS1 and > /dev/ttyS7 respectively. > > I've tried searching for similar problems but nothing comes up. > > Has maybe anyone had any experience with something like this ? > > I would appreciate any pointers in which direction to look. > > I'm aware that probably best solution is to port everything to mainline > kernel but I've been having trouble making the device boot from NAND. > > Thank you, > Petar
To answer my own issue. The problem is not related to NAND. It is strictly related to DesignWare UART IP that is used in A20. It is also used in A10, A13. I'm not sure for other Allwinner SOCs. This is a well known issue with DesignWare and the specific revision of their IP. If the device is configured with UART_16550_COMPATIBLE=NO or in versions prior to the introduction of this option, the UART will ignore writes to the LCR if the UART is busy. Basically this means that communication parameters baud rate, stop bits, etc., can't be set when the device is receiving something. The current driver in the sunxi-3.4 tree doesn't solve this issue and it can lock the kernel rendering the system unusable. I won't go into technical details but if someone is interested I can elaborate in more detail. General description can be found here: http://permalink.gmane.org/gmane.linux.serial/12672. Long story short I ended up back porting some parts of 8250_dw driver from the mainline kernel. With this solution IRQ overflow occurs very rarely because the triage code is moved away from the IRQ handler. From my tests this happened in 1 of 60 reboots. Previously it was 4 from 10 reboots. This can however be handled with watchdog on application level. As things are at this moment this issue can't be completely resolved because it's a HW problem and can lead to problems when there is a device attached to the serial port which non-stop sends data. More info: https://lkml.org/lkml/2015/3/6/941. I will perform more tests to ensure that this is working as advertised. Don't know if they are accepted any more, but if everything is fine I will release patches for 3.4 kernel. Best, Petar -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
