From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2607:f8b0:4001:c06::22b; helo=mail-io0-x22b.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (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 1C2F02034D812 for ; Tue, 7 Nov 2017 07:51:54 -0800 (PST) Received: by mail-io0-x22b.google.com with SMTP id e89so2602965ioi.11 for ; Tue, 07 Nov 2017 07:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Xqd6drWdq5Esr7Ol26Y/EeawbhU6v/8vhHtb0whgbkg=; b=QQkYW8IHzhCWdosOLgTpKqzJdM8FEOJF2llz4kq9CaW4EatweNc9ELZLX2Ufx0iqHB /TOXFkZxBpfu4oVSo5QYoRax4iEWpJWjH6weiiTh8sfmUSeUrQDdHCWJzJ0oiyPlwr2f 5vfYCPFVQCTCZuBH2N/Tu951x3jH2DyfrYKUL9Zotrggkl5U/hovWZdOkcj0x0IUOmNw JWDrLq7FmR+kcN1xZ1FmB5yJkxMyiR8JAFkX+neTHfavYUyl+sFr9onOxKuvcIjToyt3 Bbagv7ZIEn1HaulTDMd4dDBDwaK3bxeA2UzvbFrhzpy3YccSMT3kcUQP/lCAvHOlo2rB fQVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Xqd6drWdq5Esr7Ol26Y/EeawbhU6v/8vhHtb0whgbkg=; b=FBfKreBUSjYP0tMfDRCoz0nCi0bQMv+FxI9riVoB7FjnRFV5QQVakrbwagnb0+iV1Z YhC0ASSOt157LY9lm5jRpjABN9cD8/L/zuOyfSgMMa3lsyumOikNnuBdQsEUgzZllLW8 qtKgLuK8SAt88H+VxVkSjWGtBeJES6MFB5XJnGygX7IQU6DKXCdLpLl68qwo5zDZaDwD aO7J1Rlv3ec724/2/m74J8Rhx39EbweMJy/TgSbGuL5HpjgI95ZbGDOhhR8xphG3lsr5 Ld84QKGQQtFpRBIUDjVaf2Z52+hAAYfgY5xfuViZ9V96NdTypD/ETxosDKdLSFe7zoB2 SdeA== X-Gm-Message-State: AJaThX6+urrK4LhTbRNuVRF+uRwS/5nzhjRlNjArH5lD6Yd3GQxwG8B7 RtNJIhbpjmUSX9cgOoMidSexELfvoorir+CBPta7cg== X-Google-Smtp-Source: ABhQp+RUfmCP9PCv6P750uRGzzWKorN2e7Zkxv78THC4tiz7pB6Y2pt92ImmWDmo61tXBYUcZYDfdoW/U8s4L4OPc+k= X-Received: by 10.107.68.10 with SMTP id r10mr24795479ioa.202.1510070153216; Tue, 07 Nov 2017 07:55:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.167.208 with HTTP; Tue, 7 Nov 2017 07:55:52 -0800 (PST) In-Reply-To: <20171107155054.facfmiert7z5nicz@bivouac.eciton.net> References: <1509731717-5620-1-git-send-email-mw@semihalf.com> <20171107153751.xz2nb4eeo6ihxso3@bivouac.eciton.net> <20171107155054.facfmiert7z5nicz@bivouac.eciton.net> From: Marcin Wojtas Date: Tue, 7 Nov 2017 16:55:52 +0100 Message-ID: To: Leif Lindholm 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 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:51:54 -0000 Content-Type: text/plain; charset="UTF-8" 2017-11-07 16:50 GMT+01:00 Leif Lindholm : > 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) > Thanks!