linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/36] coresight: Support for ACPI bindings
@ 2019-04-15 16:03 Suzuki K Poulose
  2019-04-15 16:03 ` [PATCH v2 01/36] coresight: Fix freeing up the coresight connections Suzuki K Poulose
                   ` (36 more replies)
  0 siblings, 37 replies; 74+ messages in thread
From: Suzuki K Poulose @ 2019-04-15 16:03 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, coresight, mathieu.poirier, mike.leach, rjw,
	robert.walker, Suzuki K Poulose


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.


The majority of the series cleans up the driver and prepares the subsystem
for platform agnostic firwmare probing, naming scheme, searching etc.

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.

The last 3 patches in the series also exposes the device connections
via sysfs by symlinks to indicate the trace data paths.

Patches 01 - 05 : General cleanups and a fix.
Patches 06 - 13 : Cleanup the drivers for tracking the CoreSight device
		  instead of the parent device.
Patches 14 - 20 : Introduce platform agnostic APIs for firmware data
		  probing.
Patches 21 - 26 : Prepare for reusing and freeing up the platform data
		  description for device connections and references.
Patches 27 - 30 : Use fwnode handles and introduce generic naming scheme.
Patches 31 - 33 : Introduce ACPI bindings support
Patches 34 - 36 : RFC - expose device connections via sysfs


Applies on Mathieu's coresight/next tree.

Tested on a Juno-r0 board with ACPI bindings patch (Patch 37/36) 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


Changes since v1:

 [ http://lists.infradead.org/pipermail/linux-arm-kernel/2019-March/639963.html ]

  - Dropped the replicator driver merge changes as they were pulled already.
  - Cleanups for Power management in the drivers.
  - Reuse platform description for connection information. Also introduce
    routines to clean up the platform description to make sure we drop
    the references (fwnode_handle).
  - Add RFC patches for exposing the device-links via sysfs.
  - Drop tracking the device in favour of coresight_device.
  - Name etb10 as "etb"
  - Fix other comments in v1.
  - Use a generic helper for searching with fwnode_handle rather than adding
    one for CoreSight.


Suzuki K Poulose (36):
  coresight: Fix freeing up the coresight connections
  coresight: etb10: Cleanup power management
  coresight: tpiu: Cleanup power management
  coresight: catu: Cleanup power management
  coresight: tmc: Cleanup power management
  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: platform: Make memory allocation helper generic
  coresight: Introduce generic platform data helper
  coresight: Make device to CPU mapping generic
  coresight: Remove cpu field from platform data
  coresight: Remove name from platform description
  coresight: Cleanup coresight_remove_conns
  coresight: Reuse platform data structure for connection tracking
  coresight: Rearrange platform data probing
  coresight: Add support for releasing platform specific data
  drivers: Add a generic helper to match device by fwnode handle
  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
  [RFC] coresight: Pass coresight_device for
    coresight_release_platform_data
  [RFC] coresight: add return value for fixup connections
  [RFC] coresight: Expose device connections via sysfs

 drivers/acpi/acpi_amba.c                           |   9 +
 drivers/base/devcon.c                              |   5 -
 drivers/base/property.c                            |   6 +
 drivers/hwtracing/coresight/Makefile               |   3 +-
 drivers/hwtracing/coresight/coresight-catu.c       |  43 +-
 drivers/hwtracing/coresight/coresight-catu.h       |   1 -
 drivers/hwtracing/coresight/coresight-cpu-debug.c  |   3 +-
 drivers/hwtracing/coresight/coresight-etb10.c      |  65 +-
 drivers/hwtracing/coresight/coresight-etm.h        |   6 +-
 .../hwtracing/coresight/coresight-etm3x-sysfs.c    |  12 +-
 drivers/hwtracing/coresight/coresight-etm3x.c      |  45 +-
 drivers/hwtracing/coresight/coresight-etm4x.c      |  36 +-
 drivers/hwtracing/coresight/coresight-etm4x.h      |   2 -
 drivers/hwtracing/coresight/coresight-funnel.c     |  27 +-
 drivers/hwtracing/coresight/coresight-platform.c   | 740 +++++++++++++++++++++
 drivers/hwtracing/coresight/coresight-priv.h       |   3 +
 drivers/hwtracing/coresight/coresight-replicator.c |  37 +-
 drivers/hwtracing/coresight/coresight-stm.c        | 110 ++-
 drivers/hwtracing/coresight/coresight-tmc-etf.c    |   9 +-
 drivers/hwtracing/coresight/coresight-tmc-etr.c    |  44 +-
 drivers/hwtracing/coresight/coresight-tmc.c        | 100 +--
 drivers/hwtracing/coresight/coresight-tmc.h        |   1 -
 drivers/hwtracing/coresight/coresight-tpiu.c       |  30 +-
 drivers/hwtracing/coresight/coresight.c            | 291 ++++++--
 drivers/hwtracing/coresight/of_coresight.c         | 297 ---------
 include/linux/coresight.h                          |  65 +-
 include/linux/property.h                           |   1 +
 27 files changed, 1378 insertions(+), 613 deletions(-)
 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(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2019-05-03 17:13 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-15 16:03 [PATCH v2 00/36] coresight: Support for ACPI bindings Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 01/36] coresight: Fix freeing up the coresight connections Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 02/36] coresight: etb10: Cleanup power management Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 03/36] coresight: tpiu: " Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 04/36] coresight: catu: " Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 05/36] coresight: tmc: " Suzuki K Poulose
2019-04-17 20:03   ` Mathieu Poirier
2019-04-23  9:33     ` Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 06/36] coresight: funnel: Clean up device book keeping Suzuki K Poulose
2019-04-17 20:14   ` Mathieu Poirier
2019-04-15 16:03 ` [PATCH v2 07/36] coresight: replicator: Cleanup device tracking Suzuki K Poulose
2019-04-17 20:34   ` Mathieu Poirier
2019-04-15 16:03 ` [PATCH v2 08/36] coresight: tmc: Clean up device specific data Suzuki K Poulose
2019-04-17 21:23   ` Mathieu Poirier
2019-05-03 17:13     ` Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 09/36] coresight: catu: Cleanup " Suzuki K Poulose
2019-04-17 21:40   ` Mathieu Poirier
2019-04-15 16:03 ` [PATCH v2 10/36] coresight: tpiu: Clean up " Suzuki K Poulose
2019-04-17 21:41   ` Mathieu Poirier
2019-04-15 16:03 ` [PATCH v2 11/36] coresight: stm: Cleanup " Suzuki K Poulose
2019-04-18 16:50   ` Mathieu Poirier
2019-04-15 16:03 ` [PATCH v2 12/36] coresight: etm: Clean up " Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 13/36] coresight: etb10: " Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 14/36] coresight: Rename of_coresight to coresight-platform Suzuki K Poulose
2019-04-18 17:22   ` Mathieu Poirier
2019-04-15 16:03 ` [PATCH v2 15/36] coresight: etm3x: Rearrange cp14 access detection Suzuki K Poulose
2019-04-15 16:03 ` [PATCH v2 16/36] coresight: stm: Rearrange probing the stimulus area Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 17/36] coresight: tmc-etr: Rearrange probing default buffer size Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 18/36] coresight: platform: Make memory allocation helper generic Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 19/36] coresight: Introduce generic platform data helper Suzuki K Poulose
2019-04-22 18:09   ` Mathieu Poirier
2019-04-23  9:43     ` Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 20/36] coresight: Make device to CPU mapping generic Suzuki K Poulose
2019-04-18 18:14   ` Mathieu Poirier
2019-04-15 16:04 ` [PATCH v2 21/36] coresight: Remove cpu field from platform data Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 22/36] coresight: Remove name from platform description Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 23/36] coresight: Cleanup coresight_remove_conns Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 24/36] coresight: Reuse platform data structure for connection tracking Suzuki K Poulose
2019-04-22 17:06   ` Mathieu Poirier
2019-04-15 16:04 ` [PATCH v2 25/36] coresight: Rearrange platform data probing Suzuki K Poulose
2019-04-22 17:16   ` Mathieu Poirier
2019-04-25 17:12     ` Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 26/36] coresight: Add support for releasing platform specific data Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 27/36] drivers: Add a generic helper to match device by fwnode handle Suzuki K Poulose
2019-04-16 10:20   ` Rafael J. Wysocki
2019-04-16 10:34     ` Suzuki K Poulose
2019-04-16 10:45       ` Rafael J. Wysocki
2019-04-16 10:39   ` [RESEND][PATCH " Suzuki K Poulose
2019-04-16 10:48     ` Rafael J. Wysocki
2019-04-16 10:56       ` Suzuki K Poulose
2019-04-18 14:39         ` Rafael J. Wysocki
2019-04-18 15:18           ` Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 28/36] coresight: platform: Use fwnode handle for device search Suzuki K Poulose
2019-04-23 16:17   ` Mathieu Poirier
2019-04-15 16:04 ` [PATCH v2 29/36] coresight: Use fwnode handle instead of device names Suzuki K Poulose
2019-04-23 16:14   ` Mathieu Poirier
2019-04-15 16:04 ` [PATCH v2 30/36] coresight: Use platform agnostic names Suzuki K Poulose
2019-04-23 17:38   ` Mathieu Poirier
2019-04-15 16:04 ` [PATCH v2 31/36] coresight: stm: ACPI support for parsing stimulus base Suzuki K Poulose
2019-04-23 17:59   ` Mathieu Poirier
2019-04-25 16:17     ` Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 32/36] coresight: Support for ACPI bindings Suzuki K Poulose
2019-04-25 16:50   ` Mathieu Poirier
2019-04-25 17:30     ` Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 33/36] coresight: acpi: Support for components Suzuki K Poulose
2019-04-25 17:45   ` Mathieu Poirier
2019-04-29  8:54     ` Suzuki K Poulose
2019-04-15 16:04 ` [PATCH v2 34/36] [RFC] coresight: Pass coresight_device for coresight_release_platform_data Suzuki K Poulose
2019-04-29 17:40   ` Mathieu Poirier
2019-04-15 16:04 ` [PATCH v2 35/36] [RFC] coresight: add return value for fixup connections Suzuki K Poulose
2019-04-29 17:44   ` Mathieu Poirier
2019-04-15 16:04 ` [PATCH v2 36/36] [RFC] coresight: Expose device connections via sysfs Suzuki K Poulose
2019-04-29 20:50   ` Mathieu Poirier
2019-04-15 16:04 ` [TEST PATCH 37/36][EDK2] edk2-platform: juno: Update ACPI CoreSight Bindings Suzuki K Poulose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).