From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/2] xen: arm: more flexible scheme for specifying early printk device Date: Thu, 12 Mar 2015 16:51:57 +0000 Message-ID: <1426179117.32572.61.camel@citrix.com> References: <1426083115-29406-2-git-send-email-ian.campbell@citrix.com> <20150312110356.GB22164@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150312110356.GB22164@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: julien.grall@linaro.org, stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-03-12 at 12:03 +0100, Tim Deegan wrote: > At 14:11 +0000 on 11 Mar (1426079515), Ian Campbell wrote: > > +EARLY_PRINTK_brcm := 8250,0xF040AB00,2 > > +EARLY_PRINTK_dra7 := 8250,0x4806A000,2 > > +EARLY_PRINTK_fastmodel := pl011,0x1c090000,115200 > > +EARLY_PRINTK_exynos5250 := exynos4210,0x12c20000 > > +EARLY_PRINTK_hip04-d01 := 8250,0xE4007000,2 > > +EARLY_PRINTK_juno := pl011,0x7ff80000 > > +EARLY_PRINTK_lager := scif,0xe6e60000 > > +EARLY_PRINTK_midway := pl011,0xfff36000 > > +EARLY_PRINTK_omap5432 := 8250,0x48020000,2 > > +EARLY_PRINTK_seattle := pl011,0xe1010000 > > +EARLY_PRINTK_sun6i := 8250,0x01c28000,2 > > +EARLY_PRINTK_sun7i := 8250,0x01c28000,2 > > +EARLY_PRINTK_thunderx := pl011,0x87e024000000 > > +EARLY_PRINTK_vexpress := pl011,0x1c090000 > > +EARLY_PRINTK_xgene-mcdivitt := 8250,0x1c021000,2 > > +EARLY_PRINTK_xgene-storm := 8250,0x1c020000,2 > > +EARLY_PRINTK_zynqmp := cadence,0xff000000 > > + > > +COMMA := , > > +ifneq ($(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)),) > > +EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK))) > > +else > > +EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(CONFIG_EARLY_PRINTK)) > > +endif > > If you're respinning this, it might be neater as > > CONFIG_EARLY_PRINTK := $(or $(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)), $(CONFIG_EARLY_PRINTK) > EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(CONFIG_EARLY_PRINTK)) I didn't know about $(or ...) (but I suppose I could have guessed it existed, I wonder since when though). In my early testing I found that CONFIG_EARLY_PRINTK := $(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)) didn't do as I expected with CONFIG_EARLY_PRINTK on the make command line, but it's possible I messed up the trial. > Or maybe not, now that I've written it out. :) Either way is probably fine. :-) I could do: EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(or $(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)), $(CONFIG_EARLY_PRINTK))) Not sure that's better either. Ian.