mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
Rework internal bus handling and laptop bail-out
We used to bail out on any unknown laptop. However, modern systems with SPI flashes don't suffer from the original problem. Even if a flash chip is shared with the EC, the latter has to expect the host to send regular JEDEC SPI commands any time. So instead of bailing out, we limit the set of buses to probe. If we suspect to be running on a laptop, we only allow probing of SPI and opaque programmers. The user can still use the existing force options to probe all buses. This will obsolete some board-enables that could be moved to `print.c` in follow-up commits. Change-Id: I1dbda8cf0c10d7786106f14f0d18c3dcce35f0a3 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/28716 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Thomas Heijligen <src@posteo.de>
This commit is contained in:
@ -600,12 +600,15 @@ int it8705f_write_enable(uint8_t port)
|
||||
uint8_t tmp;
|
||||
int ret = 0;
|
||||
|
||||
if (!(internal_buses_supported & BUS_PARALLEL))
|
||||
return 1;
|
||||
|
||||
enter_conf_mode_ite(port);
|
||||
tmp = sio_read(port, 0x24);
|
||||
/* Check if at least one flash segment is enabled. */
|
||||
if (tmp & 0xf0) {
|
||||
/* The IT8705F will respond to LPC cycles and translate them. */
|
||||
internal_buses_supported = BUS_PARALLEL;
|
||||
internal_buses_supported &= BUS_PARALLEL;
|
||||
/* Flash ROM I/F Writes Enable */
|
||||
tmp |= 0x04;
|
||||
msg_pdbg("Enabling IT8705F flash ROM interface write.\n");
|
||||
|
Reference in New Issue
Block a user