From 2b72cdb4f44fa3828a7cac09f288d94e9ce12ecd Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 28 Nov 2022 18:00:37 +1100 Subject: internal,board_enable: Remove force_boardenable from globals Make `force_boardenable` stack local to the internal_init() entry-point. It's life-time should not exceed that of the internal's init entry function. Change-Id: I3324681f024003694a5531d9d35bb13d2c583eb0 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/70031 Reviewed-by: Sam McNally Tested-by: build bot (Jenkins) --- include/programmer.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/programmer.h b/include/programmer.h index ad3c5022..9e706d58 100644 --- a/include/programmer.h +++ b/include/programmer.h @@ -224,9 +224,9 @@ int it8705f_write_enable(uint8_t port); uint8_t sio_read(uint16_t port, uint8_t reg); void sio_write(uint16_t port, uint8_t reg, uint8_t data); void sio_mask(uint16_t port, uint8_t reg, uint8_t data, uint8_t mask); -void board_handle_before_superio(void); -void board_handle_before_laptop(void); -int board_flash_enable(const char *vendor, const char *model, const char *cb_vendor, const char *cb_model); +void board_handle_before_superio(bool force_boardenable); +void board_handle_before_laptop(bool force_boardenable); +int board_flash_enable(const char *vendor, const char *model, const char *cb_vendor, const char *cb_model, bool force_boardenable); /* chipset_enable.c */ int chipset_flash_enable(const struct programmer_cfg *cfg); @@ -263,7 +263,6 @@ extern int superio_count; #if CONFIG_INTERNAL == 1 extern int is_laptop; extern bool laptop_ok; -extern bool force_boardenable; extern bool force_boardmismatch; void probe_superio(void); int register_superio(struct superio s); -- cgit v1.2.3