Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Oct 2011 08:08:36 +1100
From:      Adrian Chadd <adrian@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: newbus IO ordering semantics - moving forward
Message-ID:  <CAJ-Vmom%2BbVbV_%2B1CJB4%2Bd209V9FjrZdvru5TG6URU2gKj47Pnw@mail.gmail.com>
In-Reply-To: <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com>
References:  <CAJ-VmonFJG3xLn2JvarOUN6o-e7MC%2BA%2B=W9_vocZqY6L3CmTmQ@mail.gmail.com> <20111028073710.GP25601@funkthat.com> <CAJ-Vmom1M46dxby_aRYBT_FMWG5xN3kXdH-gahyrqWcBxtVyMA@mail.gmail.com> <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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);
}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmom%2BbVbV_%2B1CJB4%2Bd209V9FjrZdvru5TG6URU2gKj47Pnw>