pru_rproc.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
  2. /*
  3. * PRUSS Remote Processor specific types
  4. *
  5. * Copyright (C) 2014-2020 Texas Instruments Incorporated - https://www.ti.com/
  6. * Suman Anna <[email protected]>
  7. */
  8. #ifndef _PRU_RPROC_H_
  9. #define _PRU_RPROC_H_
  10. /**
  11. * struct pruss_int_map - PRU system events _to_ channel and host mapping
  12. * @event: number of the system event
  13. * @chnl: channel number assigned to a given @event
  14. * @host: host number assigned to a given @chnl
  15. *
  16. * PRU system events are mapped to channels, and these channels are mapped
  17. * to host interrupts. Events can be mapped to channels in a one-to-one or
  18. * many-to-one ratio (multiple events per channel), and channels can be
  19. * mapped to host interrupts in a one-to-one or many-to-one ratio (multiple
  20. * channels per interrupt).
  21. */
  22. struct pruss_int_map {
  23. u8 event;
  24. u8 chnl;
  25. u8 host;
  26. };
  27. /**
  28. * struct pru_irq_rsc - PRU firmware section header for IRQ data
  29. * @type: resource type
  30. * @num_evts: number of described events
  31. * @pru_intc_map: PRU interrupt routing description
  32. *
  33. * The PRU firmware blob can contain optional .pru_irq_map ELF section, which
  34. * provides the PRUSS interrupt mapping description. The pru_irq_rsc struct
  35. * describes resource entry format.
  36. */
  37. struct pru_irq_rsc {
  38. u8 type;
  39. u8 num_evts;
  40. struct pruss_int_map pru_intc_map[];
  41. } __packed;
  42. #endif /* _PRU_RPROC_H_ */