Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/29085 )
Change subject: ati: initial commit
......................................................................
Patch Set 5: Code-Review+1
(2 comments)
https://review.coreboot.org/c/flashrom/+/29085/5//COMMIT_MSG
Commit Message:
https://review.coreboot.org/c/flashrom/+/29085/5//COMMIT_MSG@7
PS5, Line 7: ati: initial commit
"stub spi master to later be used for AMD GPU programming. Just fill out the essentials for now."
https://review.coreboot.org/c/flashrom/+/29085/5/Makefile
File Makefile:
https://review.coreboot.org/c/flashrom/+/29085/5/Makefile@1107
PS5, Line 1107:
: ifeq ($(CONFIG_ATI_SPI), yes)
: FEATURE_CFLAGS += -D'CONFIG_ATI_SPI=1'
: PROGRAMMER_OBJS += ati_spi.o
: NEED_LIBPCI += CONFIG_ATI_SPI
: endif
also add this to the meson build system as well please.
--
To view, visit https://review.coreboot.org/c/flashrom/+/29085
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia5f755ae7a0723372933216516625bc156b1f4bc
Gerrit-Change-Number: 29085
Gerrit-PatchSet: 5
Gerrit-Owner: Luc Verhaegen <libv(a)skynet.be>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sat, 26 Sep 2020 02:22:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/29078 )
Change subject: add newer pci infrastructure
......................................................................
Patch Set 3: Code-Review+1
(7 comments)
https://review.coreboot.org/c/flashrom/+/29078/3/pcidev.c
File pcidev.c:
https://review.coreboot.org/c/flashrom/+/29078/3/pcidev.c@351
PS3, Line 351: /*
: *
: */
kill these off?
https://review.coreboot.org/c/flashrom/+/29078/3/pcidev.c@354
PS3, Line 354: static int
: flashrom_pci_device_shutdown(void *data)
one line
https://review.coreboot.org/c/flashrom/+/29078/3/pcidev.c@396
PS3, Line 396: /* Filter by bb:dd.f (if supplied by the user). */
: pcidev_bdf = extract_programmer_param("pci");
: if (pcidev_bdf) {
: char *msg;
:
: if ((msg = pci_filter_parse_slot(&filter, pcidev_bdf))) {
: msg_perr("Error: %s\n", msg);
: return NULL;
: }
:
: free(pcidev_bdf);
: }
:
put this into its own function that just extracts the param and validates the string is the correct format?
https://review.coreboot.org/c/flashrom/+/29078/3/pcidev.c@445
PS3, Line 445: /* Only continue if exactly one supported PCI dev has been found. */
: if (!found) {
: msg_perr("Error: No supported PCI device found.\n");
: return NULL;
: } else if (found > 1) {
: msg_perr("Error: Multiple supported PCI devices found. Use 'flashrom -p xxxx:pci=bb:dd.f'\n"
: "to explicitly select the card with the given BDF (PCI bus, device, function).\n");
: return NULL;
block seems to need to be indented to match the rest of the for-loop. I think this iterator logic can be sliced into its own static function because it would be nice to unit-test it.
https://review.coreboot.org/c/flashrom/+/29078/3/pcidev.c@455
PS3, Line 455: dev
validate the allocation before using it. also 'pcidev_data' seems more appropriate
https://review.coreboot.org/c/flashrom/+/29078/3/programmer.h
File programmer.h:
https://review.coreboot.org/c/flashrom/+/29078/3/programmer.h@835
PS3, Line 835: /* programmer specific */
current comment has minimal value, could do with a little bit more explanation for users of the API.
https://review.coreboot.org/c/flashrom/+/29078/3/programmer.h@852
PS3, Line 852: struct flashrom_pci_device *flashrom_pci_init(const struct flashrom_pci_match *matches);
Add documentation comment in the header.
--
To view, visit https://review.coreboot.org/c/flashrom/+/29078
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I59af37cba5cb78014e0714c654db2501151f605e
Gerrit-Change-Number: 29078
Gerrit-PatchSet: 3
Gerrit-Owner: Luc Verhaegen <libv(a)skynet.be>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Luc Verhaegen <libv(a)skynet.be>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Comment-Date: Sat, 26 Sep 2020 02:19:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Simon Buhrow has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40477 )
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call
......................................................................
Patch Set 16:
(2 comments)
Sounds good. I hope you get time soon :-)
https://review.coreboot.org/c/flashrom/+/40477/14/ft2232_spi.c
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/40477/14/ft2232_spi.c@480
PS14, Line 480: /*
: * 280 bytes =
: * + 9 B (CMD)
: * + 1 B (WREN)
: * + 9 B (CMD)
: * + 1 B (op) \
: * + 4 B (addr) | = writecnt
: * + 256 B (page data) /
: *
: * With op: PageProgram or Erase; CMD: FTDI-Chip commands
: */
> nit: I'd place this before the assignment to `bufsize`. […]
Done
https://review.coreboot.org/c/flashrom/+/40477/14/ft2232_spi.c@555
PS14, Line 555: /* Return to get second op (Program or Erase) without
: * resetting buf nor i*/
> Comment style should be: […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/40477
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
Gerrit-Change-Number: 40477
Gerrit-PatchSet: 16
Gerrit-Owner: Simon Buhrow
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 24 Sep 2020 11:53:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/40477
to look at the new patch set (#15).
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call
......................................................................
ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call
Every ftdi_write_data() call is quite time consuming as the ftdi-chips
seems to take always 2-3ms to respond.
This leads to what the comment already says: Minimize USB transfers
by packing as many commands as possible together.
So I packed the WREN command together with the following operation
which can be program or erase operation.
This saves about 1 minute when programming a 128MBit Flash with my
config!
I´m using ftdi-2232H chip. That´s why I put it at this place.
If anyone has a good overview about all programmers:
This could be implemented in spi_write_cmd() in case that it is
compatible to all programmers
or this principle could be transfered to other programmers which act
in a similar way.
Signed-off-by: Simon Buhrow <simon.buhrow(a)posteo.de>
Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
---
M ft2232_spi.c
1 file changed, 28 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/77/40477/15
--
To view, visit https://review.coreboot.org/c/flashrom/+/40477
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
Gerrit-Change-Number: 40477
Gerrit-PatchSet: 15
Gerrit-Owner: Simon Buhrow
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset