From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 21:08:37 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FC9B106564A for ; Fri, 28 Oct 2011 21:08:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0A2388FC1A for ; Fri, 28 Oct 2011 21:08:36 +0000 (UTC) Received: by vws11 with SMTP id 11so5881330vws.13 for ; Fri, 28 Oct 2011 14:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=yD9FEP4tIDLjyek+VjxlgJ9Wcu7ta2+iySVpjjmjO7o=; b=VPj/AgTOqXxpNpyzHkCpkmbB6IxlMBFAmcag2iDHhaRY5XsDoiFQ6kOsEo69mtsrmv FSHtKN7OtxU/NDiZ0bpFCu8tR1RImuAOj00o0v6aYsy8dxVlIq1LLkorQTVtHi6szR6I PtHjh7sieFFnDoktWc8IUj4M8IISf5wTeKI/Y= MIME-Version: 1.0 Received: by 10.52.38.99 with SMTP id f3mr913287vdk.117.1319836116391; Fri, 28 Oct 2011 14:08:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.164.101 with HTTP; Fri, 28 Oct 2011 14:08:36 -0700 (PDT) In-Reply-To: <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com> References: <20111028073710.GP25601@funkthat.com> <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com> Date: Sat, 29 Oct 2011 08:08:36 +1100 X-Google-Sender-Auth: 0xL0mSZy4haiNZz_y6ur76QhzIA Message-ID: From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 21:08:37 -0000 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); }