iwlagn: move PCI related operations from probe and remove to PCI layer
Since we have now a PCI layer, all the init and deinit code that is PCI
related should move to there.
Also move the IO functions: read8/read32/write32. They need hw_base which
is killed from priv.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 49e6c68..700e9f9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1195,10 +1195,16 @@
* struct iwl_bus_ops - bus specific operations
* @set_drv_data: set the priv pointer to the bus layer
* @get_dev: returns the device struct
+ * @write8: write a byte to register at offset ofs
+ * @write32: write a dword to register at offset ofs
+ * @wread32: read a dword at register at offset ofs
*/
struct iwl_bus_ops {
void (*set_drv_data)(struct iwl_bus *bus, void *priv);
struct device *(*get_dev)(const struct iwl_bus *bus);
+ void (*write8)(struct iwl_bus *bus, u32 ofs, u8 val);
+ void (*write32)(struct iwl_bus *bus, u32 ofs, u32 val);
+ u32 (*read32)(struct iwl_bus *bus, u32 ofs);
};
struct iwl_bus {
@@ -1282,9 +1288,6 @@
/* basic pci-network driver stuff */
struct pci_dev *pci_dev;
- /* pci hardware address support */
- void __iomem *hw_base;
-
struct iwl_bus bus; /* bus specific data */
/* microcode/device supports multiple contexts */