From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 404FC81FD0 for ; Mon, 5 Dec 2016 09:24:05 -0800 (PST) Received: by mail-wm0-x231.google.com with SMTP id t79so100526907wmt.0 for ; Mon, 05 Dec 2016 09:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oEbUeftW/mhyyGQrjDHbZskr/5le/gidegIsQrY19wA=; b=iWGfpzreCK3TM3pTtku8SrNfKMHQQO5xDpA/0FcRUjeVVhVxof6tEn7F9ky/CYXt4L XieAhZw7P3JSJOH4YFSs0Pm/iuVr26A5cDZQY+r+Aa7uSsdw5a9lakgL/IHvt4ms38Gc O5+Ozkkpo4SkhPziQfRremvYRNTC5K45Kml7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oEbUeftW/mhyyGQrjDHbZskr/5le/gidegIsQrY19wA=; b=lvWXi3iAB2+TJZPH3qq+ZfJnxTfQgn6sQceYK87hkOGqrmATyIBhvlJqXhFkuJnnZw c/6YFLTki3YPRCPp6bHRedtaN1ymzW4Gyhoi4wptMkIirUiTdmRsxQdfprUuVB/fTim5 7HkTceAMsQ7iicqXft4r5RCjLWddCG8391u6oZNyYjXixUU9pa14Chh/HH/QnJFcyFlo ZhyXKDJOV/MDfrTnmjbAqG5mLl2aGby96Qt9cGOIGuzDt3Z0qYjhLVONNHhisUqTAmSX bLXJN4LvjeWn+jZzM2C4CQPy3ahiLEgFxTW+nuvrKgtRGxI7ZT5ySOxnLAlNDN0m4uoT 1NBw== X-Gm-Message-State: AKaTC00ElSyXQ9GPtC4LeOCrakFC+cU1leBOAXktmlwqTluqTF0Nwsvl3CnFAjFDuf3/pMlG X-Received: by 10.28.45.142 with SMTP id t136mr11579453wmt.110.1480958643495; Mon, 05 Dec 2016 09:24:03 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id r7sm21390624wjp.43.2016.12.05.09.24.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 09:24:02 -0800 (PST) Date: Mon, 5 Dec 2016 17:24:01 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , Andrew Fish Message-ID: <20161205172401.GP27069@bivouac.eciton.net> References: <20161127232606.21364-1-leif.lindholm@linaro.org> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH] Omap35xxPkg, BeagleBoardPkg: Use Pcd for INTERRUPT_BASE X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Dec 2016 17:24:05 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 05, 2016 at 04:40:44PM +0000, Ard Biesheuvel wrote: > On 27 November 2016 at 23:26, Leif Lindholm wrote: > > The base address for the interrupt controller is hard-coded in > > Omap3530Interrupt.h, although Omap35xxPkg/InterruptDxe appears to > > have initially intended to make use of PcdInterruptBaseAddress from > > EmbeddedPkg. Move it to use said Pcd, and also declare use of it in > > BeagleBoardLib, which makes a direct access. > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Leif Lindholm > > Reviewed-by: Ard Biesheuvel Thanks! Pushed as 209b8f3. / Leif > > --- > > > > Linux uses the same driver for OMAP2/OMAP3 and the AM3xxx variants, > > so this tweak should make it possible to reuse across different > > platforms. > > > > BeagleBoardPkg/BeagleBoardPkg.dsc | 4 ++++ > > BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardLib.inf | 3 +++ > > Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h | 5 ++++- > > Omap35xxPkg/Omap35xxPkg.dsc | 4 ++++ > > 4 files changed, 15 insertions(+), 1 deletion(-) > > > > diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc > > index f40095a..9b4142f 100644 > > --- a/BeagleBoardPkg/BeagleBoardPkg.dsc > > +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc > > @@ -3,6 +3,7 @@ > > # > > # Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.
> > # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
> > +# Copyright (c) 2016, Linaro Ltd. All rights reserved.
> > # > > # This program and the accompanying materials > > # are licensed and made available under the terms and conditions of the BSD License > > @@ -359,6 +360,9 @@ > > gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterPeriodInNanoseconds|77 > > gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|13000000 > > > > + # OMAP Interrupt Controller > > + gEmbeddedTokenSpaceGuid.PcdInterruptBaseAddress|0x48200000 > > + > > # We want to use the Shell Libraries but don't want it to initialise > > # automatically. We initialise the libraries when the command is called by the > > # Shell. > > diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardLib.inf b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardLib.inf > > index b1139a4..e004d6f 100644 > > --- a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardLib.inf > > +++ b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardLib.inf > > @@ -1,5 +1,6 @@ > > #/* @file > > # Copyright (c) 2011-2013, ARM Limited. All rights reserved. > > +# Copyright (c) 2016, Linaro Ltd. All rights reserved. > > # > > # This program and the accompanying materials > > # are licensed and made available under the terms and conditions of the BSD License > > @@ -52,3 +53,5 @@ > > > > gArmTokenSpaceGuid.PcdSystemMemoryBase > > gArmTokenSpaceGuid.PcdSystemMemorySize > > + > > + gEmbeddedTokenSpaceGuid.PcdInterruptBaseAddress > > diff --git a/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h b/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h > > index 774d873..d8d727e 100644 > > --- a/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h > > +++ b/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h > > @@ -1,6 +1,7 @@ > > /** @file > > > > Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> > + Copyright (c) 2016, Linaro Ltd. All rights reserved.
> > > > This program and the accompanying materials > > are licensed and made available under the terms and conditions of the BSD License > > @@ -15,7 +16,9 @@ > > #ifndef __OMAP3530INTERRUPT_H__ > > #define __OMAP3530INTERRUPT_H__ > > > > -#define INTERRUPT_BASE (0x48200000) > > +#include > > + > > +#define INTERRUPT_BASE (PcdGet32 (PcdInterruptBaseAddress)) > > > > #define INT_NROF_VECTORS (96) > > #define MAX_VECTOR (INT_NROF_VECTORS - 1) > > diff --git a/Omap35xxPkg/Omap35xxPkg.dsc b/Omap35xxPkg/Omap35xxPkg.dsc > > index 4a3317f..436c10b 100644 > > --- a/Omap35xxPkg/Omap35xxPkg.dsc > > +++ b/Omap35xxPkg/Omap35xxPkg.dsc > > @@ -2,6 +2,7 @@ > > # Omap35xx SoC package. > > # > > # Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.
> > +# Copyright (c) 2016, Linaro Ltd. All rights reserved.
> > # > > # This program and the accompanying materials > > # are licensed and made available under the terms and conditions of the BSD License > > @@ -159,6 +160,9 @@ > > gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterPeriodInNanoseconds|77 > > gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|13000000 > > > > + # OMAP Interrupt Controller > > + gEmbeddedTokenSpaceGuid.PcdInterruptBaseAddress|0x48200000 > > + > > # > > # ARM Pcds > > # > > -- > > 2.10.2 > >