mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 01:46:52 +07:00
ce4e2e4558
There exist chips with up to four mv643xx_eth silicon blocks but only one external SMI (MII management) interface -- the SMI logic of the first block is shared by all the blocks. Handle this by allowing a per-port override of which mv643xx_eth_shared's SMI registers (and spinlock) to use. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
/*
|
|
* MV-643XX ethernet platform device data definition file.
|
|
*/
|
|
|
|
#ifndef __LINUX_MV643XX_ETH_H
|
|
#define __LINUX_MV643XX_ETH_H
|
|
|
|
#include <linux/mbus.h>
|
|
|
|
#define MV643XX_ETH_SHARED_NAME "mv643xx_eth"
|
|
#define MV643XX_ETH_NAME "mv643xx_eth_port"
|
|
#define MV643XX_ETH_SHARED_REGS 0x2000
|
|
#define MV643XX_ETH_SHARED_REGS_SIZE 0x2000
|
|
#define MV643XX_ETH_BAR_4 0x2220
|
|
#define MV643XX_ETH_SIZE_REG_4 0x2224
|
|
#define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290
|
|
|
|
struct mv643xx_eth_shared_platform_data {
|
|
struct mbus_dram_target_info *dram;
|
|
unsigned int t_clk;
|
|
};
|
|
|
|
struct mv643xx_eth_platform_data {
|
|
struct platform_device *shared;
|
|
int port_number;
|
|
|
|
struct platform_device *shared_smi;
|
|
|
|
u16 force_phy_addr; /* force override if phy_addr == 0 */
|
|
u16 phy_addr;
|
|
|
|
/* If speed is 0, then speed and duplex are autonegotiated. */
|
|
int speed; /* 0, SPEED_10, SPEED_100, SPEED_1000 */
|
|
int duplex; /* DUPLEX_HALF or DUPLEX_FULL */
|
|
|
|
/* non-zero values of the following fields override defaults */
|
|
u32 tx_queue_size;
|
|
u32 rx_queue_size;
|
|
u32 tx_sram_addr;
|
|
u32 tx_sram_size;
|
|
u32 rx_sram_addr;
|
|
u32 rx_sram_size;
|
|
u8 mac_addr[6]; /* mac address if non-zero*/
|
|
};
|
|
|
|
#endif /* __LINUX_MV643XX_ETH_H */
|