summaryrefslogtreecommitdiff
path: root/tools/imximage.h
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-01-30 17:07:56 +0800
committerMax Krummenacher <max.krummenacher@toradex.com>2016-03-09 14:42:10 +0100
commitffeb5e2feee004393a87fd96a12f85bfec26f468 (patch)
tree1a4ca9cf312e04f6b38b8a4bcfe4e889577076a0 /tools/imximage.h
parent83429ea6af4094a05e87d3f00661db6918bafcb2 (diff)
MLK-10186-2 imximage: support new command
Since rom code supports clear bit and check data command, and new ddrc needs such commands, add clear bit and check data command in imximage.c. CHECK_DATA 4 xxxx bit This command is dead loop until bit set at address xxxx. CLR_BIT 4 xxxx bit This command is to clear bit at address xxxx. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 257600d197bf9a58a2b8d08419296aaf901d850d) Conflicts: tools/imximage.c
Diffstat (limited to 'tools/imximage.h')
-rw-r--r--tools/imximage.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/tools/imximage.h b/tools/imximage.h
index c05426035a..2d33f8f5e1 100644
--- a/tools/imximage.h
+++ b/tools/imximage.h
@@ -11,6 +11,7 @@
#define _IMXIMAGE_H_
#include <config.h>
+#include <linux/sizes.h>
#define MAX_HW_CFG_SIZE_V2 220 /* Max number of registers imx can set for v2 */
#define MAX_PLUGIN_CODE_SIZE (16*1024)
#define MAX_HW_CFG_SIZE_V1 60 /* Max number of registers imx can set for v1 */
@@ -61,12 +62,20 @@
#define DCD_VERSION 0x40
#define DCD_COMMAND_PARAM 0x4
+#define DCD_WRITE_DATA_COMMAND_TAG 0xCC
+#define DCD_WRITE_DATA_PARAM 0x4
+#define DCD_CLR_BIT_PARAM 0xC
+#define DCD_CHECK_DATA_COMMAND_TAG 0xCF
+#define DCD_CHECK_DATA_PARAM 0x14
+
enum imximage_cmd {
CMD_INVALID,
CMD_IMAGE_VERSION,
CMD_BOOT_FROM,
CMD_BOOT_OFFSET,
CMD_DATA,
+ CMD_CLR_BIT,
+ CMD_CHECK_DATA,
CMD_CSF,
CMD_PLUGIN,
};
@@ -139,9 +148,15 @@ typedef struct {
} __attribute__((packed)) write_dcd_command_t;
typedef struct {
+ uint8_t tag;
+ uint16_t length;
+ uint8_t param;
+ dcd_addr_data_t addr_data[0];
+} __attribute__((packed)) dcd_command_t;
+
+typedef struct {
ivt_header_t header;
- write_dcd_command_t write_dcd_command;
- dcd_addr_data_t addr_data[MAX_HW_CFG_SIZE_V2];
+ uint32_t dcd_data[SZ_512];
} dcd_v2_t;
typedef struct {
@@ -183,7 +198,7 @@ struct imx_header {
typedef void (*set_dcd_val_t)(struct imx_header *imxhdr,
char *name, int lineno,
- int fld, uint32_t value,
+ int fld, int cmd, uint32_t value,
uint32_t off);
typedef void (*set_dcd_rst_t)(struct imx_header *imxhdr,