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