Hi Leo Yan,
On Tue, Jul 23, 2019 at 9:12 PM Leo Yan <leo.yan@linaro.org> wrote:
>
> Hi Jeremy,
>
> On Tue, Jul 23, 2019 at 02:14:00PM +0800, Jeremy Ng wrote:
> > Hi Leo Yan,
> >
> > My apologies for the multiple emails.
>
> It's no matter.
>
> > On a separate topic from coresight discovery, the new patch I have applied
> > have resulted in failure to activate the etm drivers
> > for tracing.
> >
> > The above result can be seen here:
> >
> > # echo 1 > ec036000.etf/enable_sink
> > # echo 1 > ed440000.etm/enable_source
> > # cat ed440000.etm/enable_source
> > 0
> >
> > I might be doing something wrong. Any guidance will be appreciated.
>
> I think you have missed some patches for DT binding. Please see
> enclosed tar file which contains the DT binding.
>
> After download it, you could use below command to apply them on the
> git tree:
>
> $ tar zxvf cs_dt_binding.tgz
> $ cd $kernel
> $ git am $path/to/cs_dt_binding/*
>
> Could you confirm you are using which kernel versio (4.14 or 4.19)?
I am currently using the kernel source from
https://android.googlesource.com/kernel/hikey-linaro/+/refs/heads/android-hikey-linaro-4.14
However, when I tried to apply the patches, all the patches
have failed. the output log is as follows:
# git am /home/jem/Downloads/cs_dt_binding/*
Applying: dt-bindings: arm: coresight: Add new compatible for static replicator
error: Documentation/devicetree/bindings/arm/coresight.txt: does not match index
Patch failed at 0001 dt-bindings: arm: coresight: Add new compatible for static replicator
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
# git am --skip
Applying: coresight: replicator: Add new device id for static replicator
error: patch failed: drivers/hwtracing/coresight/coresight-replicator.c:189
error: drivers/hwtracing/coresight/coresight-replicator.c: patch does not apply
Patch failed at 0002 coresight: replicator: Add new device id for static replicator
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
# git am --skip
Applying: dt-bindings: arm: coresight: Unify funnel DT binding
error: Documentation/devicetree/bindings/arm/coresight.txt: does not match index
Patch failed at 0003 dt-bindings: arm: coresight: Unify funnel DT binding
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
# git am --skip
Applying: coresight: funnel: Support static funnel
error: patch failed: drivers/hwtracing/coresight/coresight-funnel.c:43
error: drivers/hwtracing/coresight/coresight-funnel.c: patch does not apply
Patch failed at 0004 coresight: funnel: Support static funnel
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
When I try to manually patch the files, i realized that the line numbers
that indicated changes are vastly different from my original files.
(i.e.
Patch log
=======
--- a/drivers/hwtracing/coresight/coresight-replicator.c
+++ b/drivers/hwtracing/coresight/coresight-replicator.c
@@ -189,6 +189,9 @@ static int replicator_probe(struct device *dev, struct resource *res)
dev->platform_data = pdata;
}
+ if (of_device_is_compatible(np, "arm,coresight-replicator"))
+ pr_warn_once("Uses OBSOLETE CoreSight replicator binding\n");
+
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
Actual file line
===========
from line 66 to 73
static int replicator_probe(struct platform_device *pdev)
{
int ret;
struct device *dev = &pdev->dev;
struct coresight_platform_data *pdata = NULL;
struct replicator_drvdata *drvdata;
struct coresight_desc desc = { 0 };
struct device_node *np = pdev->dev.of_node;
.
.
}
I realized that there might be several changes prior to your patch
that I might have missed out and are not pushed to upstream.
>
> Thanks,
> Leo Yan
Please assist!
Regards,
Jeremy