From patchwork Wed Nov 4 17:33:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 57729 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA4HlOet015848 for ; Wed, 4 Nov 2009 17:47:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200AbZKDReJ (ORCPT ); Wed, 4 Nov 2009 12:34:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932188AbZKDReG (ORCPT ); Wed, 4 Nov 2009 12:34:06 -0500 Received: from fg-out-1718.google.com ([72.14.220.158]:41096 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932180AbZKDReC (ORCPT ); Wed, 4 Nov 2009 12:34:02 -0500 Received: by fg-out-1718.google.com with SMTP id d23so1958951fga.1 for ; Wed, 04 Nov 2009 09:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=nBkUiFWPmF1f+QhVPcAeWOuiM+zYIY1vZ296Tjf9o3s=; b=m06KtfeHZg+z+E+vY0vKz9xNIbQYM4cDjtLox0hE0MgtoySscvhlkK0+pt+3aGmeu7 hdYpd9aG7zr8TH+tjLmm9bU0E1wP2b1lEKq1pHEmu4k951HP67LCvU2fWzHl51mD8HYE diqlU9yaP2gGCWYfFuIbMSoH6g+dQZG0KPItY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=NjmYlXnX17XCwRqFOAPY17ql5TKcowi6mbikRX3gQMQwg9xvgXa0y82CEWbMtwf+wt b09SfgNS0D9Gs86DRKvS3eW9JTWIEkyYGkQYB9xmcM/Pb8aoWBcKEEZKsIYbsCVBRV/R DoEqS3RoY/9xOGrdgfg54mo4b1/p6pehids9Y= Received: by 10.86.198.12 with SMTP id v12mr2052805fgf.17.1257356046917; Wed, 04 Nov 2009 09:34:06 -0800 (PST) Received: from localhost.localdomain (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id e20sm2208065fga.20.2009.11.04.09.34.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Nov 2009 09:34:06 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-wireless@vger.kernel.org Cc: Gertjan van Wingerde , Bartlomiej Zolnierkiewicz , Ivo van Doorn , linux-kernel@vger.kernel.org, "John W. Linville" Date: Wed, 04 Nov 2009 18:33:41 +0100 Message-Id: <20091104173341.28463.11122.sendpatchset@localhost.localdomain> In-Reply-To: <20091104173151.28463.68742.sendpatchset@localhost.localdomain> References: <20091104173151.28463.68742.sendpatchset@localhost.localdomain> Subject: [PATCH 14/41] rt2800pci: add rt2800_regbusy_read() wrapper Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Index: b/drivers/net/wireless/rt2x00/rt2800pci.c =================================================================== --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -69,14 +69,14 @@ MODULE_PARM_DESC(nohwcrypt, "Disable har * The _lock versions must be used if you already hold the csr_mutex */ #define WAIT_FOR_BBP(__dev, __reg) \ - rt2x00pci_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg)) + rt2800_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg)) #define WAIT_FOR_RFCSR(__dev, __reg) \ - rt2x00pci_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg)) + rt2800_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg)) #define WAIT_FOR_RF(__dev, __reg) \ - rt2x00pci_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg)) + rt2800_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg)) #define WAIT_FOR_MCU(__dev, __reg) \ - rt2x00pci_regbusy_read((__dev), H2M_MAILBOX_CSR, \ - H2M_MAILBOX_CSR_OWNER, (__reg)) + rt2800_regbusy_read((__dev), H2M_MAILBOX_CSR, \ + H2M_MAILBOX_CSR_OWNER, (__reg)) static void rt2800pci_bbp_write(struct rt2x00_dev *rt2x00dev, const unsigned int word, const u8 value) @@ -350,7 +350,7 @@ static void rt2800pci_efuse_read(struct rt2800_register_write(rt2x00dev, EFUSE_CTRL, reg); /* Wait until the EEPROM has been loaded */ - rt2x00pci_regbusy_read(rt2x00dev, EFUSE_CTRL, EFUSE_CTRL_KICK, ®); + rt2800_regbusy_read(rt2x00dev, EFUSE_CTRL, EFUSE_CTRL_KICK, ®); /* Apparently the data is read from end to start */ rt2800_register_read(rt2x00dev, EFUSE_DATA3, Index: b/drivers/net/wireless/rt2x00/rt2800pci.h =================================================================== --- a/drivers/net/wireless/rt2x00/rt2800pci.h +++ b/drivers/net/wireless/rt2x00/rt2800pci.h @@ -63,6 +63,14 @@ static inline void rt2800_register_multi rt2x00pci_register_multiwrite(rt2x00dev, offset, value, length); } +static inline int rt2800_regbusy_read(struct rt2x00_dev *rt2x00dev, + const unsigned int offset, + const struct rt2x00_field32 field, + u32 *reg) +{ + return rt2x00pci_regbusy_read(rt2x00dev, offset, field, reg); +} + /* * RF chip defines. *