*\r
* Copyright (c) 2017 Marvell International Ltd.\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
+* SPDX-License-Identifier: BSD-2-Clause-Patent\r
*\r
**/\r
\r
\r
#include <Uefi/UefiBaseType.h>\r
\r
-#define NOR_FLASH_MAX_ID_LEN 6\r
+#define NOR_FLASH_MAX_ID_LEN 6\r
\r
typedef struct {\r
/* Device name */\r
- UINT16 *Name;\r
+ UINT16 *Name;\r
\r
/*\r
* JEDEC ID\r
*/\r
- UINT8 Id[NOR_FLASH_MAX_ID_LEN];\r
- UINT8 IdLen;\r
+ UINT8 Id[NOR_FLASH_MAX_ID_LEN];\r
+ UINT8 IdLen;\r
\r
- UINT16 PageSize;\r
+ UINT16 PageSize;\r
\r
/*\r
* Below parameters can be referred as BlockSize\r
* and BlockCount, when treating the NorFlash as\r
* block device.\r
*/\r
- UINT32 SectorSize;\r
- UINT32 SectorCount;\r
-\r
- UINT16 Flags;\r
-#define NOR_FLASH_ERASE_4K (1 << 0) /* Use 4 KB erase blocks and CMD_ERASE_4K */\r
-#define NOR_FLASH_ERASE_32K (1 << 1) /* Use 32 KB erase blocks and CMD_ERASE_32K */\r
-#define NOR_FLASH_WRITE_FSR (1 << 2) /* Use flag status register for write */\r
-#define NOR_FLASH_4B_ADDR (1 << 3) /* Use 4B addressing */\r
+ UINT32 SectorSize;\r
+ UINT32 SectorCount;\r
+\r
+ UINT16 Flags;\r
+ #define NOR_FLASH_ERASE_4K (1 << 0) /* Use 4 KB erase blocks and CMD_ERASE_4K */\r
+ #define NOR_FLASH_ERASE_32K (1 << 1) /* Use 32 KB erase blocks and CMD_ERASE_32K */\r
+ #define NOR_FLASH_WRITE_FSR (1 << 2) /* Use flag status register for write */\r
+ #define NOR_FLASH_4B_ADDR (1 << 3) /* Use 4B addressing */\r
} NOR_FLASH_INFO;\r
\r
/* Vendor IDs */\r
-#define NOR_FLASH_ID_ATMEL 0x1f\r
-#define NOR_FLASH_ID_EON 0x1c\r
-#define NOR_FLASH_ID_GIGADEVICE 0xc8\r
-#define NOR_FLASH_ID_ISSI 0x9d\r
-#define NOR_FLASH_ID_MACRONIX 0xc2\r
-#define NOR_FLASH_ID_SPANSION 0x01\r
-#define NOR_FLASH_ID_STMICRO 0x20\r
-#define NOR_FLASH_ID_SST 0xbf\r
-#define NOR_FLASH_ID_WINDBOND 0xef\r
+#define NOR_FLASH_ID_ATMEL 0x1f\r
+#define NOR_FLASH_ID_EON 0x1c\r
+#define NOR_FLASH_ID_GIGADEVICE 0xc8\r
+#define NOR_FLASH_ID_ISSI 0x9d\r
+#define NOR_FLASH_ID_MACRONIX 0xc2\r
+#define NOR_FLASH_ID_SPANSION 0x01\r
+#define NOR_FLASH_ID_STMICRO 0x20\r
+#define NOR_FLASH_ID_SST 0xbf\r
+#define NOR_FLASH_ID_WINDBOND 0xef\r
\r
/**\r
Return an allocated copy pool of the NOR flash information structure.\r
EFI_STATUS\r
EFIAPI\r
NorFlashGetInfo (\r
- IN UINT8 *Id,\r
+ IN UINT8 *Id,\r
IN OUT NOR_FLASH_INFO **FlashInfo,\r
- IN BOOLEAN AllocateForRuntime\r
+ IN BOOLEAN AllocateForRuntime\r
);\r
\r
/**\r
NorFlashPrintInfo (\r
IN NOR_FLASH_INFO *Info\r
);\r
+\r
#endif\r