From patchwork Fri Apr 22 17:13:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 66469 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp838832qge; Fri, 22 Apr 2016 10:14:36 -0700 (PDT) X-Received: by 10.98.67.67 with SMTP id q64mr30248156pfa.44.1461345276099; Fri, 22 Apr 2016 10:14:36 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si8583563pat.133.2016.04.22.10.14.35; Fri, 22 Apr 2016 10:14:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932120AbcDVROW (ORCPT + 29 others); Fri, 22 Apr 2016 13:14:22 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:36139 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932225AbcDVROU (ORCPT ); Fri, 22 Apr 2016 13:14:20 -0400 Received: by mail-io0-f177.google.com with SMTP id u185so125500834iod.3 for ; Fri, 22 Apr 2016 10:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DrXIc6AfsxTmkG1KmLUCj69Bd3PcZKbkK4+hvtnkpg0=; b=SMLGabgkUfQQWSIVbn8AbjqvB/L/mUfbAr9luMnB1N74JdztrXaJur+fjF0WV1czaD 66ilmuW0y7y9Kwq8nYEGNq39ONxBdhwtatFW/9rlfnqpKdOGdIgyJl3xftjPS1B5MzUv Nbwau2kmNdxfcAD3S/QhNJxG8P1gIzN/3ZPqQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DrXIc6AfsxTmkG1KmLUCj69Bd3PcZKbkK4+hvtnkpg0=; b=QbtAVU0LAq8YJg3ibWrwg7Pq2Cm+NRTsmn0ZdwP9LsO6CH4olNuhxqxj70pArEHrLq 5G7OmmhADF1hqQSc71dhVS9AwM6EdDJa7S0qR7hmvchClJ76UBrrrzILvgqHykOl/+Z2 izEa1KeXDfDMxFIS+aLx/ex4mTgu5xCg/cqVAiU1FZqvBtHm/gzi9UhHQo05WWSQayLo 7ZDubUekAwoTVdVWkYWLYji60PkyE4H8nDo5F5cinGfA2AV/YfaU1scU0ULGR2zvrApa BTmXF9kyjR7ffwyrLqcIxE0NxfzqV/LvJ3Ss60zTuZ0dNVQ4go1lGKQp2jyvYbMvHw26 96vg== X-Gm-Message-State: AOPr4FU/CbiA4AMz8F+vVewTOQpL70FP4n02NV4jjzJQkL8qY8yq5j0N/ESpIw411oDXxeua X-Received: by 10.107.131.136 with SMTP id n8mr23503513ioi.132.1461345259759; Fri, 22 Apr 2016 10:14:19 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id vg8sm1975886igb.15.2016.04.22.10.14.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Apr 2016 10:14:18 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org, Suzuki.Poulose@arm.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH V3 01/18] coresight: tmc: modifying naming convention Date: Fri, 22 Apr 2016 11:13:58 -0600 Message-Id: <1461345255-11758-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461345255-11758-1-git-send-email-mathieu.poirier@linaro.org> References: <1461345255-11758-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to the TMC architectural state machine, the 'stopped' state is reached when bit 2 (TMCReady) of the TMC Status register turns to '1'. The code is correct but the naming convention isn't. The 'Triggered' bit occupies position '1' of the TMC Status register and has nothing to do with the indication of the TMC entering the stopped state. As such renaming function "tmc_wait_for_triggered()" and changing the #define to reflect what the code is really doing. This patch has no effect other than clarifying the semantic. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-tmc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.5.0 diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 2b42ecbd8831..3f646e29a99b 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -77,7 +77,7 @@ #define TMC_FFCR_TRIGON_TRIGIN BIT(8) #define TMC_FFCR_STOP_ON_FLUSH BIT(12) -#define TMC_STS_TRIGGERED_BIT 2 +#define TMC_STS_TMCREADY_BIT 2 #define TMC_FFCR_FLUSHMAN_BIT 6 enum tmc_config_type { @@ -132,11 +132,11 @@ struct tmc_drvdata { u32 trigger_cntr; }; -static void tmc_wait_for_ready(struct tmc_drvdata *drvdata) +static void tmc_wait_for_tmcready(struct tmc_drvdata *drvdata) { /* Ensure formatter, unformatter and hardware fifo are empty */ if (coresight_timeout(drvdata->base, - TMC_STS, TMC_STS_TRIGGERED_BIT, 1)) { + TMC_STS, TMC_STS_TMCREADY_BIT, 1)) { dev_err(drvdata->dev, "timeout observed when probing at offset %#x\n", TMC_STS); @@ -160,7 +160,7 @@ static void tmc_flush_and_stop(struct tmc_drvdata *drvdata) TMC_FFCR); } - tmc_wait_for_ready(drvdata); + tmc_wait_for_tmcready(drvdata); } static void tmc_enable_hw(struct tmc_drvdata *drvdata)