From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 08:32:53 2011 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 D2E921065670; Fri, 23 Dec 2011 08:32:53 +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 BD5618FC17; Fri, 23 Dec 2011 08:32:53 +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 pBN8Wrpt055718; Fri, 23 Dec 2011 08:32:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN8Wrkr055716; Fri, 23 Dec 2011 08:32:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230832.pBN8Wrkr055716@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 08:32:53 +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: r228834 - 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: Fri, 23 Dec 2011 08:32:53 -0000 Author: adrian Date: Fri Dec 23 08:32:53 2011 New Revision: 228834 URL: http://svn.freebsd.org/changeset/base/228834 Log: Port over some GPIO and LED fixes. * As a preparation for AR9287 GPIO support, add in the AR9287 GPIO mask. * Fix the association mask values; these are post-shift values but were being shifted in twice. This resulted in some garbage being written in the wrong place and the link LED (at least on my d-link AR5416 NIC) giving totally incorrect blink patterns. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Dec 23 04:05:39 2011 (r228833) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Dec 23 08:32:53 2011 (r228834) @@ -203,9 +203,9 @@ #define AR_MAC_LED_MODE_POWON 5 /* Power LED on (s/w control) */ #define AR_MAC_LED_MODE_NETON 6 /* Network LED on (s/w control) */ #define AR_MAC_LED_ASSOC 0x00000c00 -#define AR_MAC_LED_ASSOC_NONE 0x00000000 /* STA is not associated or trying */ -#define AR_MAC_LED_ASSOC_ACTIVE 0x00000400 /* STA is associated */ -#define AR_MAC_LED_ASSOC_PEND 0x00000800 /* STA is trying to associate */ +#define AR_MAC_LED_ASSOC_NONE 0x0 /* STA is not associated or trying */ +#define AR_MAC_LED_ASSOC_ACTIVE 0x1 /* STA is associated */ +#define AR_MAC_LED_ASSOC_PEND 0x2 /* STA is trying to associate */ #define AR_MAC_LED_ASSOC_S 10 #define AR_WA_UNTIE_RESET_EN 0x00008000 /* ena PCI reset to POR */ @@ -504,6 +504,8 @@ #define AR928X_GPIO_IN_VAL_S 10 #define AR9285_GPIO_IN_VAL 0x00FFF000 #define AR9285_GPIO_IN_VAL_S 12 +#define AR9287_GPIO_IN_VAL 0x003FF800 +#define AR9287_GPIO_IN_VAL_S 11 #define AR_GPIO_OE_OUT_DRV 0x3 /* 2 bit mask shifted by 2*bitpos */ #define AR_GPIO_OE_OUT_DRV_NO 0x0 /* tristate */