mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 12:44:23 +08:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
84 lines
1.9 KiB
C
84 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2011
|
|
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
|
|
*
|
|
* Vased on:
|
|
* (C) Copyright 2009
|
|
* Stefano Babic, DENX Software Engineering, sbabic@denx.de.
|
|
*/
|
|
|
|
#ifndef _UBLIMAGE_H_
|
|
#define _UBLIMAGE_H_
|
|
|
|
enum ublimage_cmd {
|
|
CMD_INVALID,
|
|
CMD_BOOT_MODE,
|
|
CMD_ENTRY,
|
|
CMD_PAGE,
|
|
CMD_ST_BLOCK,
|
|
CMD_ST_PAGE,
|
|
CMD_LD_ADDR
|
|
};
|
|
|
|
enum ublimage_fld_types {
|
|
CFG_INVALID = -1,
|
|
CFG_COMMAND,
|
|
CFG_REG_VALUE
|
|
};
|
|
|
|
/*
|
|
* from sprufg5a.pdf Table 110
|
|
* Used by RBL when doing NAND boot
|
|
*/
|
|
#define UBL_MAGIC_BASE (0xA1ACED00)
|
|
/* Safe boot mode */
|
|
#define UBL_MAGIC_SAFE (0x00)
|
|
/* DMA boot mode */
|
|
#define UBL_MAGIC_DMA (0x11)
|
|
/* I Cache boot mode */
|
|
#define UBL_MAGIC_IC (0x22)
|
|
/* Fast EMIF boot mode */
|
|
#define UBL_MAGIC_FAST (0x33)
|
|
/* DMA + ICache boot mode */
|
|
#define UBL_MAGIC_DMA_IC (0x44)
|
|
/* DMA + ICache + Fast EMIF boot mode */
|
|
#define UBL_MAGIC_DMA_IC_FAST (0x55)
|
|
|
|
/* Define max UBL image size */
|
|
#define UBL_IMAGE_SIZE (0x00003800u)
|
|
|
|
/* one NAND block */
|
|
#define UBL_BLOCK_SIZE 2048
|
|
|
|
/* from sprufg5a.pdf Table 109 */
|
|
struct ubl_header {
|
|
uint32_t magic; /* Magic Number, see UBL_* defines */
|
|
uint32_t entry; /* entry point address for bootloader */
|
|
uint32_t pages; /* number of pages (size of bootloader) */
|
|
uint32_t block; /*
|
|
* blocknumber where user bootloader is
|
|
* present
|
|
*/
|
|
uint32_t page; /*
|
|
* page number where user bootloader is
|
|
* present.
|
|
*/
|
|
uint32_t pll_m; /*
|
|
* PLL setting -Multiplier (only valid if
|
|
* Magic Number indicates PLL enable).
|
|
*/
|
|
uint32_t pll_n; /*
|
|
* PLL setting -Divider (only valid if
|
|
* Magic Number indicates PLL enable).
|
|
*/
|
|
uint32_t emif; /*
|
|
* fast EMIF setting (only valid if
|
|
* Magic Number indicates fast EMIF boot).
|
|
*/
|
|
/* to fit in one nand block */
|
|
unsigned char res[UBL_BLOCK_SIZE - 8 * 4];
|
|
};
|
|
|
|
#endif /* _UBLIMAGE_H_ */
|