From patchwork Fri Feb 6 11:47:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 5789681 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0AED4BF440 for ; Fri, 6 Feb 2015 11:48:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F0F2201C0 for ; Fri, 6 Feb 2015 11:48:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71635201B4 for ; Fri, 6 Feb 2015 11:48:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YJhOF-00071S-Ee; Fri, 06 Feb 2015 11:48:03 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YJhOD-0006sj-BC for ath10k@lists.infradead.org; Fri, 06 Feb 2015 11:48:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1423223281; x=1454759281; h=from:to:cc:subject:date:message-id:mime-version; bh=iVSvzMNpvH1z5CjsXFGinTwBANRLgRIE7tWfiBVp5K0=; b=ugyyvsZ4hyVkcmIGC5kpQvdLM/7JRMBZgDyo5pgV0WeYWxGEFgREnjrp 2PUK+jUGkiTwToIDvk3pZiURrwuA0Oa5Apt4VNdlnvgOOZwobMbjK2OK+ 0oDrTnIWlHf6vvgNA68lRgYA6cd1nWxPyw4WaM4FshnINRBBfFhXBJnsn 4=; X-IronPort-AV: E=McAfee;i="5600,1067,7703"; a="102293695" Received: from ironmsg03-r.qualcomm.com ([172.30.46.17]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Feb 2015 03:47:38 -0800 X-IronPort-AV: E=Sophos;i="5.09,529,1418112000"; d="scan'208";a="845979659" Received: from nasanexm01e.na.qualcomm.com ([10.85.0.31]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 06 Feb 2015 03:47:38 -0800 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM01E.na.qualcomm.com (10.85.0.31) with Microsoft SMTP Server (TLS) id 15.0.995.29; Fri, 6 Feb 2015 03:47:37 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.995.29; Fri, 6 Feb 2015 03:47:30 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 06 Feb 2015 17:17:21 +0530 From: Rajkumar Manoharan To: Subject: [PATCH 1/2] ath10k: Bypass PLL setting on target init for QCA9888 Date: Fri, 6 Feb 2015 17:17:17 +0530 Message-ID: <1423223238-17530-1-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.2.2 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm01a.na.qualcomm.com (10.85.0.81) To aphydexm01b.ap.qualcomm.com (10.252.127.11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150206_034801_429350_D8904ACE X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.1 (-----) Cc: linux-wireless@vger.kernel.org, Rajkumar Manoharan X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some of of qca988x solutions are having global reset issue during target initialization. Bypassing PLL setting before downloading firmware and letting the SoC run on REF_CLK is fixing the problem. Corresponding firmware change is also needed to set the clock source once the target is initialized. Since 10.2.4 firmware is having this ROM patch, applying skip_clock_init only for 10.2.4 firmware versions. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 310e12b..3119192 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -797,6 +797,20 @@ static int ath10k_download_cal_data(struct ath10k *ar) ar->cal_mode = ATH10K_CAL_MODE_OTP; done: + if ((ar->hw_rev != ATH10K_HW_QCA988X) || + (ar->wmi.op_version != ATH10K_FW_WMI_OP_VERSION_10_2_4)) { + ath10k_dbg(ar, ATH10K_DBG_BOOT, + "boot using calibration mode %s\n", + ath10k_cal_mode_str(ar->cal_mode)); + return 0; + } + + ret = ath10k_bmi_write32(ar, hi_skip_clock_init, 1); + if (ret) { + ath10k_err(ar, "could not write skip_clock_init (%d)\n", ret); + return ret; + } + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot using calibration mode %s\n", ath10k_cal_mode_str(ar->cal_mode)); return 0;