1 #ifndef _NAS782X_UTILS_H
2 #define _NAS782X_UTILS_H
5 #include <mach/hardware.h>
7 static inline void oxnas_register_clear_mask(void __iomem
*p
, unsigned mask
)
9 u32 val
= readl_relaxed(p
);
12 writel_relaxed(val
, p
);
15 static inline void oxnas_register_set_mask(void __iomem
*p
, unsigned mask
)
17 u32 val
= readl_relaxed(p
);
20 writel_relaxed(val
, p
);
23 static inline void oxnas_register_value_mask(void __iomem
*p
,
24 unsigned mask
, unsigned new_value
)
26 /* TODO sanity check mask & new_value = new_value */
27 u32 val
= readl_relaxed(p
);
31 writel_relaxed(val
, p
);
34 #endif /* _NAS782X_UTILS_H */