[PATCH v1 1/9] coresight: tmc: Support atclk
Leo Yan
leo.yan at arm.com
Tue Apr 22 01:21:08 PDT 2025
On Thu, Apr 03, 2025 at 11:20:38AM +0530, Anshuman Khandual wrote:
> On 3/27/25 17:07, Leo Yan wrote:
> > The atclk is an optional clock for the CoreSight TMC, but the driver
> > misses to initialize it. In most cases, the TMC shares the same atclk
>
> TMC shares the atclk or pclk clock with other coresight components ?
I will refine the commit log for this.
[...]
> > --- a/drivers/hwtracing/coresight/coresight-tmc-core.c
> > +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c
> > @@ -789,6 +789,10 @@ static int __tmc_probe(struct device *dev, struct resource *res)
> > struct coresight_desc desc = { 0 };
> > struct coresight_dev_list *dev_list = NULL;
> >
> > + drvdata->atclk = devm_clk_get_optional_enabled(dev, "atclk");
> > + if (IS_ERR(drvdata->atclk))
> > + return PTR_ERR(drvdata->atclk);
> > +
>
> Adding this check here in __tmc_probe() ensures that it gets called
> both during AMBA and platform probe methods.
Yes.
> > /**
> > * struct tmc_drvdata - specifics associated to an TMC component
> > + * @atclk: optional clock for the core parts of the TMC.
> > * @pclk: APB clock if present, otherwise NULL
> > * @base: memory mapped base address for this component.
> > * @csdev: component vitals needed by the framework.
> > @@ -244,6 +245,7 @@ struct tmc_resrv_buf {
> > * Used by ETR/ETF.
> > */
> > struct tmc_drvdata {
> > + struct clk *atclk;
> > struct clk *pclk;
> > void __iomem *base;
> > struct coresight_device *csdev;
>
> Otherwise, LGTM.
>
> Reviewed-by: Anshuman Khandual <anshuman.khandual at arm.com>
Thanks for reviewing!
Leo
More information about the linux-arm-kernel
mailing list