From: Leif Lindholm <leif.lindholm@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: edk2-devel@lists.01.org, feng.tian@intel.com,
michael.d.kinney@intel.com, liming.gao@intel.com,
ard.biesheuvel@linaro.org, nadavh@marvell.com, neta@marvell.com,
kostap@marvell.com, jinghua@marvell.com, jsd@semihalf.com
Subject: Re: [PATCH v3 1/1] EmbeddedPkg: Implement NorFlashInfoLib
Date: Tue, 7 Nov 2017 15:37:52 +0000 [thread overview]
Message-ID: <20171107153751.xz2nb4eeo6ihxso3@bivouac.eciton.net> (raw)
In-Reply-To: <1509731717-5620-1-git-send-email-mw@semihalf.com>
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 <mw@semihalf.com>
>
> ==========================
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 <leif.lindholm@linaro.org>
(do let me know)
/
Leif
next prev parent reply other threads:[~2017-11-07 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 17:55 [PATCH v3 1/1] EmbeddedPkg: Implement NorFlashInfoLib Marcin Wojtas
2017-11-07 15:37 ` Leif Lindholm [this message]
2017-11-07 15:45 ` Marcin Wojtas
2017-11-07 15:50 ` Leif Lindholm
2017-11-07 15:55 ` Marcin Wojtas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171107153751.xz2nb4eeo6ihxso3@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox