From 0b697a247331168c35593d0741e4d0fd09a463f6 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 25 Nov 2021 13:34:11 +0100 Subject: mb/prodrive/hermes: Clean up some cosmetics Use lowercase for hex numbers, sort includes alphabetically and avoid relying on indirect inclusion. Include `` instead of ``, as the latter implcitly relies on one definition from ``. Also drop useless dsdt.asl and fix up the indentation of some includes. Tested with BUILD_TIMELESS=1, Prodrive Hermes remains identical. Change-Id: I3aeb9a644cf33cb4b1987174f40ef0fc7daccfa9 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/59672 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/mainboard/prodrive/hermes/dsdt.asl | 9 +++------ src/mainboard/prodrive/hermes/eeprom.c | 4 ++-- src/mainboard/prodrive/hermes/eeprom.h | 8 +++++--- src/mainboard/prodrive/hermes/gpio.c | 2 +- src/mainboard/prodrive/hermes/hda_verb.c | 10 +++++----- src/mainboard/prodrive/hermes/mainboard.c | 8 ++++---- src/mainboard/prodrive/hermes/romstage.c | 8 ++++---- src/mainboard/prodrive/hermes/smbios.c | 2 +- 8 files changed, 25 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/mainboard/prodrive/hermes/dsdt.asl b/src/mainboard/prodrive/hermes/dsdt.asl index 97bee96406..9d62f408c6 100644 --- a/src/mainboard/prodrive/hermes/dsdt.asl +++ b/src/mainboard/prodrive/hermes/dsdt.asl @@ -7,22 +7,19 @@ DefinitionBlock( ACPI_DSDT_REV_2, OEM_ID, ACPI_TABLE_CREATOR, - 0x20110725 // OEM revision + 0x20110725 ) { #include #include - - // global NVS and variables #include Scope (\_SB) { Device (PCI0) { - #include - #include + #include + #include } } #include - } diff --git a/src/mainboard/prodrive/hermes/eeprom.c b/src/mainboard/prodrive/hermes/eeprom.c index 006f922496..5385a4a5e7 100644 --- a/src/mainboard/prodrive/hermes/eeprom.c +++ b/src/mainboard/prodrive/hermes/eeprom.c @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include -#include #include #include +#include +#include #include #include #include diff --git a/src/mainboard/prodrive/hermes/eeprom.h b/src/mainboard/prodrive/hermes/eeprom.h index 0d4e9d8e31..26f2faa0bd 100644 --- a/src/mainboard/prodrive/hermes/eeprom.h +++ b/src/mainboard/prodrive/hermes/eeprom.h @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include +#include union eeprom_dimm_layout { struct __packed { @@ -71,7 +73,7 @@ struct __packed eeprom_layout { FSPM_UPD mupd; }; union { - uint8_t RawFSPSUPD[0xC00]; + uint8_t RawFSPSUPD[0xc00]; FSPS_UPD supd; }; union { @@ -82,7 +84,7 @@ struct __packed eeprom_layout { char board_serial_number[HERMES_SERIAL_NUMBER_LENGTH]; uint8_t BootOrder[0x8c0]; union { - uint8_t RawBoardSetting[0xF8]; + uint8_t RawBoardSetting[0xf8]; struct eeprom_board_settings BoardSettings; }; union { @@ -92,7 +94,7 @@ struct __packed eeprom_layout { }; _Static_assert(sizeof(FSPM_UPD) <= 0x600, "FSPM_UPD too big"); -_Static_assert(sizeof(FSPS_UPD) <= 0xC00, "FSPS_UPD too big"); +_Static_assert(sizeof(FSPS_UPD) <= 0xc00, "FSPS_UPD too big"); _Static_assert(sizeof(struct eeprom_layout) == 0x2000, "EEPROM layout size mismatch"); bool eeprom_read_buffer(void *blob, size_t read_offset, size_t size); diff --git a/src/mainboard/prodrive/hermes/gpio.c b/src/mainboard/prodrive/hermes/gpio.c index 97e6740594..f228ef8edd 100644 --- a/src/mainboard/prodrive/hermes/gpio.c +++ b/src/mainboard/prodrive/hermes/gpio.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include -#include #include "gpio.h" diff --git a/src/mainboard/prodrive/hermes/hda_verb.c b/src/mainboard/prodrive/hermes/hda_verb.c index 06f2289880..c818d26d19 100644 --- a/src/mainboard/prodrive/hermes/hda_verb.c +++ b/src/mainboard/prodrive/hermes/hda_verb.c @@ -21,7 +21,7 @@ const u32 cim_verb_data[] = { AZALIA_PIN_CFG(0, 0x1c, 0x411111f0), /* CD audio - disabled */ AZALIA_PIN_CFG(0, 0x1d, 0x4004c601), /* BEEPIN */ AZALIA_PIN_CFG(0, 0x1e, 0x01452160), /* SPDIF-OUT */ - AZALIA_PIN_CFG(0, 0x1f, 0x01C52170), /* SPDIF-IN */ + AZALIA_PIN_CFG(0, 0x1f, 0x01c52170), /* SPDIF-IN */ /* Config for R02 and older */ AZALIA_PIN_CFG(0, 0x19, 0x02214c40), /* port F - front hp out */ @@ -31,11 +31,11 @@ const u32 cim_verb_data[] = { /* * VerbTable: CFL Display Audio Codec - * Revision ID = 0xFF - * Codec Vendor: 0x8086280B + * Revision ID = 0xff + * Codec Vendor: 0x8086280b */ - 0x8086280B, - 0xFFFFFFFF, + 0x8086280b, + 0xffffffff, 5, /* Number of 4 dword sets */ AZALIA_SUBVENDOR(2, 0x80860101), diff --git a/src/mainboard/prodrive/hermes/mainboard.c b/src/mainboard/prodrive/hermes/mainboard.c index 1155b96944..81ed641078 100644 --- a/src/mainboard/prodrive/hermes/mainboard.c +++ b/src/mainboard/prodrive/hermes/mainboard.c @@ -1,19 +1,19 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#include #include +#include +#include #include #include #include -#include #include #include #include -#include +#include #include +#include #include #include -#include #include "eeprom.h" #include "gpio.h" diff --git a/src/mainboard/prodrive/hermes/romstage.c b/src/mainboard/prodrive/hermes/romstage.c index 32b4c76347..513bab38b8 100644 --- a/src/mainboard/prodrive/hermes/romstage.c +++ b/src/mainboard/prodrive/hermes/romstage.c @@ -9,19 +9,19 @@ static const struct cnl_mb_cfg baseboard_mem_cfg = { /* Access memory info through SMBUS. */ .spd[0] = { .read_type = READ_SMBUS, - .spd_spec = {.spd_smbus_address = 0xA0} + .spd_spec = {.spd_smbus_address = 0xa0} }, .spd[1] = { .read_type = READ_SMBUS, - .spd_spec = {.spd_smbus_address = 0xA2} + .spd_spec = {.spd_smbus_address = 0xa2} }, .spd[2] = { .read_type = READ_SMBUS, - .spd_spec = {.spd_smbus_address = 0xA4} + .spd_spec = {.spd_smbus_address = 0xa4} }, .spd[3] = { .read_type = READ_SMBUS, - .spd_spec = {.spd_smbus_address = 0xA6} + .spd_spec = {.spd_smbus_address = 0xa6} }, /* Baseboard uses 121, 81 and 100 rcomp resistors */ diff --git a/src/mainboard/prodrive/hermes/smbios.c b/src/mainboard/prodrive/hermes/smbios.c index 624549e90d..c1325d4771 100644 --- a/src/mainboard/prodrive/hermes/smbios.c +++ b/src/mainboard/prodrive/hermes/smbios.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include #include +#include #include "eeprom.h" -- cgit v1.2.3