SAMA5 DBGU: Add logic to suppress DBGU reconfiguration when started from a bootloader
This commit is contained in:
parent
0b8d635d96
commit
0d66ba9c00
@ -367,6 +367,19 @@ config SAMA5_DBGU_TXBUFSIZE
|
||||
Characters are buffered before being sent. This specifies
|
||||
the size of the transmit buffer.
|
||||
|
||||
config SAMA5_DBGU_NOCONFIG
|
||||
bool "Suppress DBGU configuration"
|
||||
default n
|
||||
depends on SAMA5_BOOT_SDRAM && SAMA5_DBGU_CONSOLE
|
||||
---help---
|
||||
The DBGU is often used by bootloaders to provide the bootloader
|
||||
interface. If the DBGU is also used as the NuttX console, then it
|
||||
would be best to avoid reconfiguring the DBGU so that the user
|
||||
experience is seamless going from the bootloader to the NuttX
|
||||
console.
|
||||
|
||||
if !SAMA5_DBGU_NOCONFIG
|
||||
|
||||
config SAMA5_DBGU_BAUD
|
||||
int "BAUD rate"
|
||||
default 115200
|
||||
@ -380,6 +393,7 @@ config SAMA5_DBGU_PARITY
|
||||
---help---
|
||||
0=no parity, 1=odd parity, 2=even parity
|
||||
|
||||
endif # !SAMA5_DBGU_NOCONFIG
|
||||
endmenu #DBGU Configuration
|
||||
|
||||
if SAMA5_LCDC
|
||||
|
@ -164,9 +164,9 @@ static uart_dev_t g_dbgu_port =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_SUPPRESS_UART_CONFIG) && !defined(CONFIG_SAMA5_DBGU_NOCONFIG)
|
||||
static void dbgu_configure(void)
|
||||
{
|
||||
#ifndef CONFIG_SUPPRESS_UART_CONFIG
|
||||
uint32_t regval;
|
||||
|
||||
/* Set up the mode register. Start with normal DBGU mode and the MCK
|
||||
@ -200,9 +200,12 @@ static void dbgu_configure(void)
|
||||
/* Enable receiver & transmitter */
|
||||
|
||||
putreg32((DBGU_CR_RXEN|DBGU_CR_TXEN), SAM_DBGU_CR);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
# define dbgu_configure()
|
||||
#endif /* !CONFIG_SUPPRESS_UART_CONFIG && !CONFIG_SAMA5_DBGU_NOCONFIG */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: dbgu_setup
|
||||
*
|
||||
@ -237,6 +240,12 @@ static int dbgu_setup(struct uart_dev_s *dev)
|
||||
|
||||
static void dbgu_shutdown(struct uart_dev_s *dev)
|
||||
{
|
||||
#if !defined(CONFIG_SUPPRESS_UART_CONFIG) && !defined(CONFIG_SAMA5_DBGU_NOCONFIG)
|
||||
/* Disable all interrupts */
|
||||
|
||||
putreg32(DBGU_INT_ALLINTS, SAM_DBGU_IDR);
|
||||
|
||||
#else
|
||||
irqstate_t flags;
|
||||
|
||||
/* The following must be atomic */
|
||||
@ -251,6 +260,7 @@ static void dbgu_shutdown(struct uart_dev_s *dev)
|
||||
|
||||
putreg32(DBGU_INT_ALLINTS, SAM_DBGU_IDR);
|
||||
irqrestore(flags);
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -550,7 +550,7 @@ Load NuttX with U-Boot on AT91 boards
|
||||
Check this U-Boot network BuildRootFAQ entry to choose a proper MAC
|
||||
address: http://www.denx.de/wiki/DULG/EthernetDoesNotWork
|
||||
|
||||
setenv ethaddr 3e:36:65:ba:6f:be
|
||||
setenv ethaddr 00:e0:de:ad:be:ef
|
||||
|
||||
2. Setup IP parameters:
|
||||
The board ip address
|
||||
|
@ -30,6 +30,9 @@ CONFIG_WINDOWS_CYGWIN=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
# CONFIG_MOTOROLA_SREC is not set
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_UBOOT_UIMAGE=y
|
||||
CONFIG_UIMAGE_LOAD_ADDRESS=0x20008000
|
||||
CONFIG_UIMAGE_ENTRY_POINT=0x20008000
|
||||
|
||||
#
|
||||
# Customize Header Files
|
||||
@ -429,8 +432,6 @@ CONFIG_SERIAL=y
|
||||
#
|
||||
# CONFIG_MCU_SERIAL is not set
|
||||
CONFIG_STANDARD_SERIAL=y
|
||||
# CONFIG_USART1_SERIAL_CONSOLE is not set
|
||||
# CONFIG_NO_SERIAL_CONSOLE is not set
|
||||
# CONFIG_SERIAL_IFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||
# CONFIG_USBDEV is not set
|
||||
|
@ -671,7 +671,7 @@ Load NuttX with U-Boot on AT91 boards
|
||||
Check this U-Boot network BuildRootFAQ entry to choose a proper MAC
|
||||
address: http://www.denx.de/wiki/DULG/EthernetDoesNotWork
|
||||
|
||||
setenv ethaddr 3e:36:65:ba:6f:be
|
||||
setenv ethaddr 00:e0:de:ad:be:ef
|
||||
|
||||
2. Setup IP parameters:
|
||||
The board ip address
|
||||
|
Loading…
Reference in New Issue
Block a user