Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291907
b: refs/heads/master
c: a850a75
h: refs/heads/master
i:
  291905: cf7bc0f
  291903: 29c678b
v: v3
  • Loading branch information
Grant Likely committed Feb 16, 2012
1 parent bb07e0d commit 4f24fcc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1bc04f2cf8c2a1feadbd994f50c40bb145bf2989
refs/heads/master: a850a7554442f08d3e910c6eeb4ee216868dda1e
33 changes: 29 additions & 4 deletions trunk/include/linux/of_address.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/errno.h>
#include <linux/of.h>

#ifdef CONFIG_OF_ADDRESS
extern u64 of_translate_address(struct device_node *np, const __be32 *addr);
extern int of_address_to_resource(struct device_node *dev, int index,
struct resource *r);
Expand All @@ -25,12 +26,37 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
#define pci_address_to_pio pci_address_to_pio
#endif

#ifdef CONFIG_PCI
#else /* CONFIG_OF_ADDRESS */
static inline int of_address_to_resource(struct device_node *dev, int index,
struct resource *r)
{
return -EINVAL;
}
static inline struct device_node *of_find_matching_node_by_address(
struct device_node *from,
const struct of_device_id *matches,
u64 base_address)
{
return NULL;
}
static inline void __iomem *of_iomap(struct device_node *device, int index)
{
return NULL;
}
static inline const u32 *of_get_address(struct device_node *dev, int index,
u64 *size, unsigned int *flags)
{
return NULL;
}
#endif /* CONFIG_OF_ADDRESS */


#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_PCI)
extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no,
u64 *size, unsigned int *flags);
extern int of_pci_address_to_resource(struct device_node *dev, int bar,
struct resource *r);
#else /* CONFIG_PCI */
#else /* CONFIG_OF_ADDRESS && CONFIG_PCI */
static inline int of_pci_address_to_resource(struct device_node *dev, int bar,
struct resource *r)
{
Expand All @@ -42,8 +68,7 @@ static inline const __be32 *of_get_pci_address(struct device_node *dev,
{
return NULL;
}
#endif /* CONFIG_PCI */

#endif /* CONFIG_OF_ADDRESS && CONFIG_PCI */

#endif /* __OF_ADDRESS_H */

0 comments on commit 4f24fcc

Please sign in to comment.