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

Commit 654eba23 authored by Chris Lew's avatar Chris Lew
Browse files

mailbox: msm_qmp: Differentiate early boot procs



The shared memory used in QMP maybe owned by the remote proc and not be
clocked while the processor is in reset. The fake rx interrupt should
only be done on processors that are booted before the APPS proc.

Change-Id: I090bcbaee4333020b911c8643a95d8b40c9eb100
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 038b5bef
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ Required properties:
		required for the mailbox specifier, should be 1.

Optional properties:
- qcom,early-boot : bool to indicate that this remote proc will boot before QMP.
- mbox-offset : offset of the mcore mailbox from the offset of msgram. If this
			property is not used, qmp will use the configuration
			provided by the ucore.
@@ -28,6 +29,7 @@ Example:
	qmp_aop: qcom,qmp-aop {
		compatible = "qcom,qmp-mbox";
		label = "aop";
		qcom,early-boot;
		reg = <0xc300000 0x100000>,
			<0x1799000C 0x4>;
		reg-names = "msgram", "irq-reg-base";
+6 −3
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/kthread.h>
#include <linux/workqueue.h>
@@ -921,8 +922,10 @@ static int qmp_mbox_probe(struct platform_device *pdev)
		pr_err("%s: enable_irq_wake on %d failed: %d\n", __func__,
							mdev->rx_irq_line, ret);

	/* Trigger RX */
	/* Trigger fake RX in case of missed interrupt */
	if (of_property_read_bool(edge_node, "qcom,early-boot"))
		qmp_irq_handler(0, mdev);

	return 0;
}