binder: Use wake up hint for synchronous transactions.
[linux-2.6/btrfs-unstable.git] / include / linux / of_pci.h
blob518c8d20647a560bf2f679b62b80364b040ba9ae
1 #ifndef __OF_PCI_H
2 #define __OF_PCI_H
4 #include <linux/pci.h>
5 #include <linux/msi.h>
7 struct pci_dev;
8 struct of_phandle_args;
9 struct device_node;
11 #ifdef CONFIG_OF_PCI
12 int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq);
13 struct device_node *of_pci_find_child_device(struct device_node *parent,
14 unsigned int devfn);
15 int of_pci_get_devfn(struct device_node *np);
16 int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin);
17 int of_pci_parse_bus_range(struct device_node *node, struct resource *res);
18 int of_get_pci_domain_nr(struct device_node *node);
19 int of_pci_get_max_link_speed(struct device_node *node);
20 void of_pci_check_probe_only(void);
21 int of_pci_map_rid(struct device_node *np, u32 rid,
22 const char *map_name, const char *map_mask_name,
23 struct device_node **target, u32 *id_out);
24 #else
25 static inline int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq)
27 return 0;
30 static inline struct device_node *of_pci_find_child_device(struct device_node *parent,
31 unsigned int devfn)
33 return NULL;
36 static inline int of_pci_get_devfn(struct device_node *np)
38 return -EINVAL;
41 static inline int
42 of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
44 return 0;
47 static inline int
48 of_pci_parse_bus_range(struct device_node *node, struct resource *res)
50 return -EINVAL;
53 static inline int
54 of_get_pci_domain_nr(struct device_node *node)
56 return -1;
59 static inline int of_pci_map_rid(struct device_node *np, u32 rid,
60 const char *map_name, const char *map_mask_name,
61 struct device_node **target, u32 *id_out)
63 return -EINVAL;
66 static inline int
67 of_pci_get_max_link_speed(struct device_node *node)
69 return -EINVAL;
72 static inline void of_pci_check_probe_only(void) { }
73 #endif
75 #if defined(CONFIG_OF_ADDRESS)
76 int of_pci_get_host_bridge_resources(struct device_node *dev,
77 unsigned char busno, unsigned char bus_max,
78 struct list_head *resources, resource_size_t *io_base);
79 #else
80 static inline int of_pci_get_host_bridge_resources(struct device_node *dev,
81 unsigned char busno, unsigned char bus_max,
82 struct list_head *resources, resource_size_t *io_base)
84 return -EINVAL;
86 #endif
88 #endif