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

Commit 1a618f28 authored by Iliya Varadzhakov's avatar Iliya Varadzhakov Committed by Stephen Boyd
Browse files

msm:cpp: Fix for spurious interrupts from CPP hardware



When power up the CPP, it generates spurious interrupts
that can confuse microntroller and halt it. This fix
clears the interrupt requests from CPP before enable
Microcontroller at "Open Camera" event.

Change-Id: I3b75f2513efc30fb0f35dd086464f0b6c3a6ff9b
Signed-off-by: default avatarIliya Varadzhakov <ivarad@codeaurora.org>
parent 7bbe2010
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@
		compatible = "qcom,cpp";
		reg = <0xfda04000 0x100>,
		      <0xfda40000 0x200>,
		      <0xfda18000 0x008>;
		      <0xfda18000 0x018>;
		reg-names = "cpp", "cpp_vbif", "cpp_hw";
		interrupts = <0 49 0>;
		interrupt-names = "cpp";
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@
		compatible = "qcom,cpp";
		reg = <0xfda04000 0x100>,
			<0xfda40000 0x200>,
			<0xfda18000 0x008>;
			<0xfda18000 0x018>;
		reg-names = "cpp", "cpp_vbif", "cpp_hw";
		interrupts = <0 49 0>;
		interrupt-names = "cpp";
+2 −1
Original line number Diff line number Diff line
@@ -700,7 +700,7 @@ static int cpp_init_hardware(struct cpp_device *cpp_dev)
	msm_cpp_create_buff_queue(cpp_dev, MSM_CPP_MAX_BUFF_QUEUE);
	if (cpp_dev->is_firmware_loaded == 1) {
		disable_irq(cpp_dev->irq->start);
		cpp_load_fw(cpp_dev, NULL);
		cpp_load_fw(cpp_dev, cpp_dev->fw_name_bin);
		enable_irq(cpp_dev->irq->start);
		msm_camera_io_w_mb(0x7C8, cpp_dev->base +
			MSM_CPP_MICRO_IRQGEN_MASK);
@@ -790,6 +790,7 @@ static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin)
		}
		if (fw)
			release_firmware(fw);
		msm_camera_io_w_mb(0x00, cpp_dev->cpp_hw_base + 0xC);
		msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_OK);
		msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD);
	}