mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
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>
This commit is contained in:
parent
13e74d26ea
commit
b20a55adb7
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user