Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa3218d8 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Russell King
Browse files

[ARM] 4660/3: at91: allow selecting UART for early kernel messages



Currently early kernel messages, i.e., those from uncompression, go to the
debugging UART. And if it is enabled in the platform configuration, but
not initialized by the bootloader, the machine hangs, waiting for UART
status change. Besides, having those messages on another UART - typically
the console UART - may be preferrable. This patch allows selecting the
UART in kernel configuration.

Signed-off-by: default avatarGuennadi Liakhovetski <lg@denx.de>
Acked-by: default avatarAndrew Victor <linux@maxim.org.za>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent e83aff58
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -253,6 +253,36 @@ config AT91_TIMER_HZ
	  system clock (of at least several MHz), rounding is less of a
	  problem so it can be safer to use a decimal values like 100.

choice
	prompt "Select a UART for early kernel messages"

config AT91_EARLY_DBGU
	bool "DBGU"

config AT91_EARLY_USART0
	bool "USART0"

config AT91_EARLY_USART1
	bool "USART1"

config AT91_EARLY_USART2
	bool "USART2"
	depends on ! ARCH_AT91X40

config AT91_EARLY_USART3
	bool "USART3"
	depends on (ARCH_AT91RM9200 || ARCH_AT91SAM9RL || ARCH_AT91SAM9260)

config AT91_EARLY_USART4
	bool "USART4"
	depends on ARCH_AT91SAM9260

config AT91_EARLY_USART5
	bool "USART5"
	depends on ARCH_AT91SAM9260

endchoice

endmenu

endif
+1 −2
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <linux/tty_flip.h>
#include <linux/platform_device.h>
#include <linux/atmel_pdc.h>
#include <linux/atmel_serial.h>

#include <asm/io.h>

@@ -45,8 +46,6 @@
#include <asm/arch/gpio.h>
#endif

#include "atmel_serial.h"

#if defined(CONFIG_SERIAL_ATMEL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
#endif
+5 −0
Original line number Diff line number Diff line
@@ -93,6 +93,11 @@
#define AT91_RTC	(0xfffffe00 - AT91_BASE_SYS)	/* Real-Time Clock */
#define AT91_MC		(0xffffff00 - AT91_BASE_SYS)	/* Memory Controllers */

#define AT91_USART0	AT91RM9200_BASE_US0
#define AT91_USART1	AT91RM9200_BASE_US1
#define AT91_USART2	AT91RM9200_BASE_US2
#define AT91_USART3	AT91RM9200_BASE_US3

#define AT91_MATRIX	0	/* not supported */

/*
+7 −0
Original line number Diff line number Diff line
@@ -99,6 +99,13 @@
#define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
#define AT91_GPBR	(0xfffffd50 - AT91_BASE_SYS)

#define AT91_USART0	AT91SAM9260_BASE_US0
#define AT91_USART1	AT91SAM9260_BASE_US1
#define AT91_USART2	AT91SAM9260_BASE_US2
#define AT91_USART3	AT91SAM9260_BASE_US3
#define AT91_USART4	AT91SAM9260_BASE_US4
#define AT91_USART5	AT91SAM9260_BASE_US5


/*
 * Internal Memory.
+4 −0
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@
#define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
#define AT91_GPBR	(0xfffffd50 - AT91_BASE_SYS)

#define AT91_USART0	AT91SAM9261_BASE_US0
#define AT91_USART1	AT91SAM9261_BASE_US1
#define AT91_USART2	AT91SAM9261_BASE_US2


/*
 * Internal Memory.
Loading