]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
arm/early-printk: move UART base address to Rules.mk
authorAndre Przywara <andre.przywara@calxeda.com>
Fri, 24 May 2013 13:47:28 +0000 (15:47 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 30 May 2013 08:20:33 +0000 (09:20 +0100)
The UART memory mapped base address is currently hardcoded in the
early-printk UART driver, which denies the driver to be used by
two machines with a different mapping.
Move this definition out to xen/arch/arm/Rules.mk, allowing easier
user access and later sharing of the driver.

Signed-off-by: Andre Przywara <andre.przywara@calxeda.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
docs/misc/arm/early-printk.txt
xen/arch/arm/Rules.mk
xen/arch/arm/arm32/debug-exynos4210.inc
xen/arch/arm/arm32/debug-pl011.inc
xen/arch/arm/arm64/debug-pl011.inc

index 965add56b8122ff7366a75ae276a41b392e9a064..9220113e929d54015b7f20fbc4dc734dd0b1aec0 100644 (file)
@@ -12,7 +12,7 @@ where mach is the name of the machine:
   - vexpress: printk with pl011 for versatile express
   - exynos5250: printk with the second UART
 
-The baud rate is hardcoded in xen/arch/arm/Rules.mk,
+The base address and baud rate is hardcoded in xen/arch/arm/Rules.mk,
 see there when adding support for new machines.
 If not explicitly requested with "EARLY_PRINTK_INIT_UART := y" in Rules.mk,
 the code will not try to initialize the UART, so that bootloader or
index fdcf73e453995577d6d8644aed8c2b7462f6f04c..902bddb75f10cbb7ea490a3cdcf607f8c34cab9b 100644 (file)
@@ -42,15 +42,16 @@ EARLY_PRINTK := n
 ifeq ($(debug),y)
 
 # Early printk for versatile express
-# TODO handle UART base address from make command line
 ifeq ($(CONFIG_EARLY_PRINTK), vexpress)
 EARLY_PRINTK_INC := pl011
 EARLY_PRINTK_BAUD := 38400
+EARLY_UART_BASE_ADDRESS := 0x1c090000
 endif
 ifeq ($(CONFIG_EARLY_PRINTK), exynos5250)
 EARLY_PRINTK_INC := exynos4210
 EARLY_PRINTK_INIT_UART := y
 EARLY_PRINTK_BAUD := 115200
+EARLY_UART_BASE_ADDRESS := 0x12c20000
 endif
 
 ifneq ($(EARLY_PRINTK_INC),)
@@ -61,4 +62,5 @@ CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK
 CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DEARLY_PRINTK_INIT_UART
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
+CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS)
 endif
index 4922148ac1df0d147b58b3e8d06d242871327157..d746c35e30fe90798c80afd1b94cd49414cf864a 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <asm/exynos4210-uart.h>
 
-#define EARLY_UART_BASE_ADDRESS 0x12c20000
-
 /* Exynos 5 UART initialization
  * rb: register which contains the UART base address
  * rc: scratch register 1
index 2d970ea364dc6ed975392c81cf32a68c99a1ddd7..8b085b855c4a2a998ca62f017a3846622dc73fd3 100644 (file)
@@ -16,8 +16,6 @@
  * GNU General Public License for more details.
  */
 
-#define EARLY_UART_BASE_ADDRESS 0x1c090000
-
 /* PL011 UART initialization
  * rb: register which contains the UART base address
  * rc: scratch register 1
index 722094036d89bcfc96ce6fe31b467957db0371b2..b416235208d5166857035c1fb2e0f3faddc41e17 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <asm/asm_defns.h>
 
-#define EARLY_UART_BASE_ADDRESS 0x1c090000
-
 /* PL011 UART initialization
  * xb: register which containts the UART base address
  * c: scratch register number */