NetBurner 3.5.6
PDF Version
imx_boot.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4#ifndef __IMX_BOOT_H
5#define __IMX_BOOT_H
6
7#include <predef.h>
8#include <basictypes.h>
9#include <sim.h>
10#include <hal.h>
11
12#define IVT_TAG (0xD1)
13
14#define DCD_CMD_WR (0xCC)
15#define DCD_CMD_CK (0xCF)
16#define DCD_CMD_NOP (0xC0)
17
18#define DCD_WR_WR (0x00)
19#define DCD_WR_CLR (0x40)
20#define DCD_WR_SET (0xC0)
21#define DCD_WR_BYTE (0x01)
22#define DCD_WR_HALF (0x02)
23#define DCD_WR_WORD (0x04)
24
25#define DCD_CK_ALL_CLR (0x00)
26#define DCD_CK_ALL_SET (0x80)
27#define DCD_CK_ANY_CLR (0x40)
28#define DCD_CK_ANY_SET (0xC0)
29#define DCD_CK_BYTE (0x01)
30#define DCD_CK_HALF (0x02)
31#define DCD_CK_WORD (0x04)
32
33struct FlexSpi_Cfg_Block_t {
34 uint32_t tag;
35 uint32_t version;
36 uint8_t _reserved0;
37 uint8_t readSampleClkSrc;
38 uint8_t csHoldTime;
39 uint8_t csSetupTime;
40 uint8_t colAddrWidth;
41 uint8_t devModeCfgEnable;
42 uint8_t _reserved1;
43 uint16_t waitTimeCfgCommands;
44 uint32_t devModeSeq;
45 uint32_t devModeArg;
46
47} __attribute__((packed));
48
49struct DCD_header_t {
50 uint8_t tag;
51 uint16_t beLength; // needs to be big endian
52 uint8_t version;
53};
54
55struct DCD_cmdhdr_t {
56 uint8_t tag;
57 uint16_t beLength; // needs to be big endian
58 uint8_t parameter;
59};
60
61struct DCD_cmd_wr_t {
62 uint32_t addr;
63 uint32_t val_mask;
64};
65
66struct DCD_cmd_ck_t {
67 uint32_t addr;
68 uint32_t mask;
69 uint32_t count;
70};
71
72struct Boot_Data_t {
73 uint32_t startAddr;
74 uint32_t length;
75 uint32_t isPlugin;
76};
77
78struct IVT_header_t {
79 uint8_t tag;
80 uint16_t beLength; // needs to be big endian
81 uint8_t version;
82};
83
84struct IVT_t {
85 IVT_header_t header;
86 uint32_t entry;
87 uint32_t reserved1;
88 uint32_t devConfData;
89 uint32_t bootData;
90 IVT_t *self;
91 uint32_t comSeqFile;
92 uint32_t reserved2;
93};
94
95#endif /* ----- #ifndef __IMX_BOOT_H ----- */