Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3815954imu; Mon, 28 Jan 2019 11:18:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN5A4pXIdKe0abYCxITUCBFQDP4zbZgTfkoi1R8yxfcAsOtiVhx0JIK8B+27KXBzGhtqLVn7 X-Received: by 2002:a17:902:4081:: with SMTP id c1mr23359801pld.87.1548703088087; Mon, 28 Jan 2019 11:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548703088; cv=none; d=google.com; s=arc-20160816; b=IW5HOk3wkN8TSLPNE1AEKr7PJHJnMqCN6oLpTDBf3Tm1ezF2e4Cwbr3Ad2+79j9o7F Y121mMi9awRfSJ/3KW7EkK+J30KKx6ZOkX6iRUjlRETR8/JNc3hHM/bFilKAJCnT3WMB BaIsTbFoyFiSiQm3Vid/IdA3A3UQa/u1OiUvpTrBVeklHeEINskYUvJaRdHN+dJYLTpO sGXy6wBoYDTSWPwfg7L04Sy4n9stbgyXkD7WJxwwLfv4j8yIybwPKIT2+cNQmgk+gamx XuXMnRyzoEo1uw2A3HpTL85Fvavk5Bz1QBQ5xHNBuRlslBXLIJzniWYh4cDTxBh4RAfq wQmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=AmowLCpN6qp8cTS56xEI0bn7XU3MBnkI/ad4PCmHu2o=; b=LXvYLlnBEiB7wYfo8j+FwVjSrdQqu1NXb2lQarXsPSDl6H68mxlXSc72Mq++m3PRCZ Aq2S/FQ+r1+91WH9gTMFqlVnrGzwa/7LxBO5PGvrJftWo1MWIXq1EhMwEKbMDvS1LDDI PObh6vi3Cx+ybSsM+jpBZkk25fjCUxmKPd4GEuHJcq2uDsFcJGv0rip6052Hwf8XMeFX arVHz41JfOwZHZribW/w737o4hExoJXGfccSCmUmV0O34EYMfYHnu+aLew3Yb8Yo+hBs vhCIzHSC8G4/nFc/pTzw535PS2kS5FkdwICpUiA16XR5/X/cfjO3Bz8cTjPiV2L7K39j s0mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oIai9uuC; dkim=pass header.i=@codeaurora.org header.s=default header.b=U3g6ucIs; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si9963928plg.390.2019.01.28.11.17.53; Mon, 28 Jan 2019 11:18:08 -0800 (PST) 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=@codeaurora.org header.s=default header.b=oIai9uuC; dkim=pass header.i=@codeaurora.org header.s=default header.b=U3g6ucIs; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728132AbfA1TPx (ORCPT + 99 others); Mon, 28 Jan 2019 14:15:53 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:48478 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727128AbfA1TPw (ORCPT ); Mon, 28 Jan 2019 14:15:52 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 72B1060F91; Mon, 28 Jan 2019 19:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548702951; bh=yZSdMMQsRjd1YjqkjkSmmTSz2cf/QMQE0+Krewzebao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oIai9uuCWexslqJS299BNB0YH4vyEnPKVs7m+7XqG5jYCPFdroLbpK6u9xNsxfZuA YkOyV4MCUV73lfU8/hVrJfkaFkJKv+XOVAo4H44vp8n8tBbjvpg4hNQ89XLScoVY+G SkAPQVsy0keNRPiZZHvIRBYPU1tMKFdvSVVEhb5M= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 04FDC60F81; Mon, 28 Jan 2019 19:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548702929; bh=yZSdMMQsRjd1YjqkjkSmmTSz2cf/QMQE0+Krewzebao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U3g6ucIszJH824QzcqJhKX2TigFBUl5J1I0YXFz9GtVPX8djXcYcII4ip9+9ySaG2 OCnEsA5Guy8kAwotXY1pe8X40G3YbzaDNm8TVYVBdKlMigTD3l8OF7cZaoSLE9RHTC Buo7yVpElwuhDGDyP81nkU/M1WYutr6gIY6QwD8I= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 04FDC60F81 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=saiprakash.ranjan@codeaurora.org From: Sai Prakash Ranjan To: Rob Herring , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Leo Yan , Alexander Shishkin , Andy Gross , David Brown , Vivek Gautam , Jeffrey Hugo , Doug Anderson , Stephen Boyd , Bjorn Andersson , devicetree@vger.kernel.org, Mark Rutland , Marc Gonzalez Cc: Rajendra Nayak , Sibi Sankar , Tingwei Zhang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Sai Prakash Ranjan Subject: [PATCHv5 6/7] coresight: debug: Add Unique Component Identifier (UCI) table Date: Tue, 29 Jan 2019 00:44:03 +0530 Message-Id: <1019e6fed1ade6a580f01df9b3f70c2a9df5b3be.1548419933.git.saiprakash.ranjan@codeaurora.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add UCI table and a helper macro for coresight CPU debug module. This patch adds the UCI entries for Krypo CPUs found on MSM8996 which shares the same PIDs as ETMs. Without this, below error is observed on MSM8996: [ 5.429867] OF: graph: no port node found in /soc/debug@3810000 [ 5.429938] coresight-etm4x: probe of 3810000.debug failed with error -22 [ 5.435415] coresight-cpu-debug 3810000.debug: Coresight debug-CPU0 initialized [ 5.446474] OF: graph: no port node found in /soc/debug@3910000 [ 5.448927] coresight-etm4x: probe of 3910000.debug failed with error -22 [ 5.454681] coresight-cpu-debug 3910000.debug: Coresight debug-CPU1 initialized [ 5.487765] OF: graph: no port node found in /soc/debug@3a10000 [ 5.488007] coresight-etm4x: probe of 3a10000.debug failed with error -22 [ 5.493024] coresight-cpu-debug 3a10000.debug: Coresight debug-CPU2 initialized [ 5.501802] OF: graph: no port node found in /soc/debug@3b10000 [ 5.512901] coresight-etm4x: probe of 3b10000.debug failed with error -22 [ 5.513192] coresight-cpu-debug 3b10000.debug: Coresight debug-CPU3 initialized Also add a helper macro to make adding CPU PIDs easier similar to ETM4X driver. Signed-off-by: Sai Prakash Ranjan --- This patch depends on UCI support by Mike Leach in below link: https://lore.kernel.org/lkml/20190121233151.13363-2-mike.leach@linaro.org/ --- .../hwtracing/coresight/coresight-cpu-debug.c | 41 +++++++++++++------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c index 45b2460f3166..a126ed0b9a76 100644 --- a/drivers/hwtracing/coresight/coresight-cpu-debug.c +++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c @@ -655,20 +655,35 @@ static int debug_remove(struct amba_device *adev) return 0; } +#define DEBUG_AMBA_ID(pid) \ + { \ + .id = pid, \ + .mask = 0x000fffff, \ + } + +static struct amba_cs_uci_id uci_id_debug[] = { + { + /* CPU Debug UCI data */ + .devarch = 0x47706a15, + .devarch_mask = 0xfff0ffff, + .devtype = 0x00000015, + } +}; + +#define DEBUG_AMBA_UCI_ID(pid) \ + { \ + .id = pid, \ + .mask = 0x000fffff, \ + .data = uci_id_debug, \ + } + static const struct amba_id debug_ids[] = { - { /* Debug for Cortex-A53 */ - .id = 0x000bbd03, - .mask = 0x000fffff, - }, - { /* Debug for Cortex-A57 */ - .id = 0x000bbd07, - .mask = 0x000fffff, - }, - { /* Debug for Cortex-A72 */ - .id = 0x000bbd08, - .mask = 0x000fffff, - }, - { 0, 0 }, + DEBUG_AMBA_ID(0x000bbd03), /* Cortex-A53 */ + DEBUG_AMBA_ID(0x000bbd07), /* Cortex-A57 */ + DEBUG_AMBA_ID(0x000bbd08), /* Cortex-A72 */ + DEBUG_AMBA_UCI_ID(0x000f0205), /* Qualcomm Kryo */ + DEBUG_AMBA_UCI_ID(0x000f0211), /* Qualcomm Kryo */ + {}, }; static struct amba_driver debug_driver = { -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation