Commit e4d59235 authored by Marek Vasut's avatar Marek Vasut

mxssb: Remove payload and length from command stream

The command stream now only contains the filename as it should.
The IVTs are currently handled via little hack, but this will
change once there is a proper file parser.
Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
parent 1c3fb446
......@@ -129,8 +129,7 @@ static struct sb_source_entry mx28_boot_list[] = {
}, {
.tag = ROM_LOAD_CMD,
.address = SB_IVT_LOAD_ADDR,
.payload = (uint8_t *)&sb_spl_ivt,
.length = sizeof(sb_spl_ivt),
.filename = "ivt:spl",
}, {
.tag = ROM_CALL_CMD,
.flags = ROM_CALL_CMD_FLAG_HAB,
......@@ -143,8 +142,7 @@ static struct sb_source_entry mx28_boot_list[] = {
}, {
.tag = ROM_LOAD_CMD,
.address = SB_IVT_LOAD_ADDR,
.payload = (uint8_t *)&sb_uboot_ivt,
.length = sizeof(sb_uboot_ivt),
.filename = "ivt:u-boot",
}, {
.tag = ROM_CALL_CMD,
.flags = ROM_CALL_CMD_FLAG_HAB,
......@@ -628,14 +626,19 @@ static int sb_parse_cmds(struct sb_section_ctx *sctx)
/* FIXME -- this is where the file loading will happen. */
if (src->tag == ROM_LOAD_CMD) {
if (src->filename) {
/* !FIXME HACK! -- generate IVT entries properly */
if (!strcmp(src->filename, "ivt:spl")) {
cctx->ivt = 1;
cctx->data = (uint8_t *)&sb_spl_ivt;
cctx->length = sizeof(sb_spl_ivt);
} else if (!strcmp(src->filename, "ivt:u-boot")) {
cctx->ivt = 1;
cctx->data = (uint8_t *)&sb_uboot_ivt;
cctx->length = sizeof(sb_uboot_ivt);
} else {
ret = sb_load_file(cctx, src);
if (ret)
goto err;
} else { /* IVT -- FIXME */
cctx->ivt = 1;
cctx->data = src->payload;
cctx->length = src->length;
}
if (cctx->length & (SB_BLOCK_SIZE - 1))
......
......@@ -176,8 +176,6 @@ struct sb_source_entry {
uint32_t address;
uint32_t flags;
char *filename;
uint8_t *payload;
uint32_t length;
};
#endif /* __MXSSB_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment