ARM: at91: import lowlevel dbgu UART init code from at91bootstrap
For use in PBL, import dbgu init code from:
https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/at91_usart.c

The brgr calculation at the beginning is a untangled version
of the BAUDRATE macro from the usart.h header:

	#define BAUDRATE(mck, baud) \
		(((((mck) * 10) / ((baud) * 16)) % 10) >= 5) ? \
		(mck / (baud * 16) + 1) : ((mck) / (baud * 16))

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 1834ec2 commit 72e9046054e48fd1d9e77fc9276b3303fdcbd692
@Ahmad Fatoum Ahmad Fatoum authored on 14 Oct 2019
Sascha Hauer committed on 14 Oct 2019
Showing 1 changed file
View
arch/arm/mach-at91/include/mach/at91_dbgu.h