[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3c7ddb25-1d76-4f85-a058-abdf887dc0dc@oss.qualcomm.com>
Date: Mon, 12 May 2025 18:40:36 +0200
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Yuanfang Zhang <quic_yuanfang@...cinc.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach
<mike.leach@...aro.org>,
James Clark <james.clark@...aro.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: kernel@....qualcomm.com, linux-arm-msm@...r.kernel.org,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/2] coresight: add coresight Trace Network On Chip
driver
On 5/12/25 1:10 PM, Yuanfang Zhang wrote:
> Add a driver to support Coresight device Trace Network On Chip (TNOC),
> which is an integration hierarchy integrating functionalities of TPDA
> and funnels. It aggregates the trace and transports to coresight trace
> bus.
>
just a couple nits that you can feel free to skip
[...]
> +static void trace_noc_enable_hw(struct trace_noc_drvdata *drvdata)
> +{
> + u32 val;
> +
> + /* Set ATID */
> + writel_relaxed(drvdata->atid, drvdata->base + TRACE_NOC_XLD);
> +
> + /* Set the data word count between 'SYNC' packets */
> + writel_relaxed(TRACE_NOC_SYNC_INTERVAL, drvdata->base + TRACE_NOC_SYNCR);
> +
> + /* Set the Control register:
> + * - Set the FLAG packets to 'FLAG' packets
> + * - Set the FREQ packets to 'FREQ_TS' packets
> + * - Enable generation of output ATB traffic
> + */
> +
> + val = readl_relaxed(drvdata->base + TRACE_NOC_CTRL);
> +
> + val = val & ~TRACE_NOC_CTRL_FLAGTYPE;
> + val = val | TRACE_NOC_CTRL_FREQTYPE;
> + val = val | TRACE_NOC_CTRL_PORTEN;
FWIW 'x &= ~foo' and 'x |= foo' are what one usually expects
[...]
> +static int trace_noc_probe(struct amba_device *adev, const struct amba_id *id)
> +{
> + struct device *dev = &adev->dev;
> + struct coresight_platform_data *pdata;
> + struct trace_noc_drvdata *drvdata;
> + struct coresight_desc desc = { 0 };
> + int ret;
> +
> + desc.name = coresight_alloc_device_name(&trace_noc_devs, dev);
> + if (!desc.name)
> + return -ENOMEM;
it's good to add a newline after return statements
Konrad
Powered by blists - more mailing lists