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

Commit 9a94955b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: add the fuse check logic for coresight etm"

parents bc1c7e39 9d46aa65
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2016, 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
@@ -2249,6 +2249,10 @@ static int etm_probe(struct platform_device *pdev)
	struct resource *res;
	struct device_node *cpu_node;

	if (coresight_fuse_access_disabled() ||
	    coresight_fuse_apps_access_disabled())
		return -EPERM;

	pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
	if (IS_ERR(pdata))
		return PTR_ERR(pdata);
@@ -2309,12 +2313,6 @@ static int etm_probe(struct platform_device *pdev)
	if (ret)
		goto err0;

	if (!coresight_authstatus_enabled(drvdata->base)) {
		clk_disable_unprepare(drvdata->clk);
		wakeup_source_trash(&drvdata->ws);
		return -EPERM;
	}

	if (count++ == 0)
		register_hotcpu_notifier(&etm_cpu_notifier);

+5 −7
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2016, 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
@@ -3531,6 +3531,10 @@ static int etm_probe(struct platform_device *pdev)
	struct resource *res;
	struct device_node *cpu_node;

	if (coresight_fuse_access_disabled() ||
	    coresight_fuse_apps_access_disabled())
		return -EPERM;

	pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
	if (IS_ERR(pdata))
		return PTR_ERR(pdata);
@@ -3594,12 +3598,6 @@ static int etm_probe(struct platform_device *pdev)
	if (ret)
		goto err0;

	if (!coresight_authstatus_enabled(drvdata->base)) {
		clk_disable_unprepare(drvdata->clk);
		wakeup_source_trash(&drvdata->ws);
		return -EPERM;
	}

	if (count++ == 0) {
		register_hotcpu_notifier(&etm_cpu_notifier);
		register_hotcpu_notifier(&etm_cpu_dying_notifier);