efi_loader: variable: add VendorKeys variable
[oweals/u-boot.git] / include / flash.h
index dc67cb2df61672272f2fec51a77c3a888c0c633e..2655c72087fbea46cf3cf2a8c7ac7ad67c98044c 100644 (file)
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * (C) Copyright 2000-2005
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef _FLASH_H_
@@ -45,7 +44,7 @@ typedef struct {
        uchar   sr_supported;           /* status register supported            */
        const char *name;               /* human-readable name                  */
 #endif
-#ifdef CONFIG_MTD
+#ifdef CONFIG_DM_MTD
        struct mtd_info *mtd;
 #endif
 #ifdef CONFIG_CFI_FLASH                        /* DM-specific parts */
@@ -118,11 +117,18 @@ extern int jedec_flash_match(flash_info_t *info, ulong base);
 #define CFI_CMDSET_AMD_LEGACY          0xFFF0
 #endif
 
+/**
+ * flash_perror() - Print a flash error
+ *
+ * @err: Error number of message to print (ERR_... as below)
+ */
+void flash_perror(int err);
+
 /*-----------------------------------------------------------------------
  * return codes from flash_write():
  */
 #define ERR_OK                         0
-#define ERR_TIMOUT                     1
+#define ERR_TIMEOUT                    1
 #define ERR_NOT_ERASED                 2
 #define ERR_PROTECTED                  4
 #define ERR_INVAL                      8