summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-08-19 03:25:05 +0200
committerAnastasia Klimchuk <aklm@chromium.org>2022-09-08 02:14:11 +0000
commitb20a55adb790897ec0c1a861448d10c03a8dff8b (patch)
tree9b40193fbb48713165932043e31cd59a263fb8c4
parent13e74d26eaf59b22576d21e9623dc30e91c02de0 (diff)
downloadflashrom-b20a55adb790897ec0c1a861448d10c03a8dff8b.tar.gz
flashrom-b20a55adb790897ec0c1a861448d10c03a8dff8b.tar.bz2
flashrom-b20a55adb790897ec0c1a861448d10c03a8dff8b.zip
it87spi.c: Retype attribute `fast_spi` with bool
Use the bool type instead of an integer for the attribute `fast_spi`, since this represents its purpose much better. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Id28c2c9043dda7a400b8c4e9ca218cb445e97d24 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66900 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r--it87spi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/it87spi.c b/it87spi.c
index eb041418a..85da1507b 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -20,6 +20,7 @@
*/
#include <string.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <errno.h>
#include "flash.h"
@@ -39,7 +40,7 @@
struct it8716f_spi_data {
uint16_t flashport;
/* use fast 33MHz SPI (<>0) or slow 16MHz (0) */
- int fast_spi;
+ bool fast_spi;
};
static int get_data_from_context(const struct flashctx *flash, struct it8716f_spi_data **data)
@@ -242,7 +243,7 @@ static int it8716f_spi_chip_read(struct flashctx *flash, uint8_t *buf,
if (get_data_from_context(flash, &data) < 0)
return SPI_GENERIC_ERROR;
- data->fast_spi = 0;
+ data->fast_spi = false;
/* FIXME: Check if someone explicitly requested to use IT87 SPI although
* the mainboard does not use IT87 SPI translation. This should be done
@@ -432,7 +433,7 @@ static uint16_t it87spi_probe(const struct programmer_cfg *cfg, uint16_t port)
}
data->flashport = flashport;
- data->fast_spi = 1;
+ data->fast_spi = true;
if (internal_buses_supported & BUS_SPI)
msg_pdbg("Overriding chipset SPI with IT87 SPI.\n");