summaryrefslogtreecommitdiff
path: root/tools/imximage.h
diff options
context:
space:
mode:
authorAdrian Alonso <aalonso@freescale.com>2015-07-20 19:04:55 -0500
committerStefano Babic <sbabic@denx.de>2015-07-26 12:07:14 +0200
commit0b7f7c339c13256a2d6f39c0323b0224cb6d46d4 (patch)
tree5943f4986caf0cd740001f462f16f3f3b6c238fc /tools/imximage.h
parent452308c02bb5f4066c8d8650e9f012e17dbb2f95 (diff)
downloadu-boot-imx-0b7f7c339c13256a2d6f39c0323b0224cb6d46d4.zip
u-boot-imx-0b7f7c339c13256a2d6f39c0323b0224cb6d46d4.tar.gz
u-boot-imx-0b7f7c339c13256a2d6f39c0323b0224cb6d46d4.tar.bz2
imx: imximage: add new CHECK/CLR BIT command
* Extend imximage DCD version 2 to support DCD commands CMD_WRITE_CLR_BIT 4 [address] [mask bit] means: while ((*address & ~mask) != 0); CMD_CHECK_BITS_SET 4 [address] [mask bit] means: while ((*address & mask) != mask); CMD_CHECK_BITS_CLR 4 [address] [mask bit] means: *address = *address & ~mask; * Add set_dcd_param_v2 helper function to set DCD command parameters Signed-off-by: Adrian Alonso <aalonso@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'tools/imximage.h')
-rw-r--r--tools/imximage.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/tools/imximage.h b/tools/imximage.h
index a913329..d41c74f 100644
--- a/tools/imximage.h
+++ b/tools/imximage.h
@@ -42,19 +42,27 @@
#define FLASH_LOADSIZE_SATA FLASH_LOADSIZE_STANDARD
#define FLASH_LOADSIZE_QSPI 0x0 /* entire image */
-#define IVT_HEADER_TAG 0xD1
-#define IVT_VERSION 0x40
-#define DCD_HEADER_TAG 0xD2
-#define DCD_COMMAND_TAG 0xCC
-#define DCD_VERSION 0x40
-#define DCD_COMMAND_PARAM 0x4
+/* Command tags and parameters */
+#define IVT_HEADER_TAG 0xD1
+#define IVT_VERSION 0x40
+#define DCD_HEADER_TAG 0xD2
+#define DCD_VERSION 0x40
+#define DCD_WRITE_DATA_COMMAND_TAG 0xCC
+#define DCD_WRITE_DATA_PARAM 0x4
+#define DCD_WRITE_CLR_BIT_PARAM 0xC
+#define DCD_CHECK_DATA_COMMAND_TAG 0xCF
+#define DCD_CHECK_BITS_SET_PARAM 0x14
+#define DCD_CHECK_BITS_CLR_PARAM 0x04
enum imximage_cmd {
CMD_INVALID,
CMD_IMAGE_VERSION,
CMD_BOOT_FROM,
CMD_BOOT_OFFSET,
- CMD_DATA,
+ CMD_WRITE_DATA,
+ CMD_WRITE_CLR_BIT,
+ CMD_CHECK_BITS_SET,
+ CMD_CHECK_BITS_CLR,
CMD_CSF,
};
@@ -168,6 +176,9 @@ typedef void (*set_dcd_val_t)(struct imx_header *imxhdr,
int fld, uint32_t value,
uint32_t off);
+typedef void (*set_dcd_param_t)(struct imx_header *imxhdr, uint32_t dcd_len,
+ int32_t cmd);
+
typedef void (*set_dcd_rst_t)(struct imx_header *imxhdr,
uint32_t dcd_len,
char *name, int lineno);