Home | History | Annotate | Download | only in Protocol
      1 /** @file
      2 *
      3 *  Copyright (c) 2015, Hisilicon Limited. All rights reserved.
      4 *  Copyright (c) 2015, Linaro Limited. All rights reserved.
      5 *
      6 *  This program and the accompanying materials
      7 *  are licensed and made available under the terms and conditions of the BSD License
      8 *  which accompanies this distribution.  The full text of the license may be found at
      9 *  http://opensource.org/licenses/bsd-license.php
     10 *
     11 *  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12 *  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13 *
     14 **/
     15 
     16 
     17 #ifndef _NOR_FLASH_PROTOCOL_H_
     18 #define _NOR_FLASH_PROTOCOL_H_
     19 
     20 #define UNI_NOR_FLASH_PROTOCOL_GUID   \
     21     {0x86F305EA, 0xDFAC, 0x4A6B, {0x92, 0x77, 0x47, 0x31, 0x2E, 0xCE, 0x42, 0xA}}
     22 
     23 typedef struct _UNI_NOR_FLASH_PROTOCOL UNI_NOR_FLASH_PROTOCOL;
     24 
     25 typedef
     26 EFI_STATUS
     27 (EFIAPI *UNI_FLASH_ERASE_INTERFACE) (
     28     IN UNI_NOR_FLASH_PROTOCOL   *This,
     29     IN UINT32                  Offset,
     30     IN UINT32                  Length
     31     );
     32 typedef
     33 EFI_STATUS
     34 (EFIAPI *UNI_FLASH_WRITE_INTERFACE) (
     35     IN UNI_NOR_FLASH_PROTOCOL   *This,
     36     IN  UINT32                 Offset,
     37     IN  UINT8                 *Buffer,
     38     UINT32                   ulLength
     39     );
     40 
     41 typedef
     42 EFI_STATUS
     43 (EFIAPI *UNI_FLASH_READ_INTERFACE) (
     44     IN UNI_NOR_FLASH_PROTOCOL   *This,
     45     IN UINT32                  Offset,
     46     IN OUT UINT8              *Buffer,
     47     IN UINT32                   ulLen
     48     );
     49 
     50 
     51 struct _UNI_NOR_FLASH_PROTOCOL {
     52     UNI_FLASH_ERASE_INTERFACE             Erase;
     53     UNI_FLASH_WRITE_INTERFACE             Write;
     54     UNI_FLASH_READ_INTERFACE              Read;
     55 };
     56 
     57 extern EFI_GUID gUniNorFlashProtocolGuid;
     58 
     59 #endif
     60