From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (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 0BC922110C80B for ; Mon, 4 Jun 2018 02:25:44 -0700 (PDT) Received: by mail-wr0-x241.google.com with SMTP id y15-v6so42428762wrg.11 for ; Mon, 04 Jun 2018 02:25:44 -0700 (PDT) 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=SNq387Ju4ZCamJSEj+DuU3Hb9GrjNiXLMut+6BBai48=; b=aVC24clNtNL8RSoIu8Vme5HmlPDfg2XZ5H0MmCyWFBr5KazglBLotJmG20mTvRp8Tr cr/0LZY6IjeZIjsWbyOTyTU/8m81tdsepVZWtTh+mbpDtIaTug0RD9DSSY+fGB6eG054 ySIXMRzOgKYkHCrtR5eCY8INMUbE/pu8rq2K4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SNq387Ju4ZCamJSEj+DuU3Hb9GrjNiXLMut+6BBai48=; b=SmWles/o29vX7o3D+AMsfQiPYg9lQEk7ZzUCpgUZeyd/22NTfhvY/3en/fZJt0xU79 Jfx+LDGA/vOeuw15FUdAxs4KRJJ6L6NfCq4WTzU1JzJSsrOiv1clcFD++biV/GhpF2Ix 1vzt4wmI67bRHWI3L/PI1COom9OlGF1+CaCelxWqu3FnMoz0oXFtI57m4+hG+suRL4xJ 7/hUOgzx9dXww0udmy7kviZXRqY5cEkxNugNycAOCut5dgClP7nKtYKtuLMCLfzgDed1 gZMUTmNEDW70edJxOOl8imCz8jk84xqzJhW5nCjzbFZHV6pCPxDtv7FqgjqYQR6bx7oP zDfA== X-Gm-Message-State: ALKqPwfGQ28ZCIciFbDKSO3vQv0WFtob9sLLirVKGpOnQKRzKt2jO5fs Djv+qzpViyPSThwP62/t3XLaHA== X-Google-Smtp-Source: ADUXVKI0xcHIq9iU/YpjGzpnV08ResaufqV/bqi/mWFuwrASJzi9gIdg87EC3m4lAFu87VTxOk0AXw== X-Received: by 2002:adf:c358:: with SMTP id e24-v6mr14942542wrg.257.1528104341312; Mon, 04 Jun 2018 02:25:41 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u89-v6sm9668558wma.4.2018.06.04.02.25.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 02:25:40 -0700 (PDT) Date: Mon, 4 Jun 2018 10:25:38 +0100 From: Leif Lindholm To: Meenakshi Aggarwal Cc: "ard.biesheuvel@linaro.org" , "edk2-devel@lists.01.org" , Udit Kumar , Varun Sethi , Vabhav Sharma Message-ID: <20180604092538.3g2v4vc4ladeylpi@bivouac.eciton.net> References: <1518771035-6733-1-git-send-email-meenakshi.aggarwal@nxp.com> <1518771035-6733-23-git-send-email-meenakshi.aggarwal@nxp.com> <20180419144424.5hj7feldkplo4fu4@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 22/39] Platform/NXP: LS1046 RDB Board FPGA library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2018 09:25:45 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 04, 2018 at 04:10:16AM +0000, Meenakshi Aggarwal wrote: > Hi Leif, > > > -----Original Message----- > > From: Leif Lindholm [mailto:leif.lindholm@linaro.org] > > Sent: Thursday, April 19, 2018 8:14 PM > > To: Meenakshi Aggarwal > > Cc: ard.biesheuvel@linaro.org; edk2-devel@lists.01.org; Udit Kumar > > ; Varun Sethi ; Vabhav Sharma > > > > Subject: Re: [PATCH edk2-platforms 22/39] Platform/NXP: LS1046 RDB Board > > FPGA library > > > > On Fri, Feb 16, 2018 at 02:20:18PM +0530, Meenakshi wrote: > > > From: Meenakshi Aggarwal > > > > > > Library to provide functions for accessing FPGA on LS1046ARDB board. > > > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > Signed-off-by: Vabhav > > > Signed-off-by: Meenakshi Aggarwal > > > > I compare this one to LS1043aRdbPkg/Library/FpgaLib, and the differences in > > the .c file are > > --- Platform/NXP/LS1043aRdbPkg/Library/FpgaLib/FpgaLib.c 2018-04-18 > > 15:13:08.507949763 +0100 > > +++ Platform/NXP/LS1046aRdbPkg/Library/FpgaLib/FpgaLib.c 2018-04-18 > > +++ 15:13:08.531949605 +0100 > > @@ -1,5 +1,5 @@ > > /** @FpgaLib.c > > - Fpga Library for LS1043A-RDB board, containing functions to > > + Fpga Library for LS1046A-RDB board, containing functions to > > program and read the Fpga registers. > > > > FPGA is connected to IFC Controller and so MMIO APIs are used @@ -137,6 > > +137,8 @@ > > Sd1RefClkSel = FPGA_READ(Sd1RefClkSel); > > DEBUG((DEBUG_INFO, "SD1_CLK1 = %a, SD1_CLK2 = %a\n", > > Sd1RefClkSel ? SERDES_FREQ2 : SERDES_FREQ1, SERDES_FREQ1)); > > + DEBUG((DEBUG_INFO, "SD2_CLK1 = %a, SD2_CLK2 = %a\n", > > + SERDES_FREQ1, SERDES_FREQ1)); > > > > return; > > } > > > > Could these two libraries be merged into a single LS104xx variant? > > > > The LS2088a one seems to have substantial differences, so that makes sense to > > keep separate. > > We were planning to keep this library common for both LS1046 and > LS1043, Excellent. thanks. > But as this is board specific library, and in case, same soc be used on any other board, > then there will be changes in common library which might not be significant for other. > > Also, FPGA_REG_SET structure is different for both, luckily here the new struct members > are added in the end of structure, but we cannot be sure about same in future boards. > > So we decided to keep board specific stuff separate. Mainly what I'm after is reducing duplication of code and definitions. If that can be resolved by board-specific include files including common headers or a "common bits" library pulled in by board-specific libraries, that sounds good to me. Thanks, Leif