From: Tom Rini Date: Sat, 20 Mar 2021 19:37:15 -0400 Subject: [PATCH] serial: mtk: rewrite the setbrg function In-Reply-To: <1614911739-27518-1-git-send-email-weijie.gao@mediatek.com> References: <1614911739-27518-1-git-send-email-weijie.gao@mediatek.com> Message-ID: <20210320233715.GM1310@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Mar 05, 2021 at 10:35:39AM +0800, Weijie Gao wrote: > Currently the setbrg logic of serial-mtk is messy, and should be rewritten. > Also an option is added to make it possible to use highspeed-3 mode for all > bauds. > > The new logic is: > 1. If baud clock > 12MHz > a) If baud <= 115200, highspeed-0 mode will be used (ns16550 compatible) > b) If baud <= 576000, highspeed-2 mode will be used > c) any bauds > 576000, highspeed-3 mode will be used > 2. If baud clock <= 12MHz > Forced highspeed-3 mode > a) If baud <= 115200, calculates the divisor using DIV_ROUND_CLOSEST > b) any bauds > 115200, the same as 1. c) > > Signed-off-by: Weijie Gao Applied to u-boot/next, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: