dl2k: stop using net_device.{base_addr, irq} and convert to __iomem.
The eeprom registers always use the same PCI bar whereas the general registers may either use the same mapping as the eeprom registers or a different one. It is thus possible to simplify parse_eeprom(). Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
This commit is contained in:
@@ -42,23 +42,6 @@
|
||||
#define TX_TOTAL_SIZE TX_RING_SIZE*sizeof(struct netdev_desc)
|
||||
#define RX_TOTAL_SIZE RX_RING_SIZE*sizeof(struct netdev_desc)
|
||||
|
||||
/* This driver was written to use PCI memory space, however x86-oriented
|
||||
hardware often uses I/O space accesses. */
|
||||
#ifndef MEM_MAPPING
|
||||
#undef readb
|
||||
#undef readw
|
||||
#undef readl
|
||||
#undef writeb
|
||||
#undef writew
|
||||
#undef writel
|
||||
#define readb inb
|
||||
#define readw inw
|
||||
#define readl inl
|
||||
#define writeb outb
|
||||
#define writew outw
|
||||
#define writel outl
|
||||
#endif
|
||||
|
||||
/* Offsets to the device registers.
|
||||
Unlike software-only systems, device drivers interact with complex hardware.
|
||||
It's not useful to define symbolic names for every register bit in the
|
||||
@@ -391,6 +374,8 @@ struct netdev_private {
|
||||
dma_addr_t tx_ring_dma;
|
||||
dma_addr_t rx_ring_dma;
|
||||
struct pci_dev *pdev;
|
||||
void __iomem *ioaddr;
|
||||
void __iomem *eeprom_addr;
|
||||
spinlock_t tx_lock;
|
||||
spinlock_t rx_lock;
|
||||
struct net_device_stats stats;
|
||||
|
Reference in New Issue
Block a user