Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Kumar Gala | 38449a4 | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 2 | /* |
Haiying Wang | d38d4b2 | 2011-03-01 09:30:07 -0500 | [diff] [blame] | 3 | * Copyright 2009-2011 Freescale Semiconductor, Inc. |
Kumar Gala | 38449a4 | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _FSL_PORTALS_H_ |
| 7 | #define _FSL_PORTALS_H_ |
| 8 | |
Tom Rini | dec7ea0 | 2024-05-20 13:35:03 -0600 | [diff] [blame] | 9 | #include <linux/types.h> |
| 10 | |
Kumar Gala | 38449a4 | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 11 | /* entries must be in order and contiguous */ |
| 12 | enum fsl_dpaa_dev { |
| 13 | FSL_HW_PORTAL_SEC, |
| 14 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 15 | FSL_HW_PORTAL_FMAN1, |
Tom Rini | 0a2bac7 | 2022-11-16 13:10:29 -0500 | [diff] [blame] | 16 | #if (CFG_SYS_NUM_FMAN == 2) |
Kumar Gala | 38449a4 | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 17 | FSL_HW_PORTAL_FMAN2, |
| 18 | #endif |
| 19 | #endif |
Kumar Gala | 38449a4 | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 20 | FSL_HW_PORTAL_PME, |
Kumar Gala | 9d8e813 | 2011-09-10 10:44:13 -0500 | [diff] [blame] | 21 | #ifdef CONFIG_SYS_FSL_RAID_ENGINE |
| 22 | FSL_HW_PORTAL_RAID_ENGINE, |
| 23 | #endif |
Kumar Gala | 4eb3c37 | 2011-10-14 13:28:52 -0500 | [diff] [blame] | 24 | #ifdef CONFIG_SYS_DPAA_RMAN |
| 25 | FSL_HW_PORTAL_RMAN, |
| 26 | #endif |
Andy Fleming | 81177ad | 2012-10-08 07:44:18 +0000 | [diff] [blame] | 27 | #ifdef CONFIG_SYS_DPAA_DCE |
| 28 | FSL_HW_PORTAL_DCE, |
| 29 | #endif |
Kumar Gala | 4eb3c37 | 2011-10-14 13:28:52 -0500 | [diff] [blame] | 30 | |
Kumar Gala | 38449a4 | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | struct qportal_info { |
| 34 | u16 dliodn; /* DQRR LIODN */ |
| 35 | u16 fliodn; /* frame data LIODN */ |
| 36 | u16 liodn_offset; |
| 37 | u8 sdest; |
| 38 | }; |
| 39 | |
| 40 | #define SET_QP_INFO(dqrr, fdata, off, dest) \ |
| 41 | { .dliodn = dqrr, .fliodn = fdata, .liodn_offset = off, .sdest = dest } |
| 42 | |
| 43 | extern int get_dpaa_liodn(enum fsl_dpaa_dev dpaa_dev, |
| 44 | u32 *liodns, int liodn_offset); |
Kumar Gala | 38449a4 | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 45 | extern struct qportal_info qp_info[]; |
| 46 | extern void fdt_portal(void *blob, const char *compat, const char *container, |
| 47 | u64 addr, u32 size); |
| 48 | |
| 49 | #endif |