hc
2023-11-30 6c9be420e167ee7ce45c0309586f09ddab28ac15
kernel/include/linux/soc/rockchip/rk_vendor_storage.h
....@@ -29,6 +29,43 @@
2929 #define LAN_RGMII_DL_ID 16
3030 #define EINK_VCOM_ID 17
3131
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
+
3269 int rk_vendor_read(u32 id, void *pbuf, u32 size);
3370 int rk_vendor_write(u32 id, void *pbuf, u32 size);
3471 int rk_vendor_register(void *read, void *write);