Lines Matching +full:csr +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
13 #include <linux/dma-mapping.h>
27 kfree(rt2x00dev->rf); in rt2x00pci_free_reg()
28 rt2x00dev->rf = NULL; in rt2x00pci_free_reg()
30 kfree(rt2x00dev->eeprom); in rt2x00pci_free_reg()
31 rt2x00dev->eeprom = NULL; in rt2x00pci_free_reg()
33 if (rt2x00dev->csr.base) { in rt2x00pci_free_reg()
34 iounmap(rt2x00dev->csr.base); in rt2x00pci_free_reg()
35 rt2x00dev->csr.base = NULL; in rt2x00pci_free_reg()
41 struct pci_dev *pci_dev = to_pci_dev(rt2x00dev->dev); in rt2x00pci_alloc_reg()
43 rt2x00dev->csr.base = pci_ioremap_bar(pci_dev, 0); in rt2x00pci_alloc_reg()
44 if (!rt2x00dev->csr.base) in rt2x00pci_alloc_reg()
47 rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL); in rt2x00pci_alloc_reg()
48 if (!rt2x00dev->eeprom) in rt2x00pci_alloc_reg()
51 rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL); in rt2x00pci_alloc_reg()
52 if (!rt2x00dev->rf) in rt2x00pci_alloc_reg()
62 return -ENOMEM; in rt2x00pci_alloc_reg()
89 if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) { in rt2x00pci_probe()
91 retval = -EIO; in rt2x00pci_probe()
95 hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); in rt2x00pci_probe()
98 retval = -ENOMEM; in rt2x00pci_probe()
104 rt2x00dev = hw->priv; in rt2x00pci_probe()
105 rt2x00dev->dev = &pci_dev->dev; in rt2x00pci_probe()
106 rt2x00dev->ops = ops; in rt2x00pci_probe()
107 rt2x00dev->hw = hw; in rt2x00pci_probe()
108 rt2x00dev->irq = pci_dev->irq; in rt2x00pci_probe()
109 rt2x00dev->name = ops->name; in rt2x00pci_probe()
121 * Because rt3290 chip use different efuse offset to read efuse data. in rt2x00pci_probe()
126 rt2x00dev->chip.rt = chip; in rt2x00pci_probe()
154 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00pci_remove()
175 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00pci_suspend()
183 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00pci_resume()