lkml.org 
[lkml]   [2018]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] coresight: etb10: Splitting function etb_enable()
From
Date
On 14/08/18 23:14, Mathieu Poirier wrote:
> Up until now the relative simplicity of enabling the ETB made it
> possible to accommodate processing for both sysFS and perf methods.
> But work on claimtags and CPU-wide trace scenarios is adding some
> complexity, making the current code messy and hard to maintain.
>
> As such follow what has been done for ETF and ETR components and split
> function etb_enable() so that processing for both API can be done
> cleanly.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---

> +static int etb_enable(struct coresight_device *csdev, u32 mode, void *data)
> +{
> + int ret;
> + struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
> +
> + switch (mode) {
> + case CS_MODE_SYSFS:
> + ret = etb_enable_sysfs(csdev);
> + break;
> + case CS_MODE_PERF:
> + ret = etb_enable_perf(csdev, data);
> + break;
> + default:
> + ret = -EINVAL;
> + break;
> + }
> +
> + if (ret)
> + return ret;
> +
> + dev_dbg(drvdata->dev, "ETB enabled\n");
> + return 0;
> +}
> +

Looks good.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

\
 
 \ /
  Last update: 2018-08-16 17:45    [W:0.052 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site