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

Commit 565058ba authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian
Browse files

msm: smd: Reset the PIL string in edge_to_pid table



When configuration data for SMD is available through Device Tree, reset
the default subsystem_name information in edge_to_pid table. This will
enable the clients of SMD to identify unsupported edges.

Change-Id: I394cba40ae99a1bc4c255a7abf5188dbdde18a6f
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent 9181b869
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -3222,6 +3222,21 @@ void smd_set_edge_subsys_name(uint32_t edge, const char *subsys_name)
		pr_err("%s: Invalid edge type[%d]\n", __func__, edge);
}

/**
 * smd_reset_all_edge_subsys_name() - Reset the PIL string
 *
 * This function is used to reset the PIL string of all edges in
 * targets where configuration information is available through
 * device tree.
 */
void smd_reset_all_edge_subsys_name(void)
{
	int i;
	for (i = 0; i < ARRAY_SIZE(edge_to_pids); i++)
		strlcpy(edge_to_pids[i].subsys_name,
			"", sizeof(""));
}

/**
 * smd_set_edge_initialized() - Set the edge initialized status
 * @edge:	edge type identifies local and remote processor
+10 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@
#define SMSM_DBG(x...) do { } while (0)
#endif

static DEFINE_MUTEX(smd_probe_lock);
static int first_probe_done;

static int msm_smsm_probe(struct platform_device *pdev)
{
	uint32_t edge;
@@ -178,6 +181,13 @@ static int msm_smd_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	mutex_lock(&smd_probe_lock);
	if (!first_probe_done) {
		smd_reset_all_edge_subsys_name();
		first_probe_done = 1;
	}
	mutex_unlock(&smd_probe_lock);

	parent_pdev = to_platform_device(pdev->dev.parent);

	key = "irq-reg-base";
+1 −0
Original line number Diff line number Diff line
@@ -268,6 +268,7 @@ extern int smsm_post_init(void);
extern struct interrupt_config *smd_get_intr_config(uint32_t edge);
extern int smd_edge_to_remote_pid(uint32_t edge);
extern void smd_set_edge_subsys_name(uint32_t edge, const char *subsys_name);
extern void smd_reset_all_edge_subsys_name(void);
extern void smd_set_edge_initialized(uint32_t edge);
extern void smd_cfg_smd_intr(uint32_t proc, uint32_t mask, void *ptr);
extern void smd_cfg_smsm_intr(uint32_t proc, uint32_t mask, void *ptr);