diff options
author | Joachim Eastwood <manabian@gmail.com> | 2012-10-18 11:01:10 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-19 13:18:29 -0400 |
commit | b85008b7020ce00fbf9a36ae56285216fc37737a (patch) | |
tree | 3f57059c853c41fdd276913e08db5a07f826a1c6 /drivers/net/ethernet/cadence/macb.h | |
parent | a723b984342af2a2fe1cca209e17024d58033447 (diff) |
net/at91_ether/macb: absorb at91_private in to macb private struct
This will make it easier to share code between the drivers and
eventually merge them into one driver.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.h')
-rw-r--r-- | drivers/net/ethernet/cadence/macb.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index 0e5d55b9c89d..5661094d1ea0 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -504,6 +504,19 @@ struct gem_stats { u32 rx_udp_checksum_errors; }; +struct rbf_t { + unsigned int addr; + unsigned long size; +}; + +#define MAX_RBUFF_SZ 0x600 /* 1518 rounded up */ +#define MAX_RX_DESCR 9 /* max number of receive buffers */ + +struct recv_desc_bufs { + struct rbf_t descriptors[MAX_RX_DESCR]; /* must be on sizeof (rbf_t) boundary */ + char recv_buf[MAX_RX_DESCR][MAX_RBUFF_SZ]; /* must be on long boundary */ +}; + struct macb { void __iomem *regs; @@ -540,6 +553,29 @@ struct macb { unsigned int duplex; phy_interface_t phy_interface; + + /* at91_private */ + struct mii_if_info mii; /* ethtool support */ + struct macb_platform_data board_data; /* board-specific + * configuration (shared with + * macb for common data */ + struct clk *ether_clk; /* clock */ + + /* PHY */ + unsigned long phy_type; /* type of PHY (PHY_ID) */ + short phy_media; /* media interface type */ + unsigned short phy_address; /* 5-bit MDI address of PHY (0..31) */ + struct timer_list check_timer; /* Poll link status */ + + /* Transmit */ + struct sk_buff *skb; /* holds skb until xmit interrupt completes */ + dma_addr_t skb_physaddr; /* phys addr from pci_map_single */ + int skb_length; /* saved skb length for pci_unmap_single */ + + /* Receive */ + int rxBuffIndex; /* index into receive descriptor list */ + struct recv_desc_bufs *dlist; /* descriptor list address */ + struct recv_desc_bufs *dlist_phys; /* descriptor list physical address */ }; static inline bool macb_is_gem(struct macb *bp) |