3 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
7 * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
9 * See file CREDITS for list of people who contributed to this
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
41 enum ublimage_fld_types {
48 * from sprufg5a.pdf Table 110
49 * Used by RBL when doing NAND boot
51 #define UBL_MAGIC_BASE (0xA1ACED00)
53 #define UBL_MAGIC_SAFE (0x00)
55 #define UBL_MAGIC_DMA (0x11)
56 /* I Cache boot mode */
57 #define UBL_MAGIC_IC (0x22)
58 /* Fast EMIF boot mode */
59 #define UBL_MAGIC_FAST (0x33)
60 /* DMA + ICache boot mode */
61 #define UBL_MAGIC_DMA_IC (0x44)
62 /* DMA + ICache + Fast EMIF boot mode */
63 #define UBL_MAGIC_DMA_IC_FAST (0x55)
65 /* Define max UBL image size */
66 #define UBL_IMAGE_SIZE (0x00003800u)
69 #define UBL_BLOCK_SIZE 2048
71 /* from sprufg5a.pdf Table 109 */
73 uint32_t magic; /* Magic Number, see UBL_* defines */
74 uint32_t entry; /* entry point address for bootloader */
75 uint32_t pages; /* number of pages (size of bootloader) */
77 * blocknumber where user bootloader is
81 * page number where user bootloader is
85 * PLL setting -Multiplier (only valid if
86 * Magic Number indicates PLL enable).
89 * PLL setting -Divider (only valid if
90 * Magic Number indicates PLL enable).
93 * fast EMIF setting (only valid if
94 * Magic Number indicates fast EMIF boot).
96 /* to fit in one nand block */
97 unsigned char res[UBL_BLOCK_SIZE - 8 * 4];
100 #endif /* _UBLIMAGE_H_ */