Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373495
| From | Suzuki K Poulose <Suzuki.Poulose@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 06/14] coresight: tmc: making prepare/unprepare functions generic |
| Date | 2016-04-07 17:50 +0200 |
| Message-ID | <rlklY-65f-17@gated-at.bofh.it> (permalink) |
| References | <rfB69-1hK-1@gated-at.bofh.it> <rfB6c-1hK-59@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 22/03/16 20:23, Mathieu Poirier wrote:
> Dealing with HW related matters in tmc_read_prepare/unprepare
> becomes convoluted when many cases need to be handled distinctively.
>
> As such moving processing related to HW setup to individual driver
> files and keep the core driver generic.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
> drivers/hwtracing/coresight/coresight-tmc-etf.c | 68 ++++++++++++++++++++++++-
> drivers/hwtracing/coresight/coresight-tmc-etr.c | 50 +++++++++++++++++-
> drivers/hwtracing/coresight/coresight-tmc.c | 55 ++++----------------
> drivers/hwtracing/coresight/coresight-tmc.h | 8 +--
> 4 files changed, 131 insertions(+), 50 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c
> index 467d19221f7b..789384be81b6 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c
> @@ -71,7 +71,7 @@ static void tmc_etb_dump_hw(struct tmc_drvdata *drvdata)
> }
> }
>
> -void tmc_etb_disable_hw(struct tmc_drvdata *drvdata)
> +static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata)
> {
> CS_UNLOCK(drvdata->base);
>
> @@ -202,3 +202,69 @@ const struct coresight_ops tmc_etf_cs_ops = {
> .sink_ops = &tmc_etf_sink_ops,
> .link_ops = &tmc_etf_link_ops,
> };
> +
> +int tmc_read_prepare_etf(struct tmc_drvdata *drvdata)
...
> +int tmc_read_unprepare_etf(struct tmc_drvdata *drvdata)
Ideally, we are operating ETF as if it was an ETB in the sink mode,
so,
tmc_read_{prepare/unprepare}_etb sounds more intuitive than _etf.
Nothing wrong with the current code.
Thanks
Suzuki
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 06/14] coresight: tmc: making prepare/unprepare functions generic Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-04-07 17:50 +0200
csiph-web