Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/41124 )
Change subject: realtek_mst_i2c_spi.c: Remove dead code ......................................................................
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 --- M realtek_mst_i2c_spi.c 1 file changed, 0 insertions(+), 33 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/24/41124/1
diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c index 863ace5..64458dd 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; @@ -484,12 +457,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) {