0001
0002
0003
0004
0005
0006 #ifndef __LINUX_MV643XX_ETH_H
0007 #define __LINUX_MV643XX_ETH_H
0008
0009 #include <linux/mbus.h>
0010 #include <linux/if_ether.h>
0011
0012 #define MV643XX_ETH_SHARED_NAME "mv643xx_eth"
0013 #define MV643XX_ETH_NAME "mv643xx_eth_port"
0014 #define MV643XX_ETH_SHARED_REGS 0x2000
0015 #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000
0016 #define MV643XX_ETH_BAR_4 0x2220
0017 #define MV643XX_ETH_SIZE_REG_4 0x2224
0018 #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290
0019
0020 #define MV643XX_TX_CSUM_DEFAULT_LIMIT 0
0021
0022 struct mv643xx_eth_shared_platform_data {
0023 struct mbus_dram_target_info *dram;
0024
0025
0026
0027
0028 int tx_csum_limit;
0029 };
0030
0031 #define MV643XX_ETH_PHY_ADDR_DEFAULT 0
0032 #define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x))
0033 #define MV643XX_ETH_PHY_NONE 0xff
0034
0035 struct device_node;
0036 struct mv643xx_eth_platform_data {
0037
0038
0039
0040 struct platform_device *shared;
0041 int port_number;
0042
0043
0044
0045
0046 int phy_addr;
0047 struct device_node *phy_node;
0048
0049
0050
0051
0052
0053 u8 mac_addr[ETH_ALEN];
0054
0055
0056
0057
0058
0059
0060 int speed;
0061 int duplex;
0062
0063
0064
0065
0066 int rx_queue_count;
0067 int tx_queue_count;
0068
0069
0070
0071
0072 int rx_queue_size;
0073 int tx_queue_size;
0074
0075
0076
0077
0078
0079
0080 unsigned long rx_sram_addr;
0081 int rx_sram_size;
0082 unsigned long tx_sram_addr;
0083 int tx_sram_size;
0084 };
0085
0086
0087 #endif