1 #ifndef _OF_DEVICE_COMMON_H
2 #define _OF_DEVICE_COMMON_H
4 static inline u64
of_read_addr(const u32
*cell
, int size
)
8 r
= (r
<< 32) | *(cell
++);
12 void of_bus_default_count_cells(struct device_node
*dev
, int *addrc
,
14 int of_out_of_range(const u32
*addr
, const u32
*base
,
15 const u32
*size
, int na
, int ns
);
16 int of_bus_default_map(u32
*addr
, const u32
*range
, int na
, int ns
, int pna
);
17 unsigned long of_bus_default_get_flags(const u32
*addr
, unsigned long flags
);
19 int of_bus_sbus_match(struct device_node
*np
);
20 void of_bus_sbus_count_cells(struct device_node
*child
, int *addrc
, int *sizec
);
22 /* Max address size we deal with */
23 #define OF_MAX_ADDR_CELLS 4
27 const char *addr_prop_name
;
28 int (*match
)(struct device_node
*parent
);
29 void (*count_cells
)(struct device_node
*child
,
30 int *addrc
, int *sizec
);
31 int (*map
)(u32
*addr
, const u32
*range
,
32 int na
, int ns
, int pna
);
33 unsigned long (*get_flags
)(const u32
*addr
, unsigned long);
36 #endif /* _OF_DEVICE_COMMON_H */