coreboot/src/include/device
Nicholas Chin 8651731537 sconfig: Move config_of_soc from device.h to static.h
Many sources include device.h and thus static.h, but many only need the
function declarations and type definitions, not the compiled devicetree
from sconfig. This causes many unnecessary recompiles whenever the
devicetree is updated due to the dependency. Address this by moving the
config_of_soc macro directly into the generated static.h header, as it
seems to be the only line in device.h that actually requires static.h.
For now, static.h remains included in device.h so that the build is not
affected. Subsequent commits will include static.h directly into sources
that actually need it, after which it can be dropped from device.h.

Some statistics for C objects:

Dell Latitude E6400 (GM45/ICH9):
669 total objects
181 depend on static.h
2 require static.h

Dell Latitude E6430 (Ivy Bridge/Panther Point):
693 total objects
199 depend on static.h
3 require static.h

Lenovo ThinkCentre M700 / M900 Tiny (Kaby Lake):
794 total objects
298 depend on static.h
23 objects require static.h

MSI PRO Z690-A (WIFI) DDR4 (Alder Lake):
959 total objects
319 depend on static.h
25 require static.h

The number of objects was determined by grepping the build log for
calls to CC, the number of objects that depend on static.h was
determined by grepping for calls to CC after touching static.h, and the
number of objects that actually require the static.h related lines from
device.h was determined by grepping for objects that failed to build
after removing the static.h lines from device.h and running make with
the --keep-going flag.

Change-Id: I7c40135bf2815093b81e47201c38b7d0a6ac8fa8
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-28 20:44:40 +00:00
..
dram tree: Use <console/console.h> only when used 2024-07-03 04:39:42 +00:00
azalia_device.h azalia: Get rid of "return {-1,0} 2024-08-11 17:10:08 +00:00
cardbus.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
device.h sconfig: Move config_of_soc from device.h to static.h 2024-09-28 20:44:40 +00:00
gpio.h device + util/sconfig: introduce new device gpio 2020-12-28 17:47:04 +00:00
i2c.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
i2c_bus.h device/i2c_bus: Add routines to read and write multiple bytes 2022-09-04 14:55:59 +00:00
i2c_simple.h include/device/i2c_simple: add i2c_2ba_read_bytes function 2022-04-27 16:07:29 +00:00
mdio.h device/mdio: Provide helper functions for read and write 2022-11-24 05:58:28 +00:00
mmio.h treewide: Add 'IWYU pragma: export' comment 2022-11-03 13:05:17 +00:00
path.h device/path: rename domain path struct element to 'domain_id' 2024-07-31 14:32:51 +00:00
pci.h tree: Drop duplicated <device/{path,resource}.h> 2024-04-12 04:24:20 +00:00
pci_def.h device: Add support for multiple PCI segment groups 2024-01-16 22:59:55 +00:00
pci_ehci.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
pci_ids.h soc/intel/common/block/lpc: Support IBL eSPI 2024-09-24 11:13:11 +00:00
pci_mmio_cfg.h include/device/pci_mmio_cfg: assert CONFIG_ECAM_MMCONF_BUS_NUMBER != 0 2024-01-15 21:15:36 +00:00
pci_ops.h device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
pci_rom.h device: drop unnecessary CHECK_REV_IN_OPROM_NAME option 2024-05-23 21:54:26 +00:00
pci_type.h soc/intel/*: drop UART pad configuration from common code 2021-03-12 08:48:03 +00:00
pciexp.h device/pciexp: add pcie_find_dsn() 2022-11-20 17:37:09 +00:00
pcix.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
pnp.h treewide: Add 'IWYU pragma: export' comment 2022-11-03 13:05:17 +00:00
pnp_def.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
pnp_ops.h src: Include <arch/io.h> when appropriate 2020-10-26 06:44:40 +00:00
pnp_type.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
resource.h include/device/resource: drop unused IORESOURCE_* definitions 2023-08-10 21:48:46 +00:00
smbus.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
smbus_def.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
smbus_host.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
soundwire.h acpi/soundwire.[ch]: Fix dpn entry array overrun 2023-09-13 15:26:01 +00:00
spi.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
usbc_mux.h ec/google/chromeec: Split wait-loop for DP and HPD flags 2023-07-15 12:47:51 +00:00
xhci.h device/xhci: Add struct for capability registers 2023-03-07 17:11:58 +00:00