1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Profpatsch <mail@profpatsch.de>
Subject: [PATCH 16/27] disp: no efuse chip-ID check

disp refused to start unless the SoC's efuse chip ID was one of two
values, read with sunxi_efuse_readn() from Allwinner's SID driver;
current kernels replace that driver by nvmem. The check only guards
against running on another SoC, and this driver is built for the B300
alone.
---
 .../sunxi/disp2/disp/de/disp_eink_manager.c   | 21 ++++++-------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/drivers/video/fbdev/sunxi/disp2/disp/de/disp_eink_manager.c b/drivers/video/fbdev/sunxi/disp2/disp/de/disp_eink_manager.c
index ff2e29fa..d4cb3b42 100644
--- a/drivers/video/fbdev/sunxi/disp2/disp/de/disp_eink_manager.c
+++ b/drivers/video/fbdev/sunxi/disp2/disp/de/disp_eink_manager.c
@@ -12,7 +12,6 @@
 #include <asm/cacheflush.h>
 #include <linux/memory.h>
 #include <linux/string.h>
-#include <linux/sunxi-sid.h>
 #include <linux/freezer.h>
 #include <linux/version.h>
 #include "libeink.h"
@@ -3950,24 +3949,16 @@ int disp_init_eink(struct disp_bsp_init_para * para)
 	struct eink_index_buf *index_buffer;
 	struct eink_workbuffer *work_buffer;
 	struct eink_mode_mapbuffer *mode_buffer;
-	unsigned int chipid = 0;
 	int wd_buf_id = 0;
 
 	__inf("Eink driver version %s%s\n", EINK_DRIVER_VERSION, EINK_VERSION_APPEND_INFO);
 
-	ret = sunxi_efuse_readn(EFUSE_CHIPID_NAME, &chipid, sizeof(chipid));
-	if (ret != 0) {
-		__wrn("fail to get id\n");
-		return -1;
-	} else {
-		__debug("id: %08x\n", chipid);
-		if ((0x1c00 == (chipid & 0xffff)) || (0x0447 == (chipid & 0xffff))) {
-			__debug("id check ok\n");
-		} else {
-			__wrn("id check fail\n");
-			return -2;
-		}
-	}
+	/*
+	 * The vendor refused to start unless the SoC's efuse chip ID matched
+	 * one of two values, read with sunxi_efuse_readn() from Allwinner's
+	 * SID driver, which current kernels replace by nvmem. It only guards
+	 * against other SoCs; this driver is built for the B300 alone.
+	 */
 
 	eink_manager = (struct disp_eink_manager *)disp_sys_malloc(sizeof(struct disp_eink_manager) * MAX_EINK_ENGINE);
 	if(NULL == eink_manager) {