blob: 54ef4fb629542090cd41a7748d0dbb8413f39e98 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Kumar Gala38449a42009-09-10 03:02:13 -05002/*
Haiying Wangd38d4b22011-03-01 09:30:07 -05003 * Copyright 2009-2011 Freescale Semiconductor, Inc.
Kumar Gala38449a42009-09-10 03:02:13 -05004 */
5
6#ifndef _FSL_PORTALS_H_
7#define _FSL_PORTALS_H_
8
9/* entries must be in order and contiguous */
10enum fsl_dpaa_dev {
11 FSL_HW_PORTAL_SEC,
12#ifdef CONFIG_SYS_DPAA_FMAN
13 FSL_HW_PORTAL_FMAN1,
Tom Rini0a2bac72022-11-16 13:10:29 -050014#if (CFG_SYS_NUM_FMAN == 2)
Kumar Gala38449a42009-09-10 03:02:13 -050015 FSL_HW_PORTAL_FMAN2,
16#endif
17#endif
Kumar Gala38449a42009-09-10 03:02:13 -050018 FSL_HW_PORTAL_PME,
Kumar Gala9d8e8132011-09-10 10:44:13 -050019#ifdef CONFIG_SYS_FSL_RAID_ENGINE
20 FSL_HW_PORTAL_RAID_ENGINE,
21#endif
Kumar Gala4eb3c372011-10-14 13:28:52 -050022#ifdef CONFIG_SYS_DPAA_RMAN
23 FSL_HW_PORTAL_RMAN,
24#endif
Andy Fleming81177ad2012-10-08 07:44:18 +000025#ifdef CONFIG_SYS_DPAA_DCE
26 FSL_HW_PORTAL_DCE,
27#endif
Kumar Gala4eb3c372011-10-14 13:28:52 -050028
Kumar Gala38449a42009-09-10 03:02:13 -050029};
30
31struct qportal_info {
32 u16 dliodn; /* DQRR LIODN */
33 u16 fliodn; /* frame data LIODN */
34 u16 liodn_offset;
35 u8 sdest;
36};
37
38#define SET_QP_INFO(dqrr, fdata, off, dest) \
39 { .dliodn = dqrr, .fliodn = fdata, .liodn_offset = off, .sdest = dest }
40
41extern int get_dpaa_liodn(enum fsl_dpaa_dev dpaa_dev,
42 u32 *liodns, int liodn_offset);
Kumar Gala38449a42009-09-10 03:02:13 -050043extern struct qportal_info qp_info[];
44extern void fdt_portal(void *blob, const char *compat, const char *container,
45 u64 addr, u32 size);
46
47#endif