pruss_driver.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * PRU-ICSS sub-system specific definitions
  4. *
  5. * Copyright (C) 2014-2020 Texas Instruments Incorporated - http://www.ti.com/
  6. * Suman Anna <[email protected]>
  7. */
  8. #ifndef _PRUSS_DRIVER_H_
  9. #define _PRUSS_DRIVER_H_
  10. #include <linux/types.h>
  11. /*
  12. * enum pruss_mem - PRUSS memory range identifiers
  13. */
  14. enum pruss_mem {
  15. PRUSS_MEM_DRAM0 = 0,
  16. PRUSS_MEM_DRAM1,
  17. PRUSS_MEM_SHRD_RAM2,
  18. PRUSS_MEM_MAX,
  19. };
  20. /**
  21. * struct pruss_mem_region - PRUSS memory region structure
  22. * @va: kernel virtual address of the PRUSS memory region
  23. * @pa: physical (bus) address of the PRUSS memory region
  24. * @size: size of the PRUSS memory region
  25. */
  26. struct pruss_mem_region {
  27. void __iomem *va;
  28. phys_addr_t pa;
  29. size_t size;
  30. };
  31. /**
  32. * struct pruss - PRUSS parent structure
  33. * @dev: pruss device pointer
  34. * @cfg_base: base iomap for CFG region
  35. * @cfg_regmap: regmap for config region
  36. * @mem_regions: data for each of the PRUSS memory regions
  37. * @core_clk_mux: clk handle for PRUSS CORE_CLK_MUX
  38. * @iep_clk_mux: clk handle for PRUSS IEP_CLK_MUX
  39. */
  40. struct pruss {
  41. struct device *dev;
  42. void __iomem *cfg_base;
  43. struct regmap *cfg_regmap;
  44. struct pruss_mem_region mem_regions[PRUSS_MEM_MAX];
  45. struct clk *core_clk_mux;
  46. struct clk *iep_clk_mux;
  47. };
  48. #endif /* _PRUSS_DRIVER_H_ */