Commit b85008b7 authored by Joachim Eastwood's avatar Joachim Eastwood Committed by David S. Miller

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: default avatarJoachim Eastwood <manabian@gmail.com>
parent a723b984
This diff is collapsed.
......@@ -58,48 +58,4 @@
/* SMSC LAN83C185 */
#define MII_LAN83C185_ID 0x0007C0A0
/* ........................................................................ */
#define MAX_RBUFF_SZ 0x600 /* 1518 rounded up */
#define MAX_RX_DESCR 9 /* max number of receive buffers */
struct rbf_t
{
unsigned int addr;
unsigned long size;
};
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 at91_private
{
struct mii_if_info mii; /* ethtool support */
struct macb_platform_data board_data; /* board-specific
* configuration (shared with
* macb for common data */
void __iomem *regs; /* base register address */
struct clk *ether_clk; /* clock */
/* PHY */
unsigned long phy_type; /* type of PHY (PHY_ID) */
spinlock_t lock; /* lock for MDI interface */
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 */
};
#endif
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment