ArmPlatformPkg: add Null implementation of NorFlashPlatformLib
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 5 Dec 2017 10:09:59 +0000 (10:09 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 8 Dec 2017 16:31:23 +0000 (16:31 +0000)
In order to be able to build ArmPlatformPkg components outside of
the context of a particular platform, add Null implementation of
NorFlashPlatformLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c [new file with mode: 0644]
ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf [new file with mode: 0644]

diff --git a/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c b/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c
new file mode 100644 (file)
index 0000000..264d187
--- /dev/null
@@ -0,0 +1,34 @@
+/** @file\r
+\r
+ Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>\r
+\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ **/\r
+\r
+#include <Library/NorFlashPlatformLib.h>\r
+\r
+EFI_STATUS\r
+NorFlashPlatformInitialization (\r
+  VOID\r
+  )\r
+{\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+NorFlashPlatformGetDevices (\r
+  OUT NOR_FLASH_DESCRIPTION   **NorFlashDescriptions,\r
+  OUT UINT32                  *Count\r
+  )\r
+{\r
+  *NorFlashDescriptions = NULL;\r
+  *Count = 0;\r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf b/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf
new file mode 100644 (file)
index 0000000..777a629
--- /dev/null
@@ -0,0 +1,30 @@
+#/** @file\r
+#\r
+#  Component description file for NorFlashPlatformNullLib module\r
+#\r
+#  Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>\r
+#\r
+#  This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = NorFlashPlatformNullLib\r
+  FILE_GUID                      = 29b733ad-d066-4df6-8a89-b9df1beb818a\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = NorFlashPlatformLib\r
+\r
+[Sources.common]\r
+  NorFlashPlatformNullLib.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  ArmPlatformPkg/ArmPlatformPkg.dec\r