74bd4a7eb67636825d8eecbebd499a2657829fc3
[openwrt/staging/neocturne.git] /
1 From bc5c75e0a5a9400f81a987cc720100ac475fa4d8 Mon Sep 17 00:00:00 2001
2 From: Knox Chiou <knoxchiou@chromium.org>
3 Date: Wed, 23 Feb 2022 22:35:00 +0000
4 Subject: [PATCH] nvmem: qfprom: Increase fuse blow timeout to prevent write
5 fail
6
7 sc7180 blow fuses got slightly chances to hit qfprom_reg_write timeout.
8 Current timeout is simply too low. Since blowing fuses is a
9 very rare operation, so the risk associated with overestimating this
10 number is low.
11 Increase fuse blow timeout from 1ms to 10ms.
12
13 Reviewed-by: Douglas Anderson <dianders@chromium.org>
14 Signed-off-by: Knox Chiou <knoxchiou@chromium.org>
15 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
16 Link: https://lore.kernel.org/r/20220223223502.29454-2-srinivas.kandagatla@linaro.org
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 ---
19 drivers/nvmem/qfprom.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/drivers/nvmem/qfprom.c
23 +++ b/drivers/nvmem/qfprom.c
24 @@ -22,7 +22,7 @@
25
26 /* Amount of time required to hold charge to blow fuse in micro-seconds */
27 #define QFPROM_FUSE_BLOW_POLL_US 100
28 -#define QFPROM_FUSE_BLOW_TIMEOUT_US 1000
29 +#define QFPROM_FUSE_BLOW_TIMEOUT_US 10000
30
31 #define QFPROM_BLOW_STATUS_OFFSET 0x048
32 #define QFPROM_BLOW_STATUS_BUSY 0x1