diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-03-07 12:52:26 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-08 13:59:51 -0500 |
commit | 05f5b97ee0013fefbd9139cf8c3eda5f2a88c04a (patch) | |
tree | 4e91bf8b80cd2c86b6e4686e0041bd818e2878c0 /drivers | |
parent | 3a73a30049f20a0ff3ef1c5c10170a9c5539e042 (diff) |
iwlwifi: use writeb,writel,readl directly
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index ae08498dfca..5afd06ef0d8 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config IWLWIFI | 1 | config IWLWIFI |
2 | tristate "Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi) " | 2 | tristate "Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi) " |
3 | depends on PCI && MAC80211 | 3 | depends on PCI && MAC80211 && HAS_IOMEM |
4 | select FW_LOADER | 4 | select FW_LOADER |
5 | select NEW_LEDS | 5 | select NEW_LEDS |
6 | select LEDS_CLASS | 6 | select LEDS_CLASS |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index ef76a391618..389f99e6a8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |||
@@ -1600,18 +1600,17 @@ static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid, | |||
1600 | 1600 | ||
1601 | static void iwl_trans_pcie_write8(struct iwl_trans *trans, u32 ofs, u8 val) | 1601 | static void iwl_trans_pcie_write8(struct iwl_trans *trans, u32 ofs, u8 val) |
1602 | { | 1602 | { |
1603 | iowrite8(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); | 1603 | writeb(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); |
1604 | } | 1604 | } |
1605 | 1605 | ||
1606 | static void iwl_trans_pcie_write32(struct iwl_trans *trans, u32 ofs, u32 val) | 1606 | static void iwl_trans_pcie_write32(struct iwl_trans *trans, u32 ofs, u32 val) |
1607 | { | 1607 | { |
1608 | iowrite32(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); | 1608 | writel(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); |
1609 | } | 1609 | } |
1610 | 1610 | ||
1611 | static u32 iwl_trans_pcie_read32(struct iwl_trans *trans, u32 ofs) | 1611 | static u32 iwl_trans_pcie_read32(struct iwl_trans *trans, u32 ofs) |
1612 | { | 1612 | { |
1613 | u32 val = ioread32(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); | 1613 | return readl(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); |
1614 | return val; | ||
1615 | } | 1614 | } |
1616 | 1615 | ||
1617 | static void iwl_trans_pcie_free(struct iwl_trans *trans) | 1616 | static void iwl_trans_pcie_free(struct iwl_trans *trans) |
@@ -1629,7 +1628,7 @@ static void iwl_trans_pcie_free(struct iwl_trans *trans) | |||
1629 | } | 1628 | } |
1630 | 1629 | ||
1631 | pci_disable_msi(trans_pcie->pci_dev); | 1630 | pci_disable_msi(trans_pcie->pci_dev); |
1632 | pci_iounmap(trans_pcie->pci_dev, trans_pcie->hw_base); | 1631 | iounmap(trans_pcie->hw_base); |
1633 | pci_release_regions(trans_pcie->pci_dev); | 1632 | pci_release_regions(trans_pcie->pci_dev); |
1634 | pci_disable_device(trans_pcie->pci_dev); | 1633 | pci_disable_device(trans_pcie->pci_dev); |
1635 | 1634 | ||
@@ -2258,9 +2257,9 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd, | |||
2258 | goto out_pci_disable_device; | 2257 | goto out_pci_disable_device; |
2259 | } | 2258 | } |
2260 | 2259 | ||
2261 | trans_pcie->hw_base = pci_iomap(pdev, 0, 0); | 2260 | trans_pcie->hw_base = pci_ioremap_bar(pdev, 0); |
2262 | if (!trans_pcie->hw_base) { | 2261 | if (!trans_pcie->hw_base) { |
2263 | dev_printk(KERN_ERR, &pdev->dev, "pci_iomap failed"); | 2262 | dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed"); |
2264 | err = -ENODEV; | 2263 | err = -ENODEV; |
2265 | goto out_pci_release_regions; | 2264 | goto out_pci_release_regions; |
2266 | } | 2265 | } |