1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2018-2019 NXP
9 #include <rte_ethdev.h>
10 #include <rte_ethdev_vdev.h>
13 #define GEMAC_NO_PHY BIT(0)
15 #define PFE_SOC_ID_FILE "/sys/devices/soc0/soc_id"
16 extern unsigned int pfe_svr;
17 #define SVR_LS1012A_REV2 0x87040020
18 #define SVR_LS1012A_REV1 0x87040010
20 #define PFE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
21 #define MAX_MTU_ON_REV1 1878
22 struct ls1012a_eth_platform_data {
23 /* device specific information */
27 /* board specific information */
34 u8 mac_addr[ETH_ALEN];
37 struct ls1012a_mdio_platform_data {
44 struct ls1012a_pfe_platform_data {
45 struct ls1012a_eth_platform_data ls1012a_eth_pdata[3];
46 struct ls1012a_mdio_platform_data ls1012a_mdio_pdata[3];
49 #define EMAC_TXQ_CNT 16
50 #define EMAC_TXQ_DEPTH (HIF_TX_DESC_NT)
52 #define JUMBO_FRAME_SIZE 10258
53 #define EMAC_RXQ_CNT 1
54 #define EMAC_RXQ_DEPTH HIF_RX_DESC_NT
56 struct pfe_eth_priv_s {
58 struct hif_client_s client;
61 struct rte_eth_dev *ndev;
62 struct rte_eth_stats stats;
67 spinlock_t lock; /* protect member variables */
69 /* This points to the EMAC base from where we access PHY */
73 struct ls1012a_eth_platform_data *einfo;
76 #endif /* _PFE_ETH_H_ */