From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Yuanfang Zhang <quic_yuanfang@quicinc.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
James Clark <james.clark@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: kernel@oss.qualcomm.com, linux-arm-msm@vger.kernel.org,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] coresight: add coresight Trace Network On Chip driver
Date: Mon, 12 May 2025 18:40:36 +0200 [thread overview]
Message-ID: <3c7ddb25-1d76-4f85-a058-abdf887dc0dc@oss.qualcomm.com> (raw)
In-Reply-To: <20250512-trace-noc-v5-2-f2ef070baee5@quicinc.com>
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
prev parent reply other threads:[~2025-05-12 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 11:10 [PATCH v5 0/2] coresight: Add Coresight " Yuanfang Zhang
2025-05-12 11:10 ` [PATCH v5 1/2] dt-bindings: arm: Add device Trace Network On Chip definition Yuanfang Zhang
2025-05-12 11:10 ` [PATCH v5 2/2] coresight: add coresight Trace Network On Chip driver Yuanfang Zhang
2025-05-12 16:40 ` Konrad Dybcio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3c7ddb25-1d76-4f85-a058-abdf887dc0dc@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=james.clark@linaro.org \
--cc=kernel@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=quic_yuanfang@quicinc.com \
--cc=robh@kernel.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®