X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EmbeddedPkg%2FInclude%2FLibrary%2FNorFlashInfoLib.h;h=e19039d870bb3971387e5fead686652935876ce9;hp=c3761108bc0976dafc841cde3094349b69b24fd0;hb=HEAD;hpb=7046610163d3dd0f6b410ae0b3a564917db4ed0a diff --git a/EmbeddedPkg/Include/Library/NorFlashInfoLib.h b/EmbeddedPkg/Include/Library/NorFlashInfoLib.h index c3761108bc..9a26159d19 100644 --- a/EmbeddedPkg/Include/Library/NorFlashInfoLib.h +++ b/EmbeddedPkg/Include/Library/NorFlashInfoLib.h @@ -2,13 +2,7 @@ * * Copyright (c) 2017 Marvell International Ltd. * -* This program and the accompanying materials -* are licensed and made available under the terms and conditions of the BSD License -* which accompanies this distribution. The full text of the license may be found at -* http://opensource.org/licenses/bsd-license.php -* -* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +* SPDX-License-Identifier: BSD-2-Clause-Patent * **/ @@ -17,45 +11,45 @@ #include -#define NOR_FLASH_MAX_ID_LEN 6 +#define NOR_FLASH_MAX_ID_LEN 6 typedef struct { /* Device name */ - UINT16 *Name; + UINT16 *Name; /* * JEDEC ID */ - UINT8 Id[NOR_FLASH_MAX_ID_LEN]; - UINT8 IdLen; + UINT8 Id[NOR_FLASH_MAX_ID_LEN]; + UINT8 IdLen; - UINT16 PageSize; + UINT16 PageSize; /* * Below parameters can be referred as BlockSize * and BlockCount, when treating the NorFlash as * block device. */ - UINT32 SectorSize; - UINT32 SectorCount; - - UINT16 Flags; -#define NOR_FLASH_ERASE_4K (1 << 0) /* Use 4 KB erase blocks and CMD_ERASE_4K */ -#define NOR_FLASH_ERASE_32K (1 << 1) /* Use 32 KB erase blocks and CMD_ERASE_32K */ -#define NOR_FLASH_WRITE_FSR (1 << 2) /* Use flag status register for write */ -#define NOR_FLASH_4B_ADDR (1 << 3) /* Use 4B addressing */ + UINT32 SectorSize; + UINT32 SectorCount; + + UINT16 Flags; + #define NOR_FLASH_ERASE_4K (1 << 0) /* Use 4 KB erase blocks and CMD_ERASE_4K */ + #define NOR_FLASH_ERASE_32K (1 << 1) /* Use 32 KB erase blocks and CMD_ERASE_32K */ + #define NOR_FLASH_WRITE_FSR (1 << 2) /* Use flag status register for write */ + #define NOR_FLASH_4B_ADDR (1 << 3) /* Use 4B addressing */ } NOR_FLASH_INFO; /* Vendor IDs */ -#define NOR_FLASH_ID_ATMEL 0x1f -#define NOR_FLASH_ID_EON 0x1c -#define NOR_FLASH_ID_GIGADEVICE 0xc8 -#define NOR_FLASH_ID_ISSI 0x9d -#define NOR_FLASH_ID_MACRONIX 0xc2 -#define NOR_FLASH_ID_SPANSION 0x01 -#define NOR_FLASH_ID_STMICRO 0x20 -#define NOR_FLASH_ID_SST 0xbf -#define NOR_FLASH_ID_WINDBOND 0xef +#define NOR_FLASH_ID_ATMEL 0x1f +#define NOR_FLASH_ID_EON 0x1c +#define NOR_FLASH_ID_GIGADEVICE 0xc8 +#define NOR_FLASH_ID_ISSI 0x9d +#define NOR_FLASH_ID_MACRONIX 0xc2 +#define NOR_FLASH_ID_SPANSION 0x01 +#define NOR_FLASH_ID_STMICRO 0x20 +#define NOR_FLASH_ID_SST 0xbf +#define NOR_FLASH_ID_WINDBOND 0xef /** Return an allocated copy pool of the NOR flash information structure. @@ -76,9 +70,9 @@ typedef struct { EFI_STATUS EFIAPI NorFlashGetInfo ( - IN UINT8 *Id, + IN UINT8 *Id, IN OUT NOR_FLASH_INFO **FlashInfo, - IN BOOLEAN AllocateForRuntime + IN BOOLEAN AllocateForRuntime ); /** @@ -93,4 +87,5 @@ EFIAPI NorFlashPrintInfo ( IN NOR_FLASH_INFO *Info ); + #endif