cam_compat.h 992 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _CAM_COMPAT_H_
  6. #define _CAM_COMPAT_H_
  7. #include <linux/version.h>
  8. #include "cam_csiphy_dev.h"
  9. #include "cam_cpastop_hw.h"
  10. #if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
  11. #include <linux/msm_ion.h>
  12. #include <linux/ion.h>
  13. #include <linux/qcom_scm.h>
  14. #else
  15. #include <linux/msm_ion.h>
  16. #include <linux/ion_kernel.h>
  17. #include <soc/qcom/scm.h>
  18. #endif
  19. struct cam_fw_alloc_info {
  20. struct device *fw_dev;
  21. void *fw_kva;
  22. uint64_t fw_hdl;
  23. };
  24. int cam_reserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
  25. void cam_unreserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
  26. void cam_cpastop_scm_write(struct cam_cpas_hw_errata_wa *errata_wa);
  27. int cam_ife_notify_safe_lut_scm(bool safe_trigger);
  28. int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev,
  29. bool protect, int32_t offset);
  30. #endif /* _CAM_COMPAT_H_ */