Blame view

include/linux/mv643xx_eth.h 1.85 KB
c4a6a2ab5   Lennert Buytenhek   mv643xx_eth: Spli...
1
2
3
  /*
   * MV-643XX ethernet platform device data definition file.
   */
fa3959f45   Lennert Buytenhek   mv643xx_eth: get ...
4

c4a6a2ab5   Lennert Buytenhek   mv643xx_eth: Spli...
5
6
  #ifndef __LINUX_MV643XX_ETH_H
  #define __LINUX_MV643XX_ETH_H
f2ce825d2   Lennert Buytenhek   mv643xx_eth: mbus...
7
  #include <linux/mbus.h>
240e4419e   Lennert Buytenhek   mv643xx_eth: shor...
8
9
  #define MV643XX_ETH_SHARED_NAME		"mv643xx_eth"
  #define MV643XX_ETH_NAME		"mv643xx_eth_port"
c4a6a2ab5   Lennert Buytenhek   mv643xx_eth: Spli...
10
11
  #define MV643XX_ETH_SHARED_REGS		0x2000
  #define MV643XX_ETH_SHARED_REGS_SIZE	0x2000
3077d78a7   Dale Farnsworth   mv643xx_eth: Fix ...
12
13
14
  #define MV643XX_ETH_BAR_4		0x2220
  #define MV643XX_ETH_SIZE_REG_4		0x2224
  #define MV643XX_ETH_BASE_ADDR_ENABLE_REG	0x2290
c4a6a2ab5   Lennert Buytenhek   mv643xx_eth: Spli...
15

f2ce825d2   Lennert Buytenhek   mv643xx_eth: mbus...
16
17
  struct mv643xx_eth_shared_platform_data {
  	struct mbus_dram_target_info	*dram;
fc0eb9f22   Lennert Buytenhek   mv643xx_eth: smi ...
18
  	struct platform_device	*shared_smi;
fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
19
  	unsigned int		t_clk;
9b2c2ff7a   Saeed Bishara   mv643xx_eth: use ...
20
21
22
23
24
  	/*
  	 * Max packet size for Tx IP/Layer 4 checksum, when set to 0, default
  	 * limit of 9KiB will be used.
  	 */
  	int			tx_csum_limit;
f2ce825d2   Lennert Buytenhek   mv643xx_eth: mbus...
25
  };
ac840605f   Lennert Buytenhek   mv643xx_eth: remo...
26
27
28
  #define MV643XX_ETH_PHY_ADDR_DEFAULT	0
  #define MV643XX_ETH_PHY_ADDR(x)		(0x80 | (x))
  #define MV643XX_ETH_PHY_NONE		0xff
c4a6a2ab5   Lennert Buytenhek   mv643xx_eth: Spli...
29
  struct mv643xx_eth_platform_data {
fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
30
31
32
  	/*
  	 * Pointer back to our parent instance, and our port number.
  	 */
fa3959f45   Lennert Buytenhek   mv643xx_eth: get ...
33
  	struct platform_device	*shared;
fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
34
  	int			port_number;
fa3959f45   Lennert Buytenhek   mv643xx_eth: get ...
35

fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
36
37
38
  	/*
  	 * Whether a PHY is present, and if yes, at which address.
  	 */
fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
39
  	int			phy_addr;
ce4e2e455   Lennert Buytenhek   mv643xx_eth: inte...
40

fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  	/*
  	 * Use this MAC address if it is valid, overriding the
  	 * address that is already in the hardware.
  	 */
  	u8			mac_addr[6];
  
  	/*
  	 * If speed is 0, autonegotiation is enabled.
  	 *   Valid values for speed: 0, SPEED_10, SPEED_100, SPEED_1000.
  	 *   Valid values for duplex: DUPLEX_HALF, DUPLEX_FULL.
  	 */
  	int			speed;
  	int			duplex;
  
  	/*
f7981c1c6   Lennert Buytenhek   mv643xx_eth: requ...
56
  	 * How many RX/TX queues to use.
64da80a29   Lennert Buytenhek   mv643xx_eth: allo...
57
  	 */
f7981c1c6   Lennert Buytenhek   mv643xx_eth: requ...
58
59
  	int			rx_queue_count;
  	int			tx_queue_count;
64da80a29   Lennert Buytenhek   mv643xx_eth: allo...
60
61
  
  	/*
fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  	 * Override default RX/TX queue sizes if nonzero.
  	 */
  	int			rx_queue_size;
  	int			tx_queue_size;
  
  	/*
  	 * Use on-chip SRAM for RX/TX descriptors if size is nonzero
  	 * and sufficient to contain all descriptors for the requested
  	 * ring sizes.
  	 */
  	unsigned long		rx_sram_addr;
  	int			rx_sram_size;
  	unsigned long		tx_sram_addr;
  	int			tx_sram_size;
c4a6a2ab5   Lennert Buytenhek   mv643xx_eth: Spli...
76
  };
fc32b0e28   Lennert Buytenhek   mv643xx_eth: gene...
77
78
  
  #endif