From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (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 74FA081FE0 for ; Mon, 5 Dec 2016 08:40:45 -0800 (PST) Received: by mail-io0-x230.google.com with SMTP id m5so467362973ioe.3 for ; Mon, 05 Dec 2016 08:40:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=u6s0KaiQY6ccgHNZIts1IO0+Xv3VbqV+X8kYzOBCwEo=; b=Eb0Ah2eM++xBAyj6FpyjOit2i7cytuCrRzjU0w+mxZI1KeCK6OiZVDcH2OSk+wDAFt kFVY8xcClVhXlzrvnmonyHcdyF2kIXqu9Fv9oSpwInN/6WYzmet8usIMDjTlg5H/4+Cw fiSfyuKiOMhT1+0CVQQbhge3abPuF3sj0PJU8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=u6s0KaiQY6ccgHNZIts1IO0+Xv3VbqV+X8kYzOBCwEo=; b=CTLSW+020gOR451rrN7ENcA1c5Vo4bbo7zeMgub5YVgmwlFRXqE9gstrLN6lWT5txx xbwSbo+nQHA8eVxihCpD2c7GQELg0I0SLoPt/1tnrJt52V2ntj0guO7nNa+n3MziHJxO MQlO+8RqyiH76A2HfhRrFBewsWhMBItBcvkqGrk313yNnugU0NEnrdi9OQWg0cVLNRil EAJeIQfc8uzxm4UAf6C3lWLxIXQ91RXu7hUCZAuKnRRf4S3ECsyz/tvh59ZzElVI3qfo FJvEhz6SCbx+VOPJQPle1YiX5nvUtbalD+PmoXMr5HwiY4Nk0hB+IZjoR9sBHiJtzvOZ vQ3w== X-Gm-Message-State: AKaTC01DdD0Pvb095ioZRZo8TihpLJkZgLKXoEBUottdojyWp/theNqSg9uZl3YIW8lTYQR4Tk91lDQUj93+zEID X-Received: by 10.36.70.208 with SMTP id j199mr3057797itb.63.1480956044560; Mon, 05 Dec 2016 08:40:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.198.67 with HTTP; Mon, 5 Dec 2016 08:40:44 -0800 (PST) In-Reply-To: <20161127232606.21364-1-leif.lindholm@linaro.org> References: <20161127232606.21364-1-leif.lindholm@linaro.org> From: Ard Biesheuvel Date: Mon, 5 Dec 2016 16:40:44 +0000 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Andrew Fish 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 16:40:45 -0000 Content-Type: text/plain; charset=UTF-8 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 > --- > > 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 >