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