47b1e689db
drivers/of/address.c:66:29: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:66:29: expected restricted __be32 const [usertype] *cell drivers/of/address.c:66:29: got unsigned int [usertype] *addr drivers/of/address.c:87:32: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:87:32: expected restricted __be32 const [usertype] *cell drivers/of/address.c:87:32: got unsigned int [usertype] *addr drivers/of/address.c:91:30: warning: incorrect type in assignment (different base types) drivers/of/address.c:91:30: expected unsigned int [unsigned] [usertype] <noident> drivers/of/address.c:91:30: got restricted __be32 [usertype] <noident> drivers/of/address.c:92:22: warning: incorrect type in assignment (different base types) drivers/of/address.c:92:22: expected unsigned int [unsigned] [usertype] <noident> drivers/of/address.c:92:22: got restricted __be32 [usertype] <noident> drivers/of/address.c:147:35: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:147:35: expected restricted __be32 const [usertype] *addr drivers/of/address.c:147:35: got unsigned int [usertype] *addr drivers/of/address.c:157:34: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:157:34: expected restricted __be32 const [usertype] *cell drivers/of/address.c:157:34: got unsigned int [usertype] * drivers/of/address.c:256:29: warning: restricted __be32 degrades to integer drivers/of/address.c:256:36: warning: restricted __be32 degrades to integer drivers/of/address.c:262:34: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:262:34: expected restricted __be32 const [usertype] *cell drivers/of/address.c:262:34: got unsigned int [usertype] * drivers/of/address.c:372:41: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:372:41: expected restricted __be32 const [usertype] *cell drivers/of/address.c:372:41: got unsigned int [usertype] *addr drivers/of/address.c:395:53: warning: incorrect type in argument 2 (different base types) drivers/of/address.c:395:53: expected restricted __be32 const [usertype] *addr drivers/of/address.c:395:53: got unsigned int [usertype] *addr drivers/of/address.c:443:50: warning: incorrect type in argument 2 (different base types) drivers/of/address.c:443:50: expected restricted __be32 const [usertype] *addr drivers/of/address.c:443:50: got unsigned int *<noident> drivers/of/address.c:455:49: warning: incorrect type in argument 1 (different base types) drivers/of/address.c:455:49: expected restricted __be32 const [usertype] *cell drivers/of/address.c:455:49: got unsigned int *<noident> drivers/of/address.c:480:60: warning: incorrect type in argument 2 (different base types) drivers/of/address.c:480:60: expected restricted __be32 const [usertype] *addr drivers/of/address.c:480:60: got unsigned int *<noident> drivers/of/address.c:412:5: warning: symbol '__of_translate_address' was not declared. Should it be static? drivers/of/address.c:520:14: error: symbol 'of_get_address' redeclared with different type (originally declared at include/linux/of_address.h:22) - different base types Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
75 lines
2.3 KiB
C
75 lines
2.3 KiB
C
#ifndef __OF_ADDRESS_H
|
|
#define __OF_ADDRESS_H
|
|
#include <linux/ioport.h>
|
|
#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 bool of_can_translate_address(struct device_node *dev);
|
|
extern int of_address_to_resource(struct device_node *dev, int index,
|
|
struct resource *r);
|
|
extern struct device_node *of_find_matching_node_by_address(
|
|
struct device_node *from,
|
|
const struct of_device_id *matches,
|
|
u64 base_address);
|
|
extern void __iomem *of_iomap(struct device_node *device, int index);
|
|
|
|
/* Extract an address from a device, returns the region size and
|
|
* the address space flags too. The PCI version uses a BAR number
|
|
* instead of an absolute index
|
|
*/
|
|
extern const __be32 *of_get_address(struct device_node *dev, int index,
|
|
u64 *size, unsigned int *flags);
|
|
|
|
#ifndef pci_address_to_pio
|
|
static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
|
|
#define pci_address_to_pio pci_address_to_pio
|
|
#endif
|
|
|
|
#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 __be32 *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_OF_ADDRESS && CONFIG_PCI */
|
|
static inline int of_pci_address_to_resource(struct device_node *dev, int bar,
|
|
struct resource *r)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline const __be32 *of_get_pci_address(struct device_node *dev,
|
|
int bar_no, u64 *size, unsigned int *flags)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif /* CONFIG_OF_ADDRESS && CONFIG_PCI */
|
|
|
|
#endif /* __OF_ADDRESS_H */
|
|
|