From patchwork Wed Mar 20 18:49:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 160701 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp625416jan; Wed, 20 Mar 2019 11:50:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl2mMrk+uatpAcCHfjaDJArydfvB1wlr0w+GwwdalYfi6jWkYB6KOpqOKIL+4UxOeKQSt7 X-Received: by 2002:a17:902:7590:: with SMTP id j16mr9540561pll.304.1553107805850; Wed, 20 Mar 2019 11:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553107805; cv=none; d=google.com; s=arc-20160816; b=sVR31AhBQzm1qwRUZ5trQwtVUBhUn0EqkSTF2tcAePHHMZQHEoG0wGd6X0jutnLU3q 4XHcYEMZQbml6k+jvF1otNAIG1SERhgLBrwNhAKKtB4zndVnxmd3qTBn1ZZ06R7jlD6O kyaOfhU2K3xjzJRyNnfm+N4ItU9XETBkzmHkFx3ux0Q2b9oEuGqlkUGl3sZS7WOBhkWB otVQqKBbIOpIeqqdpQY3ren9l5vWaxjHgDi1Q4xiz+Eh4lV9spr9pfD7xyDfTDKT4D0i Uzxt7HHj1sNPTtZqYLxVX6P+fVdNwjvaPPPv8U0o7J2+h0KXE0uS2FPTrH4tByEe7SNp Gh3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=vT2R5P0jJQ7Kq5De+bNnU5KF2/wm+4bQBt1uk2EMVQI=; b=EFQDXDM8BUy7DTdzPoa93g9juozoVs1SiTYjjnG7pzlKJi+qb0qRXtyb5ugyYFv1AD ELtg/JKdoDx4frnKte+803W5lHrBVThjlKkcwSXFUSSaC9nyI9vflpSXVRiGpfAQzdQJ L0QOLLGhobLTQd7ftAZYX+wHjO43M8+qtYa09rVfF9ne/pQVOnTgNNepSZmcVKqNnlEr Or9DYRiWsPxIc8QHwnXvdI0Is3XVj4W8KFqXNckBQY1MWWP/wY2C8KkTQxD4d79070FX Eh7vZ9Xm8OQjtRjoO7KvwG9WUuyn8MjjtpsRtieJAoSmtU6dDXMKOT1ER7ayvcRYPbL+ auQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-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 d22si2436956plr.37.2019.03.20.11.50.05; Wed, 20 Mar 2019 11:50:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727099AbfCTSuE (ORCPT + 9 others); Wed, 20 Mar 2019 14:50:04 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:44764 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727062AbfCTSuE (ORCPT ); Wed, 20 Mar 2019 14:50:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F1C96A78; Wed, 20 Mar 2019 11:50:03 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 771EB3F59C; Wed, 20 Mar 2019 11:50:02 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, coresight@lists.linaro.org, mike.leach@linaro.org, robert.walker@arm.com, Suzuki K Poulose , "Rafael J. Wysocki" Subject: [PATCH 00/25] coresight: Support for ACPI bindings Date: Wed, 20 Mar 2019 18:49:17 +0000 Message-Id: <1553107783-3340-1-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This series adds the support for CoreSight devices on ACPI based platforms. The device connections are encoded as _DSD graph property[0], with CoreSight specific extensions to indicate the direction of data flow as described in [1]. Components attached to CPUs are listed as child devices of the corresponding CPU, removing explicit links to the CPU like we do in the DT. As a prepartion for the ACPI support, we merge the driver for dynamic and non-programmable replicators. We introduce platform independent helpers to parse the platform supplied information. Thus we rename the platform handling code from: of_coresight.c => coresight-platform.c The CoreSight driver creates shadow devices that appear on the Coresight bus, in addition to the real devices (e.g, AMBA bus devices). The name of these devices match the real device. This makes the device name a bit cryptic for ACPI platform. So this series also introduces a generic platform agnostic device naming scheme for the shadow Coresight devices. Towards this we also make changes to the way we lookup devices to resolve the connections, as we can't use the names to identify the devices. So, we use the "fwnode_handle" of the real device for the device lookups. Towards that we clean up the drivers to keep track of the "CoreSight" device rather than the "real" device. However, all real operations, like DMA allocation, Power management etc. must be performed on the real device which is the parent of the shadow device. Finally we add the support for parsing the ACPI platform data. The power management support is missing in the ACPI (and this is not specific to CoreSight). The firmware must ensure that the respective power domains are turned on. Applies on v5.1-rc1 Tested on a Juno-r0 board with ACPI bindings patch (Patch 26/25) added on top of [2]. You would need to make sure that the debug power domain is turned on before the Linux kernel boots. (e.g, connect the DS-5 to the Juno board while at UEFI). arm32 code is only compile tested. [0] ACPI Device Graphs using _DSD (Not available online yet, approved but awaiting publish and eventually should be linked at). https://uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel-1_1.htm [1] https://developer.arm.com/docs/den0067/latest/acpi-for-coresighttm-10-platform-design-document [2] https://github.com/tianocore/edk2-platforms.git Suzuki K Poulose (25): coresight: tmc: Report DMA setup failures coresight: dynamic-replicator: Clean up error handling coresight: replicator: Prepare for merging with dynamic-replicator coresight: dynamic-replicator: Prepare for merging with static replicator coresight: Merge the static and dynamic replicator drivers coresight: funnel: Clean up device book keeping coresight: replicator: Cleanup device tracking coresight: tmc: Clean up device specific data coresight: catu: Cleanup device specific data coresight: tpiu: Clean up device specific data coresight: stm: Cleanup device specific data coresight: etm: Clean up device specific data coresight: etb10: Clean up device specific data coresight: Rename of_coresight to coresight-platform coresight: etm3x: Rearrange cp14 access detection coresight: stm: Rearrange probing the stimulus area coresight: tmc-etr: Rearrange probing default buffer size coresight: Introduce generic platform data helper coresight: Make device to CPU mapping generic coresight: platform: Use fwnode handle for device search coresight: Use fwnode handle instead of device names coresight: Use platform agnostic names coresight: stm: ACPI support for parsing stimulus base coresight: Support for ACPI bindings coresight: acpi: Support for components drivers/acpi/acpi_amba.c | 9 + drivers/hwtracing/coresight/Kconfig | 8 - drivers/hwtracing/coresight/Makefile | 4 +- drivers/hwtracing/coresight/coresight-catu.c | 38 +- drivers/hwtracing/coresight/coresight-catu.h | 1 - drivers/hwtracing/coresight/coresight-cpu-debug.c | 3 +- .../coresight/coresight-dynamic-replicator.c | 255 -------- drivers/hwtracing/coresight/coresight-etb10.c | 23 +- drivers/hwtracing/coresight/coresight-etm3x.c | 23 +- drivers/hwtracing/coresight/coresight-etm4x.c | 19 +- drivers/hwtracing/coresight/coresight-funnel.c | 27 +- drivers/hwtracing/coresight/coresight-platform.c | 723 +++++++++++++++++++++ drivers/hwtracing/coresight/coresight-priv.h | 2 + drivers/hwtracing/coresight/coresight-replicator.c | 255 ++++++-- drivers/hwtracing/coresight/coresight-stm.c | 119 +++- drivers/hwtracing/coresight/coresight-tmc-etr.c | 26 +- drivers/hwtracing/coresight/coresight-tmc.c | 71 +- drivers/hwtracing/coresight/coresight-tpiu.c | 29 +- drivers/hwtracing/coresight/coresight.c | 77 ++- drivers/hwtracing/coresight/of_coresight.c | 297 --------- include/linux/coresight.h | 43 +- 21 files changed, 1287 insertions(+), 765 deletions(-) delete mode 100644 drivers/hwtracing/coresight/coresight-dynamic-replicator.c create mode 100644 drivers/hwtracing/coresight/coresight-platform.c delete mode 100644 drivers/hwtracing/coresight/of_coresight.c ACPI bindings for Juno-r0 (applies on [2] above) Suzuki K Poulose (1): edk2-platform: juno: Update ACPI CoreSight Bindings Platform/ARM/JunoPkg/AcpiTables/Dsdt.asl | 241 +++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) Cc: "Rafael J. Wysocki" -- 2.7.4