From: Chen Baozi Subject: Re: [PATCH V2 2/2] xen: arm: implement early prink for 8250 uart Date: Wed, 3 Jul 2013 21:42:05 +0800 Message-ID: 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> <1372852478.27768.225.camel@zakaz.uk.xensource.com> <51D49A080200003000058D04@soto.provo.novell.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51D49A080200003000058D04@soto.provo.novell.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: Bamvor Jian Zhang Cc: andre.przywara@calxeda.com, xen-devel@lists.xen.org, Ian Campbell , julien.grall@linaro.org, "Stefano.Stabellini@eu.citrix.com Stabellini" List-Id: xen-devel@lists.xenproject.org On Jul 3, 2013, at 9:39 PM, "Bamvor Jian Zhang" wrote: > Hi, Ian, Chen > >>>> Wrote "Ian Campbell "> On Wed, >> 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. > yes, i'd like to do it. meanwhile adding omap5432 uart support is a little > bit confuse with my cover letter. > how about i send one patch for Cortex-A7 support. and another series patch > for 8250 compatibility uart. which including > 1/3: debug-8250.inc > 2/3: sun6i changes in early-printk.txt and Rules.mk. > 3/3: omap5432 changes in early-printk.txt and Rules.mk. I'm OK with it. > > bamvor >> >>> For example: >>> >>> +ifeq ($(CONFIG_EARLY_PRINTK), omap5432) >>> +# uart configured at 115200 by bootloader >>> +EARLY_PRINTK_INC := 8250 >>> +EARLY_UART_BASE_ADDRESS := 0x48020000 >>> +endif >> >> Ian. > > >