From owner-svn-src-head@FreeBSD.ORG Thu May 12 03:15:21 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA7D106566B; Thu, 12 May 2011 03:15:21 +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 906858FC0A; Thu, 12 May 2011 03:15:21 +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 p4C3FLXV017733; Thu, 12 May 2011 03:15:21 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4C3FLGS017731; Thu, 12 May 2011 03:15:21 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105120315.p4C3FLGS017731@svn.freebsd.org> From: Adrian Chadd Date: Thu, 12 May 2011 03:15:21 +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: r221800 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 03:15:21 -0000 Author: adrian Date: Thu May 12 03:15:21 2011 New Revision: 221800 URL: http://svn.freebsd.org/changeset/base/221800 Log: Fixes from Atheros: * If AR9130, give the chip extra time to reset * If AR5416, don't shutdown the chip during reset Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Thu May 12 02:23:06 2011 (r221799) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Thu May 12 03:15:21 2011 (r221800) @@ -56,7 +56,10 @@ ar5416SetPowerModeAwake(struct ath_hal * OS_REG_SET_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN); OS_REG_SET_BIT(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN); - OS_DELAY(50); /* Give chip the chance to awake */ + if (AR_SREV_HOWL(ah)) + OS_DELAY(10000); + else + OS_DELAY(50); /* Give chip the chance to awake */ for (i = POWER_UP_TIME / 50; i != 0; i--) { val = OS_REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M; @@ -94,7 +97,8 @@ ar5416SetPowerModeSleep(struct ath_hal * if (! AR_SREV_HOWL(ah)) OS_REG_WRITE(ah, AR_RC, AR_RC_AHB|AR_RC_HOSTIF); /* Shutdown chip. Active low */ - OS_REG_CLR_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN); + if (! AR_SREV_OWL(ah)) + OS_REG_CLR_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN); } }