static int pil_auth_and_reset(struct pil_desc *pil)
{
	struct pil_tz_data *d = desc_to_data(pil);
	int rc;

	rc = enable_regulators(pil->dev, d->regs, d->reg_count);
	if (rc)
		return rc;

	rc = prepare_enable_clocks(pil->dev, d->clks, d->clk_count);
	if (rc)
		goto err_clks;

	rc = pas_auth_and_reset(d->pas_id);
	if (rc)
		goto err_reset;

	return 0;
err_reset:
	disable_unprepare_clocks(d->clks, d->clk_count);
err_clks:
	disable_regulators(d->regs, d->reg_count);

	return rc;
}
static int pil_lpass_reset_trusted(struct pil_desc *pil)
{
	struct q6v5_data *drv = container_of(pil, struct q6v5_data, desc);
	int ret;

	ret = clk_prepare_enable(drv->axi_clk);
	if (ret)
		return ret;
	return pas_auth_and_reset(PAS_Q6);
}
示例#3
0
static int reset_modem_trusted(struct pil_desc *pil)
{
	int ret;

	make_modem_proxy_votes();

	ret = pas_auth_and_reset(PAS_MODEM);
	if (ret)
		remove_modem_proxy_votes_now();

	return ret;
}
示例#4
0
static int modem_reset_trusted(struct pil_desc *pil)
{
	int ret;
	struct modem_data *drv = dev_get_drvdata(pil->dev);

	make_modem_proxy_votes(pil->dev);

	ret = pas_auth_and_reset(PAS_MODEM);
	if (ret)
		remove_modem_proxy_votes_now(drv);

	return ret;
}
static int pil_riva_reset_trusted(struct pil_desc *pil)
{
	struct riva_data *drv = dev_get_drvdata(pil->dev);
	int ret;

	ret = clk_prepare_enable(drv->xo);
	if (ret)
		return ret;
	/* Proxy-vote for resources RIVA needs */
	pil_riva_make_proxy_votes(pil->dev);
	ret = pas_auth_and_reset(PAS_RIVA);
	clk_disable_unprepare(drv->xo);
	return ret;
}
示例#6
0
static int pil_q6v4_reset_trusted(struct pil_desc *pil)
{
	const struct pil_q6v4_pdata *pdata = pil->dev->platform_data;
	int err;

	err = pil_q6v4_power_up(pil->dev);
	if (err)
		return err;

	/* Unhalt bus port */
	err = msm_bus_axi_portunhalt(pdata->bus_port);
	if (err)
		dev_err(pil->dev, "Failed to unhalt bus port\n");
	return pas_auth_and_reset(pdata->pas_id);
}
static int pil_vidc_reset(struct pil_desc *pil)
{
	int ret;
	struct vidc_data *drv = dev_get_drvdata(pil->dev);

	ret = clk_prepare_enable(drv->smmu_iface);
	if (ret)
		goto err_smmu;
	ret = clk_prepare_enable(drv->core);
	if (ret)
		goto err_core;
	ret = pas_auth_and_reset(PAS_VIDC);

	clk_disable_unprepare(drv->core);
err_core:
	clk_disable_unprepare(drv->smmu_iface);
err_smmu:
	return ret;
}
示例#8
0
static int reset_playready(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_PLAYREADY);
}
示例#9
0
static int reset_dsps_trusted(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_DSPS);
}
示例#10
0
static int modem_reset_trusted(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_MODEM);
}
示例#11
0
static int pil_vidc_reset(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_VIDC);
}
示例#12
0
static int reset_q6_trusted(struct pil_device *pil)
{
	make_q6_proxy_votes();

	return pas_auth_and_reset(PAS_Q6);
}
示例#13
0
static int pil_q6v3_reset_trusted(struct pil_desc *pil)
{
	q6v3_make_proxy_votes(pil->dev);
	return pas_auth_and_reset(PAS_Q6);
}
示例#14
0
static int pil_lpass_reset_trusted(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_Q6);
}
static int pil_bcss_auth(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_BCSS);
}
static int pil_tzapps_reset(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_TZAPPS);
}
static int pil_riva_reset_trusted(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_WCNSS);
}
static int reset_riva_trusted(struct pil_desc *pil)
{
	return pas_auth_and_reset(PAS_RIVA);
}