Date: Wed, 13 Apr 2011 03:05:15 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r220588 - head/sys/dev/ath/ath_hal Message-ID: <201104130305.p3D35F3f043361@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104130305.p3D35F3f043361>