From patchwork Sat Mar 21 08:47:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 6063751 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1C899F314 for ; Sat, 21 Mar 2015 08:48:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6677202E6 for ; Sat, 21 Mar 2015 08:48:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2E9F2026F for ; Sat, 21 Mar 2015 08:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751591AbbCUIsJ (ORCPT ); Sat, 21 Mar 2015 04:48:09 -0400 Received: from mout.gmx.net ([212.227.15.19]:63526 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751423AbbCUIrj (ORCPT ); Sat, 21 Mar 2015 04:47:39 -0400 Received: from ultralex.Speedport_W_724V_09011602_00_015 ([79.222.207.80]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MEGIi-1YkCMB0AKu-00FV4Q; Sat, 21 Mar 2015 09:47:35 +0100 From: Oleksij Rempel To: linux-wireless@vger.kernel.org, kvalo@codeaurora.org, ath9k-devel@lists.ath9k.org Cc: Oleksij Rempel Subject: [PATCH v2 14/18] ath9k: ath9k_hw_analog_shift_rmw: use REG_RMW Date: Sat, 21 Mar 2015 09:47:17 +0100 Message-Id: <1426927641-18474-15-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426927641-18474-1-git-send-email-linux@rempel-privat.de> References: <1426927641-18474-1-git-send-email-linux@rempel-privat.de> X-Provags-ID: V03:K0:8PKjcw1JobMvYgP09HmCuD9aST4tUSOJTmQu8QnVCkS0C0+lZgR kn5WOgvxxd80+S2Oz0MlE8g7JZrYWoTAHdXygpZGQnVvbGTfElpwtzA8pNc1WVXhEkvybZh sDtXG95VUM2O/91FUl2NHiTKFrCq8vg0rn/q3s5QbQDChXuawWuT6Vm/2fVr2X7ErjcHAKh pOPErQJyMAgabLPeeBsnA== X-UI-Out-Filterresults: notjunk:1; Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 use REG_RMW in ath9k_hw_analog_shift_rmw. It will double execution speed on usb bus. Signed-off-by: Oleksij Rempel --- drivers/net/wireless/ath/ath9k/eeprom.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index 971d770..cc81482 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c @@ -27,12 +27,7 @@ void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val) void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask, u32 shift, u32 val) { - u32 regVal; - - regVal = REG_READ(ah, reg) & ~mask; - regVal |= (val << shift) & mask; - - REG_WRITE(ah, reg, regVal); + REG_RMW(ah, reg, ((val << shift) & mask), mask); if (ah->config.analog_shiftreg) udelay(100);