Add a comment which covers what's going on with the 64 bit TSF write.

After chatting with the MAC team, the TSF writes (at least on the 11n
MACs, I don't know about pre-11n MACs) are done as 64 bit writes that
can take some time.  So, doing a 32 bit TSF write is definitely not
supported.  Leave a comment here which explains that.

Whilst here, add a comment which outlines that after a reset or TSF
write, the TSF write may take a while (up to 50uS) to update.
A write or reset shouldn't be done whilst the previous one is in
flight.  Also (and this isn't currently done) a read shouldn't
occur until the SLEEP32_TSF_WRITE_STAT is clear.  Right now we're
not doing that, mostly because we haven't been doing lots of TSF
resets/writes until recently.
This commit is contained in:
Adrian Chadd 2012-11-24 02:41:18 +00:00
parent 85129b4bd4
commit 6dd853a77a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243472

View File

@ -128,6 +128,18 @@ ar5416GetTsf64(struct ath_hal *ah)
return (((uint64_t) u32) << 32) | ((uint64_t) low2);
}
/*
* Update the TSF.
*
* The full TSF is only updated once the upper 32 bits have
* been written. Writing only the lower 32 bits of the TSF
* will not actually correctly update the TSF.
*
* The #if 0'ed code is to check whether the previous TSF
* reset or write has completed before writing to the
* TSF. Strictly speaking, it should be also checked before
* reading the TSF as the write/reset may not have completed.
*/
void
ar5416SetTsf64(struct ath_hal *ah, uint64_t tsf64)
{