diff options
author | Angel Pons <th3fanbus@gmail.com> | 2022-09-01 14:47:17 +0200 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-09-04 16:15:55 +0000 |
commit | 38688519cf4bca485c41b48ac5c0cc334daa8ba7 (patch) | |
tree | e058b1bc8e06784ac40619aa10b86888c31f53d2 /src/mainboard | |
parent | 25d16291d4a3b92e7a23d271d796246a1d18190a (diff) |
mb/prodrive/hermes: Use snake case for identifiers
There's no reason to use camel case for EEPROM region names or local
variables. Use snake case for consistency with coreboot's code style.
Change-Id: Id1200a0c778095b109d824a1ca4e3e69591e4165
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67274
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/prodrive/hermes/eeprom.c | 12 | ||||
-rw-r--r-- | src/mainboard/prodrive/hermes/eeprom.h | 22 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/mainboard/prodrive/hermes/eeprom.c b/src/mainboard/prodrive/hermes/eeprom.c index 5385a4a5e7..7a92fe3757 100644 --- a/src/mainboard/prodrive/hermes/eeprom.c +++ b/src/mainboard/prodrive/hermes/eeprom.c @@ -39,7 +39,7 @@ int check_signature(const size_t offset, const uint64_t signature) */ static bool get_board_settings_from_eeprom(struct eeprom_board_settings *board_cfg) { - const size_t board_settings_offset = offsetof(struct eeprom_layout, BoardSettings); + const size_t board_settings_offset = offsetof(struct eeprom_layout, board_settings); if (eeprom_read_buffer(board_cfg, board_settings_offset, sizeof(*board_cfg))) { printk(BIOS_ERR, "CFG EEPROM: Failed to read board settings\n"); @@ -72,7 +72,7 @@ struct eeprom_board_settings *get_board_settings(void) struct eeprom_bmc_settings *get_bmc_settings(void) { - const size_t bmc_settings_offset = offsetof(struct eeprom_layout, BMCSettings); + const size_t bmc_settings_offset = offsetof(struct eeprom_layout, bmc_settings); static struct eeprom_bmc_settings bmc_cfg = {0}; /* 0: uninitialized, 1: settings are valid */ @@ -120,10 +120,10 @@ bool eeprom_read_buffer(void *blob, size_t read_offset, size_t size) break; /* Write to UPD */ - uint8_t *writePointer = (uint8_t *)blob + i; - writePointer[0] = tmp[0]; + uint8_t *write_ptr = (uint8_t *)blob + i; + write_ptr[0] = tmp[0]; if (size - i > 1) - writePointer[1] = tmp[1]; + write_ptr[1] = tmp[1]; } /* Restore I2C_EN bit */ @@ -182,7 +182,7 @@ static bool eeprom_write_byte(const uint8_t data, const uint16_t write_offset) */ bool write_board_settings(const struct eeprom_board_layout *new_layout) { - const size_t off = offsetof(struct eeprom_layout, BoardLayout); + const size_t off = offsetof(struct eeprom_layout, board_layout); struct eeprom_board_layout old_layout = {0}; bool ret = false; bool changed = false; diff --git a/src/mainboard/prodrive/hermes/eeprom.h b/src/mainboard/prodrive/hermes/eeprom.h index ad41d029ed..2f7eac7253 100644 --- a/src/mainboard/prodrive/hermes/eeprom.h +++ b/src/mainboard/prodrive/hermes/eeprom.h @@ -73,27 +73,27 @@ struct __packed eeprom_bmc_settings { /* The EEPROM on address 0x57 has the following vendor defined layout: */ struct __packed eeprom_layout { union { - uint8_t RawFSPMUPD[0x600]; + uint8_t raw_fspm_upd[0x600]; FSPM_UPD mupd; }; union { - uint8_t RawFSPSUPD[0xc00]; + uint8_t raw_fsps_upd[0xc00]; FSPS_UPD supd; }; union { - uint8_t RawBoardLayout[0x400]; - struct eeprom_board_layout BoardLayout; + uint8_t raw_board_layout[0x400]; + struct eeprom_board_layout board_layout; }; char system_serial_number[HERMES_SERIAL_NUMBER_LENGTH]; char board_serial_number[HERMES_SERIAL_NUMBER_LENGTH]; - uint8_t BootOrder[0x8c0]; + uint8_t boot_order[0x8c0]; union { - uint8_t RawBoardSetting[0xf8]; - struct eeprom_board_settings BoardSettings; + uint8_t raw_board_settings[0xf8]; + struct eeprom_board_settings board_settings; }; union { - uint8_t RawBMCSetting[0x8]; - struct eeprom_bmc_settings BMCSettings; + uint8_t raw_bmc_settings[0x8]; + struct eeprom_bmc_settings bmc_settings; }; }; @@ -123,5 +123,5 @@ bool write_board_settings(const struct eeprom_board_layout *new_layout); } \ } while (0) -#define READ_EEPROM_FSP_M(dest, opt_name) READ_EEPROM(FSPM_UPD, RawFSPMUPD, dest, opt_name) -#define READ_EEPROM_FSP_S(dest, opt_name) READ_EEPROM(FSPS_UPD, RawFSPSUPD, dest, opt_name) +#define READ_EEPROM_FSP_M(dest, opt_name) READ_EEPROM(FSPM_UPD, raw_fspm_upd, dest, opt_name) +#define READ_EEPROM_FSP_S(dest, opt_name) READ_EEPROM(FSPS_UPD, raw_fsps_upd, dest, opt_name) |