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

Commit 23d0cc5e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: pil: allow subsystem to allocate extra memory"

parents 48340180 85854584
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
 */
#ifndef __MSM_PERIPHERAL_LOADER_H
#define __MSM_PERIPHERAL_LOADER_H
@@ -62,6 +62,7 @@ struct pil_desc {
	int minidump_id;
	int *aux_minidump_ids;
	int num_aux_minidump_ids;
	u32 extra_size;
};

/**
+6 −0
Original line number Diff line number Diff line
@@ -617,6 +617,7 @@ static int pil_mem_setup_trusted(struct pil_desc *pil, phys_addr_t addr,
	if (d->subsys_desc.no_auth)
		return 0;

	size += pil->extra_size;
	scm_ret = qcom_scm_pas_mem_setup(d->pas_id, addr, size);

	return scm_ret;
@@ -1349,6 +1350,11 @@ static int pil_tz_generic_probe(struct platform_device *pdev)
		}
	}

	rc = of_property_read_u32(pdev->dev.of_node, "qcom,extra-size",
						&d->desc.extra_size);
	if (rc)
		d->desc.extra_size = 0;

	d->dev = &pdev->dev;
	d->desc.dev = &pdev->dev;
	d->desc.owner = THIS_MODULE;