Author: adrian Date: Wed Apr 13 03:05:15 2011 New Revision: 220588 URL: http://svn.freebsd.org/changeset/base/220588
Log: Add OS_REG_RMW, which mirrors ath9k's REG_RMW. This macro does a read-modify-write pass with register bits to set and clear. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Wed Apr 13 02:40:45 2011 (r220587) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed Apr 13 03:05:15 2011 (r220588) @@ -468,6 +468,8 @@ isBigEndian(void) */ #define SM(_v, _f) (((_v) << _f##_S) & (_f)) #define MS(_v, _f) (((_v) & (_f)) >> _f##_S) +#define OS_REG_RMW(_a, _r, _set, _clr) \ + OS_REG_WRITE(_a, _r, (OS_REG_READ(_a, _r) & ~(_clr)) | (_set)) #define OS_REG_RMW_FIELD(_a, _r, _f, _v) \ OS_REG_WRITE(_a, _r, \ (OS_REG_READ(_a, _r) &~ (_f)) | (((_v) << _f##_S) & (_f))) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"