Skip to content
Snippets Groups Projects
Commit 3255bc70 authored by Jonas Höppner's avatar Jonas Höppner Committed by Clemens Terasa
Browse files

tty: serial: imx: Add SW emulation for mark and space parity

Integrate software implementation for mark and space from guf mdb driver.
Rewrite most of the code:
 Use controller_parity from the uart register
 Use available flags instead of new enum.
 Resort some code to remove dupplicated code snippets.
 Rewrite logic, more readable.
 Move mark and space parity to inline functions
 Disable DMA when CMSPAR is set, still port DMA needs to be disable to
 always work, as disable DMA after open (when setting CMSPAR via ioctl)
 is not implemented. Close and reopen after setting the bit does work.

 Also cleanup the reconfiguration of ODD/EVEN during TX, as RX lost
 bytes in the mdb driver variant. Now the rx_interrupt routine is called
 until all buffers are empty before disalbe RX and change ODD/EVEN parity.
 This way the received bytes could be mapped to the parity config used
 during rx. Still a short moment RX is disabled which could lead to
 missed bits.

 Theres also a busy wait until TX queues are empty, which could probably
 lead to high system load on slow datarates, as this might wait one byte
 long.

BCS 746-000322
parent 7430b85b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment