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::234; helo=mail-wr0-x234.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (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 E633C2034D83F for ; Tue, 7 Nov 2017 07:46:59 -0800 (PST) Received: by mail-wr0-x234.google.com with SMTP id l22so1507694wrc.11 for ; Tue, 07 Nov 2017 07:50:59 -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=xGtdmd4iqsj+N4pJIc1jW+XVC+GBPzUw5HBU/J0BhTc=; b=jirAr2F+EVnGiJgNUIEIuQDA8egQm6b9BXuYvyOZut7bPNX5m9MEmEjswJk3ndsc7j O0tiDKesw3ArbTM8HKizROU+3aPgVd/3jTjoqlI128GfWCGNyOk5xlAGln9l+tM5ALAm OuTuyR8WU6ClSX3P4nB/IxSvOcxEtSpLtE/N8= 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=xGtdmd4iqsj+N4pJIc1jW+XVC+GBPzUw5HBU/J0BhTc=; b=sUBiSEvE8Djl17hWrNax5SGfkAJr9XGer5Us2y0p47ZuGTUfgxbOqBBBs0yk3k3/E+ yYCNtSWYRfC8Mc4Oxsx/66M+Y6TnOJapxx0Xn0Wtkbp6cahyrnqTC1S84ez4GdA1iX8q mDrMjVn3jFfIB8qb2jHjjccPpSk4/jbNVlF/oLUnSPcm+R3zNqsFlqhpuKkTFC39mqDg dpZ6GSZXS8QcsFIb46HzhBidxP7qeFfTXkUWQpPQetYR6rU4E6yuDOMR/tjFjFXS/yCq 8LU6u8OgTZG8pxqBH1RhieJXzo3+uHI8uwygvsbv4ei2wdKAXe72i4ttnjSape/g62dl fcCQ== X-Gm-Message-State: AMCzsaX6H0PDwPS2D5pMMejPIcYBLlOqK2FbdDLqd0NJmI403baY1htr t0ADlQLRbl6TaICwb8rC4CxsEA== X-Google-Smtp-Source: ABhQp+RqgyCj5AZkDtFNkiWYyS00obM/cVKtdfxxoNSCrtInO4jadI0v6zKhfSQJGXLD+CfSu/YnLQ== X-Received: by 10.223.196.174 with SMTP id m43mr17402841wrf.7.1510069857899; Tue, 07 Nov 2017 07:50:57 -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 195sm36175901wmj.3.2017.11.07.07.50.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Nov 2017 07:50:56 -0800 (PST) Date: Tue, 7 Nov 2017 15:50:54 +0000 From: Leif Lindholm To: Marcin Wojtas Cc: edk2-devel-01 , "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" , Ard Biesheuvel , nadavh@marvell.com, Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , semihalf-dabros-jan Message-ID: <20171107155054.facfmiert7z5nicz@bivouac.eciton.net> References: <1509731717-5620-1-git-send-email-mw@semihalf.com> <20171107153751.xz2nb4eeo6ihxso3@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH v3 1/1] EmbeddedPkg: Implement NorFlashInfoLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2017 15:47:00 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 07, 2017 at 04:45:19PM +0100, Marcin Wojtas wrote: > Hi Leif, > > 2017-11-07 16:37 GMT+01:00 Leif Lindholm : > > On Fri, Nov 03, 2017 at 06:55:17PM +0100, Marcin Wojtas wrote: > >> The SPI NOR flash drivers which base on ArmPlatformPkg's > >> NorFlashDxe usually make use of static declarations of the > >> flash instances with their type and parameters. As a result > >> it implies hardcoding the exact way of flash handling, not to > >> mention the code does not look very nice. Much better solution > >> would be obtaining the flash ID and hence its description > >> in runtime. > >> > >> JEDEC compliant SPI NOR devices allow to obtain their IDs with > >> READ_ID command (0x9f), which should return the vendor ID byte, > >> followed by 2 to 4 following device ID bytes. Use this capability > >> for implementing a NorFlashInfoLib that gives an access to the > >> NOR flash description data, such as name, page size, sector > >> (block) size and others, of more than 50 different models. > >> The new library user should pass an output array from issuing > >> READ_ID command to the NorFlashGetInfo () routine - if the > >> match is found, an allocated (optionally for RT) pool with > >> the flash description copy will be returned. > >> > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Marcin Wojtas > >> > >> ========================== > > > > Please, the separator is --- > > The below does not belong in the commit message (but should be > > included below --- for clarity). > > > > > > I would however also like to fold in the following hunk, to enable > > standalone building: > > > > diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc > > index d7ee6a3018..bc19000e4b 100644 > > --- a/EmbeddedPkg/EmbeddedPkg.dsc > > +++ b/EmbeddedPkg/EmbeddedPkg.dsc > > @@ -282,6 +282,8 @@ [Components.common] > > > > EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf > > > > + EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf > > + > > [Components.ARM] > > EmbeddedPkg/Drivers/Isp1761UsbDxe/Isp1761UsbDxe.inf > > > > If you are OK with these changes: > > Reviewed-by: Leif Lindholm > > (do let me know) > > Thanks, I'm of course ok with the changes. Should I resubmit? Nah, that's fine. Pushed as 7046610163. (no that's not my phone number accidentally pasted, it's a short hash containing no a-f) / Leif