msm: camera: smmu: Move to ioremap APIs for using FW memory

When loading the camera FW, use the appropriate APIs
depending on the kernel version to map the FW region.

CRs-Fixed: 2564857
Change-Id: I2104b63b54bce799c8e44f36c49042de86f78c7e
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Esse commit está contido em:
Karthik Jayakumar
2019-11-04 15:24:08 -08:00
commit 50c8c09ead
6 arquivos alterados com 129 adições e 34 exclusões

32
drivers/cam_utils/cam_compat.h Arquivo normal
Ver arquivo

@@ -0,0 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
*/
#ifndef _CAM_COMPAT_H_
#define _CAM_COMPAT_H_
#include <linux/version.h>
#if KERNEL_VERSION(5, 4, 0) >= LINUX_VERSION_CODE
#include <linux/msm_ion.h>
#include <linux/ion.h>
#else
#include <linux/msm_ion.h>
#include <linux/ion_kernel.h>
#endif
struct cam_fw_alloc_info {
struct device *fw_dev;
void *fw_kva;
uint64_t fw_hdl;
};
int cam_reserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
void cam_unreserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
#endif /* _CAM_COMPAT_H_ */