.. | .. |
---|
23 | 23 | #define DLOG(x...) |
---|
24 | 24 | #endif |
---|
25 | 25 | |
---|
26 | | -struct vendor_item { |
---|
27 | | - u16 id; |
---|
28 | | - u16 offset; |
---|
29 | | - u16 size; |
---|
30 | | - u16 flag; |
---|
31 | | -}; |
---|
32 | | - |
---|
33 | 26 | #define FLASH_VENDOR_PART_START 8 |
---|
34 | | -#define FLASH_VENDOR_PART_SIZE 8 |
---|
35 | 27 | #define FLASH_VENDOR_PART_NUM 4 |
---|
36 | | -#define FLASH_VENDOR_TAG 0x524B5644 |
---|
37 | | - |
---|
38 | | -struct tag_vendor_info { |
---|
39 | | - u32 tag; |
---|
40 | | - u32 version; |
---|
41 | | - u16 next_index; |
---|
42 | | - u16 item_num; |
---|
43 | | - u16 free_offset; |
---|
44 | | - u16 free_size; |
---|
45 | | - struct vendor_item item[62]; /* 62 * 8 */ |
---|
46 | | - u8 data[FLASH_VENDOR_PART_SIZE * 512 - 512 - 8]; |
---|
47 | | - u32 hash; |
---|
48 | | - u32 version2; |
---|
49 | | -}; |
---|
| 28 | +#define FLASH_VENDOR_TAG VENDOR_HEAD_TAG |
---|
50 | 29 | |
---|
51 | 30 | static int (*_flash_read)(u32 sec, u32 n_sec, void *p_data); |
---|
52 | 31 | static int (*_flash_write)(u32 sec, u32 n_sec, void *p_data); |
---|
53 | | -static struct tag_vendor_info *g_vendor; |
---|
| 32 | +static struct flash_vendor_info *g_vendor; |
---|
54 | 33 | |
---|
55 | 34 | int flash_vendor_dev_ops_register(int (*read)(u32 sec, |
---|
56 | 35 | u32 n_sec, |
---|