All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@calxeda.com>
To: stefano.stabellini@eu.citrix.com, Ian.Campbell@citrix.com
Cc: Andre Przywara <andre.przywara@calxeda.com>, xen-devel@lists.xen.org
Subject: [PATCH 3/4] arm/early-printk: move UART base address to Rules.mk
Date: Fri, 24 May 2013 12:42:31 +0200	[thread overview]
Message-ID: <1369392152-1305-4-git-send-email-andre.przywara@calxeda.com> (raw)
In-Reply-To: <1369392152-1305-1-git-send-email-andre.przywara@calxeda.com>

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>
---
 xen/arch/arm/Rules.mk                   | 3 +++
 xen/arch/arm/arm32/debug-exynos4210.inc | 2 --
 xen/arch/arm/arm32/debug-pl011.inc      | 2 --
 xen/arch/arm/arm64/debug-pl011.inc      | 2 --
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index fdcf73e..37a8271 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -46,11 +46,13 @@ ifeq ($(debug),y)
 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 +63,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
diff --git a/xen/arch/arm/arm32/debug-exynos4210.inc b/xen/arch/arm/arm32/debug-exynos4210.inc
index 4922148..d746c35 100644
--- a/xen/arch/arm/arm32/debug-exynos4210.inc
+++ b/xen/arch/arm/arm32/debug-exynos4210.inc
@@ -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
diff --git a/xen/arch/arm/arm32/debug-pl011.inc b/xen/arch/arm/arm32/debug-pl011.inc
index 2d970ea..8b085b8 100644
--- a/xen/arch/arm/arm32/debug-pl011.inc
+++ b/xen/arch/arm/arm32/debug-pl011.inc
@@ -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
diff --git a/xen/arch/arm/arm64/debug-pl011.inc b/xen/arch/arm/arm64/debug-pl011.inc
index 7220940..b416235 100644
--- a/xen/arch/arm/arm64/debug-pl011.inc
+++ b/xen/arch/arm/arm64/debug-pl011.inc
@@ -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 */
-- 
1.7.12.1

  parent reply	other threads:[~2013-05-24 10:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 10:42 [PATCH 0/4] ARM/early-printk: Improve reusability and add Calxeda support Andre Przywara
2013-05-24 10:42 ` [PATCH 1/4] arm/early-printk: calculate baud rate divisor from user provided value Andre Przywara
2013-05-24 12:15   ` Julien Grall
2013-05-24 10:42 ` [PATCH 2/4] arm/early-printk: allow skipping of UART init Andre Przywara
2013-05-24 12:30   ` Julien Grall
2013-05-24 10:42 ` Andre Przywara [this message]
2013-05-24 12:36   ` [PATCH 3/4] arm/early-printk: move UART base address to Rules.mk Julien Grall
2013-05-24 12:51     ` Julien Grall
2013-05-24 10:42 ` [PATCH 4/4] arm/early-printk: add Calxeda Midway UART support Andre Przywara
2013-05-24 12:38   ` Julien Grall
2013-05-24 12:40 ` [PATCH 0/4] ARM/early-printk: Improve reusability and add Calxeda support Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369392152-1305-4-git-send-email-andre.przywara@calxeda.com \
    --to=andre.przywara@calxeda.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.