From patchwork Fri Aug 8 05:28:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 4693971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CDAFCC0338 for ; Fri, 8 Aug 2014 05:41:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10E9E2016C for ; Fri, 8 Aug 2014 05:41:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C64820158 for ; Fri, 8 Aug 2014 05:41:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XFcrx-0004kX-Bx; Fri, 08 Aug 2014 05:37:37 +0000 Received: from imta21.fe.bosch.de ([139.15.243.226]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XFcrt-0004ip-K2 for linux-arm-kernel@lists.infradead.org; Fri, 08 Aug 2014 05:37:35 +0000 Received: from smtp6-v.fe.bosch.de (imta23.fe.bosch.de [139.15.243.227]) by imta21.fe.bosch.de (Postfix) with ESMTP id 6F3E0C043C for ; Fri, 8 Aug 2014 07:30:00 +0200 (CEST) Received: from vsmta14.fe.internet.bosch.com (unknown [10.4.98.54]) by imta23.fe.bosch.de (Postfix) with ESMTP id EE552158020A; Fri, 8 Aug 2014 07:28:52 +0200 (CEST) Received: from localhost (vsgw22.fe.internet.bosch.com [10.4.98.11]) by vsmta14.fe.internet.bosch.com (Postfix) with SMTP id BEE41A40E3E; Fri, 8 Aug 2014 07:28:52 +0200 (CEST) Received: from FE-HUB1000.de.bosch.com (10.4.103.107) by fe-hub02.de.bosch.com (10.3.144.91) with Microsoft SMTP Server (TLS) id 8.3.348.2; Fri, 8 Aug 2014 07:28:49 +0200 Received: from [10.34.211.33] (10.34.211.33) by FE-HUB1000.de.bosch.com (10.4.103.107) with Microsoft SMTP Server id 14.3.195.1; Fri, 8 Aug 2014 07:28:48 +0200 Message-ID: <53E4600C.4030505@de.bosch.com> Date: Fri, 8 Aug 2014 07:28:44 +0200 From: Dirk Behme Organization: Robert Bosch Car Multimedia GmbH User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Subject: Re: [PATCH 07/10 v3] coresight-etm: add CoreSight ETM/PTM driver References: <1407435706-19441-1-git-send-email-mathieu.poirier@linaro.org> <1407435706-19441-8-git-send-email-mathieu.poirier@linaro.org> In-Reply-To: <1407435706-19441-8-git-send-email-mathieu.poirier@linaro.org> X-Originating-IP: [10.34.211.33] X-TM-AS-MML: disable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140807_223733_927931_E6C298AD X-CRM114-Status: GOOD ( 11.46 ) X-Spam-Score: -5.0 (-----) Cc: john.stultz@linaro.org, daniel.thompson@linaro.org, robbelibobban@gmail.com, linux@arm.linux.org.uk, patches@linaro.org, Tony.Armitstead@arm.com, linus.walleij@linaro.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, varshney@ti.com, r.sengupta@samsung.com, arve@android.com, jonas.svennebring@avagotech.com, james.king@linaro.org, Al.Grant@arm.com, marcin.jabrzyk@gmail.com, panchaxari.prasannamurthy@linaro.org, linux-arm-kernel@lists.infradead.org, pratikp@codeaurora.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 07.08.2014 20:21, mathieu.poirier@linaro.org wrote: > From: Pratik Patel > > This driver manages CoreSight ETM (Embedded Trace Macrocell) that > supports processor tracing. Currently supported version are ARM > ETMv3.x and PTM1.x. > > Signed-off-by: Pratik Patel > Signed-off-by: Panchaxari Prasannamurthy > Signed-off-by: Mathieu Poirier > --- ... > +static struct amba_id etm_ids[] = { > + { /* ETM 3.3 */ > + .id = 0x0003b921, > + .mask = 0x0003ffff, > + }, > + { /* ETM 3.5 */ > + .id = 0x0003b956, > + .mask = 0x0003ffff, > + }, > + { /* PTM */ > + .id = 0x0003b95f, > + .mask = 0x0003ffff, > + }, > + { 0, 0}, Maybe you like to add PTM 1.0 [1] here, too? Best regards Dirk [1] diff --git a/drivers/coresight/coresight-etm.c b/drivers/coresight/coresight-etm.c index 6f5dbc7..a7a08e6 100644 --- a/drivers/coresight/coresight-etm.c +++ b/drivers/coresight/coresight-etm.c @@ -1284,6 +1284,8 @@ static bool etm_arch_supported(u8 arch) break; case ETM_ARCH_V3_5: break; + case PFT_ARCH_V1_0: + break; case PFT_ARCH_V1_1: break; default: @@ -1418,6 +1420,7 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id) put_online_cpus(); if (etm_arch_supported(drvdata->arch) == false) { + dev_err(dev, "ETM arch 0x%02x not supported\n", drvdata->arch); ret = -EINVAL; goto err_arch_supported; } @@ -1472,11 +1475,15 @@ static struct amba_id etm_ids[] = { .id = 0x0003b921, .mask = 0x0003ffff, }, + { /* PTM 1.0 */ + .id = 0x0003b950, + .mask = 0x0003ffff, + }, { /* ETM 3.5 */ .id = 0x0003b956, .mask = 0x0003ffff, }, - { /* PTM */ + { /* PTM 1.1 */ .id = 0x0003b95f, .mask = 0x0003ffff, }, diff --git a/include/linux/coresight.h b/include/linux/coresight.h index a19420e..596ec94 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -32,6 +32,7 @@ #define ETM_ARCH_V3_3 (0x23) #define ETM_ARCH_V3_5 (0x25) +#define PFT_ARCH_V1_0 (0x30) #define PFT_ARCH_V1_1 (0x31) #define CORESIGHT_UNLOCK (0xC5ACCE55)