mirror of https://github.com/OpenIPC/firmware.git
51 lines
1.1 KiB
Diff
51 lines
1.1 KiB
Diff
diff -drupN a/include/linux/sunxi-panicpart.h b/include/linux/sunxi-panicpart.h
|
|
--- a/include/linux/sunxi-panicpart.h 1970-01-01 03:00:00.000000000 +0300
|
|
+++ b/include/linux/sunxi-panicpart.h 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -0,0 +1,46 @@
|
|
+/* SPDX-License-Identifier: GPL-2.0 */
|
|
+
|
|
+#ifndef __SUNXI_PANICPART_H
|
|
+#define __SUNXI_PANICPART_H
|
|
+
|
|
+#include <linux/types.h>
|
|
+
|
|
+enum sunxi_flash {
|
|
+ SUNXI_FLASH_ERROR = 0,
|
|
+ SUNXI_FLASH_MMC,
|
|
+ SUNXI_FLASH_NAND,
|
|
+ SUNXI_FLASH_NOR,
|
|
+};
|
|
+
|
|
+struct panic_part {
|
|
+ enum sunxi_flash type;
|
|
+ const char *bdev;
|
|
+ size_t start_sect;
|
|
+ size_t sects;
|
|
+
|
|
+ ssize_t (*panic_read)(struct panic_part *part, loff_t sec_off,
|
|
+ size_t sec_cnt, char *buf);
|
|
+ ssize_t (*panic_write)(struct panic_part *part, loff_t sec_off,
|
|
+ size_t sec_cnt, const char *buf);
|
|
+
|
|
+ void *private;
|
|
+};
|
|
+
|
|
+#ifdef CONFIG_SUNXI_PANICPART
|
|
+extern int sunxi_panicpart_init(struct panic_part *part);
|
|
+extern int sunxi_parse_blkdev(char *bdev, int len);
|
|
+#else
|
|
+/*
|
|
+ *static int sunxi_panicpart_init(struct panic_part *part)
|
|
+ *{
|
|
+ * return -1;
|
|
+ *}
|
|
+ *
|
|
+ *static int sunxi_parse_blkdev(char *bdev, int len)
|
|
+ *{
|
|
+ * return -1;
|
|
+ *}
|
|
+ */
|
|
+#endif
|
|
+
|
|
+#endif
|