diff options
author | Leah Rowe <leah@libreboot.org> | 2024-05-26 20:30:45 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-05-26 20:30:45 +0100 |
commit | 64c64bcf10d5116c4813aa2c0ed76108b448c110 (patch) | |
tree | 3baec28f7f4198aea9ade3f8d86c212548e6af71 /config/flashprog | |
parent | 914852dd4086f54e24b865790b72920c76f70a18 (diff) |
flashprog: bump to 5b4fdd1 from 2 May 2024
I've rebased the workaround-mx patch as follows. See:
commit 9a11cbf21a5078bcdb8db7584c44a9ee17020db4
Author: Nico Huber <nico.h@gmx.de>
Date: Fri Jan 13 01:19:07 2023 +0100
Let the flash context directly point to the used master
This change, now upstream in flashprog, made me have to do this in
the patch. I changed this:
flash->mst->spi.command(flash, sizeof(cmd), sizeof(buf), cmd, buf);
to this:
flash->mst.spi->command(flash, sizeof(cmd), sizeof(buf), cmd, buf);
It should work fine. This update imports the following upstream
patches from flashprog:
* 5b4fdd1 z60_flashprog.rules: Add udev rule for CH347
* 72c9e40 meson: Check for CPU families with known raw mem access
* 3458220 platform/meson: Port pciutils/pci.h workaround to Meson
* f279762 platform/meson: Check for libi386 on NetBSD
* 14da5f7 README: Convert to Markdown
* 8ddea57 README: Document branching and release policy
* 2522456 util/list_yet_unsupported_chips.sh: Fix path
* cbf9c11 spi: Don't cross 16MiB boundaries with long writes
* 823a704 dediprog: Skip warning on first attempt to read device string
* e8463c8 dediprog: Revise prefix check for given programmer id
* 38af1a1 dediprog: Revise id matching
* 4661e7c amd_spi100: Use flashprog_read_chunked() for progress reporting
* cdcfda2 read_memmapped: Use flashprog_read_chunked() for progress reporting
* 7679b5c spi25: Replace spi_read_chunked() with more abstract version
* ca1c7fd spi25: Normalize parameters of spi_nbyte_read()
* e36e3dc dediprog: Use default_spi_write_256
* 522a86d linux_spi: Use default_spi_read()/_write_256()
* 806509b cli_classic: Turn progress reporting into a progress bar
* 842d678 libflashrom: Return progress state to the library user
* aa714dd flashprog.c: Let select_erase_functions() return byte count
* 2eed4cf serprog: Add SPI Mode and CS Mode commands
* 821a085 dediprog: Implement id reading for SF600 and later
* 274e655 dediprog: Read device string early
* 0057822 dediprog: Add protocol detection for SF700 & SF600Plus-G2
* fb176d2 dediprog: Use more general 4BA write mode for newer protocols
* 0ab5c3d dediprog: Split device type and version parsing
* bdef5c2 dediprog: Use unsigned conversions to parse device string
* 5262e29 dediprog: Try to request 32B device string (instead of 16B)
* e76e21f dediprog: Get rid of some unnecessary hex constants
* 5a09d1e udelay: Lower the sleep vs delay threshold
* 03ad4a4 linux_mtd: Provide no-op delay implementation
* 211c6ec serprog: Refine flushing before synchronization
* 383b7fe serprog: Test synchronicity before trying to synchronize
* d7318ea serprog: Move synchronicity test into separate function
* 9a11cbf Let the flash context directly point to the used master
* aabb3e0 writeprotect: Hook wp functions into the chip driver
* 89569d6 memory_mapped: Reduce `decode_sizes` to a single `max_rom_decode`
* 929d2e1 internal: Pass programmer context down into chipset enables
* 7c717c3 internal: Pass programmer context down into board enables
* e3a2688 Pass programmer context to programmer->init()
* 2b66ad9 Start implementing struct flashprog_programmer
* 4517e92 memory_bus: Drop stale `size == 0` workaround and FIXME
* b197402 memory_bus: Split register mapping into own function
* 0e76d99 memory_bus: Move (un)map_flash_region into par master
* 9eec407 Perform default mapping only for respective chips
* 56b53dd wbsio_spi: Request memory mapping locally
* 5596190 it87spi: Request memory mapping locally
* 46449b4 spi25: Drop stale `bus == SPI` guards
* ab6b18f spi25: Move 4BA preparations into spi_prepare_4ba() hook
* 901fb95 Add prepare/finish_access() hooks for chip drivers
* a96aaa3 dediprog: Support long writes of 16MiB and more
* 1338936 Consider 4BA support when filtering erase functions
* 8d36db6 flashprog.8: Fix up serprog example
* d2ac303 flashprog.8: document new serprog cs parameter
* d1b9153 chipset_enable.c: Add Genoa to mendocino entry
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/flashprog')
-rw-r--r-- | config/flashprog/patches/0001-Workaround-for-MX25-chips.patch | 28 |
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 |