1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * (C) Copyright 2011 4 * Stefano Babic, DENX Software Engineering, sbabic@denx.de. 5 */ 6 7 #ifndef _AISIMAGE_H_ 8 #define _AISIMAGE_H_ 9 10 /* all values are for little endian systems */ 11 #define AIS_MAGIC_WORD 0x41504954 12 #define AIS_FCN_MAX 8 13 14 enum { 15 AIS_CMD_LOAD = 0x58535901, 16 AIS_CMD_VALCRC = 0x58535902, 17 AIS_CMD_ENCRC = 0x58535903, 18 AIS_CMD_DISCRC = 0x58535904, 19 AIS_CMD_JMP = 0x58535905, 20 AIS_CMD_JMPCLOSE = 0x58535906, 21 AIS_CMD_BOOTTBL = 0x58535907, 22 AIS_CMD_FILL = 0x5853590A, 23 AIS_CMD_FNLOAD = 0x5853590D, 24 AIS_CMD_SEQREAD = 0x58535963, 25 }; 26 27 struct ais_cmd_load { 28 uint32_t cmd; 29 uint32_t addr; 30 uint32_t size; 31 uint32_t data[1]; 32 }; 33 34 struct ais_cmd_func { 35 uint32_t cmd; 36 uint32_t func_args; 37 uint32_t parms[AIS_FCN_MAX]; 38 }; 39 40 struct ais_cmd_jmpclose { 41 uint32_t cmd; 42 uint32_t addr; 43 }; 44 45 #define CMD_DATA_STR "DATA" 46 47 enum ais_file_cmd { 48 CMD_INVALID, 49 CMD_FILL, 50 CMD_CRCON, 51 CMD_CRCOFF, 52 CMD_CRCCHECK, 53 CMD_JMPCLOSE, 54 CMD_JMP, 55 CMD_SEQREAD, 56 CMD_DATA, 57 CMD_PLL0, 58 CMD_PLL1, 59 CMD_CLK, 60 CMD_DDR2, 61 CMD_EMIFA, 62 CMD_EMIFA_ASYNC, 63 CMD_PLL, 64 CMD_PSC, 65 CMD_PINMUX, 66 CMD_BOOTTABLE 67 }; 68 69 enum aisimage_fld_types { 70 CFG_INVALID = -1, 71 CFG_COMMAND, 72 CFG_VALUE, 73 }; 74 75 struct ais_header { 76 uint32_t magic; 77 char data[1]; 78 }; 79 80 #endif /* _AISIMAGE_H_ */ 81