Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16b4f674 authored by E V Ravi's avatar E V Ravi Committed by Gerrit - the friendly Code Review server
Browse files

msm: ais: Update early camera with new apis



Early domain core driver provides apis to communicate
with LK instead of using scratch registers

Change-Id: If312307d0b2eec7a40faf8575a7ad12451408c7c
Signed-off-by: default avatarE V Ravi <evenka@codeaurora.org>
parent e46bc1b0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#define CREATE_TRACE_POINTS
#include "trace/events/msm_cam.h"
#include "sensor/cci/msm_early_cam.h"
#include <soc/qcom/early_domain.h>

#define MAX_ISP_V4l2_EVENTS 100
#define MAX_ISP_REG_LIST 100
@@ -2292,6 +2293,8 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
	vfe_dev->isp_raw2_debug = 0;

	/* Postpone hardware changes until early camera is complete */
	/* Signal LK early camera that Kernel started running AIS */
	request_early_service_shutdown(EARLY_CAMERA);
	msm_early_camera_wait();

	if (vfe_dev->hw_info->vfe_ops.core_ops.init_hw(vfe_dev) < 0) {
+6 −15
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/of_platform.h>
#include <linux/iopoll.h>
#include <soc/qcom/early_domain.h>
#include "msm_sd.h"
#include "msm_early_cam.h"
#include "msm_cam_cci_hwreg.h"
@@ -39,12 +39,6 @@
static struct platform_driver msm_early_camera_driver;
static struct early_cam_device *new_early_cam_dev;

#define MMSS_A_VFE_0_BASE 0x00A10000
#define MMSS_A_VFE_0_SIZE 0x1000
#define EARLY_CAMERA_SIGNAL_DONE 0xa5a5a5a5
#define EARLY_CAMERA_SIGNAL_DISABLED 0
#define MMSS_A_VFE_0_SPARE 0xC84

int msm_early_cam_disable_clocks(void)
{
	int rc = 0;
@@ -263,14 +257,11 @@ int msm_ais_disable_clocks(void)

void msm_early_camera_wait(void)
{
	u32 val = 0;
	void __iomem *base;

	base = ioremap(MMSS_A_VFE_0_BASE, MMSS_A_VFE_0_SIZE);
	readl_poll_timeout(base + MMSS_A_VFE_0_SPARE, val,
		((val == EARLY_CAMERA_SIGNAL_DONE)
		|| (val == EARLY_CAMERA_SIGNAL_DISABLED)), 0, 0);
	iounmap(base);
	while (get_early_service_status(EARLY_CAMERA)) {
		CDBG("%s: wait for signal of early camera from LK",
			__func__);
		msleep(500);
	}
}

static int msm_early_cam_probe(struct platform_device *pdev)