]>
git.ipfire.org Git - people/ms/u-boot.git/blob - tools/kwbimage.h
3 * Marvell Semiconductor <www.marvell.com>
4 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
6 * SPDX-License-Identifier: GPL-2.0+
14 #define KWBIMAGE_MAX_CONFIG ((0x1dc - 0x20)/sizeof(struct reg_config))
15 #define MAX_TEMPBUF_LEN 32
18 #define IBR_HDR_ECC_DEFAULT 0x00
19 #define IBR_HDR_ECC_FORCED_HAMMING 0x01
20 #define IBR_HDR_ECC_FORCED_RS 0x02
21 #define IBR_HDR_ECC_DISABLED 0x03
23 /* Boot Type - block ID */
24 #define IBR_HDR_I2C_ID 0x4D
25 #define IBR_HDR_SPI_ID 0x5A
26 #define IBR_HDR_NAND_ID 0x8B
27 #define IBR_HDR_SATA_ID 0x78
28 #define IBR_HDR_PEX_ID 0x9C
29 #define IBR_HDR_UART_ID 0x69
30 #define IBR_DEF_ATTRIB 0x00
42 enum kwbimage_cmd_types
{
50 typedef struct bhr_t
{
51 uint8_t blockid
; /*0 */
52 uint8_t nandeccmode
; /*1 */
53 uint16_t nandpagesize
; /*2-3 */
54 uint32_t blocksize
; /*4-7 */
55 uint32_t rsvd1
; /*8-11 */
56 uint32_t srcaddr
; /*12-15 */
57 uint32_t destaddr
; /*16-19 */
58 uint32_t execaddr
; /*20-23 */
59 uint8_t satapiomode
; /*24 */
60 uint8_t rsvd3
; /*25 */
61 uint16_t ddrinitdelay
; /*26-27 */
62 uint16_t rsvd2
; /*28-29 */
64 uint8_t checkSum
; /*31 */
72 typedef struct extbhr_t
{
73 uint32_t dramregsoffs
;
74 uint8_t rsrvd1
[0x20 - sizeof(uint32_t)];
75 struct reg_config rcfg
[KWBIMAGE_MAX_CONFIG
];
78 } extbhr_t
, *pextbhr_t
;
88 void init_kwb_image_type (void);
90 #endif /* _KWBIMAGE_H_ */