board: sama5d3_xplained: Fix SPL DTB read from NAND
[oweals/u-boot.git] / include / fpga.h
index f4440933531f41a5ac9a339119200a71bc968f20..ec5144334df1f393930ca9e09b9c167e8d86b6d0 100644 (file)
 
 /* fpga_xxxx function return value definitions */
 #define FPGA_SUCCESS           0
-#define FPGA_FAIL              -1
+#define FPGA_FAIL              1
 
 /* device numbers must be non-negative */
 #define FPGA_INVALID_DEVICE    -1
 
+#define FPGA_ENC_USR_KEY       1
+#define FPGA_NO_ENC_OR_NO_AUTH 2
+
 /* root data type defintions */
 typedef enum {                 /* typedef fpga_type */
        fpga_min_type,          /* range check value */
@@ -38,10 +41,16 @@ typedef struct {                /* typedef fpga_desc */
        unsigned int blocksize;
        char *interface;
        char *dev_part;
-       char *filename;
+       const char *filename;
        int fstype;
 } fpga_fs_info;
 
+struct fpga_secure_info {
+       u8 *userkey_addr;
+       u8 authflag;
+       u8 encflag;
+};
+
 typedef enum {
        BIT_FULL = 0,
        BIT_PARTIAL,
@@ -58,6 +67,8 @@ int fpga_load(int devnum, const void *buf, size_t bsize,
              bitstream_type bstype);
 int fpga_fsload(int devnum, const void *buf, size_t size,
                fpga_fs_info *fpga_fsinfo);
+int fpga_loads(int devnum, const void *buf, size_t size,
+              struct fpga_secure_info *fpga_sec_info);
 int fpga_loadbitstream(int devnum, char *fpgadata, size_t size,
                       bitstream_type bstype);
 int fpga_dump(int devnum, const void *buf, size_t bsize);