-/* $OpenBSD: ofw_clock.c,v 1.5 2016/08/22 22:06:59 kettenis Exp $ */
+/* $OpenBSD: ofw_clock.c,v 1.6 2016/08/23 21:30:18 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
reset_do_assert_idx(node, idx, assert);
}
+void
+reset_assert_idx(int node, int idx)
+{
+ reset_do_assert_idx(node, idx, 1);
+}
+
void
reset_assert(int node, const char *name)
{
reset_do_assert(node, name, 1);
}
+void
+reset_deassert_idx(int node, int idx)
+{
+ reset_do_assert_idx(node, idx, 0);
+}
+
void
reset_deassert(int node, const char *name)
{
-/* $OpenBSD: ofw_clock.h,v 1.4 2016/08/22 19:28:27 kettenis Exp $ */
+/* $OpenBSD: ofw_clock.h,v 1.5 2016/08/23 21:30:18 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
void reset_register(struct reset_device *);
void reset_assert(int, const char *);
+void reset_assert_idx(int, int);
void reset_deassert(int, const char *);
+void reset_deassert_idx(int, int);
+
+static inline void
+reset_assert_all(int node)
+{
+ reset_assert_idx(node, -1);
+}
+
+static inline void
+reset_deassert_all(int node)
+{
+ reset_deassert_idx(node, -1);
+}
#endif /* _DEV_OFW_CLOCK_H_ */