newbus IO ordering semantics - moving forward
Adrian Chadd
adrian at freebsd.org
Fri Oct 28 21:08:37 UTC 2011
This is the offending code. Ah, I had it wrong - lots of writes,
followed by a read:
uint32_t
ar5212GetRadioRev(struct ath_hal *ah)
{
uint32_t val;
int i;
/* Read Radio Chip Rev Extract */
OS_REG_WRITE(ah, AR_PHY(0x34), 0x00001c16);
for (i = 0; i < 8; i++)
OS_REG_WRITE(ah, AR_PHY(0x20), 0x00010000);
val = (OS_REG_READ(ah, AR_PHY(256)) >> 24) & 0xff;
val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4);
return ath_hal_reverseBits(val, 8);
}
More information about the freebsd-arch
mailing list