summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/EmbeddedPkg.dec
diff options
context:
space:
mode:
authorMarcin Wojtas <mw@semihalf.com>2017-11-03 18:55:17 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2017-11-07 15:26:41 +0000
commit7046610163d3dd0f6b410ae0b3a564917db4ed0a (patch)
tree8b16ed490aee68012fe13d41708348dabbee82f8 /EmbeddedPkg/EmbeddedPkg.dec
parent62ba0febf517138a01c7a5f6d221ce6a2e4c28b6 (diff)
downloadedk2-7046610163d3dd0f6b410ae0b3a564917db4ed0a.tar.gz
edk2-7046610163d3dd0f6b410ae0b3a564917db4ed0a.tar.bz2
edk2-7046610163d3dd0f6b410ae0b3a564917db4ed0a.zip
EmbeddedPkg: Implement NorFlashInfoLib
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> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'EmbeddedPkg/EmbeddedPkg.dec')
-rw-r--r--EmbeddedPkg/EmbeddedPkg.dec1
1 files changed, 1 insertions, 0 deletions
diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec
index cb07d3ece6..af9b221f4f 100644
--- a/EmbeddedPkg/EmbeddedPkg.dec
+++ b/EmbeddedPkg/EmbeddedPkg.dec
@@ -45,6 +45,7 @@
EblNetworkLib|Include/Library/EblNetworkLib.h
GdbSerialLib|Include/Library/GdbSerialLib.h
DebugAgentTimerLib|Include/Library/DebugAgentTimerLib.h
+ NorFlashInfoLib|Include/Library/NorFlashInfoLib.h
DtPlatformDtbLoaderLib|Include/Library/DtPlatformDtbLoaderLib.h