ipa_table.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
  3. * Copyright (C) 2019-2024 Linaro Ltd.
  4. */
  5. #ifndef _IPA_TABLE_H_
  6. #define _IPA_TABLE_H_
  7. #include <linux/types.h>
  8. struct ipa;
  9. /**
  10. * ipa_filtered_valid() - Validate a filter table endpoint bitmap
  11. * @ipa: IPA pointer
  12. * @filtered: Filter table endpoint bitmap to check
  13. *
  14. * Return: true if all regions are valid, false otherwise
  15. */
  16. bool ipa_filtered_valid(struct ipa *ipa, u64 filtered);
  17. /**
  18. * ipa_table_hash_support() - Return true if hashed tables are supported
  19. * @ipa: IPA pointer
  20. */
  21. bool ipa_table_hash_support(struct ipa *ipa);
  22. /**
  23. * ipa_table_reset() - Reset filter and route tables entries to "none"
  24. * @ipa: IPA pointer
  25. * @modem: Whether to reset modem or AP entries
  26. */
  27. void ipa_table_reset(struct ipa *ipa, bool modem);
  28. /**
  29. * ipa_table_hash_flush() - Synchronize hashed filter and route updates
  30. * @ipa: IPA pointer
  31. */
  32. int ipa_table_hash_flush(struct ipa *ipa);
  33. /**
  34. * ipa_table_setup() - Set up filter and route tables
  35. * @ipa: IPA pointer
  36. *
  37. * There is no need for a matching ipa_table_teardown() function.
  38. */
  39. int ipa_table_setup(struct ipa *ipa);
  40. /**
  41. * ipa_table_config() - Configure filter and route tables
  42. * @ipa: IPA pointer
  43. *
  44. * There is no need for a matching ipa_table_deconfig() function.
  45. */
  46. void ipa_table_config(struct ipa *ipa);
  47. /**
  48. * ipa_table_init() - Do early initialization of filter and route tables
  49. * @ipa: IPA pointer
  50. */
  51. int ipa_table_init(struct ipa *ipa);
  52. /**
  53. * ipa_table_exit() - Inverse of ipa_table_init()
  54. * @ipa: IPA pointer
  55. */
  56. void ipa_table_exit(struct ipa *ipa);
  57. /**
  58. * ipa_table_mem_valid() - Validate sizes of table memory regions
  59. * @ipa: IPA pointer
  60. * @filter: Whether to check filter or routing tables
  61. */
  62. bool ipa_table_mem_valid(struct ipa *ipa, bool filter);
  63. #endif /* _IPA_TABLE_H_ */