UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie pkcardionxt
Newbie
9,627 Views
Registered: ‎02-08-2016

Cannot send Serial Line Break in Linux 3.8.0, TRD 14.5

The Xilinx Zynq (7020) PS serial port line break Linux functions do not initiate a serial line break condition in Linux 3.8.0, TRD 14.5.  Specifically these Linux functions do not initiate a Serial Line Break: tcsendbreak(<fd>, 0), ioctl(<fd>, TIOCSBRK, 0), ioctl(<fd>, TIOCCBRK, 0).  Digging into the Xilinx_uartps.c code it was found that only STARTBRK was set for a line break system call.  However, according to UG585, STOPBRK (STPBRK) must be cleared in order to set STARTBRK.  Through experimentation, it was found that must be performed in one single write transaction.  The following code update solves the issue:

 

Update: /drivers/tty/serial/xilinx_uartps.c   Line 613:

From:                    xuartps_writel(XUARTPS_CR_STARTBRK | status,

To:                          xuartps_writel(XUARTPS_CR_STARTBRK | (~XUARTPS_CR_STOPBRK & status),

 

Note Zynq UG585, Register Control_reg0 Details, states STARTBRK can only be set if STOPBRK is not high, however to implement this the bits must be modified simultaneously in one write transaction, which is not clear in the datasheet.

 

0 Kudos