From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756643AbcDGPne (ORCPT ); Thu, 7 Apr 2016 11:43:34 -0400 Received: from foss.arm.com ([217.140.101.70]:35156 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755501AbcDGPnd (ORCPT ); Thu, 7 Apr 2016 11:43:33 -0400 Subject: Re: [PATCH 06/14] coresight: tmc: making prepare/unprepare functions generic To: Mathieu Poirier , linux-arm-kernel@lists.infradead.org References: <1458678202-3447-1-git-send-email-mathieu.poirier@linaro.org> <1458678202-3447-7-git-send-email-mathieu.poirier@linaro.org> Cc: linux-kernel@vger.kernel.org From: Suzuki K Poulose Message-ID: <57068022.6010405@arm.com> Date: Thu, 7 Apr 2016 16:43:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1458678202-3447-7-git-send-email-mathieu.poirier@linaro.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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