aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pasemi_mac.h
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-11-28 21:56:32 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:21 -0500
commit34c20624ce541f8a7ff937f474af51f9044cedd7 (patch)
tree6d1bcecb9c43d70f938c61c40fd23c695ccb2547 /drivers/net/pasemi_mac.h
parent8ee9d85779356c1dc2ba87aca27fbf9414f2d82b (diff)
pasemi_mac: Convert to new dma library
pasemi_mac: Convert to new dma library Convert the pasemi_mac driver to the new platform global DMA manaagement library. This also does a couple of other minor cleanups w.r.t. channel management. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pasemi_mac.h')
-rw-r--r--drivers/net/pasemi_mac.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/pasemi_mac.h b/drivers/net/pasemi_mac.h
index c61c0110e085..64b2047d19f0 100644
--- a/drivers/net/pasemi_mac.h
+++ b/drivers/net/pasemi_mac.h
@@ -27,23 +27,18 @@
27#include <linux/phy.h> 27#include <linux/phy.h>
28 28
29struct pasemi_mac_txring { 29struct pasemi_mac_txring {
30 struct pasemi_dmachan chan; /* Must be first */
30 spinlock_t lock; 31 spinlock_t lock;
31 u64 *status; /* Ptr to cacheable status area */
32 u64 *ring;
33 dma_addr_t dma;
34 unsigned int size; 32 unsigned int size;
35 unsigned int next_to_fill; 33 unsigned int next_to_fill;
36 unsigned int next_to_clean; 34 unsigned int next_to_clean;
37 struct pasemi_mac_buffer *ring_info; 35 struct pasemi_mac_buffer *ring_info;
38 int chan;
39 struct pasemi_mac *mac; /* Needed in intr handler */ 36 struct pasemi_mac *mac; /* Needed in intr handler */
40}; 37};
41 38
42struct pasemi_mac_rxring { 39struct pasemi_mac_rxring {
40 struct pasemi_dmachan chan; /* Must be first */
43 spinlock_t lock; 41 spinlock_t lock;
44 u64 *status; /* Ptr to cacheable status area */
45 u64 *ring; /* RX channel descriptor ring */
46 dma_addr_t dma;
47 u64 *buffers; /* RX interface buffer ring */ 42 u64 *buffers; /* RX interface buffer ring */
48 dma_addr_t buf_dma; 43 dma_addr_t buf_dma;
49 unsigned int size; 44 unsigned int size;
@@ -55,9 +50,6 @@ struct pasemi_mac_rxring {
55 50
56struct pasemi_mac { 51struct pasemi_mac {
57 struct net_device *netdev; 52 struct net_device *netdev;
58 void __iomem *regs;
59 void __iomem *dma_regs;
60 void __iomem *iob_regs;
61 struct pci_dev *pdev; 53 struct pci_dev *pdev;
62 struct pci_dev *dma_pdev; 54 struct pci_dev *dma_pdev;
63 struct pci_dev *iob_pdev; 55 struct pci_dev *iob_pdev;
@@ -67,8 +59,6 @@ struct pasemi_mac {
67 u8 type; 59 u8 type;
68#define MAC_TYPE_GMAC 1 60#define MAC_TYPE_GMAC 1
69#define MAC_TYPE_XAUI 2 61#define MAC_TYPE_XAUI 2
70 u32 dma_txch;
71 u32 dma_rxch;
72 u32 dma_if; 62 u32 dma_if;
73 63
74 u8 mac_addr[6]; 64 u8 mac_addr[6];
@@ -77,8 +67,6 @@ struct pasemi_mac {
77 67
78 struct pasemi_mac_txring *tx; 68 struct pasemi_mac_txring *tx;
79 struct pasemi_mac_rxring *rx; 69 struct pasemi_mac_rxring *rx;
80 unsigned int tx_irq;
81 unsigned int rx_irq;
82 char tx_irq_name[10]; /* "eth%d tx" */ 70 char tx_irq_name[10]; /* "eth%d tx" */
83 char rx_irq_name[10]; /* "eth%d rx" */ 71 char rx_irq_name[10]; /* "eth%d rx" */
84 int link; 72 int link;