Sean Anderson has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/43608 )
Change subject: buspirate: Add option for setting the aux pin
......................................................................
buspirate: Add option for setting the aux pin
This adds a parameter to drive the aux pin low (or high if you
explicitly want the previous behavior). Some boards need to have a reset
pin driven low before the firmware can be safely flashed. With the Bus
Pirate, this is most easily done with the auxiliary pin.
Change-Id: Ieeecfdf1afc06dadda9b8f99547cd74854ca6775
Signed-off-by: Sean Anderson <seanga2(a)gmail.com>
---
M buspirate_spi.c
M flashrom.8.tmpl
2 files changed, 33 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/08/43608/1
diff --git a/buspirate_spi.c b/buspirate_spi.c
index fdfc0e4..1ccb107 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -228,6 +228,7 @@
int serialspeed_index = -1;
int ret = 0;
int pullup = 0;
+ int aux = 1;
dev = extract_programmer_param("dev");
if (dev && !strlen(dev)) {
@@ -277,6 +278,17 @@
}
free(tmp);
+ tmp = extract_programmer_param("aux");
+ if (tmp) {
+ if (strcasecmp("high", tmp) == 0)
+ ; /* Default */
+ else if (strcasecmp("low", tmp) == 0)
+ aux = 0;
+ else
+ msg_perr("Invalid AUX state, driving high by default.\n");
+ }
+ free(tmp);
+
/* Default buffer size is 19: 16 bytes data, 3 bytes control. */
#define DEFAULT_BUFSIZE (16 + 3)
bp_commbuf = malloc(DEFAULT_BUFSIZE);
@@ -520,11 +532,18 @@
}
/* Initial setup (SPI peripherals config): Enable power, CS high, AUX */
- bp_commbuf[0] = 0x40 | 0x0b;
+ bp_commbuf[0] = 0x40 | 0x09;
if (pullup == 1) {
bp_commbuf[0] |= (1 << 2);
msg_pdbg("Enabling pull-up resistors.\n");
}
+ if (aux) {
+ bp_commbuf[0] |= (1 << 1);
+ msg_pdbg("Driving AUX high.\n");
+ } else {
+ msg_pdbg("Driving AUX low.\n");
+ }
+
ret = buspirate_sendrecv(bp_commbuf, 1, 1);
if (ret)
return 1;
diff --git a/flashrom.8.tmpl b/flashrom.8.tmpl
index db50d59..caf860c 100644
--- a/flashrom.8.tmpl
+++ b/flashrom.8.tmpl
@@ -902,6 +902,19 @@
.URLB "http://dangerousprototypes.com/docs/Practical_guide_to_Bus_Pirate_pull-up_r…" \
"in a guide by dangerousprototypes" .
Only the external supply voltage (Vpu) is supported as of this writing.
+.sp
+An optional aux parameter specifies the state of the Bus Pirate auxiliary pin.
+This may be used to drive the auxiliary pin high or low before a transfer.
+Syntax is
+.sp
+.B " flashrom -p buspirate_spi:aux=state"
+.sp
+where
+.B state
+can be
+.BR high " or " low .
+The default
+.BR state " is " high .
.SS
.BR "pickit2_spi " programmer
.IP
--
To view, visit https://review.coreboot.org/c/flashrom/+/43608
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ieeecfdf1afc06dadda9b8f99547cd74854ca6775
Gerrit-Change-Number: 43608
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Anderson <seanga2(a)gmail.com>
Gerrit-MessageType: newchange
Attention is currently required from: Thomas Heijligen, Arthur Heymans, Nicholas Chin.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67481 )
Change subject: spi: Make 'default_spi_send_multicommand' the default unless defined
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS2:
> This one needs a manual rebase
Done. Thanks
--
To view, visit https://review.coreboot.org/c/flashrom/+/67481
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6cc24bf982da3d5251d391eb397db43dd10280e8
Gerrit-Change-Number: 67481
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Comment-Date: Tue, 28 Feb 2023 23:58:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan.
Hello build bot (Jenkins), Thomas Heijligen, Peter Marheine,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/67481
to look at the new patch set (#3).
Change subject: spi: Make 'default_spi_send_multicommand' the default unless defined
......................................................................
spi: Make 'default_spi_send_multicommand' the default unless defined
A NULL func pointer is necessary and sufficient for the
condition `NULL func pointer => default_spi_send_multicommand' as to not
need this explicit specification of 'default'.
Therefore drop the explicit need to specify the
'default_spi_send_multicommand' callback function pointer in the
spi_master struct. This is a reasonable default for every other driver
in the tree with only a few exceptions.
This simplifies the code and driver development.
Change-Id: I6cc24bf982da3d5251d391eb397db43dd10280e8
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M asm106x.c
M bitbang_spi.c
M buspirate_spi.c
M ch341a_spi.c
M ch347_spi.c
M dediprog.c
M digilent_spi.c
M dirtyjtag_spi.c
M dummyflasher.c
M it87spi.c
M jlink_spi.c
M linux_spi.c
M mediatek_i2c_spi.c
M mstarddc_spi.c
M ni845x_spi.c
M parade_lspcon.c
M pickit2_spi.c
M raiden_debug_spi.c
M realtek_mst_i2c_spi.c
M sb600spi.c
M serprog.c
M spi.c
M stlinkv3_spi.c
M usbblaster_spi.c
M wbsio_spi.c
25 files changed, 26 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/81/67481/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/67481
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6cc24bf982da3d5251d391eb397db43dd10280e8
Gerrit-Change-Number: 67481
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: newpatchset
Nicholas Chin has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/71066 )
Change subject: ch347t_spi.c: Move ch347_device struct to flashctx
......................................................................
Abandoned
Not needed anymore, CB:70573 was merged which already contained these changes
--
To view, visit https://review.coreboot.org/c/flashrom/+/71066
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If3ff96dedd2b591200dd69f54df753668853beca
Gerrit-Change-Number: 71066
Gerrit-PatchSet: 1
Gerrit-Owner: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: abandon
Attention is currently required from: Alexander Goncharov.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72619 )
Change subject: move manpage to sphinx
......................................................................
Patch Set 12:
(1 comment)
File meson.build:
https://review.coreboot.org/c/flashrom/+/72619/comment/efeb9e08_d49b1807
PS11, Line 4: meson_version : '>=0.57.0',
> How about mentioning it in the commit message? Something like: […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/72619
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iee9f1164c5913e47385e6f7d51dc7775a58b5a67
Gerrit-Change-Number: 72619
Gerrit-PatchSet: 12
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Tue, 28 Feb 2023 13:21:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Hello build bot (Jenkins), Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/72656
to look at the new patch set (#6).
Change subject: meson: use mesons configuration_data for to evaluate cflags
......................................................................
meson: use mesons configuration_data for to evaluate cflags
Use mesons build in system for configurations instead of managing them
by our own.
Change-Id: Ie91b4e1377b9d6d347511d4727c0a26a314b1e57
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
---
M doc/meson.build
M meson.build
2 files changed, 39 insertions(+), 79 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/56/72656/6
--
To view, visit https://review.coreboot.org/c/flashrom/+/72656
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie91b4e1377b9d6d347511d4727c0a26a314b1e57
Gerrit-Change-Number: 72656
Gerrit-PatchSet: 6
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Thomas Heijligen.
Hello build bot (Jenkins), Edward O'Callaghan, Anastasia Klimchuk, Alexander Goncharov,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/72619
to look at the new patch set (#12).
Change subject: move manpage to sphinx
......................................................................
move manpage to sphinx
Use sphinx (sphinx-doc.org) to generate the UNIX man page from an
reStructuredText file instead of dealing with plain groff.
Use `meson setup -Dman-pages=enabled` to build the man page, and
`meson setup -Ddocumentation=enabled` to build the web documentation
explicitly. Both are enabled automatically if sphinx-build is found.
The man page will be installed as `<meson_mandir>/man8/flashrom.8` and
The html documentation in <meson_datadir>/doc/flashrom/html`.
The Makefile builds only the man-page format.
Increase the minimum version of meson from 0.53.0 to 0.57.0 to be
able to pass environment variables to the custom_target() command. That
is needed to pass the FLASHROM_VERSION to the documentation.
Change-Id: Iee9f1164c5913e47385e6f7d51dc7775a58b5a67
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
---
M .gitignore
M Makefile
A doc/classic_cli_manpage.rst
A doc/conf.py
A doc/index.rst
A doc/meson.build
D flashrom.8.tmpl
M meson.build
M meson_options.txt
9 files changed, 1,494 insertions(+), 1,870 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/19/72619/12
--
To view, visit https://review.coreboot.org/c/flashrom/+/72619
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iee9f1164c5913e47385e6f7d51dc7775a58b5a67
Gerrit-Change-Number: 72619
Gerrit-PatchSet: 12
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Anastasia Klimchuk.
Alexander Goncharov has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72807 )
Change subject: ch341a_spi: Refactor singleton states into reentrant pattern
......................................................................
Patch Set 3:
(2 comments)
File ch341a_spi.c:
https://review.coreboot.org/c/flashrom/+/72807/comment/facf031d_250d076f
PS3, Line 80: struct libusb_transfer *transfer_out;
: struct libusb_transfer *transfer_ins[USB_IN_TRANSFERS];
:
: /* Accumulate delays to be plucked between CS deassertion and CS assertions. */
: unsigned int stored_delay_us;
:
: struct libusb_device_handle *handle;
> Will default values for these be the same as before? […]
Yes, they will. Memory in ch341a_spi_data is allocated at the beginning of initialization using `calloc()`, so it will be 0s/NULLs.
https://review.coreboot.org/c/flashrom/+/72807/comment/f419795f_090d8665
PS3, Line 461: msg_pwarn("Cannot detach the existing USB driver. Claiming the interface may fail. %s\n",
: libusb_error_name(ret));
> Is this an error branch? It should `goto free_data` then. […]
This is warn branch. So, no need to do something
--
To view, visit https://review.coreboot.org/c/flashrom/+/72807
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I9fe72bff88b7f8778c1199bdab8ba43bf32e1c8c
Gerrit-Change-Number: 72807
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 28 Feb 2023 12:52:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment