Merge branch 'bcmring/cleanup' into bcmring/removal
[deliverable/linux.git] / include / linux / mv643xx_eth.h
1 /*
2 * MV-643XX ethernet platform device data definition file.
3 */
4
5 #ifndef __LINUX_MV643XX_ETH_H
6 #define __LINUX_MV643XX_ETH_H
7
8 #include <linux/mbus.h>
9
10 #define MV643XX_ETH_SHARED_NAME "mv643xx_eth"
11 #define MV643XX_ETH_NAME "mv643xx_eth_port"
12 #define MV643XX_ETH_SHARED_REGS 0x2000
13 #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000
14 #define MV643XX_ETH_BAR_4 0x2220
15 #define MV643XX_ETH_SIZE_REG_4 0x2224
16 #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290
17
18 struct mv643xx_eth_shared_platform_data {
19 struct mbus_dram_target_info *dram;
20 struct platform_device *shared_smi;
21 /*
22 * Max packet size for Tx IP/Layer 4 checksum, when set to 0, default
23 * limit of 9KiB will be used.
24 */
25 int tx_csum_limit;
26 };
27
28 #define MV643XX_ETH_PHY_ADDR_DEFAULT 0
29 #define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x))
30 #define MV643XX_ETH_PHY_NONE 0xff
31
32 struct mv643xx_eth_platform_data {
33 /*
34 * Pointer back to our parent instance, and our port number.
35 */
36 struct platform_device *shared;
37 int port_number;
38
39 /*
40 * Whether a PHY is present, and if yes, at which address.
41 */
42 int phy_addr;
43
44 /*
45 * Use this MAC address if it is valid, overriding the
46 * address that is already in the hardware.
47 */
48 u8 mac_addr[6];
49
50 /*
51 * If speed is 0, autonegotiation is enabled.
52 * Valid values for speed: 0, SPEED_10, SPEED_100, SPEED_1000.
53 * Valid values for duplex: DUPLEX_HALF, DUPLEX_FULL.
54 */
55 int speed;
56 int duplex;
57
58 /*
59 * How many RX/TX queues to use.
60 */
61 int rx_queue_count;
62 int tx_queue_count;
63
64 /*
65 * Override default RX/TX queue sizes if nonzero.
66 */
67 int rx_queue_size;
68 int tx_queue_size;
69
70 /*
71 * Use on-chip SRAM for RX/TX descriptors if size is nonzero
72 * and sufficient to contain all descriptors for the requested
73 * ring sizes.
74 */
75 unsigned long rx_sram_addr;
76 int rx_sram_size;
77 unsigned long tx_sram_addr;
78 int tx_sram_size;
79 };
80
81
82 #endif
This page took 0.034279 seconds and 6 git commands to generate.