zapb has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/48379 )
Change subject: jlink_spi: Reduce transfer size
......................................................................
jlink_spi: Reduce transfer size
The maximum transfer size is too large for some devices and
results in an USB timeout.
Change-Id: If2c00b1524ec56740bdfe290096c3546cf375d73
Signed-off-by: Marc Schink <dev(a)zapb.de>
---
M jlink_spi.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/79/48379/1
diff --git a/jlink_spi.c b/jlink_spi.c
index 36611bf..3a73c01 100644
--- a/jlink_spi.c
+++ b/jlink_spi.c
@@ -34,7 +34,7 @@
* Maximum number of bytes that can be transferred at once via the JTAG
* interface, see jaylink_jtag_io().
*/
-#define JTAG_MAX_TRANSFER_SIZE (UINT16_MAX / 8)
+#define JTAG_MAX_TRANSFER_SIZE (32768 / 8)
/*
* Default base frequency in Hz. Used when the base frequency can not be
--
To view, visit https://review.coreboot.org/c/flashrom/+/48379
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If2c00b1524ec56740bdfe290096c3546cf375d73
Gerrit-Change-Number: 48379
Gerrit-PatchSet: 1
Gerrit-Owner: zapb <dev(a)zapb.de>
Gerrit-MessageType: newchange
Idwer Vollering has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/48879 )
Change subject: sb600spi.c: add rev 0x51 to the leading comment block
......................................................................
sb600spi.c: add rev 0x51 to the leading comment block
Signed-off-by: Idwer Vollering <vidwer(a)gmail.com>
Change-Id: Ic74cff04f2d1fd92ad92aa37f71e5852f02d86a6
---
M sb600spi.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/79/48879/1
diff --git a/sb600spi.c b/sb600spi.c
index ef9da4b..b9560e2 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -127,7 +127,7 @@
* found on both Stoney Ridge and Zen platforms.
*
* The revisions I have found by searching various lspci
- * outputs are as follows: 0x4b, 0x59 & 0x61.
+ * outputs are as follows: 0x4b, 0x51, 0x59 & 0x61.
*/
} else if (rev == 0x4b || rev == 0x51 || rev == 0x59 || rev == 0x61) {
msg_pdbg("Promontory (rev 0x%02x) detected.\n", rev);
--
To view, visit https://review.coreboot.org/c/flashrom/+/48879
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic74cff04f2d1fd92ad92aa37f71e5852f02d86a6
Gerrit-Change-Number: 48879
Gerrit-PatchSet: 1
Gerrit-Owner: Idwer Vollering <vidwer(a)gmail.com>
Gerrit-MessageType: newchange
Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/48196 )
Change subject: Simplifying the initialisation flow for it85spi
......................................................................
Simplifying the initialisation flow for it85spi
1) Inlining it85xx_spi_common_init since it's only used once in
it85xx_spi_init, after inlining ret value is not needed.
2) Creating it86_init_error section to ensure that data is freed
if error happened in initialisaton flow.
BUG=b:172876667
TEST=builds
Change-Id: Iac1b4ae9c6f34c5265e729ae0a80024800c3c272
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M it85spi.c
1 file changed, 32 insertions(+), 39 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/96/48196/1
diff --git a/it85spi.c b/it85spi.c
index 6215515..52b09b1 100644
--- a/it85spi.c
+++ b/it85spi.c
@@ -289,11 +289,18 @@
.write_aai = default_spi_write_aai,
};
-static int it85xx_spi_common_init(struct superio s)
+int it85xx_spi_init(struct superio s)
{
chipaddr base;
+ struct it85spi_data *data;
+ msg_pdbg("%s():%d superio.vendor=0x%02x\n", __func__, __LINE__, s.vendor);
- struct it85spi_data *data = calloc(1, sizeof(struct it85spi_data));
+ if (!(internal_buses_supported & BUS_FWH)) {
+ msg_pdbg("%s():%d buses not support FWH\n", __func__, __LINE__);
+ return 1;
+ }
+
+ data = calloc(1, sizeof(struct it85spi_data));
if (!data) {
msg_perr("Unable to allocate space for extra SPI master data.\n");
return SPI_GENERIC_ERROR;
@@ -301,12 +308,8 @@
spi_master_it85xx.data = data;
- msg_pdbg("%s():%d superio.vendor=0x%02x\n", __func__, __LINE__,
- s.vendor);
-
if (register_shutdown(it85xx_shutdown, data)) {
- free(data);
- return 1;
+ goto it85spi_init_error;
}
#ifdef LPC_IO
@@ -334,9 +337,9 @@
* Major TODO here, and it will be a lot of work.
*/
base = (chipaddr)physmap("it85 communication", 0xFFFFF000, 0x1000);
- if (base == (chipaddr)ERROR_PTR)
- free(data);
- return 1;
+ if (base == (chipaddr)ERROR_PTR) {
+ goto it85spi_init_error;
+ }
msg_pdbg("%s():%d base=0x%08x\n", __func__, __LINE__,
(unsigned int)base);
@@ -344,37 +347,27 @@
data->ce_low = (unsigned char *)(base + 0xD00); /* 0xFFFFFD00 */
#endif
+ msg_pdbg("%s: internal_buses_supported=0x%x\n", __func__,
+ internal_buses_supported);
+ /* Check for FWH because IT85 listens to FWH cycles.
+ * FIXME: The big question is whether FWH cycles are necessary
+ * for communication even if LPC_IO is defined.
+ */
+ if (internal_buses_supported & BUS_FWH)
+ msg_pdbg("Registering IT85 SPI.\n");
+ /* FIXME: Really leave FWH enabled? We can't use this region
+ * anymore since accessing it would mess up IT85 communication.
+ * If we decide to disable FWH for this region, we should print
+ * a debug message about it.
+ */
+ /* Set this as SPI controller. */
+ register_spi_master(&spi_master_it85xx);
+
return 0;
-}
-int it85xx_spi_init(struct superio s)
-{
- int ret;
-
- if (!(internal_buses_supported & BUS_FWH)) {
- msg_pdbg("%s():%d buses not support FWH\n", __func__, __LINE__);
- return 1;
- }
- ret = it85xx_spi_common_init(s);
- msg_pdbg("FWH: %s():%d ret=%d\n", __func__, __LINE__, ret);
- if (!ret) {
- msg_pdbg("%s: internal_buses_supported=0x%x\n", __func__,
- internal_buses_supported);
- /* Check for FWH because IT85 listens to FWH cycles.
- * FIXME: The big question is whether FWH cycles are necessary
- * for communication even if LPC_IO is defined.
- */
- if (internal_buses_supported & BUS_FWH)
- msg_pdbg("Registering IT85 SPI.\n");
- /* FIXME: Really leave FWH enabled? We can't use this region
- * anymore since accessing it would mess up IT85 communication.
- * If we decide to disable FWH for this region, we should print
- * a debug message about it.
- */
- /* Set this as SPI controller. */
- register_spi_master(&spi_master_it85xx);
- }
- return ret;
+it85spi_init_error:
+ free(data);
+ return 1;
}
#endif
--
To view, visit https://review.coreboot.org/c/flashrom/+/48196
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iac1b4ae9c6f34c5265e729ae0a80024800c3c272
Gerrit-Change-Number: 48196
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newchange