summaryrefslogtreecommitdiff
path: root/tools/imximage.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2013-04-21 05:52:22 +0000
committerStefano Babic <sbabic@denx.de>2013-05-05 17:45:04 +0200
commit895d996676b2d538657a5e058aa316a85237487c (patch)
treeda661378af1700714a56d02981900785c7badda1 /tools/imximage.h
parentfb7383a7a27a6ae2442b7f0db89831478192fd2d (diff)
imx: Align the imximage header and payload to multiples of 4k
The MX53 ROM loads the data from NAND in multiples of pages and supports maximum page size of 4k. Thus, align the image and header to 4k to be safe from ROM bugs. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@ti.com>
Diffstat (limited to 'tools/imximage.h')
-rw-r--r--tools/imximage.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/imximage.h b/tools/imximage.h
index 1445c1ee074..5c929e4987e 100644
--- a/tools/imximage.h
+++ b/tools/imximage.h
@@ -157,13 +157,14 @@ typedef struct {
dcd_v2_t dcd_table;
} imx_header_v2_t;
+/* The header must be aligned to 4k on MX53 for NAND boot */
struct imx_header {
union {
imx_header_v1_t hdr_v1;
imx_header_v2_t hdr_v2;
} header;
uint32_t flash_offset;
-};
+} __attribute__((aligned(4096)));
typedef void (*set_dcd_val_t)(struct imx_header *imxhdr,
char *name, int lineno,