]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
a2a55e51 | 2 | /* |
2557c5a9 YG |
3 | * Copyright (C) 2014-2016 Freescale Semiconductor |
4 | * Copyright 2017 NXP | |
a2a55e51 PK |
5 | */ |
6 | ||
7 | #ifndef _FSL_MC_PRIVATE_H_ | |
8 | #define _FSL_MC_PRIVATE_H_ | |
9 | ||
10 | #include <errno.h> | |
11 | #include <malloc.h> | |
12 | #include <asm/io.h> | |
13 | #include <linux/compat.h> | |
14 | #include <linux/types.h> | |
15 | #include <linux/stringify.h> | |
c919ab9e | 16 | #include <phy.h> |
a2a55e51 PK |
17 | |
18 | #include <fsl-mc/fsl_mc_sys.h> | |
19 | #include <fsl-mc/fsl_mc_cmd.h> | |
c517771a | 20 | #include <fsl-mc/fsl_dprc.h> |
a2a55e51 | 21 | #include <fsl-mc/fsl_dpbp.h> |
1730a17d | 22 | #include <fsl-mc/fsl_dpni.h> |
a2a55e51 PK |
23 | |
24 | extern struct fsl_mc_io *dflt_mc_io; | |
25 | ||
26 | /** | |
27 | * struct dpbp_node - DPBP strucuture | |
28 | * @uint16_t handle: DPBP object handle | |
1730a17d | 29 | * @struct dpbp_attr: DPBP attribute |
a2a55e51 PK |
30 | */ |
31 | struct fsl_dpbp_obj { | |
2557c5a9 | 32 | uint32_t dpbp_id; |
a2a55e51 PK |
33 | uint16_t dpbp_handle; |
34 | struct dpbp_attr dpbp_attr; | |
35 | }; | |
36 | ||
37 | extern struct fsl_dpbp_obj *dflt_dpbp; | |
38 | ||
39 | /** | |
40 | * struct fsl_dpio_obj - DPIO strucuture | |
41 | * @int dpio_id: DPIO id | |
42 | * @struct qbman_swp *sw_portal: SW portal object | |
43 | */ | |
44 | struct fsl_dpio_obj { | |
2557c5a9 | 45 | uint32_t dpio_id; |
1730a17d | 46 | uint16_t dpio_handle; |
a2a55e51 PK |
47 | struct qbman_swp *sw_portal; /** SW portal object */ |
48 | }; | |
49 | ||
50 | extern struct fsl_dpio_obj *dflt_dpio; | |
51 | ||
1730a17d PK |
52 | /** |
53 | * struct dpni_node - DPNI strucuture | |
54 | * @int dpni_id: DPNI id | |
55 | * @uint16_t handle: DPNI object handle | |
56 | * @struct dpni_attr: DPNI attributes | |
57 | * @struct dpni_buffer_layout: DPNI buffer layout | |
58 | */ | |
59 | struct fsl_dpni_obj { | |
2557c5a9 | 60 | uint32_t dpni_id; |
1730a17d PK |
61 | uint16_t dpni_handle; |
62 | struct dpni_attr dpni_attrs; | |
63 | struct dpni_buffer_layout buf_layout; | |
64 | }; | |
65 | ||
66 | extern struct fsl_dpni_obj *dflt_dpni; | |
67 | ||
fb4a87a7 | 68 | int mc_init(u64 mc_fw_addr, u64 mc_dpc_addr); |
c919ab9e | 69 | int ldpaa_eth_init(int dpmac_id, phy_interface_t enet_if); |
1730a17d | 70 | int mc_apply_dpl(u64 mc_dpl_addr); |
a2a55e51 | 71 | #endif /* _FSL_MC_PRIVATE_H_ */ |