From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>,
linux-wireless@vger.kernel.org,
Stanislaw Gruszka <sgruszka@redhat.com>
Subject: [PATCH 4/6] iwlwifi: use writeb,writel,readl directly
Date: Thu, 23 Feb 2012 11:16:06 +0100 [thread overview]
Message-ID: <1329992168-19990-4-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1329992168-19990-1-git-send-email-sgruszka@redhat.com>
That change will save us some CPU cycles at run time. Having port-based
I/O seems to be not possible for PCIe devices.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/iwlwifi/Kconfig | 1 +
drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 13 ++++++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index ae08498..404ac69 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -6,6 +6,7 @@ config IWLWIFI
select LEDS_CLASS
select LEDS_TRIGGERS
select MAC80211_LEDS
+ select HAS_IOMEM
---help---
Select to build the driver supporting the:
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index f5cb5d3..b6909b4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -1583,18 +1583,17 @@ static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid,
static void iwl_trans_pcie_write8(struct iwl_trans *trans, u32 ofs, u8 val)
{
- iowrite8(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
+ writeb(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
}
static void iwl_trans_pcie_write32(struct iwl_trans *trans, u32 ofs, u32 val)
{
- iowrite32(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
+ writel(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
}
static u32 iwl_trans_pcie_read32(struct iwl_trans *trans, u32 ofs)
{
- u32 val = ioread32(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
- return val;
+ return readl(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
}
static void iwl_trans_pcie_free(struct iwl_trans *trans)
@@ -1613,7 +1612,7 @@ static void iwl_trans_pcie_free(struct iwl_trans *trans)
}
pci_disable_msi(trans_pcie->pci_dev);
- pci_iounmap(trans_pcie->pci_dev, trans_pcie->hw_base);
+ iounmap(trans_pcie->hw_base);
pci_release_regions(trans_pcie->pci_dev);
pci_disable_device(trans_pcie->pci_dev);
@@ -2294,9 +2293,9 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd,
goto out_pci_disable_device;
}
- trans_pcie->hw_base = pci_iomap(pdev, 0, 0);
+ trans_pcie->hw_base = pci_ioremap_bar(pdev, 0);
if (!trans_pcie->hw_base) {
- dev_printk(KERN_ERR, &pdev->dev, "pci_iomap failed");
+ dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed");
err = -ENODEV;
goto out_pci_release_regions;
}
--
1.7.1
next prev parent reply other threads:[~2012-02-23 10:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 10:16 [PATCH 1/6] iwlwifi: dump stack when fail to gain access to the device Stanislaw Gruszka
2012-02-23 10:16 ` [PATCH 2/6] iwlwifi: always check if got h/w access before write Stanislaw Gruszka
2012-02-23 10:16 ` [PATCH 3/6] iwlwifi: cleanup/fix memory barriers Stanislaw Gruszka
2012-02-23 12:22 ` Johannes Berg
2012-02-23 10:16 ` Stanislaw Gruszka [this message]
2012-02-23 12:23 ` [PATCH 4/6] iwlwifi: use writeb,writel,readl directly Johannes Berg
2012-02-23 10:16 ` [PATCH 5/6] iwlwifi: print DMA stop timeout message only if that error happened Stanislaw Gruszka
2012-02-23 10:16 ` [PATCH 6/6] iwlwifi: reintroduce iwl_enable_rfkill_int Stanislaw Gruszka
2012-02-23 12:22 ` [PATCH 1/6] iwlwifi: dump stack when fail to gain access to the device Johannes Berg
2012-02-23 14:55 ` Guy, Wey-Yi
2012-02-24 9:32 ` Stanislaw Gruszka
2012-02-24 14:45 ` Guy, Wey-Yi
2012-02-24 16:01 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1329992168-19990-4-git-send-email-sgruszka@redhat.com \
--to=sgruszka@redhat.com \
--cc=ilw@linux.intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=wey-yi.w.guy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).