1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
8 * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
24 enum ublimage_fld_types {
31 * from sprufg5a.pdf Table 110
32 * Used by RBL when doing NAND boot
34 #define UBL_MAGIC_BASE (0xA1ACED00)
36 #define UBL_MAGIC_SAFE (0x00)
38 #define UBL_MAGIC_DMA (0x11)
39 /* I Cache boot mode */
40 #define UBL_MAGIC_IC (0x22)
41 /* Fast EMIF boot mode */
42 #define UBL_MAGIC_FAST (0x33)
43 /* DMA + ICache boot mode */
44 #define UBL_MAGIC_DMA_IC (0x44)
45 /* DMA + ICache + Fast EMIF boot mode */
46 #define UBL_MAGIC_DMA_IC_FAST (0x55)
48 /* Define max UBL image size */
49 #define UBL_IMAGE_SIZE (0x00003800u)
52 #define UBL_BLOCK_SIZE 2048
54 /* from sprufg5a.pdf Table 109 */
56 uint32_t magic; /* Magic Number, see UBL_* defines */
57 uint32_t entry; /* entry point address for bootloader */
58 uint32_t pages; /* number of pages (size of bootloader) */
60 * blocknumber where user bootloader is
64 * page number where user bootloader is
68 * PLL setting -Multiplier (only valid if
69 * Magic Number indicates PLL enable).
72 * PLL setting -Divider (only valid if
73 * Magic Number indicates PLL enable).
76 * fast EMIF setting (only valid if
77 * Magic Number indicates fast EMIF boot).
79 /* to fit in one nand block */
80 unsigned char res[UBL_BLOCK_SIZE - 8 * 4];
83 #endif /* _UBLIMAGE_H_ */