diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-01-30 17:07:56 +0800 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-04-29 14:56:33 +0800 |
commit | 0393e813c0ab5050125cd19bc78d6e5b2d487e0d (patch) | |
tree | decea93cfeea06c7fbb1838decb5f9685a7096a1 /tools/imximage.h | |
parent | 3d52e221ed444dab96038a2417d1dcb2217ad593 (diff) | |
download | u-boot-imx-0393e813c0ab5050125cd19bc78d6e5b2d487e0d.zip u-boot-imx-0393e813c0ab5050125cd19bc78d6e5b2d487e0d.tar.gz u-boot-imx-0393e813c0ab5050125cd19bc78d6e5b2d487e0d.tar.bz2 |
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.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/tools/imximage.h b/tools/imximage.h index d5be43d0..d29004c 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 { @@ -182,7 +197,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, |