fsl_portals.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright 2009-2011 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _FSL_PORTALS_H_
  7. #define _FSL_PORTALS_H_
  8. /* entries must be in order and contiguous */
  9. enum fsl_dpaa_dev {
  10. FSL_HW_PORTAL_SEC,
  11. #ifdef CONFIG_SYS_DPAA_FMAN
  12. FSL_HW_PORTAL_FMAN1,
  13. #if (CONFIG_SYS_NUM_FMAN == 2)
  14. FSL_HW_PORTAL_FMAN2,
  15. #endif
  16. #endif
  17. FSL_HW_PORTAL_PME,
  18. #ifdef CONFIG_SYS_FSL_RAID_ENGINE
  19. FSL_HW_PORTAL_RAID_ENGINE,
  20. #endif
  21. #ifdef CONFIG_SYS_DPAA_RMAN
  22. FSL_HW_PORTAL_RMAN,
  23. #endif
  24. #ifdef CONFIG_SYS_DPAA_DCE
  25. FSL_HW_PORTAL_DCE,
  26. #endif
  27. };
  28. struct qportal_info {
  29. u16 dliodn; /* DQRR LIODN */
  30. u16 fliodn; /* frame data LIODN */
  31. u16 liodn_offset;
  32. u8 sdest;
  33. };
  34. #define SET_QP_INFO(dqrr, fdata, off, dest) \
  35. { .dliodn = dqrr, .fliodn = fdata, .liodn_offset = off, .sdest = dest }
  36. extern int get_dpaa_liodn(enum fsl_dpaa_dev dpaa_dev,
  37. u32 *liodns, int liodn_offset);
  38. extern void setup_portals(void);
  39. extern void fdt_fixup_qportals(void *blob);
  40. extern void fdt_fixup_bportals(void *blob);
  41. extern struct qportal_info qp_info[];
  42. extern void fdt_portal(void *blob, const char *compat, const char *container,
  43. u64 addr, u32 size);
  44. #endif