1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2018-2019 NXP
10 #include <rte_ethdev.h>
14 #include "pfe_hif_lib.h"
17 #define PHYID_MAX_VAL 32
19 /* PFE DPDK driver supports two interfaces.
21 #define PFE_CDEV_ETH_COUNT 2
23 /* PFE DPDK driver needs a kernel module named "pfe.ko", This module
24 * is required for PHY initialisation and creates a character device
25 * "pfe_us_cdev" for IOCTL support. PFE DPDK driver uses this character
26 * device for link status.
28 #define PFE_CDEV_PATH "/dev/pfe_us_cdev"
29 #define PFE_CDEV_INVALID_FD -1
30 #define PFE_NAME_PMD net_pfe
32 /* used when 'read' call is issued, returning PFE_CDEV_ETH_COUNT number of
33 * pfe_shared_info as array.
35 struct pfe_shared_info {
36 uint32_t phy_id; /* Link phy ID */
37 uint8_t state; /* Has either 0 or 1 */
41 struct pfe_eth_priv_s *eth_priv[PFE_CDEV_ETH_COUNT];
45 uint64_t ddr_phys_baseaddr;
50 struct ls1012a_pfe_platform_data platform_data;
53 struct hif_client_s *hif_client[HIF_CLIENTS_MAX];
54 int mdio_muxval[PHYID_MAX_VAL];
61 #define PFE_CDEV_ETH0_STATE_GET _IOR('R', 0, int)
62 #define PFE_CDEV_ETH1_STATE_GET _IOR('R', 1, int)
63 #define PFE_CDEV_HIF_INTR_EN _IOWR('R', 2, int)
64 #endif /* _PFE_MOD_H */