Angel Pons 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 14: Code-Review+1
(3 comments)
> Patch Set 14:
>
> @AngelPons:
> Would be great to get some feedback and/or get this merged. See my last post to get a quick overview of this change.
Sorry, I've forgotten about these changes. I'll take a look as soon as I can, because it's been a long while.
https://review.coreboot.org/c/flashrom/+/40477/8/ft2232_spi.c
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/40477/8/ft2232_spi.c@473
PS8, Line 473: static
> This is related to Line 541 and following lines. It is explained (shortly) in Line 542. […]
Ack
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`. And please align correctly (there's one tab too many)
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:
/*
* Return to get second op (Program or Erase)
* without resetting buf nor i
*/
--
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: 14
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: Mon, 21 Sep 2020 11:34:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Simon Buhrow
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
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 14:
@AngelPons:
Would be great to get some feedback and/or get this merged. See my last post to get a quick overview of this change.
--
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: 14
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: Mon, 21 Sep 2020 08:10:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Nikolai Artemiev has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/45438 )
Change subject: tests: Update licence headers
......................................................................
tests: Update licence headers
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
Change-Id: Ia964279ace569b4b93f4e2919c1c228a9b621745
---
M tests/flashrom.c
M tests/helpers.c
M tests/include/test.h
M tests/meson.build
M tests/spi25.c
M tests/tests.c
M tests/tests.h
7 files changed, 101 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/38/45438/1
diff --git a/tests/flashrom.c b/tests/flashrom.c
index ad46dd8..50464dd 100644
--- a/tests/flashrom.c
+++ b/tests/flashrom.c
@@ -1,3 +1,18 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright 2020 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#include <include/test.h>
#include "programmer.h"
diff --git a/tests/helpers.c b/tests/helpers.c
index ab0863f..a920c15 100644
--- a/tests/helpers.c
+++ b/tests/helpers.c
@@ -1,3 +1,18 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright 2020 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#include <include/test.h>
#include "flash.h"
diff --git a/tests/include/test.h b/tests/include/test.h
index b4e0dd2..24fa963 100644
--- a/tests/include/test.h
+++ b/tests/include/test.h
@@ -1,5 +1,17 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/* This file is part of the coreboot project. */
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright 2020 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
#ifndef _TESTS_TEST_H
#define _TESTS_TEST_H
diff --git a/tests/meson.build b/tests/meson.build
index b1f9fda..f0cb76d 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,3 +1,16 @@
+# This file is part of the flashrom project.
+#
+# Copyright 2020 Google LLC
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
root_includes = include_directories('../subprojects')
srcs = [
diff --git a/tests/spi25.c b/tests/spi25.c
index aa1eea0..6ad0357 100644
--- a/tests/spi25.c
+++ b/tests/spi25.c
@@ -1,3 +1,18 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright 2020 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#include <include/test.h>
#include "programmer.h"
diff --git a/tests/tests.c b/tests/tests.c
index 1a6b65f..3124607 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -1,5 +1,17 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/* This file is part of the coreboot project. */
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright 2020 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
#include <include/test.h>
#include "tests.h"
diff --git a/tests/tests.h b/tests/tests.h
index 107cb51..cb905fd 100644
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -1,3 +1,18 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright 2020 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#ifndef TESTS_H
#define TESTS_H
--
To view, visit https://review.coreboot.org/c/flashrom/+/45438
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia964279ace569b4b93f4e2919c1c228a9b621745
Gerrit-Change-Number: 45438
Gerrit-PatchSet: 1
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: newchange
Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/45431 )
Change subject: tests: Clear ID cache before trying to fetch chip ID a second time
......................................................................
tests: Clear ID cache before trying to fetch chip ID a second time
Without that, the code never calls into spi_send_command (because
everything's known already) and so the expected return values are
never returned.
Change-Id: Iba6a56774ce5b51e0f7072b4600a9479cdabf8c7
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
M tests/spi25.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/31/45431/1
diff --git a/tests/spi25.c b/tests/spi25.c
index aa1eea0..362f5c6 100644
--- a/tests/spi25.c
+++ b/tests/spi25.c
@@ -129,6 +129,7 @@
(void) state; /* unused */
/* setup initial test state. */
+ clear_spi_id_cache();
struct flashctx flashctx = { .chip = &mock_chip };
expect_memory(__wrap_spi_send_command, flash,
&flashctx, sizeof(flashctx));
--
To view, visit https://review.coreboot.org/c/flashrom/+/45431
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iba6a56774ce5b51e0f7072b4600a9479cdabf8c7
Gerrit-Change-Number: 45431
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange