From patchwork Tue Apr 12 17:54:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 65640 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2059435qge; Tue, 12 Apr 2016 10:55:18 -0700 (PDT) X-Received: by 10.66.141.42 with SMTP id rl10mr6495723pab.48.1460483718770; Tue, 12 Apr 2016 10:55:18 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u67si11094018pfa.243.2016.04.12.10.55.18; Tue, 12 Apr 2016 10:55:18 -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 S934172AbcDLRy6 (ORCPT + 29 others); Tue, 12 Apr 2016 13:54:58 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35907 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932894AbcDLRy5 (ORCPT ); Tue, 12 Apr 2016 13:54:57 -0400 Received: by mail-pa0-f44.google.com with SMTP id bx7so17408309pad.3 for ; Tue, 12 Apr 2016 10:54:56 -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=w7gp2ZkWIqszud9Ixaf0tIGtCkXsANWWVNQtb6arlM4=; b=JadGrih2h/zQ/MziKzdu/UE/3LGc60RxwN9Yda4TFhnJAsy1xXy21uViMjdMYuNh9j L3Z/w2paooBhy9SQt5xXj9mEsv7ggYIf/WnuCeiCjKjPAuqgSRDpJWgUVkKb0quEqAqA 6C5uVsR8eo0DJUm2QW7tBMhJJZa0NbFCL6pgA= 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=w7gp2ZkWIqszud9Ixaf0tIGtCkXsANWWVNQtb6arlM4=; b=Eykxp58zuVzTf58T1k3nwr7OQXwfaL2IIWSx/VGHpbYQxUUK4WAPC64e0b0JYAEuqZ hFwBkiuVjmzbEKks51iF8vN3QRpGTEUbHwRaDwvXnXJAOFl9srMS13YioF8liLTPVVn2 QBW63QyGGYp4jHJBZNJHmmTDF1HRD8zdIZqSkP9R3sZbQ4O4yKj9FZuHaPCfRi47SybQ QGJU1C7q8mNhSWkj+xYIfYcekdHWZdb9htDAZ4VYAK0++f6aSongiWGbcf/EDMwfV+Hp UvrCiHIkpPEyHllonLGvtWTsVbVdZZrO1CsFsW9RAd+3jhXCmHh6VgjMxQ9eIJ+eGPzo RzFQ== X-Gm-Message-State: AOPr4FXSmHhXcmpqjbIM7YUxxBRyRnu1x71BngIwi8kYndZey5XwCbPZ+0RPmLU62OA4uQ4/ X-Received: by 10.66.157.194 with SMTP id wo2mr6501871pab.128.1460483696423; Tue, 12 Apr 2016 10:54:56 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id p189sm24633204pfb.51.2016.04.12.10.54.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Apr 2016 10:54:55 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org, Suzuki.Poulose@arm.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH V2 01/15] coresight: tmc: modifying naming convention Date: Tue, 12 Apr 2016 11:54:38 -0600 Message-Id: <1460483692-25061-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460483692-25061-1-git-send-email-mathieu.poirier@linaro.org> References: <1460483692-25061-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 --- 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)