summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-10-18 02:46:26 +0000
committeradrian <adrian@FreeBSD.org>2011-10-18 02:46:26 +0000
commit9000cf77a50a5af5a2aa2db12323d0f91963afe5 (patch)
tree963bf4d144c5a53cfeffbede3145a5ec5aed3a27
parent1e651efecd190d3846022a52f240fea3372a10f7 (diff)
downloadFreeBSD-src-9000cf77a50a5af5a2aa2db12323d0f91963afe5.zip
FreeBSD-src-9000cf77a50a5af5a2aa2db12323d0f91963afe5.tar.gz
Add in OS_REG_BIT_SET, a macro which does what it says it does.
This will be used in an upcoming commit to the ar5212 HAL.
-rw-r--r--sys/dev/ath/ath_hal/ah_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h
index 657618d..521b57e 100644
--- a/sys/dev/ath/ath_hal/ah_internal.h
+++ b/sys/dev/ath/ath_hal/ah_internal.h
@@ -472,6 +472,8 @@ isBigEndian(void)
OS_REG_WRITE(_a, _r, OS_REG_READ(_a, _r) | (_f))
#define OS_REG_CLR_BIT(_a, _r, _f) \
OS_REG_WRITE(_a, _r, OS_REG_READ(_a, _r) &~ (_f))
+#define OS_REG_IS_BIT_SET(_a, _r, _f) \
+ ((OS_REG_READ(_a, _r) & (_f)) != 0)
/* Analog register writes may require a delay between each one (eg Merlin?) */
#define OS_A_REG_RMW_FIELD(_a, _r, _f, _v) \
OpenPOWER on IntegriCloud