qti_plat.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
  3. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
  4. *
  5. * SPDX-License-Identifier: BSD-3-Clause
  6. */
  7. #ifndef QTI_PLAT_H
  8. #define QTI_PLAT_H
  9. #include <stdint.h>
  10. #include <common/bl_common.h>
  11. #include <lib/cassert.h>
  12. #include <lib/el3_runtime/cpu_data.h>
  13. #include <lib/xlat_tables/xlat_tables_v2.h>
  14. /*
  15. * Utility functions common to QTI platforms
  16. */
  17. int qti_mmap_add_dynamic_region(uintptr_t base_pa, size_t size,
  18. unsigned int attr);
  19. int qti_mmap_remove_dynamic_region(uintptr_t base_va, size_t size);
  20. /*
  21. * Utility functions common to ARM standard platforms
  22. */
  23. void qti_setup_page_tables(
  24. uintptr_t total_base,
  25. size_t total_size,
  26. uintptr_t code_start,
  27. uintptr_t code_limit,
  28. uintptr_t rodata_start,
  29. uintptr_t rodata_limit
  30. );
  31. /*
  32. * Mandatory functions required in ARM standard platforms
  33. */
  34. void plat_qti_gic_driver_init(void);
  35. void plat_qti_gic_init(void);
  36. void plat_qti_gic_cpuif_enable(void);
  37. void plat_qti_gic_cpuif_disable(void);
  38. void plat_qti_gic_pcpu_init(void);
  39. /*
  40. * Optional functions required in ARM standard platforms
  41. */
  42. unsigned int plat_qti_core_pos_by_mpidr(u_register_t mpidr);
  43. unsigned int plat_qti_my_cluster_pos(void);
  44. void gic_set_spi_routing(unsigned int id, unsigned int irm, u_register_t mpidr);
  45. void qti_pmic_prepare_reset(void);
  46. void qti_pmic_prepare_shutdown(void);
  47. typedef struct chip_id_info {
  48. uint16_t jtag_id;
  49. uint16_t chipinfo_id;
  50. } chip_id_info_t;
  51. #endif /* QTI_PLAT_H */