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>
This commit is contained in:
parent
7a39e02cfd
commit
6f1e8d24af
|
@ -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_device(u16 vendor, u16 device, device_t from);
|
||||||
device_t dev_find_class(unsigned int class, 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_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);
|
device_t dev_find_lapic(unsigned int apic_id);
|
||||||
int dev_count_cpu(void);
|
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_init(struct resource *res, resource_t base, int buses);
|
||||||
void mmconf_resource(struct device *dev, unsigned long index);
|
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()
|
/* It is the caller's responsibility to adjust regions such that ram_resource()
|
||||||
* and mmio_resource() do not overlap.
|
* 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);
|
void tolm_test(void *gp, struct device *dev, struct resource *new);
|
||||||
u32 find_pci_tolm(struct bus *bus);
|
u32 find_pci_tolm(struct bus *bus);
|
||||||
|
|
||||||
#else /* vv __SIMPLE_DEVICE__ vv */
|
#endif
|
||||||
|
|
||||||
DEVTREE_CONST struct device *dev_find_slot(unsigned int bus,
|
DEVTREE_CONST struct device *dev_find_slot(unsigned int bus,
|
||||||
unsigned int devfn);
|
unsigned int devfn);
|
||||||
|
@ -280,7 +272,10 @@ DEVTREE_CONST struct device *dev_find_slot_on_smbus(unsigned int bus,
|
||||||
unsigned int addr);
|
unsigned int addr);
|
||||||
DEVTREE_CONST struct device *dev_find_slot_pnp(u16 port, u16 device);
|
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__) */
|
#endif /* !defined(__ROMCC__) */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue