From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 01:42:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E691065670; Wed, 25 Apr 2012 01:42:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68BF48FC0A; Wed, 25 Apr 2012 01:42:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P1gNWM073938; Wed, 25 Apr 2012 01:42:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P1gNXt073935; Wed, 25 Apr 2012 01:42:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204250142.q3P1gNXt073935@svn.freebsd.org> From: Adrian Chadd Date: Wed, 25 Apr 2012 01:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234664 - in head/sys/dev/ath: . ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 01:42:23 -0000 Author: adrian Date: Wed Apr 25 01:42:22 2012 New Revision: 234664 URL: http://svn.freebsd.org/changeset/base/234664 Log: Add placeholder methods for WMI command access (USB, perhaps SDIO later) which will be needed for AR7010 and AR9287 USB access. The names differ slightly from Linux and Atheros, for the sake of consistency. A lot more work is required in order to convert the 11n HAL support to fully support USB. Modified: head/sys/dev/ath/ah_osdep.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ah_osdep.h ============================================================================== --- head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:24:39 2012 (r234663) +++ head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:42:22 2012 (r234664) @@ -89,6 +89,20 @@ struct ath_hal; #endif /* _BYTE_ORDER */ /* + * For USB/SDIO support (where access latencies are quite high); + * some write accesses may be buffered and then flushed when + * either a read is done, or an explicit flush is done. + * + * These are simply placeholders for now. + */ +#define OS_REG_WRITE_BUFFER_ENABLE(_ah) \ + do { } while (0) +#define OS_REG_WRITE_BUFFER_DISABLE(_ah) \ + do { } while (0) +#define OS_REG_WRITE_BUFFER_FLUSH(_ah) \ + do { } while (0) + +/* * Register read/write operations are either handled through * platform-dependent routines (or when debugging is enabled * with AH_DEBUG); or they are inline expanded using the macros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Apr 25 01:24:39 2012 (r234663) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Apr 25 01:42:22 2012 (r234664) @@ -581,6 +581,8 @@ ar5416SpurMitigate(struct ath_hal *ah, c AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK | AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK); + OS_REG_WRITE_BUFFER_ENABLE(ah); + OS_REG_WRITE(ah, AR_PHY_TIMING_CTRL4_CHAIN(0), new); new = (AR_PHY_SPUR_REG_MASK_RATE_CNTL | @@ -765,6 +767,9 @@ ar5416SpurMitigate(struct ath_hal *ah, c | (mask_p[47] << 2) | (mask_p[46] << 0); OS_REG_WRITE(ah, AR_PHY_BIN_MASK2_4, tmp_mask); OS_REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask); + + OS_REG_WRITE_BUFFER_FLUSH(ah); + OS_REG_WRITE_BUFFER_DISABLE(ah); } /*