hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/soc/rockchip/flash_vendor_storage.c
....@@ -23,34 +23,13 @@
2323 #define DLOG(x...)
2424 #endif
2525
26
-struct vendor_item {
27
- u16 id;
28
- u16 offset;
29
- u16 size;
30
- u16 flag;
31
-};
32
-
3326 #define FLASH_VENDOR_PART_START 8
34
-#define FLASH_VENDOR_PART_SIZE 8
3527 #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
5029
5130 static int (*_flash_read)(u32 sec, u32 n_sec, void *p_data);
5231 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;
5433
5534 int flash_vendor_dev_ops_register(int (*read)(u32 sec,
5635 u32 n_sec,