From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 01/16] xen: arm64: Add 8250 earlyprintk support Date: Wed, 20 Nov 2013 16:17:41 +0000 Message-ID: <528CE0A5.80307@linaro.org> References: <1384958746.6071.64.camel@kazak.uk.xensource.com> <1384958897-13074-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1384958897-13074-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: pranavkumar@linaro.org, stefano.stabellini@eu.citrix.com, tim@xen.org, Anup Patel , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 11/20/2013 02:48 PM, Ian Campbell wrote: > From: Pranavkumar Sawargaonkar > > Extracted from "Basic Platform support for APM X-Gene Storm." > > Signed-off-by: Anup Patel > Signed-off-by: Pranavkumar Sawargaonkar > > Reworked into generic 8250 driver, use EARLY_UART_REG_SHIFT. > > While there observe a missing shift in the arm32 version (UART_THR is zero so > it doesn't really matter). Changed for consistency. > > Signed-off-by: Ian Campbell > --- > xen/arch/arm/Rules.mk | 6 +++++ > xen/arch/arm/arm64/debug-8250.inc | 52 +++++++++++++++++++++++++++++++++++++ > 2 files changed, 58 insertions(+) > create mode 100644 xen/arch/arm/arm64/debug-8250.inc > > diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk > index c27c2eb..aaa203e 100644 > --- a/xen/arch/arm/Rules.mk > +++ b/xen/arch/arm/Rules.mk > @@ -82,6 +82,12 @@ EARLY_PRINTK_INC := 8250 > EARLY_UART_BASE_ADDRESS := 0xF0406B00 > EARLY_UART_REG_SHIFT := 2 > endif > +ifeq ($(CONFIG_EARLY_PRINTK), xgene-storm) > +EARLY_PRINTK_INC := 8250 > +EARLY_PRINTK_BAUD := 115200 > +EARLY_UART_BASE_ADDRESS := 0x1c020000 > +EARLY_UART_REG_SHIFT := 2 > +endif > > ifneq ($(EARLY_PRINTK_INC),) > EARLY_PRINTK := y > diff --git a/xen/arch/arm/arm64/debug-8250.inc b/xen/arch/arm/arm64/debug-8250.inc > new file mode 100644 > index 0000000..5858354 > --- /dev/null > +++ b/xen/arch/arm/arm64/debug-8250.inc > @@ -0,0 +1,52 @@ > +/* > + * xen/arch/arm/arm64/debug-8250.inc > + * > + * 8250 specific debug code > + * > + * Copyright (c) 2013 Applied Micro. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > + > +/* UART initialization > + * rb: register which contains the UART base address > + * rc: scratch register 1 > + * rd: scratch register 2 */ > +.macro early_uart_init rb rc rd > +.endm You don't need to define early_uart_init. This macro is only used if EARLY_PRINTK_INIT_UART is defined, which it's not the case here. -- Julien Grall