return 1ULL << (size + 20);
}
-int of_pci_get_host_bridge_resources(struct device_node *dev,
+ struct device_node;
+
+ #ifdef CONFIG_OF
+ int of_pci_parse_bus_range(struct device_node *node, struct resource *res);
+ int of_get_pci_domain_nr(struct device_node *node);
+ int of_pci_get_max_link_speed(struct device_node *node);
+
+ #else
+ static inline int
+ of_pci_parse_bus_range(struct device_node *node, struct resource *res)
+ {
+ return -EINVAL;
+ }
+
+ static inline int
+ of_get_pci_domain_nr(struct device_node *node)
+ {
+ return -1;
+ }
+
+ static inline int
+ of_pci_get_max_link_speed(struct device_node *node)
+ {
+ return -EINVAL;
+ }
+ #endif /* CONFIG_OF */
+
+ #if defined(CONFIG_OF_ADDRESS)
-static inline int of_pci_get_host_bridge_resources(struct device_node *dev,
++int devm_of_pci_get_host_bridge_resources(struct device *dev,
+ unsigned char busno, unsigned char bus_max,
+ struct list_head *resources, resource_size_t *io_base);
+ #else
++static inline int devm_of_pci_get_host_bridge_resources(struct device *dev,
+ unsigned char busno, unsigned char bus_max,
+ struct list_head *resources, resource_size_t *io_base)
+ {
+ return -EINVAL;
+ }
+ #endif
+
#endif /* DRIVERS_PCI_H */