Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Freescale Semiconductor |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 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> |
Prabhakar Kushwaha | 52d2e2c | 2015-11-04 12:26:00 +0530 | [diff] [blame] | 16 | #include <phy.h> |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 17 | |
| 18 | #include <fsl-mc/fsl_mc_sys.h> |
| 19 | #include <fsl-mc/fsl_mc_cmd.h> |
Prabhakar Kushwaha | 5350b99 | 2015-03-19 09:20:46 -0700 | [diff] [blame] | 20 | #include <fsl-mc/fsl_dprc.h> |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 21 | #include <fsl-mc/fsl_dpbp.h> |
Prabhakar Kushwaha | 316b71c | 2015-11-04 12:25:59 +0530 | [diff] [blame] | 22 | #include <fsl-mc/fsl_dpni.h> |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 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 |
Prabhakar Kushwaha | 316b71c | 2015-11-04 12:25:59 +0530 | [diff] [blame] | 29 | * @struct dpbp_attr: DPBP attribute |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 30 | */ |
| 31 | struct fsl_dpbp_obj { |
| 32 | uint16_t dpbp_handle; |
| 33 | struct dpbp_attr dpbp_attr; |
| 34 | }; |
| 35 | |
| 36 | extern struct fsl_dpbp_obj *dflt_dpbp; |
| 37 | |
| 38 | /** |
| 39 | * struct fsl_dpio_obj - DPIO strucuture |
| 40 | * @int dpio_id: DPIO id |
| 41 | * @struct qbman_swp *sw_portal: SW portal object |
| 42 | */ |
| 43 | struct fsl_dpio_obj { |
| 44 | int dpio_id; |
Prabhakar Kushwaha | 316b71c | 2015-11-04 12:25:59 +0530 | [diff] [blame] | 45 | uint16_t dpio_handle; |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 46 | struct qbman_swp *sw_portal; /** SW portal object */ |
| 47 | }; |
| 48 | |
| 49 | extern struct fsl_dpio_obj *dflt_dpio; |
| 50 | |
Prabhakar Kushwaha | 316b71c | 2015-11-04 12:25:59 +0530 | [diff] [blame] | 51 | /** |
| 52 | * struct dpni_node - DPNI strucuture |
| 53 | * @int dpni_id: DPNI id |
| 54 | * @uint16_t handle: DPNI object handle |
| 55 | * @struct dpni_attr: DPNI attributes |
| 56 | * @struct dpni_buffer_layout: DPNI buffer layout |
| 57 | */ |
| 58 | struct fsl_dpni_obj { |
| 59 | int dpni_id; |
| 60 | uint16_t dpni_handle; |
| 61 | struct dpni_attr dpni_attrs; |
| 62 | struct dpni_buffer_layout buf_layout; |
| 63 | }; |
| 64 | |
| 65 | extern struct fsl_dpni_obj *dflt_dpni; |
| 66 | |
Prabhakar Kushwaha | 29a63e4 | 2015-11-04 12:25:58 +0530 | [diff] [blame] | 67 | int mc_init(u64 mc_fw_addr, u64 mc_dpc_addr); |
Prabhakar Kushwaha | 52d2e2c | 2015-11-04 12:26:00 +0530 | [diff] [blame] | 68 | int ldpaa_eth_init(int dpmac_id, phy_interface_t enet_if); |
Prabhakar Kushwaha | 316b71c | 2015-11-04 12:25:59 +0530 | [diff] [blame] | 69 | int mc_apply_dpl(u64 mc_dpl_addr); |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 70 | #endif /* _FSL_MC_PRIVATE_H_ */ |