source: src/linux/universal/linux-3.2/drivers/net/ethernet/raeth/raether.h @ 18367

Last change on this file since 18367 was 18367, checked in by BrainSlayer, 17 months ago

fix crashbug

File size: 2.1 KB
Line 
1#ifndef RA2882ETHEND_H
2#define RA2882ETHEND_H
3
4#ifdef DSP_VIA_NONCACHEABLE
5#define ESRAM_BASE      0xa0800000      /* 0x0080-0000  ~ 0x00807FFF */
6#else
7#define ESRAM_BASE      0x80800000      /* 0x0080-0000  ~ 0x00807FFF */
8#endif
9
10#define RX_RING_BASE    ((int)(ESRAM_BASE + 0x7000))
11#define TX_RING_BASE    ((int)(ESRAM_BASE + 0x7800))
12
13#if defined(CONFIG_RALINK_RT2880)
14#define NUM_TX_RINGS    1
15#else
16#define NUM_TX_RINGS    4
17#endif
18#ifdef MEMORY_OPTIMIZATION
19#ifdef CONFIG_RAETH_ROUTER
20#define NUM_RX_DESC     128
21#define NUM_TX_DESC     128
22#elif CONFIG_RT_3052_ESW
23#define NUM_RX_DESC     64
24#define NUM_TX_DESC     64
25#else
26#define NUM_RX_DESC     128
27#define NUM_TX_DESC     128
28#endif
29//#define NUM_RX_MAX_PROCESS 32
30#define NUM_RX_MAX_PROCESS 64
31#else
32#if defined (CONFIG_RAETH_ROUTER)
33#define NUM_RX_DESC     256
34#define NUM_TX_DESC     256
35#elif defined (CONFIG_RT_3052_ESW)
36#define NUM_RX_DESC     256
37#define NUM_TX_DESC     256
38#else
39#define NUM_RX_DESC     256
40#define NUM_TX_DESC     256
41#endif
42#ifdef CONFIG_RALINK_RT3883
43#define NUM_RX_MAX_PROCESS 2
44#else
45#define NUM_RX_MAX_PROCESS 16
46#endif
47#endif
48
49#define DEV_NAME        "eth2"
50
51#define GMAC2_OFFSET    0x22
52#define GMAC0_OFFSET    0x28
53#define GMAC1_OFFSET    0x2E
54
55#define IRQ_ENET0       5       /* hardware interrupt #3, defined in RT2880 Soc Design Spec Rev 0.03, pp43 */
56
57#define FE_INT_STATUS_REG (*(volatile unsigned long *)(FE_INT_STATUS))
58#define FE_INT_STATUS_CLEAN(reg) (*(volatile unsigned long *)(FE_INT_STATUS)) = reg
59
60//#define RAETH_DEBUG
61#ifdef RAETH_DEBUG
62#define RAETH_PRINT(fmt, args...) printk(KERN_INFO fmt, ## args)
63#else
64#define RAETH_PRINT(fmt, args...) { }
65#endif
66
67struct net_device_stats *ra_get_stats(struct net_device *dev);
68
69void ei_tx_timeout(struct net_device *dev);
70int rather_probe(struct net_device *dev);
71int ei_open(struct net_device *dev);
72int ei_close(struct net_device *dev);
73
74int ra2882eth_init(void);
75void ra2882eth_cleanup_module(void);
76
77void ei_xmit_housekeeping(unsigned long data);
78
79u32 mii_mgr_read(u32 phy_addr, u32 phy_register, u32 *read_data);
80u32 mii_mgr_write(u32 phy_addr, u32 phy_register, u32 write_data);
81#endif
Note: See TracBrowser for help on using the repository browser.