21 #ifndef _ASM_POWERPC_SCOM_H
22 #define _ASM_POWERPC_SCOM_H
26 #ifdef CONFIG_PPC_SCOM
44 typedef void *scom_map_t;
47 #define SCOM_MAP_INVALID (NULL)
67 static inline void scom_init(
const struct scom_controller *
controller)
76 static inline int scom_map_ok(scom_map_t
map)
78 return map != SCOM_MAP_INVALID;
89 static inline scom_map_t scom_map(
struct device_node *ctrl_dev,
92 return scom_controller->map(ctrl_dev, reg, count);
126 static inline void scom_unmap(scom_map_t
map)
128 if (scom_map_ok(map))
129 scom_controller->unmap(map);
137 static inline u64 scom_read(scom_map_t map,
u32 reg)
139 return scom_controller->read(map, reg);
148 static inline void scom_write(scom_map_t map,
u32 reg,
u64 value)
150 scom_controller->write(map, reg, value);