Date: Mon, 7 Oct 2013 21:54:15 +0200 From: Zbigniew Bodek <zbb@freebsd.org> To: freebsd-embedded@freebsd.org Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Changes to UART ns8250 Message-ID: <CALF_Tx=AwVnr0d75-K-yu97iVgmTJC7aaABoix73zHD%2B5eKJnQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--001a11c366d052011d04e82c04a8 Content-Type: text/plain; charset=ISO-8859-1 Hello. I would like to present a patch for ns8250 serial that I would like to commit in the near future (if there are no objections). The patch is fixing newest DesignWare UART with busy detection. During frequency divisors configuration when UART is busy transferring or receiving data, line control register manipulation will not take effect. Therefore, we will not set divisor latch access bit and we will corrupt LCR instead of configuring divisors. It is necessary to wait until UART finishes all transfers to proceed with the configuration. This was detected on Armada XP as UART fails on this issue 100/100 attempts. The patch was tested by kevlo@ and me and it works on our Armada XP - based systems. Please send your comment or remarks if there are any. Best regards Zbigniew Bodek --001a11c366d052011d04e82c04a8 Content-Type: application/octet-stream; name="0001-Wait-for-DesignWare-UART-transfers-completion-before.patch" Content-Disposition: attachment; filename="0001-Wait-for-DesignWare-UART-transfers-completion-before.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hmi48egp0 RnJvbSBiMWU0Nzc5OGFlMjY5OGY0MjI3N2YwOTFlODQxZGZiNzEyNTY2MzA0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBaYmlnbmlldyBCb2RlayA8emJiQHNlbWloYWxmLmNvbT4KRGF0 ZTogU2F0LCA1IE9jdCAyMDEzIDAyOjI1OjIzICswMjAwClN1YmplY3Q6IFtQQVRDSCAxLzNdIFdh aXQgZm9yIERlc2lnbldhcmUgVUFSVCB0cmFuc2ZlcnMgY29tcGxldGlvbiBiZWZvcmUKIGFjY2Vz c2luZyBsaW5lIGNvbnRyb2wKCldoZW4gdXNpbmcgRFcgVUFSVCB3aXRoIEJVU1kgZGV0ZWN0aW9u IGl0IGlzIG5lY2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ggQlVTWSBkZXRlY3Rpb24gaXQgaXMgbmVjZXNzYXJ5IHRvIHdhaXQKKwkg KiB1bnRpbCBhbGwgc2VyaWFsIHRyYW5zZmVycyBhcmUgZmluaXNoZWQgYmVmb3JlIG1hbmlwdWxh dGluZyB0aGUKKwkgKiBsaW5lIGNvbnRyb2wuIExDUiB3aWxsIG5vdCBiZSBhZmZlY3RlZCB3aGVu IFVBUlQgaXMgYnVzeS4KKwkgKi8KKwl3aGlsZSAobnM4MjUwLT5idXN5X2RldGVjdCAhPSAwICYm CisJICAgICh1YXJ0X2dldHJlZyhiYXMsIERXX1JFR19VU1IpICYgVVNSX0JVU1kpICE9IDApCisJ CTsKIAllcnJvciA9IG5zODI1MF9wYXJhbShiYXMsIGJhdWRyYXRlLCBkYXRhYml0cywgc3RvcGJp dHMsIHBhcml0eSk7CiAJdWFydF91bmxvY2soc2MtPnNjX2h3bXR4KTsKIAlyZXR1cm4gKGVycm9y KTsKLS0gCjEuOC40Cgo= --001a11c366d052011d04e82c04a8--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALF_Tx=AwVnr0d75-K-yu97iVgmTJC7aaABoix73zHD%2B5eKJnQ>