diff options
author | Aaron Durbin <adurbin@chromium.org> | 2017-11-09 12:38:03 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-11-10 06:33:28 +0000 |
commit | 6f1e8d24af98299c296b358e575b485300f851b9 (patch) | |
tree | 9fe99c7c161d6a739ee747805233092ca716d275 /src/include/device | |
parent | 7a39e02cfdfc1d44b3ac8d53f03e68f0fe7893d4 (diff) | |
download | coreboot-6f1e8d24af98299c296b358e575b485300f851b9.tar.xz |
device: untangle device_t from struct device some more
This further allows compilation units to be re-used without
having to add macro guards because of declarations not being
around in the __SIMPLE_DEVICE__ case. These declarations are for
functions that operate on struct device. struct device is a known
type so just expose the functions using the correct type. Also,
DEVTREE_CONST is empty while in ramstage so there's no reason
to separate the declarations. They compile regardless of stage.
Change-Id: Idd4180437d30e7dfaa9f735416c108841e43129f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22397
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Diffstat (limited to 'src/include/device')
-rw-r--r-- | src/include/device/device.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h index 1d2afe8394..b20c452fb7 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -200,9 +200,6 @@ device_t alloc_find_dev(struct bus *parent, struct device_path *path); device_t dev_find_device(u16 vendor, u16 device, device_t from); device_t dev_find_class(unsigned int class, device_t from); device_t dev_find_path(device_t prev_match, enum device_path_type path_type); -device_t dev_find_slot(unsigned int bus, unsigned int devfn); -device_t dev_find_slot_on_smbus(unsigned int bus, unsigned int addr); -device_t dev_find_slot_pnp(u16 port, u16 device); device_t dev_find_lapic(unsigned int apic_id); int dev_count_cpu(void); @@ -243,11 +240,6 @@ void fixed_mem_resource(device_t dev, unsigned long index, void mmconf_resource_init(struct resource *res, resource_t base, int buses); void mmconf_resource(struct device *dev, unsigned long index); -void scan_smbus(device_t bus); -void scan_generic_bus(device_t bus); -void scan_static_bus(device_t bus); -void scan_lpc_bus(device_t bus); - /* It is the caller's responsibility to adjust regions such that ram_resource() * and mmio_resource() do not overlap. */ @@ -270,7 +262,7 @@ void scan_lpc_bus(device_t bus); void tolm_test(void *gp, struct device *dev, struct resource *new); u32 find_pci_tolm(struct bus *bus); -#else /* vv __SIMPLE_DEVICE__ vv */ +#endif DEVTREE_CONST struct device *dev_find_slot(unsigned int bus, unsigned int devfn); @@ -280,7 +272,10 @@ DEVTREE_CONST struct device *dev_find_slot_on_smbus(unsigned int bus, unsigned int addr); DEVTREE_CONST struct device *dev_find_slot_pnp(u16 port, u16 device); -#endif +void scan_smbus(struct device *bus); +void scan_generic_bus(struct device *bus); +void scan_static_bus(struct device *bus); +void scan_lpc_bus(struct device *bus); #endif /* !defined(__ROMCC__) */ |