From: Ian Campbell Subject: Re: [PATCH V2 2/2] xen: arm: implement early prink for 8250 uart Date: Wed, 3 Jul 2013 12:54:38 +0100 Message-ID: <1372852478.27768.225.camel@zakaz.uk.xensource.com> References: <1372770714-1657-1-git-send-email-bjzhang@suse.com> <1372770714-1657-3-git-send-email-bjzhang@suse.com> <1372849795.27768.214.camel@zakaz.uk.xensource.com> <5897CCEC-31A4-4B05-8DB0-D566D8BCE3AF@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5897CCEC-31A4-4B05-8DB0-D566D8BCE3AF@gmail.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: Chen Baozi Cc: "Stefano.Stabellini@eu.citrix.com Stabellini" , andre.przywara@calxeda.com, xen-devel@lists.xen.org, julien.grall@linaro.org, Bamvor Jian Zhang List-Id: xen-devel@lists.xenproject.org On Wed, 2013-07-03 at 19:50 +0800, Chen Baozi wrote: > On Tue, 2013-07-02 at 21:11 +0800, Bamvor Jian Zhang wrote: > > > implement early printk for 8250 uart which is used by lots of arm SOC, such as > > Allwinner A31(sun6i) and OMAP5432. > > > > Signed-off-by: Bamvor Jian Zhang > > --- > > docs/misc/arm/early-printk.txt | 1 + > > xen/arch/arm/Rules.mk | 5 ++++ > > xen/arch/arm/arm32/debug-8250.inc | 48 +++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 54 insertions(+) > > create mode 100644 xen/arch/arm/arm32/debug-8250.inc > > > > diff --git a/docs/misc/arm/early-printk.txt b/docs/misc/arm/early-printk.txt > > index fbc3208..eaa66a1 100644 > > --- a/docs/misc/arm/early-printk.txt > > +++ b/docs/misc/arm/early-printk.txt > > @@ -13,6 +13,7 @@ where mach is the name of the machine: > > - exynos5250: printk with the second UART > > - midway: printk with the pl011 on Calxeda Midway processors > > - fastmodel: printk on ARM Fastmodel software emulators > > + - sun6i: printk with 8250 on Allwinner A31 processors > Could this be better to add: > > - omap5432: printk with 8250 compatible UART on OMAP5432 processors > > > > > The base address and baud rate is hardcoded in xen/arch/arm/Rules.mk, > > see there when adding support for new machines. > > diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk > > index 422ed04..51e823d 100644 > > --- a/xen/arch/arm/Rules.mk > > +++ b/xen/arch/arm/Rules.mk > > @@ -64,6 +64,11 @@ EARLY_PRINTK_INC := pl011 > > EARLY_PRINTK_BAUD := 115200 > > EARLY_UART_BASE_ADDRESS := 0xfff36000 > > endif > > +ifeq ($(CONFIG_EARLY_PRINTK), sun6i) > > +# uart configured at 115200 by bootloader > > +EARLY_PRINTK_INC := 8250 > > +EARLY_UART_BASE_ADDRESS := 0x01c28000 > > +endif > > EARLY_UART_BASE_ADDRESS on OMAP5432 is 0x48020000, so I think we'd > better to add another case to support it? Yes, this is exactly what should happen. You could either send a patch on top of Bamvor's or perhaps he would be willing to integrate these bits into his existing patch. > For example: > > +ifeq ($(CONFIG_EARLY_PRINTK), omap5432) > +# uart configured at 115200 by bootloader > +EARLY_PRINTK_INC := 8250 > +EARLY_UART_BASE_ADDRESS := 0x48020000 > +endif Ian.