Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/59672 )
Change subject: mb/prodrive/hermes: Clean up some cosmetics ......................................................................
mb/prodrive/hermes: Clean up some cosmetics
Use lowercase for hex numbers, sort includes alphabetically and avoid relying on indirect inclusion. Include `<intelblocks/gpio.h>` instead of `<intelblocks/gpio_defs.h>`, as the latter implcitly relies on one definition from `<soc/gpio.h>`. 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 th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/59672 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/prodrive/hermes/dsdt.asl M src/mainboard/prodrive/hermes/eeprom.c M src/mainboard/prodrive/hermes/eeprom.h M src/mainboard/prodrive/hermes/gpio.c M src/mainboard/prodrive/hermes/hda_verb.c M src/mainboard/prodrive/hermes/mainboard.c M src/mainboard/prodrive/hermes/romstage.c M src/mainboard/prodrive/hermes/smbios.c 8 files changed, 25 insertions(+), 26 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved
diff --git a/src/mainboard/prodrive/hermes/dsdt.asl b/src/mainboard/prodrive/hermes/dsdt.asl index 97bee96..9d62f40 100644 --- a/src/mainboard/prodrive/hermes/dsdt.asl +++ b/src/mainboard/prodrive/hermes/dsdt.asl @@ -7,22 +7,19 @@ ACPI_DSDT_REV_2, OEM_ID, ACPI_TABLE_CREATOR, - 0x20110725 // OEM revision + 0x20110725 ) { #include <acpi/dsdt_top.asl> #include <soc/intel/common/block/acpi/acpi/platform.asl> - - // global NVS and variables #include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
Scope (_SB) { Device (PCI0) { - #include <soc/intel/common/block/acpi/acpi/northbridge.asl> - #include <soc/intel/cannonlake/acpi/southbridge.asl> + #include <soc/intel/common/block/acpi/acpi/northbridge.asl> + #include <soc/intel/cannonlake/acpi/southbridge.asl> } }
#include <southbridge/intel/common/acpi/sleepstates.asl> - } diff --git a/src/mainboard/prodrive/hermes/eeprom.c b/src/mainboard/prodrive/hermes/eeprom.c index 006f922..5385a4a 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 <assert.h> -#include <device/pci_ops.h> -#include <delay.h> #include <console/console.h> #include <crc_byte.h> +#include <delay.h> +#include <device/pci_ops.h> #include <device/smbus_host.h> #include <soc/intel/common/block/smbus/smbuslib.h> #include <types.h> diff --git a/src/mainboard/prodrive/hermes/eeprom.h b/src/mainboard/prodrive/hermes/eeprom.h index 0d4e9d8..26f2faa 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 <assert.h> #include <soc/ramstage.h> +#include <types.h>
union eeprom_dimm_layout { struct __packed { @@ -71,7 +73,7 @@ FSPM_UPD mupd; }; union { - uint8_t RawFSPSUPD[0xC00]; + uint8_t RawFSPSUPD[0xc00]; FSPS_UPD supd; }; union { @@ -82,7 +84,7 @@ 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 @@ };
_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 97e6740..f228ef8 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 <commonlib/helpers.h> +#include <intelblocks/gpio.h> #include <soc/gpio.h> -#include <intelblocks/gpio_defs.h>
#include "gpio.h"
diff --git a/src/mainboard/prodrive/hermes/hda_verb.c b/src/mainboard/prodrive/hermes/hda_verb.c index 06f2289..c818d26 100644 --- a/src/mainboard/prodrive/hermes/hda_verb.c +++ b/src/mainboard/prodrive/hermes/hda_verb.c @@ -21,7 +21,7 @@ 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 @@
/* * 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 1155b96..81ed641 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 <arch/cpu.h> #include <acpi/acpigen.h> +#include <arch/cpu.h> +#include <bootstate.h> #include <cbmem.h> #include <console/console.h> #include <crc_byte.h> -#include <bootstate.h> #include <device/device.h> #include <device/dram/spd.h> #include <gpio.h> -#include <intelblocks/gpio_defs.h> +#include <intelblocks/gpio.h> #include <intelblocks/pmclib.h> +#include <smbios.h> #include <soc/gpio.h> #include <types.h> -#include <smbios.h>
#include "eeprom.h" #include "gpio.h" diff --git a/src/mainboard/prodrive/hermes/romstage.c b/src/mainboard/prodrive/hermes/romstage.c index 32b4c76..513bab3 100644 --- a/src/mainboard/prodrive/hermes/romstage.c +++ b/src/mainboard/prodrive/hermes/romstage.c @@ -9,19 +9,19 @@ /* 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 624549e..c1325d4 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 <smbios.h> -#include <types.h> #include <string.h> +#include <types.h>
#include "eeprom.h"