[U-Boot] [U-Boot, v2, 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()

Tom Rini trini at konsulko.com
Tue Jul 25 00:43:35 UTC 2017


On Thu, Jul 13, 2017 at 03:09:44PM +0200, Christophe Leroy wrote:

> divider is calculated based on SCCR_DFBRG, with:
> SCCR_DFBRG 00 => divider 1  = 1 << 0
> SCCR_DFBRG 01 => divider 4  = 1 << 2
> SCCR_DFBRG 10 => divider 16 = 1 << 4
> SCCR_DFBRG 11 => divider 64 = 1 << 6
> 
> This can be easily converted to a single shift operation:
> divider = 1 << (SCCR_DFBRG * 2)
> 
> Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/51bbfd1e/attachment.sig>


More information about the U-Boot mailing list