Edward O'Callaghan submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Sam McNally: Looks good to me, approved
realtek_mst_i2c_spi.c: Remove dead code

Turns out the MST likely doesn't need these so-called defaults
to be written for the purposes of spi flashing.

BUG=b:152558985,b:148745673
BRANCH=none
TEST=builds

Change-Id: Ieb938cf0805b22692d61db23795208c9be962b60
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/41124
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
---
M realtek_mst_i2c_spi.c
1 file changed, 0 insertions(+), 33 deletions(-)

diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c
index e9ee576..6158524 100644
--- a/realtek_mst_i2c_spi.c
+++ b/realtek_mst_i2c_spi.c
@@ -145,33 +145,6 @@
return ret;
}

-#if 0
-static int realtek_mst_i2c_spi_set_defaults(int fd)
-{
- // 0xFF1B = 0x02;
- int ret = realtek_mst_i2c_spi_write_register(fd, 0x1B, 0x02);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x1C, 0x30);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x1D, 0x1C);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x1E, 0x02);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x1F, 0x00);
-
- ret = realtek_mst_i2c_spi_write_register(fd, 0x20, 0x1C);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x2C, 0x02);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x2D, 0x00);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x2E, 0x1C);
-
- ret = realtek_mst_i2c_spi_write_register(fd, 0x62, 0x06);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x6A, 0x03);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x6B, 0x0B);
- ret = realtek_mst_i2c_spi_write_register(fd, 0x6C, 0x00);
-
- ret = realtek_mst_i2c_spi_write_register(fd, 0xED, 0x88);
- ret = realtek_mst_i2c_spi_write_register(fd, 0xEE, 0x04);
-
- return ret;
-}
-#endif
-
static int realtek_mst_i2c_spi_disable_protection(int fd)
{
int ret = 0;
@@ -485,12 +458,6 @@
ret |= realtek_mst_i2c_spi_enter_isp_mode(fd);
if (ret)
return ret;
-// XXX: maybe make into a mode:defaults cli param?
-#if 0
- ret |= realtek_mst_i2c_spi_set_defaults(fd);
- if (ret)
- return ret;
-#endif

struct realtek_mst_i2c_spi_data *data = calloc(1, sizeof(struct realtek_mst_i2c_spi_data));
if (!data) {

To view, visit change 41124. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ieb938cf0805b22692d61db23795208c9be962b60
Gerrit-Change-Number: 41124
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Edward Hill <ecgh@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Sam McNally <sammc@google.com>
Gerrit-Reviewer: Shiyu Sun <sshiyu@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged