From: Mike Leach <mike.leach@linaro.org> To: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> Cc: linux@armlinux.org.uk, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, Mathieu Poirier <mathieu.poirier@linaro.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Rajendra Nayak <rnayak@codeaurora.org>, Vivek Gautam <vivek.gautam@codeaurora.org>, Sibi Sankar <sibis@codeaurora.org> Subject: Re: [RESEND PATCH v3 1/2] drivers: amba: Updates to component identification for driver matching. Date: Fri, 25 Jan 2019 10:37:45 +0000 [thread overview] Message-ID: <CAJ9a7Vh6McpjtyRuBDPSYMWec0TuWkXeOLBOpKvv8tWUU0sV2A@mail.gmail.com> (raw) In-Reply-To: <353c8f4b-f48f-863c-7149-342b764a02c0@codeaurora.org> Hello Sai On Fri, 25 Jan 2019 at 07:20, Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> wrote: > > Hi Mike, > > Thanks for the patch. > > BTW somehow I can't find the latest series in my inbox, so commenting > on this here. > > Mathieu pointed me to this patch series.This solves CPU debug module > sharing same PID as ETM on MSM8996. I will be posting patch for CPU > debug UCI table soon. > > But please find my one comment inline. > > On 12/19/2018 3:29 AM, Mike Leach wrote: > > The CoreSight specification (ARM IHI 0029E), updates the ID register > > requirements for components on an AMBA bus, to cover both traditional > > ARM Primecell type devices, and newer CoreSight and other components. > > > > The Peripheral ID (PID) / Component ID (CID) pair is extended in certain > > cases to uniquely identify components. CoreSight components related to > > a single function can share Peripheral ID values, and must be further > > identified using a Unique Component Identifier (UCI). e.g. the ETM, CTI, > > PMU and Debug hardware of the A35 all share the same PID. > > > > [..] > > > +static const struct amba_id * > > +amba_lookup(const struct amba_id *table, struct amba_device *dev) > > +{ > > while (table->mask) { > > - ret = (dev->periphid & table->mask) == table->id; > > - if (ret) > > - break; > > + if (((dev->periphid & table->mask) == table->id) && > > + ((dev->cid != CORESIGHT_CID) || > > + (amba_cs_uci_id_match(table, dev)))) > > Shouldn't the check be (dev->cid == CORESIGHT_CID) ? > Without this STM fails to probe on both SDM845 and MSM8996. > I believe the test is correct To expand the logic here: if (dev->periphid & table->mask) == table->id) { //** match on peripheral ID at this point if (CID != CORESIGHT_ID) return table; //** not coresight - match on peripheral ID only //** or if (amba_cs_uci_id_match() ) return table; //** is coresight - match on UCI if available - otherwise peripheral ID only; However - looking at the coresight STM driver - this is using the private .data field in the amba_id for a name - which I had not spotted before. I will have to revisit this patchset to fix either the amba id struct or the method for getting the uci data into the amba_id.data which allows for multiple uses. Regards Mike > With this, > > Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> > > Thanks, > Sai > > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
WARNING: multiple messages have this Message-ID (diff)
From: Mike Leach <mike.leach@linaro.org> To: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> Cc: Rajendra Nayak <rnayak@codeaurora.org>, Mathieu Poirier <mathieu.poirier@linaro.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, coresight@lists.linaro.org, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Sibi Sankar <sibis@codeaurora.org>, Vivek Gautam <vivek.gautam@codeaurora.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org> Subject: Re: [RESEND PATCH v3 1/2] drivers: amba: Updates to component identification for driver matching. Date: Fri, 25 Jan 2019 10:37:45 +0000 [thread overview] Message-ID: <CAJ9a7Vh6McpjtyRuBDPSYMWec0TuWkXeOLBOpKvv8tWUU0sV2A@mail.gmail.com> (raw) In-Reply-To: <353c8f4b-f48f-863c-7149-342b764a02c0@codeaurora.org> Hello Sai On Fri, 25 Jan 2019 at 07:20, Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> wrote: > > Hi Mike, > > Thanks for the patch. > > BTW somehow I can't find the latest series in my inbox, so commenting > on this here. > > Mathieu pointed me to this patch series.This solves CPU debug module > sharing same PID as ETM on MSM8996. I will be posting patch for CPU > debug UCI table soon. > > But please find my one comment inline. > > On 12/19/2018 3:29 AM, Mike Leach wrote: > > The CoreSight specification (ARM IHI 0029E), updates the ID register > > requirements for components on an AMBA bus, to cover both traditional > > ARM Primecell type devices, and newer CoreSight and other components. > > > > The Peripheral ID (PID) / Component ID (CID) pair is extended in certain > > cases to uniquely identify components. CoreSight components related to > > a single function can share Peripheral ID values, and must be further > > identified using a Unique Component Identifier (UCI). e.g. the ETM, CTI, > > PMU and Debug hardware of the A35 all share the same PID. > > > > [..] > > > +static const struct amba_id * > > +amba_lookup(const struct amba_id *table, struct amba_device *dev) > > +{ > > while (table->mask) { > > - ret = (dev->periphid & table->mask) == table->id; > > - if (ret) > > - break; > > + if (((dev->periphid & table->mask) == table->id) && > > + ((dev->cid != CORESIGHT_CID) || > > + (amba_cs_uci_id_match(table, dev)))) > > Shouldn't the check be (dev->cid == CORESIGHT_CID) ? > Without this STM fails to probe on both SDM845 and MSM8996. > I believe the test is correct To expand the logic here: if (dev->periphid & table->mask) == table->id) { //** match on peripheral ID at this point if (CID != CORESIGHT_ID) return table; //** not coresight - match on peripheral ID only //** or if (amba_cs_uci_id_match() ) return table; //** is coresight - match on UCI if available - otherwise peripheral ID only; However - looking at the coresight STM driver - this is using the private .data field in the amba_id for a name - which I had not spotted before. I will have to revisit this patchset to fix either the amba id struct or the method for getting the uci data into the amba_id.data which allows for multiple uses. Regards Mike > With this, > > Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> > > Thanks, > Sai > > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-01-25 10:38 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-18 21:59 [RESEND PATCH v3 0/2] Update AMBA driver for enhanced component ID spec Mike Leach 2018-12-18 21:59 ` Mike Leach 2018-12-18 21:59 ` [RESEND PATCH v3 1/2] drivers: amba: Updates to component identification for driver matching Mike Leach 2018-12-18 21:59 ` Mike Leach 2019-01-11 11:43 ` Suzuki K Poulose 2019-01-11 11:43 ` Suzuki K Poulose 2019-01-25 7:20 ` Sai Prakash Ranjan 2019-01-25 7:20 ` Sai Prakash Ranjan 2019-01-25 10:37 ` Mike Leach [this message] 2019-01-25 10:37 ` Mike Leach 2019-01-25 10:42 ` Suzuki K Poulose 2019-01-25 10:42 ` Suzuki K Poulose 2018-12-18 21:59 ` [RESEND PATCH v3 2/2] coresight: etmv4: Update ID register table to add UCI support Mike Leach 2018-12-18 21:59 ` Mike Leach 2019-01-11 11:44 ` Suzuki K Poulose 2019-01-11 11:44 ` Suzuki K Poulose 2019-01-21 23:31 [RESEND PATCH v3 0/2] Update AMBA driver for enhanced component ID spec Mike Leach 2019-01-21 23:31 ` [RESEND PATCH v3 1/2] drivers: amba: Updates to component identification for driver matching Mike Leach
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=CAJ9a7Vh6McpjtyRuBDPSYMWec0TuWkXeOLBOpKvv8tWUU0sV2A@mail.gmail.com \ --to=mike.leach@linaro.org \ --cc=coresight@lists.linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=mathieu.poirier@linaro.org \ --cc=rnayak@codeaurora.org \ --cc=saiprakash.ranjan@codeaurora.org \ --cc=sibis@codeaurora.org \ --cc=suzuki.poulose@arm.com \ --cc=vivek.gautam@codeaurora.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.