stream_id_lsch2.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2017 NXP Semiconductor, Inc.
  4. *
  5. */
  6. #ifndef __FSL_STREAM_ID_H
  7. #define __FSL_STREAM_ID_H
  8. /*
  9. * Stream IDs on Chassis-2 (for example ls1043a, ls1046a, ls1012) devices
  10. * are not hardwired and are programmed by sw. There are a limited number
  11. * of stream IDs available, and the partitioning of them is scenario
  12. * dependent. This header defines the partitioning between legacy, PCI,
  13. * and DPAA1 devices.
  14. *
  15. * This partitioning can be customized in this file depending
  16. * on the specific hardware config:
  17. *
  18. * -non-PCI legacy, platform devices (USB, SDHC, SATA, DMA, QE etc)
  19. * -all legacy devices get a unique stream ID assigned and programmed in
  20. * their AMQR registers by u-boot
  21. *
  22. * -PCIe
  23. * -there is a range of stream IDs set aside for PCI in this
  24. * file. U-boot will scan the PCI bus and for each device discovered:
  25. * -allocate a streamID
  26. * -set a PEXn LUT table entry mapping 'requester ID' to 'stream ID'
  27. * -set a msi-map entry in the PEXn controller node in the
  28. * device tree (see Documentation/devicetree/bindings/pci/pci-msi.txt
  29. * for more info on the msi-map definition)
  30. * -set a iommu-map entry in the PEXn controller node in the
  31. * device tree (see Documentation/devicetree/bindings/pci/pci-iommu.txt
  32. * for more info on the iommu-map definition)
  33. *
  34. * -DPAA1
  35. * - Stream ids for DPAA1 use are reserved for future usecase.
  36. *
  37. */
  38. #define FSL_INVALID_STREAM_ID 0
  39. /* legacy devices */
  40. #define FSL_USB1_STREAM_ID 1
  41. #define FSL_USB2_STREAM_ID 2
  42. #define FSL_USB3_STREAM_ID 3
  43. #define FSL_SDHC_STREAM_ID 4
  44. #define FSL_SATA_STREAM_ID 5
  45. #define FSL_QE_STREAM_ID 6
  46. #define FSL_QDMA_STREAM_ID 7
  47. #define FSL_EDMA_STREAM_ID 8
  48. #define FSL_ETR_STREAM_ID 9
  49. /* PCI - programmed in PEXn_LUT */
  50. #define FSL_PEX_STREAM_ID_START 11
  51. #define FSL_PEX_STREAM_ID_END 26
  52. /* DPAA1 - Stream-ID that can be programmed in DPAA1 h/w */
  53. #define FSL_DPAA1_STREAM_ID_START 27
  54. #define FSL_DPAA1_STREAM_ID_END 63
  55. #endif