summaryrefslogtreecommitdiff
path: root/config/flashprog/patches
diff options
context:
space:
mode:
Diffstat (limited to 'config/flashprog/patches')
-rw-r--r--config/flashprog/patches/0001-Workaround-for-MX25-chips.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/config/flashprog/patches/0001-Workaround-for-MX25-chips.patch b/config/flashprog/patches/0001-Workaround-for-MX25-chips.patch
index b4fd904b..ddbe90a6 100644
--- a/config/flashprog/patches/0001-Workaround-for-MX25-chips.patch
+++ b/config/flashprog/patches/0001-Workaround-for-MX25-chips.patch
@@ -1,7 +1,7 @@
-From 294433aeac82764ea22caf0c17b05cf4127aaa19 Mon Sep 17 00:00:00 2001
+From 25047d86c478beb58fd7c9a3539b03ea9426edb6 Mon Sep 17 00:00:00 2001
From: consts <grudnevkv@gmail.com>
Date: Fri, 2 Mar 2018 07:03:37 +0000
-Subject: [PATCH] Workaround for MX25 chips
+Subject: [PATCH 1/1] Workaround for MX25 chips
TEST: In-system programming a ThinkPad X200 using a clip and
pico-serprog works now. It just doesn't without this hack.
@@ -17,7 +17,7 @@ Change-Id: I43a306b67862b59c1dcd02729e189f3bf73f481b
3 files changed, 15 insertions(+)
diff --git a/cli_classic.c b/cli_classic.c
-index 1ffe4dd..3b50d23 100644
+index ab5f8b1..2825033 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -67,6 +67,7 @@ static void cli_classic_usage(const char *name)
@@ -28,29 +28,29 @@ index 1ffe4dd..3b50d23 100644
#if CONFIG_PRINT_WIKI == 1
" -z | --list-supported-wiki print supported devices in wiki syntax\n"
#endif
-@@ -290,6 +291,7 @@ int main(int argc, char *argv[])
- {"help", 0, NULL, 'h'},
+@@ -262,6 +263,7 @@ int main(int argc, char *argv[])
{"version", 0, NULL, 'R'},
{"output", 1, NULL, 'o'},
+ {"progress", 0, NULL, OPTION_PROGRESS},
+ {"workaround-mx", 0, NULL, 'm'},
{NULL, 0, NULL, 0},
};
-@@ -506,6 +508,9 @@ int main(int argc, char *argv[])
+@@ -478,6 +480,9 @@ int main(int argc, char *argv[])
cli_classic_abort_usage("No log filename specified.\n");
}
break;
+ case 'm': /* --workaround-mx */
+ workaround_mx = 1;
+ break;
- default:
- cli_classic_abort_usage(NULL);
+ case OPTION_PROGRESS:
+ show_progress = true;
break;
diff --git a/include/programmer.h b/include/programmer.h
-index 4fee2ef..7e78598 100644
+index edef52b..722e599 100644
--- a/include/programmer.h
+++ b/include/programmer.h
-@@ -355,6 +355,7 @@ enum ich_chipset {
+@@ -356,6 +356,7 @@ enum ich_chipset {
CHIPSET_GEMINI_LAKE,
CHIPSET_ELKHART_LAKE,
};
@@ -59,7 +59,7 @@ index 4fee2ef..7e78598 100644
/* ichspi.c */
#if CONFIG_INTERNAL == 1
diff --git a/spi.c b/spi.c
-index 6e61f53..f8f5d11 100644
+index ac51d87..be62588 100644
--- a/spi.c
+++ b/spi.c
@@ -26,10 +26,19 @@
@@ -76,12 +76,12 @@ index 6e61f53..f8f5d11 100644
+ const unsigned char cmd[JEDEC_READ_OUTSIZE] = {JEDEC_READ, 0, 0, 0};
+ unsigned char buf[256];
+ /* keep flash busy for some time, keep CS warm before sending actual command */
-+ flash->mst->spi.command(flash, sizeof(cmd), sizeof(buf), cmd, buf);
++ flash->mst.spi->command(flash, sizeof(cmd), sizeof(buf), cmd, buf);
+ }
+ /* actual command */
- return flash->mst->spi.command(flash, writecnt, readcnt, writearr,
+ return flash->mst.spi->command(flash, writecnt, readcnt, writearr,
readarr);
}
--
-2.43.0
+2.39.2