.. | .. |
---|
29 | 29 | #define LAN_RGMII_DL_ID 16 |
---|
30 | 30 | #define EINK_VCOM_ID 17 |
---|
31 | 31 | |
---|
| 32 | +#define VENDOR_HEAD_TAG 0x524B5644 |
---|
| 33 | +#define FLASH_VENDOR_PART_SIZE 8 |
---|
| 34 | +#define VENDOR_PART_SIZE 128 |
---|
| 35 | + |
---|
| 36 | +struct vendor_item { |
---|
| 37 | + u16 id; |
---|
| 38 | + u16 offset; |
---|
| 39 | + u16 size; |
---|
| 40 | + u16 flag; |
---|
| 41 | +}; |
---|
| 42 | + |
---|
| 43 | +struct vendor_info { |
---|
| 44 | + u32 tag; |
---|
| 45 | + u32 version; |
---|
| 46 | + u16 next_index; |
---|
| 47 | + u16 item_num; |
---|
| 48 | + u16 free_offset; |
---|
| 49 | + u16 free_size; |
---|
| 50 | + struct vendor_item item[126]; /* 126 * 8 */ |
---|
| 51 | + u8 data[VENDOR_PART_SIZE * 512 - 1024 - 8]; |
---|
| 52 | + u32 hash; |
---|
| 53 | + u32 version2; |
---|
| 54 | +}; |
---|
| 55 | + |
---|
| 56 | +struct flash_vendor_info { |
---|
| 57 | + u32 tag; |
---|
| 58 | + u32 version; |
---|
| 59 | + u16 next_index; |
---|
| 60 | + u16 item_num; |
---|
| 61 | + u16 free_offset; |
---|
| 62 | + u16 free_size; |
---|
| 63 | + struct vendor_item item[62]; /* 62 * 8 */ |
---|
| 64 | + u8 data[FLASH_VENDOR_PART_SIZE * 512 - 512 - 8]; |
---|
| 65 | + u32 hash; |
---|
| 66 | + u32 version2; |
---|
| 67 | +}; |
---|
| 68 | + |
---|
32 | 69 | int rk_vendor_read(u32 id, void *pbuf, u32 size); |
---|
33 | 70 | int rk_vendor_write(u32 id, void *pbuf, u32 size); |
---|
34 | 71 | int rk_vendor_register(void *read, void *write); |
---|