summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm43xx/bcm43xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx.h')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx.h101
1 files changed, 6 insertions, 95 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h
index 5f8c63f..29c95b0 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -718,8 +718,6 @@ struct bcm43xx_private {
/* Debugging stuff follows. */
#ifdef CONFIG_BCM43XX_DEBUG
struct bcm43xx_dfsentry *dfsentry;
- atomic_t mmio_print_cnt;
- atomic_t pcicfg_print_cnt;
#endif
};
@@ -805,141 +803,54 @@ struct bcm43xx_lopair * bcm43xx_get_lopair(struct bcm43xx_phyinfo *phy,
}
-/* MMIO read/write functions. Debug and non-debug variants. */
-#ifdef CONFIG_BCM43XX_DEBUG
-
static inline
u16 bcm43xx_read16(struct bcm43xx_private *bcm, u16 offset)
{
- u16 value;
-
- value = ioread16(bcm->mmio_addr + core_offset(bcm) + offset);
- if (unlikely(atomic_read(&bcm->mmio_print_cnt) > 0)) {
- printk(KERN_INFO PFX "ioread16 offset: 0x%04x, value: 0x%04x\n",
- offset, value);
- }
-
- return value;
+ return ioread16(bcm->mmio_addr + core_offset(bcm) + offset);
}
static inline
void bcm43xx_write16(struct bcm43xx_private *bcm, u16 offset, u16 value)
{
iowrite16(value, bcm->mmio_addr + core_offset(bcm) + offset);
- if (unlikely(atomic_read(&bcm->mmio_print_cnt) > 0)) {
- printk(KERN_INFO PFX "iowrite16 offset: 0x%04x, value: 0x%04x\n",
- offset, value);
- }
}
static inline
u32 bcm43xx_read32(struct bcm43xx_private *bcm, u16 offset)
{
- u32 value;
-
- value = ioread32(bcm->mmio_addr + core_offset(bcm) + offset);
- if (unlikely(atomic_read(&bcm->mmio_print_cnt) > 0)) {
- printk(KERN_INFO PFX "ioread32 offset: 0x%04x, value: 0x%08x\n",
- offset, value);
- }
-
- return value;
+ return ioread32(bcm->mmio_addr + core_offset(bcm) + offset);
}
static inline
void bcm43xx_write32(struct bcm43xx_private *bcm, u16 offset, u32 value)
{
iowrite32(value, bcm->mmio_addr + core_offset(bcm) + offset);
- if (unlikely(atomic_read(&bcm->mmio_print_cnt) > 0)) {
- printk(KERN_INFO PFX "iowrite32 offset: 0x%04x, value: 0x%08x\n",
- offset, value);
- }
}
static inline
int bcm43xx_pci_read_config16(struct bcm43xx_private *bcm, int offset, u16 *value)
{
- int err;
-
- err = pci_read_config_word(bcm->pci_dev, offset, value);
- if (unlikely(atomic_read(&bcm->pcicfg_print_cnt) > 0)) {
- printk(KERN_INFO PFX "pciread16 offset: 0x%08x, value: 0x%04x, err: %d\n",
- offset, *value, err);
- }
-
- return err;
+ return pci_read_config_word(bcm->pci_dev, offset, value);
}
static inline
int bcm43xx_pci_read_config32(struct bcm43xx_private *bcm, int offset, u32 *value)
{
- int err;
-
- err = pci_read_config_dword(bcm->pci_dev, offset, value);
- if (unlikely(atomic_read(&bcm->pcicfg_print_cnt) > 0)) {
- printk(KERN_INFO PFX "pciread32 offset: 0x%08x, value: 0x%08x, err: %d\n",
- offset, *value, err);
- }
-
- return err;
+ return pci_read_config_dword(bcm->pci_dev, offset, value);
}
static inline
int bcm43xx_pci_write_config16(struct bcm43xx_private *bcm, int offset, u16 value)
{
- int err;
-
- err = pci_write_config_word(bcm->pci_dev, offset, value);
- if (unlikely(atomic_read(&bcm->pcicfg_print_cnt) > 0)) {
- printk(KERN_INFO PFX "pciwrite16 offset: 0x%08x, value: 0x%04x, err: %d\n",
- offset, value, err);
- }
-
- return err;
+ return pci_write_config_word(bcm->pci_dev, offset, value);
}
static inline
int bcm43xx_pci_write_config32(struct bcm43xx_private *bcm, int offset, u32 value)
{
- int err;
-
- err = pci_write_config_dword(bcm->pci_dev, offset, value);
- if (unlikely(atomic_read(&bcm->pcicfg_print_cnt) > 0)) {
- printk(KERN_INFO PFX "pciwrite32 offset: 0x%08x, value: 0x%08x, err: %d\n",
- offset, value, err);
- }
-
- return err;
+ return pci_write_config_dword(bcm->pci_dev, offset, value);
}
-#define bcm43xx_mmioprint_initial(bcm, value) atomic_set(&(bcm)->mmio_print_cnt, (value))
-#define bcm43xx_mmioprint_enable(bcm) atomic_inc(&(bcm)->mmio_print_cnt)
-#define bcm43xx_mmioprint_disable(bcm) atomic_dec(&(bcm)->mmio_print_cnt)
-#define bcm43xx_pciprint_initial(bcm, value) atomic_set(&(bcm)->pcicfg_print_cnt, (value))
-#define bcm43xx_pciprint_enable(bcm) atomic_inc(&(bcm)->pcicfg_print_cnt)
-#define bcm43xx_pciprint_disable(bcm) atomic_dec(&(bcm)->pcicfg_print_cnt)
-
-#else /* CONFIG_BCM43XX_DEBUG*/
-
-#define bcm43xx_read16(bcm, offset) ioread16((bcm)->mmio_addr + core_offset(bcm) + (offset))
-#define bcm43xx_write16(bcm, offset, value) iowrite16((value), (bcm)->mmio_addr + core_offset(bcm) + (offset))
-#define bcm43xx_read32(bcm, offset) ioread32((bcm)->mmio_addr + core_offset(bcm) + (offset))
-#define bcm43xx_write32(bcm, offset, value) iowrite32((value), (bcm)->mmio_addr + core_offset(bcm) + (offset))
-#define bcm43xx_pci_read_config16(bcm, o, v) pci_read_config_word((bcm)->pci_dev, (o), (v))
-#define bcm43xx_pci_read_config32(bcm, o, v) pci_read_config_dword((bcm)->pci_dev, (o), (v))
-#define bcm43xx_pci_write_config16(bcm, o, v) pci_write_config_word((bcm)->pci_dev, (o), (v))
-#define bcm43xx_pci_write_config32(bcm, o, v) pci_write_config_dword((bcm)->pci_dev, (o), (v))
-
-#define bcm43xx_mmioprint_initial(x, y) do { /* nothing */ } while (0)
-#define bcm43xx_mmioprint_enable(x) do { /* nothing */ } while (0)
-#define bcm43xx_mmioprint_disable(x) do { /* nothing */ } while (0)
-#define bcm43xx_pciprint_initial(bcm, value) do { /* nothing */ } while (0)
-#define bcm43xx_pciprint_enable(bcm) do { /* nothing */ } while (0)
-#define bcm43xx_pciprint_disable(bcm) do { /* nothing */ } while (0)
-
-#endif /* CONFIG_BCM43XX_DEBUG*/
-
-
/** Limit a value between two limits */
#ifdef limit_value
# undef limit_value
OpenPOWER on IntegriCloud