ARM: at91: sama5d2: reduce UART setup boilerplate with new helpers
The sama5d2 can be fused for one of 9 preset UART iosets. This is then
used by the BootROM for printing the `RomBOOT' header and for the XMODEM
protocol implemented by the SAM-BA monitor. Add two new sama5d2 specific
helpers:

- sama5d2_dbgu_setup_ll for setting up the port with only pinmux and
  master clock as arguments
- sama5d2_resetup_uart_console for resetup of the uart console with
  same pinmux used by the ROM code

The default value, when unfused, is UART_1_IOSET_1 (RX@PD2, TX@PD3),
which are the same ones used on the two sama5d2 board supported so far.

With this change, the DEBUG_LL baudrate is also no longer fixed at 115200,
but instead comes from the CONFIG_BAUDRATE symbol.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 1ecfb8e commit 01474752795536d9dad1a7631f0f54c6c0191892
@Ahmad Fatoum Ahmad Fatoum authored on 1 Jul 2020
Sascha Hauer committed on 11 Jul 2020
Showing 5 changed files
View
arch/arm/boards/sama5d27-giantboard/lowlevel.c
View
arch/arm/boards/sama5d27-som1/lowlevel.c
View
arch/arm/mach-at91/include/mach/debug_ll.h
View
arch/arm/mach-at91/include/mach/sama5d2.h
View
arch/arm/mach-at91/include/mach/sama5d2_ll.h